wcfsoapuiwshttpbindingbasichttpbindingservice-model

Cannot process the message because the content type 'text/xml;charset=UTF-8' was not the expected type 'application/soap+xml; charset=utf-8'


I got the following error when sending a request from SoapUI client to a WCF service:

Cannot process the message because the content type 'text/xml;charset=UTF-8' was not the expected type 'application/soap+xml; charset=utf-8'


Solution

  • SoapUI uses, by default, soap protocol version 1.2 and the service bind was using basichttpbinding, witch exposes as soap protocol 1.1

    To send requests in soap 1.1, do:

    1. At project tree, binding level see the property pane at the bottom left corner. Change the Soap version property to Soap 1.1

    2. Create new request. Previous created requests forms will still be send data in version 1.1

    Source:https://community.smartbear.com/t5/SoapUI-Pro/how-to-change-SOAP-version-when-updating-binding/td-p/20229