Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which is the best maven's plugin to generate a Web Service Client?

Tags:

java

axis

jax-ws

I have to generate a WS Client and I can't decide which plugin to use. Until now my options are: jaxb2-maven-plugin, axistools-maven-plugin and jaxws-maven-plugin.

like image 238
Neuquino Avatar asked Aug 27 '10 20:08

Neuquino


People also ask

How do I generate a class from WSDL using Apache CXF?

You will have to make sure that you create an appropriate directory structure for your project and add the earlier shown hello. wsdl file to the specified folder. The wsdl2java plugin will compile this wsdl and create Apache CXF classes in a pre-defined folder.

What is Maven generate sources?

The “maven-source” plugin is used to pack your source code and deploy along with your project. This is extremely useful, for developers who use your deployed project and also want to attach your source code for debugging.

What is org Codehaus Mojo plugin?

org.codehaus.mojo » exec-maven-pluginApache. A plugin to allow execution of system and Java programs.


1 Answers

I have to generate a WS Client and I can't decide wich plugin to use. Until now my options are: jaxb2-maven-plugin, axistools-maven-plugin and jaxws-maven-plugin.

First, the jaxb2-maven-plugin is not really intended to generate WS clients. ELIMINATED.

Second, personally I wouldn't use Axis even for client development only so I won't recommend using the axistools-maven-plugin. ELIMINATED.

This leaves us with the JAX-WS RI and the Apache CXF stacks, and their respective Maven plugins: the JAX-WS Maven Plugin (instructions to use the JAX-WS Maven Plugin can be found on the Usage page) and the cxf-codegen-plugin.

Regarding the pros and cons, I would summarize them like this:

  • JAX-WS RI is included in Java 6, but the documentation is more "rough" (although you'll find plenty of tutorials about JAX-WS RI too).
  • Apache CXF is better documentated and provide more flexibility if you want to go beyond the spec.

At the end, both choices are decent so I suggest to browse the links a bit and to make your own opinion.

like image 127
Pascal Thivent Avatar answered Oct 04 '22 16:10

Pascal Thivent