Tuesday, June 25, 2019

Running SOAP request in a Linux command line

curl --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:ws:shoppingCart" --data @shoppingcartreq.xml http://172.20.150.11:40100/Implws/services/ImplWSOrder

where

  1. "Content-Type: text/xml;charset=UTF-8" --> should be same if you are using a xml file
  2. "SOAPAction:ws:shoppingCart" --> need to specify the api that we are going to request
  3. shoppingcartreq.xml  -->  This should have the soap request - full soap request
  4. http://172.20.150.11:40100/Implws/services/ImplWSOrder --> URL of the webservice


another example: curl --header "Content-Type: text/xml;charset=UTF-8" --header "SOAPAction:ns2:searchProductOffering" --data @productreq.xml http://172.20.150.11:40100/Implws/services/GuidedSvc