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/200702/wsrm-1.1-spec-os-01.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,", Oracle WSM 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

oracle/wsrm11_policy

Provides support for version 1.1 of the Web Services Reliable Messaging protocol.

oracle/wsrm10_policy

Provides support for version 1.0 of the Web Services Reliable Messaging protocol.


For more information about the reliable messaging predefined policies, see "Reliable Messaging Policies" in Security and Administrator's Guide for Web Services.

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 Oracle Enterprise Manager. 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. You need to configure the following:

  • Delivery assurance (see Table 5-1)

  • Message store information, such as type and name

  • Retransmission interval—Interval, in milliseconds, that the source endpoint waits after transmitting a message and before it retransmits the message if it receives no acknowledgment for that message.

  • Inactivity timeout—Amount of time, in milliseconds, that can elapse between message exchanges associated with a particular WS-RM sequence before the sequence is terminated.

The steps to configure reliable messaging policies are described in "Reliable Messaging Policies and Configuration Steps" in Security and Administrator's Guide for Web Services.