2013-07-11 28 views
2

如何解決此問題?使用SoapUI測試時WCF - SOAP操作不匹配錯誤

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

回答

2

配置SOAPUI發送此HTTP標頭:

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

顯然您正在使用SOAP 1.2(見 'http://www.w3.org/2003/05/soap-envelope'),並使用 '的SOAPAction' 不會對SOAP 1.2(僅用於肥皂工作1.1)。

對於soap 1.2來說,可以在最後的'Content-Type'頭部找到soap動作,它會說'Content-Type:application/soap + xml; charset = UTF-8; action = ......「。

我遇到了同樣的問題,並沒有在這裏找到答案。 唯一對我有用的是使用WS-Addressing。 您是否找到不同的解決方案?