Quantcast
Channel: Planet Apache
Viewing all articles
Browse latest Browse all 9364

Sagara Gunathunga: JAX-WS processing using Axis2 tools

$
0
0
JAX-WS wsgen and wsimport tools were designed to generate portable artifacts so that those artifacts can be use with any JAX-WS vendor runtime also these tools distribute as a part of JDK. Traditionally Axis2 does not provide any JAX-WS tools, instead it's possible to execute artifacts generated by wsgen and wsimport tools within Axis2. Recently number of users are requested to enable JAX-WS processing through Axis2 tools such as WSDL2JAVA and JAVA2WSDL. Starting from 1.7.0 version Axis2 provides first class JAX-WS processing support for both WSDL2JAVA and JAVA2WSDL tools. Also it's possible use  wsgen and wsimport tools with Axis2 in the usual manner.  


There is a new command line option introduced as "jws" that enables switching between Axis2 native processing and JAX-WS processing. Once the "jws" option available the tool will switch to JAX-WS processing from default Axis2 native processing . 

To provide other input options it is possible to use some of the existing WSDL2JAVA/JAVA2WSDL options or possible to use  wsgen/wsimport options if those option names are not conflict with Axis2 tools option names. If such option name conflict occurs Axis2 option will get the priority.

WSDL2JAVA options


























Option (Axis2) Option (wsimport)
-uri [url or path] -uri [url or path] A url or path to a WSDL
-o [path] -d [path] Specify a directory path for the generated code
-p [pkg name] -p [pkg name] Specify a custom package name for the generated code
-http-proxy-host [host name] -httpproxy [host:port] specify a HTTP proxy server
-http-proxy-port [port]


Examples :
 wsdl2java.sh -jws -uri SimpleService.wsdl   

 wsdl2java.sh -jws -uri SimpleService.wsdl -o out  

 wsdl2java.sh -jws -uri SimpleService.wsdl -d out  


JAVA2WSDL options






  
















Option (Axis2) Option (wsimport)
-cn [fully qualified class name] -cn [fully qualified class name] fully qualified class name
-o [path] -d [path] Output directory
-cp [class path uri] -cp [class path uri] list of classpath entries


 Examples :
 java2wsdl.sh -jws -cn sample.UserService 

 java2wsdl.sh -jws -cn sample.UserService -d out  

 java2wsdl.sh -jws -cn sample.UserService -o out  



Viewing all articles
Browse latest Browse all 9364

Latest Images

Trending Articles



Latest Images