When talking about Web Service development services, we need to introduce several frameworks currently used to develop Web Services, namely Axis, axis2, Xfire, CXF and JWS (that is, the ones mentioned earlier JAX-WS, this is an implementation of Web Service provided by Java6 release.)
The first few are all open source projects, among which axis2 and cxf are the most commonly used, and Axis and XFire have been With the continuous replacement of technology slowly coming to an end, currently only axis2 and cxf have official updates, while Axis and XFire are no longer updated.
The following will introduce the differences between these frameworks so that you can make a better choice:
XFire is a new framework alongside Axis2 A generation of WebService platform. It is also called the new generation because it:
1. Supports a series of new standards for Web Service - JSR181, WSDL2.0, JAXB2, WS-Security, etc.;
2. Using Stax to interpret XML, performance has been qualitatively improved. XFire uses Woodstox as Stax implementation;
3. Easy to use, you can publish services from pojo conveniently and quickly;
4. Spring combination;
5. Flexible Binding Mechanisms, including default Aegis, xmlbeans, jaxb2, castor.
Comparison of performance between XFire and Axis1
1. XFire is 2-6 times faster than Axis1.3
2. The response time of XFire is Axis1 .1/2 to 1/5 of 3
Comparison between XFire and Axis2
Although XFire and Axis2 are both new generation WebService platforms, the developers of Axis2 Too eager to launch version 1.0, so 1.0 is not yet a stable version. Its developer claims that version 1.1 will be launched soon, and hopes that version 1.1 will be a stable version.
Some people thought that Axis2 would die after XFire was donated to apache. In fact, in the eyes of many people, Axis2 is not a pojo form. Dan Diephouse proved that XFire has more market than Axis
I also found that many people started to switch from Axis to XFire, including me, who was also convincing people around me Turning to using XFire for WebService development, it is typical that I can teach my team to use XFire to publish a Web service of his own within a few minutes.
I tend to think that XFire is indeed much simpler than Axis2.
AXIS VS CXF
In the field of SOA, we believe that Web Service is the building block of the SOA system.
For service developers, AXIS and CXF must be familiar. Both products are Web Service open source development tools under the Apache Incubator.
The latest version of Axis when this article was published was 1.4; CXF has now reached version 3.0.
These two frameworks are developed from existing open source projects
Axis2 is developed from the Axis1.x series. CXF is a combination product of the XFire and Celtix projects. Axis2 is completely re-implemented from the bottom up, using a new module architecture with better scalability. CXF also re-deepens the two development tools XFire and Celtix.
Comparing the Web Service development methods of these two frameworks is as important as comparing their features.
From a developer's perspective, the features of the two frameworks are quite different.
The development method of Axis2 is similar to a small application server. The development package of Axis2 must be deployed in the form of WAR into a Servlet container, such as Tomcat. Through these containers, the working Web Service can be well monitored. and management.
Axis2's Web administrator module allows us to dynamically configure Axis2. A new service can be uploaded, activated, disabled, and the parameters of the web service can be modified.
The management UI can also manage one or more running services. One disadvantage of this interface-based management method is that all parameters modified during runtime cannot be saved, because after restarting, all modifications you make will become invalid.
Axis2 allows itself to be published as a standalone application to the Web Service, and provides a large number of functions and a good model, which can continuously add new functions through its own architecture (modular architecture).
Some developers think this approach is too cumbersome for their needs, and will prefer CXF
CXF pays more attention to developer ergonomics and embeddability.
Most can be completed through the configuration API, replacing the more cumbersome XML configuration files. Spring's integration is often mentioned. CXF supports Spring2.0 and CXF's API and Spring's configuration files can be very Good correspondence.
CXF emphasizes code-first design and uses a simple API to make it convenient to develop services from existing applications.
But whether you choose Axis2 or CXF, you can get a lot of help from the open source community.
Both frameworks have commercial companies providing services, WSO2 provides AXIS2 support, and Iona provides CXF support. Both companies have active developer communities.
The following introduces the basic concepts of these Web Service frameworks
1. JWS is an implementation of WebService service in Java language and is used to develop and publish Serve.
From the perspective of the service itself, the JWS service has no language boundaries. However, the Java language provides a way for Java developers to conveniently publish and call WebService services.
2. Axis2 is a heavyweight WebService framework under Apache. To be precise, it is a Web Services / SOAP / WSDL engine. It is the master of the WebService framework. It can not only produce and publish WebService, but also generate Java and other language versions of WebService client and server code.
This is its advantage. However, this also inevitably leads to the complexity of Axis2. Developers who have used it all know that the number and size of the packages it relies on are staggering. It is troublesome to package, deploy and release, and it cannot be well integrated with existing Applications integrated into one.
But if you want to develop clients in languages other than Java, the rich tools provided by Axis2 will be your best choice.
3. XFire is a high-performance WebService framework. Before Java6, its popularity even exceeded Apache's Axis2. The advantage of XFire is that it is easy to develop and integrates well with the existing Web. Integrated, and development is also very convenient
However, no relevant coding tools are provided for languages other than Java. XFire was later acquired by Apache because it was too good. After the acquisition, with the rise of Java6 JWS, the open source WebService engine was no longer favored and gradually fell into decline.
4. CXF is a heavyweight SOA simple framework under Apache, which implements ESB (Enterprise Service Bus).
CXF comes from the XFire project and was formed after transformation, just like the current Struts2 comes from WebWork
It can be seen that the fate of XFire will be the same as that of WebWork, and it will eventually fade out of people's consciousness sight. CXF is not only an excellent Web Services / SOAP / WSDL engine, but also a good ESB bus, which provides an option for SOA implementation. Of course, it is not the best. It only implements part of the SOA architecture.
Note: Regarding the relationship between Axis2 and CXF, one is that Axis2 appeared earlier, and CXF caught up quickly.
How to choose:
1. If the application requires multi-language support, Axis2 should be the first choice;
2. If the application is If you follow the Spring philosophy, Apache CXF is a better choice, especially for embedded Web Services;
3. If the application does not require new features, just use the original project The frameworks used, such as Axis1, XFire, Celtrix or BEA, etc., are manufacturers' own Web Services implementations, so don't waste time and money.
Finally, my suggestion is: if you need multi-language 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 if you embed your Web Service into 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. You should continue to use it until you have good reasons to replace it.
Thank you everyone for reading, I hope you will benefit a lot.
This article is reproduced from: https://blog.csdn.net/apicescn/article/details/42965785
Recommended tutorial: "java tutorial"
The above is the detailed content of Take you to learn more about several Web Service frameworks used in JAVA development. For more information, please follow other related articles on the PHP Chinese website!