Maven JAX-WS Plugin

The JAX-WS maven plugin integrates the wsgen and wsimport tools into the automated build process. These tools are commonly used to generate WSDL files out of annotated class files and to create client stubs.

This plugin extends the official plugin (https://jax-ws-commons.dev.java.net/jaxws-maven-plugin/) with the following features:

  • The service endpoint implementation class name (<sei>) does not have to be set explicitly. If this parameter is set to a star (<sei>*</sei>) or omitted (as this is the default value) all classes having a @WebService annotation are included.
  • Three new parameters set the webservice URL that the client should contact. These parameters are concatenated to get the full URL.
    • The <hostURL> parameter sets the base URL part (for example http://localhost:8080)
    • The <contextURL> parameter sets the context part (for example module-remoting-jaxws-tests)
    • The <serviceURL> parameter sets the service name (for example Calculator.Jaxws.Remotingtests). All star characters (*) are replaced by the corresponding webservice name (@WebService(name = ...)) specified by the annotated class (for example *.Jaxws.Remotingtests).
  • Before EL4J version 1.6, the default value for <wsdlDirectory> was $project.build.directory/jaxws/wsgen/wsdl (in contrast to $basedir/src/wsdl in the original). This simplified the generation of all needed files in one maven install pass. Since this approach is not recommended anymore (use Spring JAX-WS integration instead), the default is the same as in the original plugin.

This plugin uses JAXB 2.1 which conflicts with the version 2.0 included in JavaSE 6. https://jaxb.dev.java.net/guide/Migrating_JAXB_2_0_applications_to_JavaSE_6.html section 7.1.2 explains how to solve this problem.

For usage see the plugin info page.