Curl command line for consuming webServices? Curl command line for consuming webServices? curl curl

Curl command line for consuming webServices?


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"


For a SOAP 1.2 Webservice, I normally use

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


Wrong. That doesn't work for me.

For me this one works:

curl -H 'SOAPACTION: "urn:samsung.com:service:MainTVAgent2:1#CheckPIN"'   -X POST -H 'Content-type: text/xml'   -d @/tmp/pinrequest.xml 192.168.1.5:52235/MainTVServer2/control/MainTVAgent2