wcf - SOAP server 1.1 sending response using content type defined for 1.2? -
i tried sending soap1.2 request server , received following exception
system.servicemodel.communicationexception: envelope version of incoming message (soap11 (http://schemas.xmlsoap.org/soap/envelope/)) not match of encoder (soap12 (http://www.w3.org/2003/05/soap-envelope)). make sure binding configured same version expected messages.
on analyzing traffic through wireshark, see response envelope http://schemas.xmlsoap.org/soap/envelope/ , request envelope http://www.w3.org/2003/05/soap-envelope
again tried sending message same server using soap 1.1 , got following exception
system.servicemodel.protocolexception: content type application/soap +xml of response message not match content type of binding (text/xml; charset=utf-8). if using custom encoder, sure iscontenttypesupported method implemented properly.
based on above 2 logs, can conclude remote server using soap1.1 , sending response using content type defined soap1.2 application/soap+xml? right implementation of soap specification?
code generated using service reference wsdl. following code snippet:
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 soap 1.1
<system.servicemodel> <bindings> <basichttpbinding> <binding name="<>" /> </basichttpbinding> </bindings> <client> <endpoint address="<>" binding="basichttpbinding" bindingconfiguration="<>" contract="<>" name="<>" /> </client> </system.servicemodel>
service binding 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>
Comments
Post a Comment