【问题标题】:WCF - SOAP Action mismatch error while testing with SoapUIWCF - 使用 SoapUI 进行测试时出现 SOAP 操作不匹配错误
【发布时间】:2013-07-11 14:17:38
【问题描述】:

我该如何解决这个问题?

>  <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
> xmlns:a="http://www.w3.org/2005/08/addressing">    <s:Header>
>       <a:Action s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/fault</a:Action>
> </s:Header>    <s:Body>
>       <s:Fault>
>          <s:Code>
>             <s:Value>s:Sender</s:Value>
>             <s:Subcode>
>                <s:Value>a:ActionMismatch</s:Value>
>             </s:Subcode>
>          </s:Code>
>          <s:Reason>
>             <s:Text xml:lang="en-US">The SOAP action specified on the message, '', does not match the HTTP SOAP Action,
> 'XX.XXX.WebServices.XXXXService/XXXXService/AuthenticateUser'.</s:Text>
>          </s:Reason>
>          <s:Detail>
>             <a:ProblemHeaderQName>a:Action</a:ProblemHeaderQName>
>          </s:Detail>
>       </s:Fault>    </s:Body> </s:Envelope>

【问题讨论】:

    标签: c# .net wcf soapui


    【解决方案1】:

    配置 SOAPUI 以发送此 http 标头:

    SOAPAction=XX.XXX.WebServices.XXXXService/XXXXService/AuthenticateUser
    

    【讨论】:

      【解决方案2】:

      显然您正在使用soap 1.2(请参阅'http://www.w3.org/2003/05/soap-envelope'),并且使用'SOAPAction' 不适用于soap 1.2(仅适用于soap 1.1)。

      对于soap 1.2,可以在末尾的“Content-Type”标头中找到soap 操作,它会显示类似“Content-Type: application/soap+xml;charset=UTF-8;action=”的内容。 ..'。

      我遇到了同样的问题,在这里没有找到答案。 唯一对我有用的是使用 WS-Addressing。 您找到其他解决方案了吗?

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-06-01
        • 1970-01-01
        • 2021-03-30
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-10-05
        相关资源
        最近更新 更多