Axis2 vs CXF vs Metro

Axis2 vs CXF vs Metro

Capabilities

Both Axis2 and CFX also evolved from existing projects. Axis2 came from the well known Axis 1.x series. CXF is literally the offspring of the XFire and Celtix projects, as those two projects have pooled their codebases and development teams to give rise to CXF. The delta between the old projects and their new versions is significant in each case. Axis2 is a total rewrite of Axis from the ground up, using a new modular architecture that allows its functionality to be more easily extended. CXF has also been extensively retooled from its Xfire and Celtix origins. Both Axis2 and CXF provide migration guides that give developers tips on how to migrate from their previous versions, but as of this writing neither project has provided migration tools or guides for porting web services from one framework to another. In such a migration, though, it’s always worth looking at all the options available. Axis2 and CXF each take different approaches to web service development and these approaches will appeal more to some developers than others.

CXF: has support for WS-Addressing, WS-Policy, WS-RM, WS-Security, and WS-I BasicProfile. Axis2 supports each of these except for WS-Policy, which will be supported in an upcoming version.

CXF was written with Spring in mind; Axis2 is not.

Axis2 supports a wider range of data bindings, including XMLBeans, JiBX, JaxMe and JaxBRI as well as its own native data binding, ADB. Note that support for JaxME and JaxBRI are still considered experimental in Axis2 1.2. CXF currently supports only JAXB and Aegis; support for XMLBeans, JiBX and Castor will come in CXF 2.1.

Axis2 supports multiple languages — there is a C/C++ version available in addition to the Java version.

In comparing these frameworks, though, it’s just as important to look at their approach to developing web services as it is to compare features. From a developer perspective, both frameworks behave very differently from one another. Axis2 has taken an approach that makes it in many ways resemble an application server in miniature. Axis2 comes packaged with a WAR that can be deployed on a servlet container such as Tomcat that is designed to make web services easier to manage and deploy on the fly. The Axis2 Web Administration module allows Axis2 to be configured dynamically while applications are running: new services can be uploaded, activated or deactivated and their parameters may be changed. The administration UI also allows modules to be enabled on one or more running services.

The only downside to using the UI for these purposes is the fact that configuration changes made through it are not persistent — they go away when the servlet container is restarted.

Axis2 lends itself towards web services that stand alone, independent of other applications, and offers a wide variety of functionality, and a good model for adding more functionality as time goes on through its modular architecture. Some developers may find that a little too cumbersome or heavy-duty for their needs. These developers might prefer to look at Apache CXF.

CXF concentrates on developer ergonomics and embeddability. Most configurations are done via the API instead of cumbersome XML files, Spring integration is heavily emphasized, including support for Spring 2.0, and CXF’s APIs and Spring configuration mirror one another fairly closely. CXF emphasizes code-first design, using simple APIs to make development of services from existing applications easier (and its embeddability helps too).

As regarding Metro, the Java API for XML based Web Services is the successor of the JAXRPC 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 JAXWS 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.

Metro is 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 the Glassfish Application Server. To make services also executable in other application servers, two libraries (JAX-WS and JAXB) have to be installed. Application servers such as JBoss, WebSphere or Tomcat can be upgraded with JAX-WS within about 10 minutes.

Performance

Due to the modern streaming XML parser, the performance of all three SOAP engines is very well. The ping time for a locale roundtrip is about 2-4 milliseconds (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 shows the support for WS*-Standards of the toolkits. The following table summarizes the standards implemented by each framework:

webservices

Conclusion

None of the Web Services frameworks is in general superior to the others. Axis 2 is structured modularly, has many features and can be used as an application server for Web Services. A special feature of Axis 2 is the support of removable binding frameworks, for example XMLBeans. Axis 2 together with the XMLBeans framework included is well suited for Web Services which are using very complex schema definitions. The disadvantages of Axis 2 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 the JAX-WS implementation.

Furthermore CXF is slim and easy to use. CXF is the tool of choice if a SOAP engine has to be embedded into existing software. Who just wants to code against the standard is well advised with the JAX-WS implementation.

Made by: Arpad Sebesi

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

One comment on “Axis2 vs CXF vs Metro”

  1. ufc betting said:

    I see a lot of good posts here, what template do you use, is this random template ?

Leave a comment




Spam Protection by WP-SpamFree