posted by 동건이 2011. 9. 21. 21:05

웹서비스 프레임워크 비교(Comparision of WS) Apache Axis2, CXF and Sun JAX-WS

Apache Axis2

Axis2 is the follow-up of the popular Axis1 framework. Axis2 is based on a completely new architecture and has been rewritten from scratch. That makes Axis2 very flexible. For instance the databinding that is responsible for the serialization of Java objects into XML is not limited to one technology. For instance the following databindings are available:

Data BindingDescription
ADB The Axis2 Databinding Framework is leightweight and simple but doesn't cover all XML Schema functions.
JiBX Allows the use of pojos without any modifications. A mapping defines how the pojos are serialized to XML.
XMLBeans Offers the most comprehensive XML Schema support.

Table 1: Axis2 Databindings

Asynchronous Web Services are well supported by Axis2. An Axis2 service accepts also asynchronous requests without any changes to the service. The service can use an endpoint reference delivered in the request to address a callback after finishing an asynchronous request.

Asynchronous Web Service Invocation
Figure 1: Asynchronous Web Service Invocation

The deployment of services for Axis1 has often been criticized. Therefore Axis2 has a completely new deployment model. An Axis2 runtime is a Web application and can be installed on every JEE compliant Application Server. The Axis2 web application itself is a container for Web Services. Web Services are packed into an own file format with the file extension aar. Due to these archives, Web Services can be installed and configured by a simple user interface at run time. A Web Service is regarded as an independent package which can be installed into the Axis2 runtime environment. Services are configured using the service.xml configuration file.

Axis2 Deployment
Figure 2: Axis2 Deployment

Axis2 offers modules providing additional functionality, for example WS-* standard support, which can also be installed during runtime.

Apache CXF

CXF is also a project of the Apache software foundation. CXF came up from a fusion of XFire and Ionas Celtix project.

CXF was developed with the intention to integrate it into other systems. This is reflected in the CXF API and the use of the Spring framework. Therefore it is simple to integrate CXF into existing systems. For instance CXF respectively its predecessor XFire was integrated into numerous open and closed source projects like ServiceMix or Mule.

A proprietary API as well as the standardized JAX-WS interface are available for the development and use of Web Services.

The JAX-WS Standard

The Java API for XML based Web Services is the successor of the JAX-RPC specification. JAX-WS respectively its predecessor is message based and supports asynchronous communication. The Configuration is managed by annotations therefore Java 5 or higher is required. JAX-WS isn't downwardly compatible to its predecessor JAX-RPC. With JAX-WS it is pretty easy to write and consume Web Services. The default values of numerous parameters are comfortable for the programmer, so that simple Pojos declared with a @WebService annotation can be used as a Service. Listing 1 shows a simple implementation of a Web Service using the @WebService annotation.

