Question

Curl command line for consuming webServices?

Do you guys know how I can use the Curl command line to POST SOAP to test a web service?

I have a file (soap.xml) which has all the soap message attached to it I just don't seem to be able to properly post it.

Thanks!

 47  117961  47
1 Jan 1970

Solution

 43

Posting a string:

curl -d "String to post" "http://www.example.com/target"

Posting the contents of a file:

curl -d @soap.xml "http://www.example.com/target"
2008-09-17

Solution

 34

For a SOAP 1.2 Webservice, I normally use

curl --header "content-type: application/soap+xml" --data @filetopost.xml http://domain/path
2011-01-01