Tuesday, June 15, 2010

How to invoke a secured web service without maintaining a policy at the client side ?

http://charithaka.blogspot.com/2010/02/how-to-invoke-secured-web-service.html

Sunday, June 13, 2010

What are the required minimal jars to run an Axis2 client?

http://amilachinthaka.blogspot.com/2009/11/minimal-jars-required-for-axis2-15.html

Thursday, June 3, 2010

How to invoke a web service call with curl ?

If you are on Windows you can download the curl-7.19.5-win32-ssl-sspi.zip from here.

You can download the SimpleStockQuoteService.aar used in the example from here.

SOAP Invocations

curl -d @request.xml -H "Content-Type: application/soap
+xml action=getQuote" http://localhost:8080/axis2/services/SimpleStockQuoteService


The request.xml will look like following.

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<getQuote xmlns="http://services.samples">
<request>
   <symbol xmlns="http://services.samples/xsd">IBM</symbol>
</request>
</getQuote>
</soapenv:Body>
</soapenv:Envelope>

POX Invocations

curl -d @request.xml -H "Content-Type: application/xml" http://localhost:8080/axis2/services/SimpleStockQuoteService

*Notice that the Content-Type has changed.

Now the request.xml will look like following.

<getQuote xmlns="http://services.samples">
<request>
   <symbol xmlns="http://services.samples/xsd">IBM</symbol>
</request>
</getQuote>
If you want to invoke a service with an HTTPS end point without trusting it's certificate authority - you can use the option "-k"

curl -k -d @request.xml -H "Content-Type: application/xml action=getQuote" http://localhost:8080/axis2/services/SimpleStockQuoteService