Sunday, June 10, 2012

JAX-WS wsimport tool to generate artifact classes

wsimport is a tool which generates Java-WS artifacts like the service end point classes from the wsdl.
This tool comes with Java and used in top down approach when we need to create artifacts from wsdl.

wsimport tools comes with JDK. The following shows how to use wsimport.bat on Windows.


wsimport.bat -verbose -p javaexp.ws.wsgen 
-d C:\Siddhartha\dev\Projects\JavaExp\MyJWS2\src 
-keep CalculatorSimpleGen.wsdl
The above command will generate the followings classes along with source (since we specified the -keep option).

javaexp\ws\wsgen\CalculatorWS.java
javaexp\ws\wsgen\CalculatorWSImplService.java
javaexp\ws\wsgen\MathOperationRQ.java
javaexp\ws\wsgen\MathOperationRS.java
javaexp\ws\wsgen\MetaDataInfo.java
javaexp\ws\wsgen\ObjectFactory.java
javaexp\ws\wsgen\package-info.java
javaexp\ws\wsgen\CalculatorWS.java
javaexp\ws\wsgen\CalculatorWSImplService.java
javaexp\ws\wsgen\MathOperationRQ.java
javaexp\ws\wsgen\MathOperationRS.java
javaexp\ws\wsgen\MetaDataInfo.java
javaexp\ws\wsgen\ObjectFactory.java
javaexp\ws\wsgen\package-info.java

No comments :

Post a Comment