5 Using Web Services Reliable Messaging

This chapter describes how to use Web Services Reliable Messaging (WS-ReliableMessaging) with Oracle Infrastructure Web services to exchange messages reliably.

This chapter includes the following topics:

Overview of Web Services Reliable Messaging

Message exchanges between Web services can be disrupted by various errors, including network, system, and software component errors or anomalies. Once a Web service or client sends a message, there is no immediate way, except by consulting network-level exceptions or SOAP fault messages, to determine whether the message was delivered successfully, if delivery failed and requires a retransmission, or if a sequence of messages arrived in the correct order.

To resolve these issues, Oracle Infrastructure Web services support the messaging protocol defined by the Web Services Reliable Messaging (WS-ReliableMessaging) specification at http://docs.oasis-open.org/ws-rx/wsrm/v1.2/wsrm.pdf. This specification describes a protocol that makes message exchanges reliable. Reliable is defined as the ability to guarantee message delivery between the two Web Services. It ensures that messages are delivered reliably between distributed applications regardless of software component, system, or network failures. Ordered delivery is assured and automatic retransmission of failed messages does not have to be coded by each client application.

A reliable Web service provides the following delivery assurances.

Table 5-1 Delivery Assurances for Reliable Messaging

Delivery Assurance Description

At Most Once

Messages are delivered at most once, without duplication. It is possible that some messages may not be delivered at all.

At Least Once

Every message is delivered at least once. It is possible that some messages are delivered more than once.

Exactly Once

Every message is delivered exactly once, without duplication.

In Order

Messages are delivered in the order that they were sent. This delivery assurance can be combined with one of the preceding three assurances.

Consider using reliable messaging if your Web service is experiencing the following problems:

  • Network failures or dropped connections.

  • Messages are lost in transit.

  • Messages are arriving at their destination out of order.

Predefined Reliable Messaging Policies

Reliable messaging is driven by policies and the Policy framework. As described in Chapter 2, "Attaching Policies to Oracle Infrastructure Web Services," OWSM provides a set of predefined policies that are automatically available when you install Oracle Fusion Middleware.

The reliable messaging policies listed in Table 5-2 are available out-of-the-box.

Table 5-2 Predefined Reliable Messaging Policies

Reliable Messaging Policy Description


When directly attached to an endpoint or globally attached at a lower scope, effectively disables a globally attached Web Services Reliable Messaging policy at a higher scope.


Configures Web services reliable messaging on the Web service and client.

For more information about the reliable messaging predefined policies, see "Reliable Messaging Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager.

Attaching Reliable Messaging Policies

You can attach reliable messaging policies to Oracle Infrastructure Web services or clients at design time using Oracle JDeveloper, or at runtime using the Fusion Middleware Control. For more information, see Chapter 2, "Attaching Policies to Oracle Infrastructure Web Services."

Configuring Reliable Messaging Policies

You must configure the reliable messaging policies before you can use them in your environment. The steps to configure reliable messaging policies are described in "Reliable Messaging Policies" in Securing Web Services and Managing Policies with Oracle Web Services Manager.