SOAP Action mismatch error while testing a WCF service with SoapUI

ぃ、小莉子 提交于 2019-12-04 23:12:50

This is probably a WS-A addressing issue.

In the WS-A tab of your Request, check "Enable WS-A addressing". You may also have to check "Add default was:To".

Your web service is returning a SOAPFault which is saying that web service expects a SOAP Action http header. In order to add a SOAP action in your SOAP request from SOAPUI you must add a http header named SOAPAction, to do so do the next step:

  • In the bottom of your SOAP test request there are some tabs (Header(0), Attachments(0)...), open the Header(0) tab.Then using + add button, add a header with SOAPAction name and your value:

hope this helps,

This error also occurs due to improper syntax in xml request

For Eg : It will throw same error if closing tag is missing

    </soap:Body>
</soap:Envelope>

in below code

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:wkus="http://XXX.XX.XXXX/IXXXXXX">
    <soap:Header />
    <soap:Body>
        <ns1:AddOrderInfromation>
            <ns1:inputsting>
                <ns1:AddOrderInfromation>
                    <ns1:OrderNo>4500146</ns1:OrderNo>
                    <ns1:OrderDate>08/22/2014</ns1:OrderDate>
                    <ns1:TotalItems>1</ns1:TotalItems>         
                </ns1:AddOrderInfromation>
            </ns1:inputsting>
        </ns1:AddOrderInfromation>

or if having unexpected syntax like this

    <ns1:OrderNo>4500146**<ns1:OrderNo>**

instead of

    <ns1:OrderNo>4500146**</ns1:OrderNo>**

or this

    <ns1:**OrderNo**4500146</ns1:OrderNo>

instead of

    <ns1:**OrderNo>**4500146</ns1:OrderNo>

I had this problem too, and solved it by enabling WS-A addressing in SopaUI. screenshot from SoapUI

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