Chapter 4: Reliable Messaging for Web Services


Although SOAP and its underlying transport protocols provide adequate support for sending a message from point A to point B, Web services require a more robust mechanism to guarantee that messages are being received by their intended recipients and that message addressing remains consistent, even when messages are routed or carried using heterogeneous message transports. This chapter discusses some of the newly proposed Web service standards designed to solve these message reliability issues. It also describes the extent of the messaging support provided by Microsoft in WSE.

Introduction to Reliable Messaging

As I indicated in previous chapters, SOAP is a high-level protocol in the overall Web services protocol stack whose main job is to provide a package for XML data, the metadata needed by the recipient, and a binding to a transport. Therefore, SOAP relies on lower-level protocols, such as HTTP, SMTP, and TCP to get the SOAP message and its data payload from endpoint to endpoint. When you send a SOAP message using TCP, HTTP, or any other potential transport protocol for SOAP, these transports see the message path only as a pair of endpoints. Unlike the protocols to which they re bound, SOAP messages need a more holistic view of where they re headed. Certain Web service implementations may require a SOAP message be modified by a specific sequence of Web servers before reaching its ultimate destination. A Web service may also need to be able to delegate the processing of an incoming message to other services. There might even be a need during this message routing process for a SOAP message to be transferred from one transport to another, say from HTTP to TCP. Of course, the core SOAP specification doesn t provide a mechanism for reliably addressing SOAP messages through this kind of complex message routing.

While you generally think of Web services using a two-way, request-response messaging behavior, Web services also support other types of messaging behaviors, including asynchronous messaging. The Web Services Description Language specification (WSDL) identifies the following Web service messaging behaviors:

  • Request-response in this synchronous messaging scenario, the client sends a request message to the Web Service and receives response message back from the service.

  • One-way a type of asynchronous messaging, the client sends a message, but a response message is not required or expected. This might be used when a client needs to send period status updates to a Web service.

  • Solicit-response The Web Service sends a message to the client, and the client then sends back a correlated reply message. This might be used when a Web service needs to poll clients for status information.

  • Notification another type of asynchronous messaging; the Web Service sends a message to one or more clients without requiring a response. This might be used for clients who have subscribed to event notifications from a Web service.

An equally important concern in SOAP messaging is the issue of message reliability. If we cannot guarantee that messages will be transmitted reliably between endpoints, all of the expected benefits of Web services cannot be realized. Since we do live in a world of unreliable networks, there needs to be a mechanism to enable a message sender to verify that one or a series of SOAP messages have indeed reached the intended recipient. Therefore, reliability for SOAP messaging must address the following issues:

  • Message ordering The need to order a series of related messages regardless of when they actually arrive .

  • Message acknowledgment The need to be able to send a response back to the sender stating that one or more messages in a series have been received.

  • Message delivery policies The need for an endpoint to be able to request specific reliability behaviors for requests , such as the number of times that a failed message should be re-sent and how long to wait before resending.

Reliable Messaging Specifications

To drive the interoperability of SOAP messaging in the enterprise so that, for example, a .NET Web service can interact reliably with a Web service based on Java 2 Platform Enterprise Edition (J2EE), we need a set of SOAP-based messaging specifications that can help to guarantee reliable messaging between Web services that are implemented on differing platforms. To that end, IBM, BEA Systems, and Microsoft have teamed up to propose two specifications that begin to solve these problems. These specifications are WS-Addressing, which defines a consistent addressing model for SOAP messages that is transport independent, and WS-ReliableMessaging, which defines mechanisms for message acknowledgment and ordering and for declaring messaging policies.




Understanding Web Services Specifications and the WSE
Understanding Web Services Specifications and the WSE (Pro Developer)
ISBN: 0735619131
EAN: 2147483647
Year: 2006
Pages: 79

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net