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.

4 comments:

Bram 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.

Ozzie 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

sarah lee said...

I really enjoyed reading your article. I found this as an informative and interesting post, so i think it is very useful and knowledgeable. I would like to thank you for the effort you have made in writing this article.


edupdf.org