我有一个定义的 wsdl 来支持需要支持 wsaddressing 的soap 1.1 的互操作性。结果,我已经设置了我的服务,因此使用自定义绑定配置了我的 wcf 服务,如下所示。
<customBinding>
<binding name="CustomWsHttpSoap11" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00">
<textMessageEncoding messageVersion="Soap11WSAddressing10"/>
<httpTransport maxReceivedMessageSize="2147483647" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
useDefaultWebProxy="true">
</httpTransport>
</binding>
</customBinding>
<services>
<service behaviorConfiguration="TEST.BattleMountain.TestService"
name="TEST.BattleMountain.TestService">
<endpoint address="" behaviorConfiguration="TestMethod"
binding="customBinding" bindingConfiguration="CustomWsHttpSoap11"
name="TestMethod-v2-0_pttBinding" bindingNamespace="urn:test:services:201005"
contract="ITestMethodV20_ptt" />
</service>
当我使用 SOA 清洁器创建测试请求时,我得到了肥皂错误
对消息“”指定的 SOAP 操作与 HTTP SOAP 操作“urn:test:services:201005:TestMethod-v2-0”不匹配。
我不确定为什么会这样。要求如下
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">urn:test:services:201005:TestMethod-v2-0</Action>
</s:Header>
<s:Body>
<DistributionEnvelope xmlns="urn:test:ns:201005" />
</s:Body>
</s:Envelope>