Tuesday, July 16, 2013

Create a Web Service Client using Axis2 - Command Prompt(CMD)

Use following URL to download Apache Axis2
http://axis.apache.org/axis2/java/core/download.cgi
Steps :
1.UnZip the downloaded Axis2 (Ex:Unzipped to drive C)
2.Set Axis home as a system or user variable(AXIS2_HOME, C:\DOWNLOADED_AXIS2)
3.Run following command using CMD
%AXIS2_HOME%\bin\WSDL2Java -uri D:\Path_For_WSDL\test.wsdl
Ex:
C:\GenerateStubs>%AXIS2_HOME%\bin\WSDL2Java -uri D:\Path_For_WSDL\test.wsdl

Web service client will generate in GenerateStubs folder

ref :
http://axis.apache.org/axis2/java/core/tools/CodegenToolReference.html

To generate stub class separately
%AXIS2_HOME%\bin\WSDL2Java -uri D:\wsdl\CMUEnterprise.wsdl -p org.apache.axis2.axis2userguide -ss -g

To generate Stub class separately  with services.xml
%AXIS2_HOME%\bin\WSDL2Java -uri D:\wsdl\TestDialogService.wsdl -p org.apache.axis2.axis2userguide -ss -g -sd
This site providing you to JAVA Language easy way. I think if you are beginner to JAVA refer this to implements you knowledge using only with very simplest codes.