Introduction to several frameworks for Java development Web Service

Source: Internet
Author: User
Tags soap wsdl

 

When talking about Web service development services, you need to introduce a few frameworks that currently develop a Web service, namely AXIS,AXIS2,XFIRE,CXF and JWs (that is, Jax-ws as described earlier, which is what the JAVA6 release provides for the web An implementation of service services. The first few items are open source projects, which are most commonly used by Axis2 and CXF, axis and Xfire have been gradually replaced with technology, and currently only Axis2 and CXF official updates, axis and Xfire are no longer updated.


The following sections describe the differences between these frameworks, so that you can make better choices:
Xfire is a new generation of WebService platform tied to Axis2. The reason is called a new generation because it:
1, support a series of new standards of Web service--jsr181, WSDL2.0, JAXB2, ws-security and so on;
2, the use of Stax interpretation of XML, performance has a qualitative improvement. Xfire adopts Woodstox for Stax realization;
3, easy to get started, can be easily and quickly released from the Pojo service;
4, spring's combination;
5, flexible binding mechanism, including the default aegis,xmlbeans,jaxb2,castor.

Comparison of performance of Xfire and AXIS1
1, Xfire 2-6 times faster than Axis1.3
2, Xfire response time is Axis1.3 1/2 to 1/5


Comparison of Xfire and Axis2
Although Xfire and Axis2 are a new generation of WebService platform, but the AXIS2 developers are too eager to launch 1.0 version, so 1.0 is not a stable version, its developers claim that the 1.1 version is coming soon, I hope the 1.1 version will be a stable version. After Xfire donated to Apache, some people thought that Axis2 would perish. In fact, in many people's eyes, Axis2 is not pojo form, Dan Diephouse proved xfire more market than axis, I also found a lot of people began to move from axis to Xfire, I am also persuading people around me to turn to the development of webservice with Xfire, and it is typical that I can teach my team practical Xfire to publish a Web service of his own within minutes.
I am inclined to xfire is indeed much simpler than AXIS2.


AXIS VS CXF
In the SOA realm, we believe that Web service is the building block of the SOA architecture (building blocks). For service developers, Axis and cxf must not be unfamiliar. Both of these products are Web service open source development tools under the Apache incubator.
At the time this article was released, the latest version of axis is 1.4;CXF, which is now in version 3.0.
Both frameworks are developed from existing open source projects. Axis2 was developed from the axis1.x series. CXF is a combination of the Xfire and Celtix projects. Axis2 is all re-implemented from the bottom up, using a new extensibility and better modular architecture. CXF has also re-deepened the two development tools of Xfire and Celtix.


Comparing the Web service development methods of these two frameworks is as important as comparing their characteristics.
From the developer's point of view, the features of the two frameworks are quite different. Axis2 is developed in a way similar to a small Application server, where Axis2 's development packages are deployed as war to servlet containers, such as Tomcat, which can be used to monitor and manage Web service at work. AXIS2 's Web administrion module allows us to dynamically configure the Axis2. A new service can be uploaded, activated, invalidated, and modified for Web service parameters. The administration UI can also manage one or more services that are in a running state. One drawback of this interface management approach is that all parameters that are modified at run time are not saved because the changes you make are invalidated after the reboot. AXIS2 allows itself to publish Web Service as a standalone application, and provides a number of features and a good model that can be constantly added to new functionality through its own architecture (modular architecture). Some developers believe that this approach is too cumbersome for their needs and will be more like CXF.


CXF more attention to developer ergonomics (ergonomics) and embedding capabilities (embeddability). Most can be done through the configuration API, replacing the cumbersome XML configuration file, spring's integration is often mentioned, CXF support Spring2.0 and CXF ' s API and spring configuration files can be very good correspondence. CXF emphasizes code-first design (Code-first), using a simple API that makes it easy to develop services from existing applications.


But if you choose Axis2 or CXF, you can get a lot of help from the open source community. Both frameworks have commercial companies offering services, WSO2 provides AXIS2 support, and Iona provides CXF support. Both companies have a very active community of developers.

The basic concepts of these Web service frameworks are described in


below.
1, JWs is an implementation of the Java language for WebService services to develop and publish services. From the point of view of the service itself, the JWS service has no language boundaries. But the Java language provides a way for Java developers to easily publish and invoke WebService services.

2, Axis2 is a heavyweight webservice framework under Apache, which is exactly the engine of a web services/soap/wsdl, a synthesizer of the WebService framework, It can not only produce and publish WebService, but also can generate Java and other language version WebService client and server code. This is the advantage of it. However, this also inevitably led to the complexity of the AXIS2, the use of the developers know that it depends on the number and size of the package is amazing, packaging deployment release is more troublesome, not very good integration with existing applications. But if you want to develop a language client outside of Java, the rich tools offered by AXIS2 will be your choice.

3, Xfire is a high-performance WebService framework, before JAVA6, its visibility even more than the advantages of Apache Axis2,xfire is the development of convenient, with the existing Web integration is good, can be integrated, and development is also very convenient. But for languages other than Java, there are no relevant code tools available. Xfire was later acquired by Apache, the reason is that it is too good, after the acquisition, with the rise of Java6 JWs, open source WebService engine has been no longer favored, gradually decline.

4, CXF is an Apache-heavy SOA simple framework that implements the ESB (Enterprise service Bus). CXF from the Xfire project, after the transformation formed, like the current Struts2 from WebWork. It can be seen that the fate of Xfire and the fate of WebWork, will eventually fade out of sight. CXF is not only an excellent web services/soap/wsdl engine, but also a good ESB bus, which provides a choice for SOA implementation, and of course, he is not the best, it only implements a part of the SOA architecture.
Note: For the relationship between Axis2 and CXF, one is that the Axis2 appears earlier, while the CXF is catching up fast.


How to choose:
1, if the application needs multi-language support, AXIS2 should be preferred;
2. If the application follows the Spring philosophy route, Apache CXF is a better choice, especially for embedded Web Services;
3, if the application does not need new features, it is still used in the original project framework, such as Axis1,xfire,celtrix or BEA and so on manufacturers own Web Services implementation, do not costly.


Finally, my advice is: if you need multi-lingual support, you should choose AXIS2. If you need to focus your implementation on Java and want to integrate with spring, CXF is a better choice, especially to embed your Web service in other programs. If you feel that the new features of these two frameworks are not of much use to you, you will feel that AXIS1 is also a good choice and you should continue to use it until you have a good reason to change it.

Introduction to several frameworks for Java development Web Service

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.