Development of Java Web services over the next year

Source: Internet
Author: User
In 2006, the Web service field will undergo earth-shaking changes. For Java developers, these changes will include the emergence of the new web service framework and the new function layer built on the web service. In Part 1 of Dennis sosnoski's "Java Web Services" series, he discussed the upcoming changes and gave readers a basic overview.

2006 will be a landmark year for the development of web services (especially Java Web Services. The new third-generation frameworks will be unveiled soon. These frameworks will provide better support for Doc/LIT soap and bring potential performance improvements. At the same time, the fourth generation of WS-* standards finally began to form a group of interoperable layers to expand soap and WSDL to support core enterprise needs.

This article is part 1 of my Java Web series. I will discuss the current status of the following Web Services and the major changes that will take place in 1st, it will briefly explain how the new framework and technology are related and interactive. Many of the frameworks and technologies will be discussed in later articles, so that you can learn about the latest developments in this field and learn how they can help your programming projects.

  Background

It has been more than six years since the release of the soap 1.0 specification. Prior to the release of the SOAP specification, developers had been switching XML messages over the Internet Protocol. However, the introduction of soap promises to standardize the technology and achieve better interoperability. Soap also provides various hook mechanisms to facilitate extension, so that you can add advanced infrastructure functions to enhance future XML message exchange. The WSDL specification was released shortly after the release of soap and added a standard representation of Web Service metadata. Major software vendors soon saw the potential to combine soap and WSDL. Over the next few years, soap web services have become an unstoppable trend.

  Challenges of soap and WSDL

Despite the rapid rise of soap + WSDL throughout the industry, there are still many problems that may prevent soap from achieving the expected complete success. The first aspect is interoperability. Although the most attractive aspect of soap is its interoperability commitment, the actual progress is not significant. This was initially caused by the emphasis on rpc/encoded web services (also called rpc/ENC). In this case, the object model will be serialized into XML and re-constructed at the receiving end. This automatic serialization/deserialization function makes rpc/ENC very easy to use (as long as it uses a relatively simple data structure), but it will generate xml that cannot be used for any purpose. What's worse, the difference in language and platform support leads to a large number of incompatibility between implementations.

The widely accepted web service best practices are now inclined to replace the RPC/ENC style with the document/literal style (DOC/plain. In DOC/clusters, the XML Message format is defined by W3C XML schema. Theoretically, this should eliminate any interoperability issues, because the schema instance defines the actual structure of the XML, and each platform is responsible for properly processing the XML. In practice, the level of support for extremely complex W3C schema standards is uneven, and there are other interoperability problems.

Early rpc/ENC interoperability problems and recent DOC/notebook interoperability problems will be further aggravated by lack of understanding. For DOC/docs, various frameworks support different mode standard subsets, but do not list missing features, making this situation especially acute. Implementation is often incomplete even if different frameworks claim to support specific pattern features, resulting in interoperability issues when using these features. Some of the reasons for turning to DOC/docs are the hope to take advantage of standard enterprise or industry models. The design of such standard patterns is generally not considered to be used in Web Services, so they often use soap frameworks that do not provide good support.

Another problem with the soap Web Service is the expansion of the infrastructure and basic soap processing-the added processing layers of applications on a series of web services-which are constantly ambiguous. Soap is designed to run easily to add such extensions, but these extensions are generally only useful when they are supported by multiple frameworks. This requires the entire industry to collaborate, but it is usually difficult to do. Even the most basic extensions (such as attachments and Security) require years of development, but they are still not supported by all frameworks.

  Soap Resistance

The interoperability and standardization discussed in the previous section limit the applicability of the soap web service. At the same time, the soap framework itself is usually complex and difficult to use. Limited advantages and potential complexity allow many developers to switch to a simpler alternative than soap. Most of the resistance of soap comes from aspects related to a technology called rest. Strictly speaking, rest is the standardization technology of the basic rules that can be applied to the HTTP protocol of Web Services. In reality, rest activities often put normalization aside and include all the content of XML documents transmitted over HTTP without using soap packaging, basically, the method is the same as that of the direct XML document before the emergence of soap.

Rest is far less ambitious than soap. Rest is naturally restricted to using HTTP as the transport layer (although other transmission can be performed using similar methods ), theoretically, soap is independent from the transport layer (although HTTP transmission is widely used for deployment so far ). Rest does not include any method for directly adding infrastructure extensions-this restriction can be considered insignificant before soap actually begins to provide such extensions.

Since the rest function commitment is not comparable to soap, it usually does not need to use any framework code to implement the client or server, so developers do not need to deal with the complexity of the framework. On the other hand, this technology does need to directly implement HTTP and XML processing, but many developers are used to this technology. Directly processing XML can even be considered an advantage, because developers have a larger choice space in this case than the choice provided by the soap framework.

So should we discard soap and start to adopt simpler rest? For forms of many web service applications, this may be a very practical choice, so I am not opposed to this idea. However, many other applications (especially at the enterprise level) need the infrastructure extensions and transmission independence that soap promises. Turning to rest means that these applications will need to directly implement functions such as security, transaction processing and collaboration, rather than providing these functions through the framework. Most enterprise applications may choose to completely avoid using web services, rather than spending this effort.

But like in movies, even if the future of soap looks gloomy, there will still be new hopes. This hope comes from the next-generation framework to be launched. The goal of these frameworks is to ultimately discover the full potential of soap, turn the implementation of brand new soap web service applications into reality, and greatly improve the interoperability of DOC/docs Web Services.

Importance of Indigo

Although this series is about Java technology, the first new framework I will mention is from the bottom of my heart that developers think it is a competitor of Java technology: Microsoft. NET. The new framework is Windows Communication Foundation (WCF), also known as indigo. Indigo was originally intended to be part of the forthcoming release of the javassw "Longhorn" version, but Microsoft has announced that it will be available to older Windows versions in the form of WCF. WCF is expected to replace the older. NET Framework after its launch.

The reason why WCF is important to Web Services is the absolute advantage of Microsoft Desktop System share (not fully occupied-people like me are using Linux for all their work, macs is also very popular-but more than 90% ). The absolute advantage of desktop system usage means that when Microsoft introduces a new framework, it will have a huge impact. The technologies supported by Microsoft will automatically become the targets of most other frameworks, and those that are not supported by Microsoft may become "second-class citizens ", it can be used only when neither the client nor the server uses the Microsoft system.

With WCF, Microsoft will add major new technologies to the basic. NET platform (although some of them are currently provided to basic. NET through the WSE 3.0 add-on ). These technologies include xop/MTOM, WS-Addressing, WS-trust, WS-secureconversation, WS-reliablemessaging, WS-coordination, WS-atomictransaction, and WS-policy. Xop and MTOM are standards that support the inclusion of binary data as attachments in soap messages, this can ultimately achieve the interoperability of attachments in the main soap framework (Microsoft previously only supported one attachment technology called dime, and most frameworks supported Microsoft's early recommendation solution called SWA ). WS-Addressing provides standard formats for message identifiers, destination addresses, and operations. The identifiers are required by multiple other technologies, so they are important, the address and operation must be used to support backup transmission (except HTTP) and asynchronous operations. WS-trust and WS-secureconversation complement older (widely supported) WS-Security and support symmetric encryption with higher performance. WS-reliablemessaging supports message delivery and sequence assurance. WS-Coordination manages operation sequences in the distributed network of web services. WS-atomictransaction uses the two-phase commit protocol to support transaction processing on soap. Finally, WS-policy defines the WSDL extension so that the Service declares its requirements for using all of these technologies. These WCF technologies represent most of the necessary support services for building enterprise applications using Web Services.

If the technologies included in WCF are indeed widely supported and have good interoperability, we will have enough reason to construct enterprise web services with soap as the core. Now, it is very likely to become a reality. Microsoft presented most of the major soap frameworks at the WCF interoperability plug event held on September 14, November 2005, including the Java alternative frameworks I will discuss in the rest of this article. These early test results are very limited, and there are still some problems with full interoperability (including the need to support the changing WS-* standard special edition ), however, the direction of the industry is undoubtedly to support the WCF technology as the core part of the next-generation soap framework.

  Sun and Java standards

JAX-RPC 1.0 is the original standard for Java Web Services. Although JAX-RPC is designed to implement different protocols for actual Web Services, in practice, it is only used for soap services. Multiple different JAX-RPC implementations have been developed, the most widely used is probably the Apache framework, followed by the reference implementation distributed by Sun Microsystems as part of the Java Web Services developer pack.

When developing JAX-RPC 1.0, many in the industry believe that rpc/ENC-style soap will become the most convenient and easy-to-use web service. JAX-RPC 1.0 specifications require support for rpc/ENC and DOC/quiet styles, but do not require support for many pattern features. This has brought about an unfortunate side effect, making DOC/parse soap (this technology is mode-based) A second-stream option.

JAX-RPC 1.0 has some limitations on Web service functions. From its name, we can see that the initial purpose is to support Remote Procedure Call (RPC) operations using XML. Java now has an existing technology for RPC calling between Java applications, that is, Remote Method Invocation (RMI ). The specification team chose to model the JAX-RPC on the existing RMI interface. As long as the request-response operation uses rpc/ENC soap, this model can be matched very closely, but the effect of ing to asynchronous operations or other transfers is not ideal. By the end of 2003, Sun formed an expert group to begin development of the JAX-RPC 2.0 specification, realizing that there was always a significant revision to the JAX-RPC to address these and other issues.

  Jax -*

The main goal of JAX-RPC 2.0 development is to update standards to support mandatory requirements for JAX-RPC 1.x (based on Java 5 features such as annotation and generics ), improved messaging support, including asynchronous operations and transfers except HTTP, and improved mode support by using jaxb 2.0 bindings to replace the simple (but limited) built-in binding of JAX-RPC 1.x. The name of this subsequent standard was changed to JAX-WS 2.0 for emphasis on the scope of change and for other reasons. JAX-WS 2.0 now provides a prerelease version whose production version is expected to be available in mid-2006.

JAX-WS 2.0 successfully fulfilled various expectations for JAX-RPC 1.x and even provided some additional functionality such as limited rest support. Because JAX-WS 2.0 heavily uses annotation and other Java 5 features (so that older JVMs cannot be used), some developers may encounter problems during use, however, for many developers, dependency on the Java 5 feature will be a major advantage. A prominent concern is that JAX-WS 2.0 does not support any of the annotation's back-up options for Web service configuration, which may limit the flexibility and long-term advantages of the framework.

Both JAX-WS 2.0 and jaxb 2.0 are preparing to bind to the release Java 5 version of The j2se specification. Using these components as part of the standard JVM installation will undoubtedly increase the attractiveness of developers, as this will avoid the need to include a large number of frameworks in each application. The disadvantage of including a large number of frameworks in the standard JVM is that (in addition to increasing the basic download size), it may be difficult to implement version control when an error fix is required, just like a situation where components such as JAXP have already been bound ).

Importance of Indigo

Although this series is about Java technology, the first new framework I will mention is from the bottom of my heart that developers think it is a competitor of Java technology: Microsoft. NET. The new framework is Windows Communication Foundation (WCF), also known as indigo. Indigo was originally intended to be part of the forthcoming release of the javassw "Longhorn" version, but Microsoft has announced that it will be available to older Windows versions in the form of WCF. WCF is expected to replace the older. NET Framework after its launch.

The reason why WCF is important to Web Services is the absolute advantage of Microsoft Desktop System share (not fully occupied-people like me are using Linux for all their work, macs is also very popular-but more than 90% ). The absolute advantage of desktop system usage means that when Microsoft introduces a new framework, it will have a huge impact. The technologies supported by Microsoft will automatically become the targets of most other frameworks, and those that are not supported by Microsoft may become "second-class citizens ", it can be used only when neither the client nor the server uses the Microsoft system.

With WCF, Microsoft will add major new technologies to the basic. NET platform (although some of them are currently provided to basic. NET through the WSE 3.0 add-on ). These technologies include xop/MTOM, WS-Addressing, WS-trust, WS-secureconversation, WS-reliablemessaging, WS-coordination, WS-atomictransaction, and WS-policy. Xop and MTOM are standards that support the inclusion of binary data as attachments in soap messages, this can ultimately achieve the interoperability of attachments in the main soap framework (Microsoft previously only supported one attachment technology called dime, and most frameworks supported Microsoft's early recommendation solution called SWA ). WS-Addressing provides standard formats for message identifiers, destination addresses, and operations. The identifiers are required by multiple other technologies, so they are important, the address and operation must be used to support backup transmission (except HTTP) and asynchronous operations. WS-trust and WS-secureconversation complement older (widely supported) WS-Security and support symmetric encryption with higher performance. WS-reliablemessaging supports message delivery and sequence assurance. WS-Coordination manages operation sequences in the distributed network of web services. WS-atomictransaction uses the two-phase commit protocol to support transaction processing on soap. Finally, WS-policy defines the WSDL extension so that the Service declares its requirements for using all of these technologies. These WCF technologies represent most of the necessary support services for building enterprise applications using Web Services.

If the technologies included in WCF are indeed widely supported and have good interoperability, we will have enough reason to construct enterprise web services with soap as the core. Now, it is very likely to become a reality. Microsoft presented most of the major soap frameworks at the WCF interoperability plug event held on September 14, November 2005, including the Java alternative frameworks I will discuss in the rest of this article. These early test results are very limited, and there are still some problems with full interoperability (including the need to support the changing WS-* standard special edition ), however, the direction of the industry is undoubtedly to support the WCF technology as the core part of the next-generation soap framework.

  Sun and Java standards

JAX-RPC 1.0 is the original standard for Java Web Services. Although JAX-RPC is designed to implement different protocols for actual Web Services, in practice, it is only used for soap services. Multiple different JAX-RPC implementations have been developed, the most widely used is probably the Apache framework, followed by the reference implementation distributed by Sun Microsystems as part of the Java Web Services developer pack.

When developing JAX-RPC 1.0, many in the industry believe that rpc/ENC-style soap will become the most convenient and easy-to-use web service. JAX-RPC 1.0 specifications require support for rpc/ENC and DOC/quiet styles, but do not require support for many pattern features. This has brought about an unfortunate side effect, making DOC/parse soap (this technology is mode-based) A second-stream option.

JAX-RPC 1.0 has some limitations on Web service functions. From its name, we can see that the initial purpose is to support Remote Procedure Call (RPC) operations using XML. Java now has an existing technology for RPC calling between Java applications, that is, Remote Method Invocation (RMI ). The specification team chose to model the JAX-RPC on the existing RMI interface. As long as the request-response operation uses rpc/ENC soap, this model can be matched very closely, but the effect of ing to asynchronous operations or other transfers is not ideal. By the end of 2003, Sun formed an expert group to begin development of the JAX-RPC 2.0 specification, realizing that there was always a significant revision to the JAX-RPC to address these and other issues.

  Jax -*

The main goal of JAX-RPC 2.0 development is to update standards to support mandatory requirements for JAX-RPC 1.x (based on Java 5 features such as annotation and generics ), improved messaging support, including asynchronous operations and transfers except HTTP, and improved mode support by using jaxb 2.0 bindings to replace the simple (but limited) built-in binding of JAX-RPC 1.x. The name of this subsequent standard was changed to JAX-WS 2.0 for emphasis on the scope of change and for other reasons. JAX-WS 2.0 now provides a prerelease version whose production version is expected to be available in mid-2006.

JAX-WS 2.0 successfully fulfilled various expectations for JAX-RPC 1.x and even provided some additional functionality such as limited rest support. Because JAX-WS 2.0 heavily uses annotation and other Java 5 features (so that older JVMs cannot be used), some developers may encounter problems during use, however, for many developers, dependency on the Java 5 feature will be a major advantage. A prominent concern is that JAX-WS 2.0 does not support any of the annotation's back-up options for Web service configuration, which may limit the flexibility and long-term advantages of the framework.

Both JAX-WS 2.0 and jaxb 2.0 are preparing to bind to the release Java 5 version of The j2se specification. Using these components as part of the standard JVM installation will undoubtedly increase the attractiveness of developers, as this will avoid the need to include a large number of frameworks in each application. The disadvantage of including a large number of frameworks in the standard JVM is that (in addition to increasing the basic download size), it may be difficult to implement version control when an error fix is required, just like a situation where components such as JAXP have already been bound ).

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.