WCF - SOAP Action mismatch error while testing with SoapUI

丶灬走出姿态 提交于 2019-12-13 16:25:10

问题


How do I fix this?

>  <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>

回答1:


Configure SOAPUI to send this http header:

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



回答2:


Apparently your are using soap 1.2 (see 'http://www.w3.org/2003/05/soap-envelope'), and using 'SOAPAction' will not work for soap 1.2 (only for soap 1.1).

For soap 1.2 the soap action can be found in the 'Content-Type' header at the end, and it will say something like 'Content-Type: application/soap+xml;charset=UTF-8;action=...'.

I encountered the same problem, and did not find the answer here. The only thing that worked for me is using WS-Addressing. Did you find a different solution?



来源:https://stackoverflow.com/questions/17595847/wcf-soap-action-mismatch-error-while-testing-with-soapui

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!