Thursday, August 30, 2007

Simple SOAP posting from the command line

From the linux command line, you can do use curl to submit a soap file to a URL.

curl -H "Content-Type: text/xml; charset=utf-8" \
-H "SOAPAction:" \
-d @soap.txt \
-X POST http://localhost:18181/httpWSDLService/httpWSDLPort

where the @ specifies a file as input and soap.txt is the file.

3 comments:

Anonymous said...

Just what I was looking for, great!

Used it on the example provided by the w3 (http://www.w3schools.com/webservices/tempconvert.asmx?op=CelsiusToFahrenheit) and it worked like a charm.

Anonymous said...

For the same solution, but on Windows using powershell, you can visit this post: http://rambletech.wordpress.com/2011/09/21/posting-soap-request-from-windows-powershell/

STC Technologies said...

Nice comments. Thank You!
STC Technologies