Content Type application/soap+xml; charset=utf-8 was not supported by service

后端 未结 17 2336
长发绾君心
长发绾君心 2020-12-15 02:54

I am getting the error below while trying to add WCF service to WCFTestClient. I went through a number of solutions on the web but I couldn\'t get it to work.

Can

17条回答
  •  温柔的废话
    2020-12-15 03:26

    This error may occur when WCF client tries to send its message using MTOM extension (MIME type application/soap+xml is used to transfer SOAP XML in MTOM), but service is just able to understand normal SOAP messages (it doesn't contain MIME parts, only text/xml type in HTTP request).

    Be sure you generated your client code against correct WSDL.

    In order to use MTOM on server side, change your configuration file adding messageEncoding attribute:

    
    

提交回复
热议问题