Articles

Affichage des articles du juin, 2012

Create and publish a SOAP Webservice with CXF and Maven

We will see in this post how to create and publish a service with tomcat maven and CXF. First, initialize the project with the Maven webapp archetype: mvn archetype:create -DgroupId=com.test.ws.cxf -DartifactId=cxf-webapp -DarchetypeArtifactId=maven-archetype-webapp cd ./cxf-webapp mvn clean Edit the pom.xml to include the following dependencies: <dependency>  <groupId>org.apache.cxf</groupId>  <artifactId>cxf-rt-frontend-jaxws</artifactId>  <version>2.3.1</version> </dependency> <dependency>  <groupId>org.apache.cxf</groupId>  <artifactId>cxf-rt-transports-http</artifactId>  <version>2.3.1</version> </dependency> Create a WSDL, we will remain a classic and simple HelloWorld service: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns...