TechnoBuzz

A Techno Blog, mainly about Java

Spring WS template

So what is JAXWS: “Java API For XML Web Services can be thought of as a
Java Programming API to create Web Services. JAXWS was introduced in JAVA SE 5 and
uses Annotations in the creation of end points and service clients. JAXWS 2.0 replaced or
encompassed the JAX-RPC API. For more details on the same look at this developer works article.
JAXWS uses JAXB 2.0 for data binding
Generating proxy classes
JAX-WS provides a tool called wsimport which takes the WSDL of a web service and generates proxy classes for the WSDL’s service and port definitions. These can then be used to access the web service endpoint.

With the help of the JAX-WS Maven plugin the wsimport tool can easily be used in Maven based projects.

he WSDL to be processed can either be fetched directly from the actual web service endpoint or from a local directory (by specifying the wsdlDirectory property as shown in the example). I recommend to stick with the latter approach. That way your project can be built even if the service to be accessed is not available from your development environment.

During the “generate-sources” build lifecycle phase the plugin will generate

  • proxy classes for all service and port type declarations contained within the WSDL files in the specified directory
  • JAXB binding classes for all schema types used in the operations of that services

http://krams915.blogspot.com/2010/12/spring-ws-mvc-implementing-client.html

Advertisements

November 5, 2012 Posted by | Uncategorized | Leave a comment