Ошибка вызова службы WS-Security + SSL с адаптером WCF-WSHttp BizTalk 2010 - PullRequest
0 голосов
/ 08 февраля 2012

Я звоню в веб-службу, используя BizTalk Server 2010 и адаптер WCF-WSHttp. Веб-служба публикуется по протоколу HTTPS, и запросы должны отправляться с использованием WS-Security, подписанного сертификатом.

Это конфигурация адаптера:

Общие сведения -> Транспорт -> Тип: WCF-WSHttp

WCF-WSHttp Свойства:

Общие сведения -> Адрес: конечная точка службы https.

Общие -> Безопасность -> Режим безопасности: TransportWithMessageCredential

Общее -> Безопасность -> Безопасность сообщений -> Тип учетных данных клиента сообщений: Сертификат

Общее -> Безопасность -> Безопасность сообщений -> Algoritm Suite: 256

Общее -> Безопасность -> Согласовать учетные данные службы: Да

Общее -> Безопасность -> Установить контекст безопасности: Да

Общее -> Безопасность -> Сертификат клиента -> ThumbPrint: Сертификат, используемый для подписи сообщения.

Я ничего не помещаю в текстовое поле SOAP Action Header вкладки General.

Когда я звоню в службу, я получаю следующее сообщение об ошибке:

An error occurred while processing the message, refer to the details section for more information
Message ID: {A3234833-0453-4DCA-BB9C-7AAA9A865B90}
Instance ID: {54417DE1-3E08-4AB4-8BE2-B5565650ECFF}
Error Description: System.ServiceModel.ProtocolException: El tipo de contenido text/xml;charset=utf-8 del mensaje de respuesta no coincide con el tipo de contenido del enlace (application/soap+xml; charset=utf-8). Si usa un codificador personalizado, asegurese de que el método IsContentTypeSupported se implemente correctamente. Los primeros 553 bytes de la respuesta fueron: '<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode>
   <faultstring>no SOAPAction header!</faultstring>
   <detail>
    <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">zefdesw02</ns2:hostname>
   </detail>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>'. ---> System.Net.WebException: Error en el servidor remoto: (500) Error interno del servidor.
   en System.Net.HttpWebRequest.GetResponse()
   en System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
   --- Fin del seguimiento de la pila de la excepción interna ---

Server stack trace:
   en System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
   en System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)
   en System.ServiceModel.Security.TlsnegoTokenProvider.OnOpen(TimeSpan timeout)
   en System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
   en System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   en System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout)
   en System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout)
   en System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
   en System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   en System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)
   en System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   en System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout)
   en System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout)
   en System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout)
   en System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout)
   en System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   en System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   en System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   en System.ServiceModel.Channels.CommunicationObject.Open()

Exception rethrown at [0]:
   en System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   en System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   en System.ServiceModel.ICommunicationObject.Open()
   en Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1& cachedFactory)
   en Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)

Похоже, что удаленный сервер не понимает клиентское сообщение SOAP или сообщение SOAP неправильно сформировано (это не сообщение SOAP или оно не подписано).

Может ли кто-нибудь мне помочь?

1 Ответ

0 голосов
/ 15 марта 2012

Исходя из перевода, похоже, что отправляемый тип контента неверен для ожидаемой службы назначения.Похоже, что вы вызываете службу Apache Axis, поэтому вам может потребоваться создать поведение конечной точки для обработки ответа от Apache.В других потоках я слышал о людях, которым нужно настраивать то, что отправляется, потому что служба назначения не является WCF.

...