views:

172

answers:

1

I'm able to generate a client from a wsdl file. Now I need to run it in Eclipse.

When I create a Axis2 Client using Eclipse, I just create an DynamicWebProject and it automatically adds the neccessary libraries to the ClassPath.

What about ApacheCXF? Does anyone have the list of all the neccessary libraries one needs to add to the BUILD PATH manually?

On the apache web site they recommend to use Maven to achieve that functionality, but I guess, is there a simpler way?

As far as I see, the creation of Axis2 client by means of Eclipse WTP is less painful, in a few steps I get all the neccessary libraries added to the project folder.

WHAT IS the most simple step-by-step solution how to bind the generated by WSDL2Java Apache CXF client stub with the neccessary libraries TO RUN THE CLIENT?

A: 

If you want an "Apache Axis2"-like experience with CXF under Eclipse, you can install the JAX-WS Tools Project. Actually, this project is part of the Web Tools Platform (in the incubator) so, to install it, just go to the Web Tools update site (http://download.eclipse.org/webtools/updates) and install CXF Web Services (Incubation).

Once installed, go to Window > Preference > Web Services > CXF 2.x Preferences and setup the path to your CXF Home (i.e. it needs to be "installed" on your machine).

Then, create a New > Other > Web Services > Web Service Client, set the Service definition (WSDL), change the runtime to Apache CXF 2.x and follow the steps of the wizard.

Pascal Thivent
@Pascal Thivent Yep thank you. I found the same solution although it's in incubation. It's now the question how to create a sample client, ie how to put it all together. The wizard does not create a sample invocation. Do you have any ideas or links?
EugeneP
@EugeneP Once you have the generated artifacts, invoking the client should be pretty easy (3 lines of code). See http://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html
Pascal Thivent