Apache Axis2 can be downloaded from here. Here I used Axis2 1.5.1 which is the recently released version.
Apache tomcat server can be downloaded from here. Here I am using the newer version of Apache tomcat 6.0.16.
Eclipse IDE for java ee developers can be downloaded from here. It is a must to use eclipse j2ee platform here.
Then we can start our work......
Start eclipse.
- Set axis2 preference. navigate Window-->Preferences-->Web Services-->Axis2 Preferences-->Axis2 Runtime. Then set the Axis2 runtime location of downloaded Axis2 bin folder location. Click Ok.
- Then we must setup the web server which we use to deploy from. To do this....... right click on the Project Explorer pan-->New-->Other-->Server-->Server-->Next--> Select apache tomcat server according to the tomcat version. Click finish.
- Now its time to start the project..... Right click on the Project Explorer pan-->New-->Other-->Dynamic Web Project-->Next -->Name the project-->Click Finish.
- Next we create a java package in the previously created project by right click on the project name in the Project Explorer pan. This is the package which include our web service.
- Create a class in the package created on previous step and write the program in it.
- Right click on the class name in the Project Explorer pan-->Web Services-->Create Web Service.
- In the configuration set Web Service Runtime as Apache Axis2 and click Finish.
- Now the Web Service will create and deploy by the Apache tomcat server.
- You can see whether this work or not by visit localhost:8080/(Project name)-->Services Then it will show your public methods under your java class file name in which we implement the web service.
- If you want to see the wsdl file just click on the java class file name.
I will present how to create a client program which uses this web service later......