Differences between wsimport and wsgen


wsimport:
The wsimport tool reads a WSDL and generates all the required artifacts for web service development, deployment, and invocation. The wsimport tool supports the top-down approach to developing JAX-WS Web services, where you are starting from a wsdl.
The wsimport tool generated JAX-WS portable artifacts include Service Endpoint Interface (SEI), Service, Exception class mapped from wsdl:fault (if any), JAXB generated value types (mapped java classes from schema types) etc. These artifacts can be packaged in a WAR file with the WSDL and schema documents along with the endpoint implementation to be deployed.

Ex Command : wsimport http://localhost:8090/MyJaxWSService?wsdl

wsgen:
The wsgen tool reads an existing web service implementation class and generates the required JAX–WS portable artifacts for web service development and deployment. The wsgen tool can be used for bottoms-up approach, where you are starting from a service endpoint implementation rather than a wsdl.

Ex Command : wsgen -verbose -keep -cp . in.malliktalksjava.service.HellowWorldService

 

wsgen and wsimport generate request and response wrapper bean classes and the JAXB classes. However, wsgen generates the JAXB classes and put them in a jaxws folder. But wsimport does not put those classes in any folder instead in the current directory.

The JAX-WS artifacts generated can be used by both service implementation and client implementation.

Using wsgen you can also generate the wsdl using based on webservice implementation class.

Advertisements
About

I born in Good cultural place called India. My family is traditional family. We fallow all Indian traditions.

Tagged with: , , , , , , ,
Posted in JAVA, Web Services

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 678 other followers

Calendar
December 2016
M T W T F S S
« Dec   Aug »
 1234
567891011
12131415161718
19202122232425
262728293031  
Mallikarjun Gunda

This is Mallikarjun Gunda, I am working as a software professional. Blogging is my Passion. This blog contains the posts on Java related technologies and programming languages. I am happy to share my knowledge through the blogs.

Blog Stats
  • 276,390 hits
IndiBlogger
malliktalksjava.wordpress.c...
70/100