Invoking SOAP request from shell command

shell, soap, unix

Solution

You need to provide the name of the SOAP action. You have:

-H "SOAPAction:"

Supply the name of the action in there. E.g.

-H "SOAPAction: http://my_example/my_action"

Get the name of the action from the WSDL if you have one. E.g., see How do you determine a valid SoapAction?.

Problem

I using curl to send a SOAP request to a web service and get the response using shell scripting. please find below the command i am using:- ``` curl -H "Content-Type: text/xml; charset=utf-8" -H "SOAPAction:" -d @sample_request.txt -X POST http://someWebServiceURL ``` I am getting an error response which says no SOAPAction header. PFB the response body part ``` <soapenv:Body> <soapenv:Fault> <faultcode>Client.NoSOAPAction</faultcode> <faultstring>WSWS3147E: Error: no SOAPAction header!</faultstring> </soapenv:Fault> </soapenv:Body> ``` Any help is appreciated !!

Original source

Related problems