CXF VS AXIS2 Overview

Both CXF and axis are famous open web service framework, there are new next-generation which evolved from existing projects and introduced many innovative thoughts, therefore, it’s difficult to select one but give rid of another one. The two web services frameworks have been released several years and used widely, now they are under the umbrella of Apache.

Axis2 is a follow-up of the popular and well-known Axis 1.x series framework, the deployment of services for Axis1 has often been criticized. Therefore Axis2 has a completely new deployment model. CXF is literally the offspring of the XFire and Celtix project, it is based on Servlet technology and SOA application, it was developed with the intention to integrate it into other systems.

CXF and Axis2 which is better one? We compare them from following aspects:

Let’s take a look: CXC vs Axis2:

1. Popularity:

The below finger displays an overall statistics comparison they were seen on the web(e.g. the search rate, articles, discussion and email around them).

Early in 2007 and 2008, Axis2 was almost twice popular than CXF, unfortunately, it has been dropped down a lot but CXF got a big win, up to the present time. CXF has advantage over  Axis2 quite a bit.

2. Their advantage Comparison.

2.1 The advantage of CXF:

  1. CXF supports for WS-Addressing, WS-Policy, WS-RM, WS-Security and WS-I BasicProfile.
  2. CXF implements JAX-WS API (according by JAX-WS 2.0 TCK).
  3. CXF has better integration with Spring and other frameworks.
  4. CXF has high extensibility in terms of their interceptor strategy.
  5. CXF has more configurable feature via the API instead of cumbersome XML files.
  6. CXF has Bindings:SOAP、REST/HTTP, and its Data Bndings support JAXB 2.0、Aegis, by default it use JAXB 2.0 and more close Java standard specification.
  7. CXF has abundant toolkits, e.g. Java to WSDL, WSDL to Java, XSD to WSDL, WSDL to XML, WSDL to SOAP, WSDL to Service.

2.2 The advantage of Axis2:

  1. Axis2 also supports WS-RM, WS-Security, and WS-I BasicProfile except for WS-Policy, I expect it will be supported in an upcoming version.
  2. Axis has more options for data bindings for your choose
  3. Axis2 supports multiple languages—including C/C++ version and Java version.
  4. Axis2 supports a wider range of data bindings, including XMLBeans, JiBX, JaxMe and JaxBRI as well as its own native data binding, ADB.
  5. longer history than CXF.

From above advantage items, it brings us to a good thoughts to compare Axis2 and CXF on their own merits. they all have different well-developed areas in a certain field, CXF is very configurable, integratable and has rich tool kits supported and close to Java community, Axis2 has taken an approach that makes it in many ways resemble an application server in miniature. it is across multiple programming languages. because its Independence, Axis2 lends itself towards web services that stand alone, independent of other applications, and offers a wide variety of functionality.

3. Features?Details Comparison:

Feature Category Feature Axis 1.x Axis2 CXF
General Features Basic Profile 1.1 Compliant Yes Yes Yes
Easily Create Services from POJOs Yes Yes Yes
Open Source Yes Yes Yes
RPC-Encoding Yes
Spring Support Yes Yes Yes
REST Support Yes Yes
IDEA Plugins Yes
Eclipse Plugins Yes Yes
Hot Deployment Yes Yes
Soap 1.1 Yes Yes Yes
Soap 1.2 Yes Yes Yes
Streaming XML (StAX based) Yes Yes
WSDL 1.1 ->Code (Client) Yes Yes Yes
WSDL 1.1 ->Code (Server) Yes Yes Yes
WSDL 2.0 ->Code (Client) Yes
WSDL2.0 ->Code (Server) Yes
Client-side Asynchrony Yes Yes Yes
Server-side Asynchrony Yes Yes Yes
Policy-driven code generation Yes Yes
Web Services related
JSR standards
JAX-WS Yes [13] Yes
JSR 181 Yes Yes Yes
JSR 181 on Java 1.4
SAAJ (1.2/1.3) Yes Yes Yes
JSR 109
Data Bindings YesMLBeans Support Yes Yes Yes
Castor Support Yes Yes [9]
JiBX Yes Yes
JAXB Yes Yes Yes
WS-* WS-Addressing Yes Yes Yes
WS-Atomic Transaction Yes Yes
WS-Business Activity Yes
WS-Coordination Yes Yes
WS-Eventing Yes
WS-Metadata Exchange Yes [10] Yes
WS-Notification Yes Yes [12] Yes
WS-ReliableMessaging Yes Yes Yes
WS-Policy Yes Yes
WS-Secure Conversation Yes Yes
WS-Security Policy Yes Yes
WS-Security Yes Yes Yes
WS-Trust Yes Yes
WS-Transfer Yes
WSDL 1.1 Support Yes Yes Yes
WSDL 2.0 Support Yes
Transports HTTP Yes Yes Yes
JMS Yes Yes Yes
Jabber Experimental Yes Yes [15]
SMTP/POP3 Yes Yes Yes [15]
TCP Yes Yes Yes [15]
In-VM ? Yes Yes
SMS Yes Yes [15]
UDP Yes Yes [15]
Attachments Soap w/ Attachments Yes Yes Yes
MTOM Yes Yes
Encoding Table YesML Textual Yes Yes Yes
MTOM Yes Yes
FastInfoset Yes Yes
JSON Yes Yes

4. Support and Community:

Sometimes using the best technology can still be tough if you are the only one doing so and are unsupported. For Support and Community, there have not a big difference between them because they are both open source project with the normal community support lists.


As a developer, we need to accord our perspective to choose the right one, whichever framework you choose, you’ll have the benefit of an active and stable open source community. In terms of performance, I did a test based the same functionality and configed in the same web container, the result shows that CXF performed little bit better than Axis2, the single case may not exactly reflect their capabilities and performance. In some research articles, it reveals that Axis2′s proprietary ADB databinding is a bit faster than CXF since it don’t have additional feature(WS-Security).