Thursday, June 9, 2011

The SOAP action specified on the message, '', does not match the HTTP SOAP Action

this http://social.msdn.microsoft.com/forums/en-US/wcf/thread/ed32328d-e3ad-47dd-bcb0-3db9e6205f9c/
post helped me a lot:

in my WSDL I was using

    wsdl:binding name="MyServiceBinding" type="tns:IMyService"
        soap:binding style="document"
            transport="http://schemas.xmlsoap.org/soap/http"


which meant that not only I must specify the HTTP header SOAPAction: "http://www.bla.com:MyAction"

but I need to specify also in the SOAP Envelope the header:

<soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Action>http://www.bla.com:MyAction</wsa:Action>
</soap:Header>



(make sure you pick up the right wsa namespace, there are many flavors around)





No comments: