In [step1], we have configured CXF Eclipse Plugin to use CXF 2.4.2 and created an empty Dynamic Web project with Tomcat 7.
In this article we will create a sample Java class HelloServiceImpl and publish it as WebService by using CXF Eclipse wizard. Basicly, this wizard will :
- modify the HelloServiceImpl to add well-formed JAX-WS annotation.
- modify or create the Spring beans.xml file which declares the WebServices (in our case HelloServiceImpl) to publish.
- modify the web.xml to declare the Spring CXF Servlet used to dispatch to the proper WebService declared in the beans.xml.
Few months ago, I had to migrate WebServices from my professional project based on Axis to JAX-WS which is the Java API for XML Web Services supported by the Java Platform, Standard Edition 6 (Java SE 6).
There are several implementations of JAX-WS like :
I have discovered and learned CXF with Eclipse JEE Indigo (works too with Eclipse JEE Helios) which provides Wizard to generate JAX-WS annotation and initialize CXF application. I think that playing with the CXF Eclipse Wizard is a good start point to learn CXF, so I decided to write some articles called JAX-WS with Apache CXF and Eclipse (this link is the plan of articles) which explains step by step how to generate WebService and Consumer of WebService with CXF Eclipse Wizard.
In my articles I will use :
- the last version 2.4.2 of CXF.
- Tomcat 7 as server.
- Eclipse JEE Indigo.
But you can do the same thing with another version of CXF and another server. In this article I will explain how to