The content type application/xml;charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8)

后端 未结 8 1273
醉话见心
醉话见心 2020-11-30 10:12

I trying to consume a WCF web service using stand alone application. I am able to view this service using Internet Explorer also able to view in Visual studio service refere

8条回答
  •  死守一世寂寞
    2020-11-30 10:43

    Just in case...
    If you are using SoapUI Mock Service (as the Server), calling it from a C# WCF:

    WCF --> SoapUI MockService
    

    And in this case you are getting the same error:

    The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8).
    

    Edit your Mock Response at SoapUI and add a Header to it:

    In my scenario, this fix the problem.

提交回复
热议问题