Error consuming webservice, content type “application/xop+xml” does not match expected type “text/xml”

For anyone suffering from the same problem; I’ve found a solution for consuming the web service as a Service Reference (WCF). The BasicHttpBinding.MessageEncoding property needs setting to “Mtom”.

Here’s a snippet of the required config setting:

        <binding messageEncoding="Mtom">          

Edit: If you are having the same issue with a custom binding please refer to the answer from @robmzd.

I still haven’t found a solution for consuming it as an old style Web Reference yet.

Leave a Comment