Showing posts with label SOAP. Show all posts
Showing posts with label SOAP. Show all posts

Monday, January 8, 2018

Invoking a SOAP back-end with apache ab

Following is a sample request to invoke a soap backend using apache ab


ab -n 10 -c 5 -p req.xml -T "text/xml" -H "soapAction:getSimpleQuote" http://localhost:9000/services/SimpleStockQuoteService

Here
-n : number of requests
-c : number of concurrent requests
-p : post request payload file
-T : content type
-H: custom header

req.xml

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:getSimpleQuote xmlns:ser="http://services.samples">
         <ser:symbol>ABC</ser:symbol>
      </ser:getSimpleQuote>
   </soapenv:Body>
</soapenv:Envelope>