Reputation: 31
I am calling a Web Service using BizTalk Server 2010 and WCF-WSHttp adapter. The Web service is published on HTTPS and the requests must be sent using WS-Security signed with a certificate.
These are the adapter configuration:
General -> Transport -> Type: WCF-WSHttp
WCF-WSHttp Properties:
General -> Adress: https service end point.
General -> Security -> Security Mode: TransportWithMessageCredential
General -> Security -> Message Security -> Message Client Credential type: Certificate
General -> Security -> Message Security -> Algoritm Suite: 256
General -> Security -> Negotiate Service Credential: Yes
General -> Security -> Establish Security Context: Yes
General -> Security -> Client Certificate -> ThumbPrint: Certificate used to sign the message.
I don't put anything in the SOAP Action Header text box of the General Tab.
When I call the service, I obtain the following error message:
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)
It seems that the remote server doesn't understand the SOAP client message or the SOAP message is not being well formed (it isn't a SOAP Message or it is not being signned).
Could someone help me?
Upvotes: 0
Views: 915
Reputation: 134
Based on the translation it looks like the content type being sent is incorrect for what the destination service expects. It looks like you are calling an Apache Axis service so you may need to build an endpoint behavior to handle processing the response from Apache. On other threads, I have heard of people needing to customize what is sent because the destination service is not WCF.
Upvotes: 0