Home Java javaTutorial Take you to learn more about several Web Service frameworks used in JAVA development

Take you to learn more about several Web Service frameworks used in JAVA development

Jul 08, 2020 pm 01:14 PM
java web service

Take you to learn more about several Web Service frameworks used in JAVA development

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1665
14
PHP Tutorial
1269
29
C# Tutorial
1249
24
Break or return from Java 8 stream forEach? Break or return from Java 8 stream forEach? Feb 07, 2025 pm 12:09 PM

Java 8 introduces the Stream API, providing a powerful and expressive way to process data collections. However, a common question when using Stream is: How to break or return from a forEach operation? Traditional loops allow for early interruption or return, but Stream's forEach method does not directly support this method. This article will explain the reasons and explore alternative methods for implementing premature termination in Stream processing systems. Further reading: Java Stream API improvements Understand Stream forEach The forEach method is a terminal operation that performs one operation on each element in the Stream. Its design intention is

PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP vs. Python: Understanding the Differences PHP vs. Python: Understanding the Differences Apr 11, 2025 am 12:15 AM

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP vs. Other Languages: A Comparison PHP vs. Other Languages: A Comparison Apr 13, 2025 am 12:19 AM

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.

PHP vs. Python: Core Features and Functionality PHP vs. Python: Core Features and Functionality Apr 13, 2025 am 12:16 AM

PHP and Python each have their own advantages and are suitable for different scenarios. 1.PHP is suitable for web development and provides built-in web servers and rich function libraries. 2. Python is suitable for data science and machine learning, with concise syntax and a powerful standard library. When choosing, it should be decided based on project requirements.

PHP's Impact: Web Development and Beyond PHP's Impact: Web Development and Beyond Apr 18, 2025 am 12:10 AM

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

PHP: The Foundation of Many Websites PHP: The Foundation of Many Websites Apr 13, 2025 am 12:07 AM

The reasons why PHP is the preferred technology stack for many websites include its ease of use, strong community support, and widespread use. 1) Easy to learn and use, suitable for beginners. 2) Have a huge developer community and rich resources. 3) Widely used in WordPress, Drupal and other platforms. 4) Integrate tightly with web servers to simplify development deployment.

PHP vs. Python: Use Cases and Applications PHP vs. Python: Use Cases and Applications Apr 17, 2025 am 12:23 AM

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

See all articles