01.import javax.jws.WebService;
02.import javax.jws.WebMethod;
05.public class HelloWorldService {
07.public String helloWorld() {
08.return "Hello World!";
Listing 1: HelloWorld Web Service using JAX-WS

A WSDL document can also be generated from the class. Annotations can influence the content of the generated WSDL document. For example a different namespace or other element names can be used. If JAXB is already known to the programmer, its annotations can be used to define the serialization in every detail. With the contract first approach a Service Interface, JAXB annotated classes for serialization and a skeleton for the implementation can be generated out of WSDL. According to the WSDL document the generated classes can have numerous annotations. Annotations are also the main point of criticism of JAX-WS. Despite this criticism the JAX-WS specification came out well. It is well attuned and combinable with other Java and Java EE specifications. For example, Listing 2 shows a stateless EJB 3.0 Bean which acts as a Web Service at the same time.

3.public class MyService{
4.public String hello(String name) {
5.return "Hallo"+name;
Listing 2: Stateless SessionBean acting as Web Service

JAX-WS Reference Implementation

The JAX-WS Reference Implementation represents the core component of the Web Services protocol stack Metro. The Metro Stack provides support for the following Web Services standards:

  • WS-Addressing
  • WS-Policy
  • Web Services Security aka WS-Security
  • WS-Transaction
  • WS-Reliable Messaging
  • WS-Trust
  • WS-SecureConversation

JAX-WS and Metro are documented in detail. Apart from the JAX-WS, JAXB and JWS specifications there are numerous tutorials und samples. The Netbeans IDE as well as the tutorials of the enterprise pack makes it particularly easy to get started. Of course, Eclipse can also be used for the development with Metro.

Web applications containing Web Services which have been realized with JAX-WS are executable in Glassfish and many other application servers. To make services also executable in Tomcat, two libraries (JAX-WS and JAXB) have to be installed.


JBossWS is the Web Services Framework for the JBoss application server. By providing an integration layer it is possible to choose from three stack options:

  • Native Stack:
  • Apache CXF Stack:
  • Metro Stack:


Due to the modern streaming StAX parser, the performance of all three SOAP engines is very well. The ping time for a locale roundtrip is less than 1 millisecond (message size about 3KB, Dual Core Notebook). Therefore the time delay by the SOAP communication is negligible in many projects.

WS-* Standards

The support of the WS-Standard family can also be decisive for the selection of a SOAP engine. For example, messages sent to services can be secured with signatures as described in the Web Service Security standard (in short WSS). Table 1 lists the supported WS-* standards for each toolkit.

WS-Addressing X X X
WS-Coordination X(2) X
WS-MetadataExchange X
WS-Policy X X X
WS-ReliableMessaging X(3) X X
Web Services Security X(1) X(4) X
WS-SecureConversation X(1) X(4) X
WS-SecurityPolicy X X X
WS-Transaction X(2) X
WS-Trust X X X

Table 2: Support for WS-* Standards ( as of August 2010)

(1) Supported by the additional module Apache Rampart
(2) Supported by the additional module Apache Kandula2
(3) Supported by the additional module Apache Sandesha2
(4) By Apache WSS4J


None of the Web Services frameworks is in general superior to the others. Axis2 is structured modularly, has many features and can be used as an application server for Web Services. A special feature of Axis2 is the support of exchangeable binding frameworks, for example XMLBeans. Axis2 together with the XMLBeans framework is well suited for Web Services which are using very complex schema definitions. The disadvantages of Axis2 are its complexity as well as the insufficient JAX-WS support. Therefore anyone who wants to work with JAX-WS should choose Apache CXF or the reference implementation.

Those who prefer a seamless integration with the Spring framework are well advised with Apache CXF. Furthermore CXF is slim and easy to use. CXF is the tool of choice if a SOAP engine has to be embedded into an existing software.

Who wants to code against the standard is well advised with the JAX-WS implementation. The enterprise pack of the Netbeans development environment supports JAX-WS RI very well. Only a few clicks are needed to build a server or to call a Web Service. The Metro stack that includes JAX-WS RI offers the most comprehensive support for the WS-* standards. A major advantage of Metro 2.0 is its compatibility with Microsofts Windows Communication Foundation.

I hope this article could help you with the decision for a WS toolkit.

댓글을 달아 주세요

  1. Favicon of BlogIcon moncler españa 2013.01.04 14:02  Addr  Edit/Del  Reply

    You can also know about Visa regulations in specific countries, moncler. You can know about the ground delays of flights and track the rescheduling, moncler online. You also do not have to glue yourself before television or news channels to know the status of flight because of bad weathers. You can now easily know about airport closure beforehand. You save time and cost both, If you are first time flyer, you can easily know about the boarding process of a particular airport, moncler españa. If you are going to board at Philadelphia airport or Newark, moncler chaquetas, you will only get specific knowledge of this airport only. From parking to shops around, moncler outlet, these airport guides are comprehensive knowledge source for frequent and first time flyers alike. These can save you from the endless hassles which could face you if you are unprepared. Offering the simplest of services such as relevant information on flights from Dallas Fort Worth, on-site and off-site parking slots at Airport, these airport guides work towards to save your day and trip both.Related articles:

  2. Favicon of BlogIcon moncler outlet 2013.01.04 17:46  Addr  Edit/Del  Reply

    Le chef des opérations de maintien de la paix des Nations unies, moncler chaquetas, Alain Le Roy, moncler, a déclaré mercredi à l'AFP qu'il allait demander l'envoi de 1, moncler outlet.000 à 2, moncler españa.000 Casques bleus supplémentaires en C?te d'Ivoire, moncler online, en proie à une grave crise politique, articles:

  3. Favicon of BlogIcon moncler chaquetas 2013.01.05 16:35  Addr  Edit/Del  Reply

    Des contr, moncler españa?les de contamination à la dioxine vont être effectués, moncler, selon un porte-parole du ministère de l'Agriculture de l'Etat régional de Basse-Saxe, où sont situés la plus grande partie des élevages, moncler online.?La nourriture pour ces élevages, aujourd'hui concernés par cette alerte, a, moncler outlet? été livrée par le fabricant Harles & Jentzsch, installé à Uetersen dans le nord du pays. Selon la Fédération des agriculteurs allemands,, Harles & Jentzsch a re, moncler chaquetas?u de l'acide gras contaminé en dioxine d'un commer?ant hollandais qui s'est lui-même fourni auprès d'un fabricant allemand de biodiesel situé à Emden (Nord de l'Allemagne).Les dioxines sont des résidus essentiellement formés lors des combustions, industrielles ou naturelles. Elles ont été classées comme substance cancérigène par l'Organisation Mondiale de la Santé. Santé Un test pour détecter les cellules cancéreuses bient?t sur le marché Actu en continu Inondations/Australie: attention aux serpents et crocodilesRelated articles:"powered+by+daum"+~endorsement&ct=clnk