When analyzing traffic through wirehark, I see the response envelope as http://schemas.xmlsoap.org/soap/envelope/ and request the envelope http://www.w3.org/2003/05/soap-envelope
Again I tried to send a message to the same server using SOAP 1.1 and received the following exception
System.ServiceModel.ProtocolException: the application of the content type / soap + xml of the response message does not match the content type of the binding (text / xml; charset = utf-8). When using a custom encoder, make sure that the IsContentTypeSupported Method is implemented correctly.
Based on the above 2 logs, can I conclude that the remote server uses SOAP1.1 and sends a response using the content type defined for SOAP1.2, which is application / soap + xml? Is this the correct implementation of the SOAP specification?
The code was generated using the Service reference from WSDL. The following is a snippet of code:
Test3.ServiceReference1.SoapRqst client = new Test3.ServiceReference1.SoapRqstClient();
RepRequest rqst = new RepRequest();
RepResponse op = client.getReply(rqst);
string responseSting = op.Body.respMsg;
Console.Out.Write(responseSting);
Client Side Service Model:
Service Binding For SOAP 1.1
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="<>" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="<>"
binding="basicHttpBinding" bindingConfiguration="<>"
contract="<>" name="<>" />
</client>
</system.serviceModel>
Service Binding for SOAP 1.2
<system.serviceModel>
<bindings>
<customBinding>
<binding name="">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="<>"
binding="customBinding" bindingConfiguration="<>"
contract="<>" name="<>" />
</client>
source
share