CXF SOAP Without Spring

CXF SOAP Without Spring explains about step by step details of Creating / Developing Web service using Apache CXF without any spring dependencies

Apache CXF  is a free and open source project, and a fully featured Webservice framework. It helps you building webservices using different front-end API's, like as JAX-RS and JAX-WS.

Most of the tutorial related to Apache CXF is developed using spring framework, this is because of easy integration with spring. But it is not a necessity.

In this, we are extending CXFNonSpringServlet in order to remove spring dependency.

Required Libraries

You need to download

  1. JDK 6
  2. Eclipse 3.7
  3. CXF-2.7.3
  4. Tomcat 7

Following jar must be in ClassPath

  1. commons-logging-1.1.1.jar
  2. cxf-2.7.3.jar
  3. httpasyncclient-4.0-beta3.jar
  4. httpclient-4.2.1.jar
  5. httpcore-4.2.2.jar
  6. httpcore-nio-4.2.2.jar
  7. neethi-3.0.2.jar
  8. wsdl4j-1.6.2.jar
  9. xmlschema-core-2.0.3.jar

CXF Without Spring

I am creating a sample web service project that pass Student object and return with some changes on that object. The service is using simple POJO (Plain Old Java Object) bean.

Firstly create a Dynamic Web Project (File->New->Dynamic Web Project) named "CXFTutorial" according to following screenshot

CXF Without Spring CXF Without Spring

Create a Student Object

package com.student;

public class Student {
private String name;
public String getName() {
return name;
public void setName(String name) { = name;

1 2 3 Next

5 Responses to "CXF SOAP Without Spring"
  1. Roman 2012-10-04 10:10:47.0
  1. admin 2012-10-05 10:10:47.0
  1. Roman 2012-10-06 10:10:47.0
  1. Roman 2012-10-07 10:10:47.0
  1. sanjeev 2012-10-08 10:10:47.0

Your email address will not be published. Required fields are marked *