【发布时间】:2018-03-06 00:31:09
【问题描述】:
我正在尝试使用 wsHttpBinding 调用 SOAP1.2 服务。服务接受拒绝默认的 Soap12WSAddressing10 消息版本。它只接受 SOAP12。
我从 Internet 搜索中得到的一个建议是在自定义绑定中创建 TextMessageEncodingElement。
如何使用代码或配置来完成?
WSHttpBinding myBinding = new WSHttpBinding();
myBinding.Security.Mode = SecurityMode.Transport;
myBinding.Security.Transport.ClientCredentialType =
HttpClientCredentialType.Certificate;
//MessageVersion = SOAP12
在使用自定义 wsBinding 时,也没有建议的占位符来指定消息版本。
<wsHttpBinding>
<binding name="customWS">
<security mode="Transport">
<message clientCredentialType="Certificate"></message>
</security>
</binding>
</wsHttpBinding>
【问题讨论】:
标签: wcf wshttpbinding