C# WCF客户端-如何处理SOAP服务器1.1使用SOAP 1.2内容类型发送响应

C# WCF客户端-如何处理SOAP服务器1.1使用SOAP 1.2内容类型发送响应,c#,wcf,soap,soap-client,C#,Wcf,Soap,Soap Client,我的程序需要从SOAP1.1中的第三方web服务进行查询,我使用VS2013的服务引用从WSDL为它创建web服务 由于它是SOAP 1.1 Web服务,因此我在app.config中使用了basicHttpBinding,但是当我运行该程序时,它会抛出错误: The content type application/soap+xml;charset=utf-8 of the response message does not match the content type of the bind

我的程序需要从SOAP1.1中的第三方web服务进行查询,我使用VS2013的服务引用从WSDL为它创建web服务

由于它是SOAP 1.1 Web服务,因此我在app.config中使用了basicHttpBinding,但是当我运行该程序时,它会抛出错误:

The content type application/soap+xml;charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header/><SOAP-ENV:Body><memberEnquiryResponse><errMsg>144859327293915198337416aFD&amp;EQshadfq2w</errMsg><result>0</result><member><name>test2</name><phone>85297350833</phone><securityCode>9702</securityCode><memberID>151983374</memberID></member><points>10000</points><pointExpiry>201701312359</pointExpiry><accTransactionAmount>0.00</accTransactionAmount><lastTransactionDatetime>-</lastTransactionDatetime><coupons><coupon><id>159</id><type>2</type><netOff>20</netOff><offType>0</offType><itemCode>DIS:</itemCode><name>Sandwiches (receipt discount $)</name><expiry>20161113</expiry><description>Coupon Description (Chi)</description></coupon><coupon><id>158</id><type>1</type><netOff>10</netOff><offType>1</offType><name>Soup (item discount %)</name><expiry>20161113</expiry><description>Coupon Description (Chi)</description></coupon><coupon><id>160</id><type>2</ty'.

内容类型应用程序/soap+xml;响应消息的charset=utf-8与绑定的内容类型(text/xml;charset=utf-8)不匹配。如果使用自定义编码器,请确保正确实现IsContentTypeSupported方法。响应的前1024个字节是:“1448593272933915198337416AFD&;EQshadfq2w0test2852973508339702151983374100002017013123590.00-1592200DIS:三明治(收据折扣美元)20161113优惠券说明(Chi)15810110汤(项目折扣%)20161113优惠券说明(Chi)1602您尝试过改用
wsHttpBinding
吗?它支持SOAP 1.2。@Tim尝试了wsHttpBinding,但它抛出的错误是SOAP 1.1,wsHttpBinding是SOAP 1.2,并且不匹配
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" />