java soap1.2_SOAP服务器1.1使用为1.2定义的内容类型发送响应?

我尝试向服务器发送SOAP1.2请求并收到以下异常

System.ServiceModel.CommunicationException:传入消息的信封版本(Soap11(http://schemas.xmlsoap.org/soap/envelope/))与编码器的信封版本不匹配(Soap12(http://www.w3) .ORG / 2003/05 / SOAP信封)) . 确保使用与预期消息相同的版本配置绑定 .

我再次尝试使用SOAP 1.1向同一服务器发送消息并获得以下异常

System.ServiceModel.ProtocolException:响应消息的内容类型application / soap xml与绑定的内容类型(text / xml; charset = utf-8)不匹配 . 如果使用自定义编码器,请确保正确实现IsContentTypeSupported方法 .

基于以上2个日志,我可以得出结论远程服务器正在使用SOAP1.1并使用为SOAP1.2定义的内容类型发送响应,即application / soap xml?它是SOAP规范的正确实现吗?

代码是使用WSDL的服务引用生成的 . 以下是代码段:

Test3.ServiceReference1.SoapRqst client = new Test3.ServiceReference1.SoapRqstClient();

RepRequest rqst = new RepRequest();

RepResponse op = client.getReply(rqst);

string responseSting = op.Body.respMsg;

Console.Out.Write(responseSting);

客户端服务模型:

服务绑定对于SOAP 1.1

binding="basicHttpBinding" bindingConfiguration="<>"

contract="<>" name="<>" />

SOAP 1.2的服务绑定

binding="customBinding" bindingConfiguration="<>"

contract="<>" name="<>" />

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值