Forum Discussion

bsheward's avatar
bsheward
New Contributor
14 years ago

SOAP 1.2 .Net WCF Service expecting text/xml content?

Hi,

I have imported a WSDL file from a .Net WCF web service. If I right-click on the entry within soapUI 3.6 and select "Show Interface Viewer", I can clearly see SOAP Version: SOAP 1.2.

If I open a request against that service, and view the raw output, I see:

POST http://... HTTP/1.1
Accept-Encoding: gzip, deflate
Content-Type: application/soap+xml; charset=UTF-8; action="http://tempuri.org/..."


However, if I run the request and check the raw response, I see:

HTTP/1.1 415 Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'.
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET


As I understand it, (according to http://hadleynet.org/marc/whatsnew.html#S3.7.1) , A SOAP 1.2 service should be expecting type 'application/soap+xml'.

Has anyone else experienced this and know of a workaround?

Thanks and Regards,

Barry

1 Reply

  • r3nrut's avatar
    r3nrut
    Occasional Contributor
    I had a similar problem. It was because the service I was testing had support for both SOAP 1.1 and SOAP 1.2. For the requests that used the SOAP 1.1 standard I had to specify that in the interface properties for the BasicHttpBinding and SOAP 1.2 for the WSHttpBinding. This is also important when using Test Runner to make sure you're using the correct binding for the requests you have otherwise you'll get unmatched content-types.

    http://www.w3schools.com/soap/soap_httpbinding.asp