Angelo Zerr: JAX-WS with Apache CXF and Eclipse [step2]

August 24, 2011

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 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 well WebService declared in the beans.xml. Download You can download jaxwswithcxf_step2.zip which is a zip which contains the the Dynamic Web Project jaxwswithcxf with the HelloWorldImpl WebServices explained in this article. Create Class HelloServiceImpl Create in the jaxwswithcxf Dynamic Web Project the class org.sample.ws.HelloServiceImpl like this : package org.sample.ws; public class HelloServiceImpl { public String getVersion() { return “1.0″; } public String hello(String user) { return “Hello ” + user + “!”; } } Create WebService HelloServiceImpl Web services can be created using two methods: top-down development : Top-down Web services development involves creating a Web service …

Link:
Angelo Zerr: JAX-WS with Apache CXF and Eclipse [step2]

Previous post:

Next post: