Showing posts with label Bash. Show all posts
Showing posts with label Bash. 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>

Saturday, September 3, 2016

How to setup a local SVN server

Following commands guide to set a local SVN server, this is helpful when you want to use a temporary SVN sever (eg: testing a cluster setup)

Creating the repository

(go to the desired path where you want to setup the repository)
svnadmin create <repository-name>

Setting up username and password

uncomment the following in <repository-name>/conf/svnserve.conf
  • anon-access = none
  • auth-access = write
  • password-db = passwd 
add the users in the <repository-name>/conf/passwd in the following format 
username = password 

Starting the SVN server 

svnserve -d -r <repository-name>

svn server will start on the default port 3690

Checking out the repository 

svn co svn://localhost/

Committing a file 

svn ci -m "adding hello file" hello.txt --username username --password password

Stopping the svn server

ps -ef | grep [s]vnserve | awk '{print $2}' | xargs kill -9