This article shows how to send a SOAP request from command line. For an example you can test envelopes using curl command on UNIX systems.
Create an envelope
Create a file for the envelope and save it.Source code viewer
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:my:service:types"> <soapenv:Header/> <soapenv:Body> <urn:Message> <urn:Element_1>Value 1</urn:Element_1> <urn:Element_2>Value 2</urn:Element_2> </urn:Message> </soapenv:Body> </soapenv:Envelope>Programming Language: XML
Send the request using curl.
Source code viewer
curl --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:ACTION_YOU_WANT_TO_CALL" --data @FILE_NAME URL_OF_THE_SERVICE # For an example: curl --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:urn:my:service-interaction:soap:some-action" --data @envelope.txt http://127.0.0.1:8080/myserviceProgramming Language: Bash