Integrating Islands with Landmasses

EAI notes and thoughts

Thursday, June 15, 2006

Learning Apache Axis - II

I have been trying to understand how to develop a document style and it has been a frustrating experience to say the least. There is a lot of code required in the client, a number of interfaces to create, a number of utilities to run/re-run all for just sending an XML document instead of a string. I am fully aware of the benefits of this style but I am wondering if too much complexity would drive developers away from this approach to the more simpler RPC approach.

del.icio.us  digg  technorati 

Monday, June 12, 2006

Learning Apache Axis - I

In the past couple of weeks, I had been getting a lot of fundamental doubts in , so a friend asked me to learn to get an understanding on Web Services. So, I started with writing a simple web service and deploying it on Axis. Following are the steps to do so.
  1. Create a webapp for axis in Tomcat or any other web container ($:\apache-tomcat-5.5.17\webapps\axis\WEB-INF\classes)
  2. Create a service class with service methods
  3. Create deploy.wsdd file (sample code pasted below)
  4. Deploy using admin client - java org.apache.axis.client.AdminClient OrderDeploy.wsdd
  5. Copy web service class to Tomcat classes folder - $:\apache-tomcat-5.5.17\webapps\axis\WEB-INF\classes
  6. By default, the service will be deployed at - http://localhost:8080/axis/services/OrderService.
  7. Invoke service at above location
Sample Web Service Deployment Descriptor (wsdd)
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="OrderService" provider="java:RPC">
<parameter name="className" value="OrderService"/>
<parameter name="allowedMethods" value="*"/>
</service>
</deployment>

I will provide more details in subsequent posts.

del.icio.us  digg  technorati