Thursday, 10 December 2015

difference between wsimport and wsgen command

The wsimport tool 
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. 

The wsgen tool 
The wsgen tool reads an existing web service implementation class (SIB) 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 (SIB) rather than a wsdl. 

Can we say that wsgen and wsimport command generates same classes (same JAX-WS artifacts)? 
Can we say that wsgen and wsimport command is used to generate both server and client side code ? 
can wsgen command be used to generate a WSDL file ? 

SOAP Web Service Flow

Wednesday, 9 December 2015

What is wsgen command?

The wsgen tool is used to parse an existing web service implementation class and generates required files (JAX-WS portable artifacts) for web service deployment. This wsgen tool is available in $JDK/bin folder.

     We can use wsgen command for following.........

  1. Generates JAX-WS portable artifacts (Java files) for web service deployment.
  2. Generates WSDL and xsd files, for testing or web service client development.



Top Down Approach to develop the soap web service


JAX-RPC versus JAX-WS

http://www.ibm.com/developerworks/library/ws-tip-jaxwsrpc/
https://sites.google.com/site/easytolearnbyyou/docs-for-u/web-service/jax-ws-vs-jax-rpc

Web services have been around a while now. First there was SOAP. But SOAP only described what the messages looked like. Then there was WSDL. But WSDL didn't tell you how to write web services in Java™. Then along came JAX-RPC 1.0. After a few months of use, the Java Community Process (JCP) folks who wrote that specification realized that it needed a few tweaks, so out came JAX-RPC 1.1. After a year or so of using that specification, the JCP folks wanted to build a better version: JAX-RPC 2.0. A primary goal was to align with industry direction, but the industry was not merely doing RPC web services, they were also doing message-oriented web services. So "RPC" was removed from the name and replaced with "WS" (which stands for web Services, of course). Thus the successor to JAX-RPC 1.1 is JAX-WS 2.0 - the Java API for XML-based web services.

What different files are created when we run wsimport command

What different files are created when we run wsimport command




Tuesday, 8 December 2015

WSDL and UDDI

http://codeasp.net/articles/asp-net/16/what-is-wsdl


http://codeasp.net/CodeASPNETPics/ArticleImages/what-is-wsdl/WSDLPosition2.PNG