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.


below describes the differences between these frameworks, so that you can make a better choice:
Xfire is the next generation Axis2 platform that is tied to webservice. It is called the next generation because it:  
1, new standards for supporting a range of Web service--jsr181, WSDL2.0, JAXB2, ws-security,  
2, using Stax to interpret XML, The quality of the performance has been improved. Xfire adopts Woodstox for Stax realization;  
3, easy to use, quick and easy to release services from Pojo,  
4, Spring's union;  
5, flexible binding mechanism, Includes the default aegis,xmlbeans,jaxb2,castor.

Xfire compared to Axis1 performance  ,
1, Xfire 2-6 times faster than Axis1.3  
2, Xfire response time is Axis1.3 1/2 to 1/5


Xfire and Axis2  
Although Xfire and Axis2 are the next generation WebService platforms, But AXIS2 developers are too eager to launch version 1.0, 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. The
I tend to xfire is really 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.
The latest version of axis at the time this article was published is 1.4;CXF now in version 3.0. The
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 below respectively
1, JWS is an implementation of the Java language for WebService services for developing and publishing 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

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.