Consuming web service results in “Unable to handle request without a valid action parameter”
You need to supply the SOAPAction
as a HTTP header, not a SOAP header. Here is how a complete request might look like when performed with SoapUI (notice the forth row):
POST /8223third_17/webservices/ItfResidentData.asmx HTTP/1.1Accept-Encoding: gzip,deflateContent-Type: text/xml;charset=UTF-8SOAPAction: "http://tempuri.org/YSI.Interfaces.WebServices/ItfResidentData/GetVersionNumber"User-Agent: Jakarta Commons-HttpClient/3.1Host: www.iyardiasp.comContent-Length: 260<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:itf="http://tempuri.org/YSI.Interfaces.WebServices/ItfResidentData"> <soapenv:Body> <itf:GetVersionNumber/> </soapenv:Body></soapenv:Envelope>
For curl
you might use the -H
parameter to send the SOAPAction
header but I suggest you use SoapUI for your preliminary consumption (it includes the SOAPAction
header by default and beats the console any day).
If you do need to use curl
, try something like this (all must be on one line; separated for readability):
curl -H "Content-Type: text/xml;charset=UTF-8" -H "SOAPAction: \"http://tempuri.org/YSI.Interfaces.WebServices/ItfResidentData/GetVersionNumber\"" -d @GetVersionNumber.xml https://www.iyardiasp.com/8223third_17/webservices/ItfResidentData.asmx
with this in the GetVersionNumber.xml
file:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:itf="http://tempuri.org/YSI.Interfaces.WebServices/ItfResidentData"> <soapenv:Body> <itf:GetVersionNumber/> </soapenv:Body></soapenv:Envelope>