Monday, 17 October 2011

Tomcat + Axis2 + Eclipse + Axis2 Code Gen Part 4

Part 4 Generate Webservice Client


Download and install the Axis2 code gen tool for eclipse plugin.
Please follow the instruction stated as in
http://axis.apache.org/axis2/java/core/tools/eclipse/plugin-installation.html

Start Eclipse, Choose from menu, File -> New-> Other...
Browse to Axis2 Wizards and select Axis2 Code Generator and click Next button.



Select the option Generate Java source code from WSDL file and click Next button.



Click on Browse button, in the File name entry box, key in http://localhost:8080/axis2/services/FTPAlternativeService?wsdl to refer to the webservice WSDL and click on open button.



Click next button to see the screen as below, don't change anything for this screen and click next button to proceed.


Key in the information as screen below and click on the Finish button.


If you see the screen below, that means you have successfully generated the java code from WSDL file.


Create a new java project from eclipse, key in the project name HookInForestWSClient and click Finish button.



After created the project, you will be able to see the previous generated source codes in the project.
Right click on the build.xml and run as ant build.


That's it for the webservice client generation!

No comments:

Post a Comment