Linux: Test a SOAP web service using curl

Curl is a linux command-line HTTP tool.

Sample SOAP Message:

Sample curl command to transmit SOAP message to a SOAP service (with –data curl will automatically POST):

Note
replace $HOSTNAME,$PORT and $SOMEPATH below

4 thoughts on “Linux: Test a SOAP web service using curl

  1. Vijeth

    Just to test whether a webservice is up and running, can we not use just the following command, rather to create a new sample.xml file?

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

    Reply
    1. Lance Post author

      Hey Vijeth! Thanks for the reply. For SOAP services, we have to supply a SOAP envelope. We could try to escape it all into a command line string, but I find this to be much more readable. I have a different post for REST services where I do use curl -d “String to post”.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">