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

前端 未结 7 1854
我在风中等你
我在风中等你 2020-11-30 03:16

I\'m having a weird issue when consuming a webservice for a product that my company has bought. The product is called Campaign Commander and it\'s made by a company called

7条回答
  •  天命终不由人
    2020-11-30 03:53

    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:

    
      
        
          
                      
            
          
        
      
    
    

    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.

提交回复
热议问题