The following sections provide reference information about Web Service reliable messaging policy assertions in a WS-Policy file:
|WARNING:||This section applies only to JAX-RPC 1.1-based Web Services, and not to JAX-WS 2.0 Web Services.|
You use WS-Policy files to configure the reliable messaging capabilities of a WebLogic Web Service running on a destination endpoint. Use the
@Policy JWS annotations in the JWS file that implements the Web Service to specify the name of the WS-Policy file that is associated with a Web Service.
A WS-Policy file is an XML file that conforms to the
<wsp:Policy>. To configure Web Service reliable messaging, you first add a
<wsrm:RMAssertion> child element; its main purpose is to group all the reliable messaging policy assertions together. Then you add as child elements to
<wsrm:RMAssertion> the assertions that enable the type of Web Service reliable messaging you want. All these assertions conform to the .
|WARNING:||You must enter the assertions in the ordered listed in the graphic below. See Graphical Representation.|
WebLogic Server includes two WS-Policy files (
LongRunningReliability.xml) that contain typical reliable messaging assertions that you can use if you do not want to create your own WS-Policy file. For details about these two files, see .
Seefor task-oriented information about creating a reliable WebLogic Web Service.
The following graphic describes the element hierarchy of Web Service reliable messaging policy assertions in a WS-Policy file.
The following example shows a simple WS-Policy file used to configure reliable messaging for a WebLogic Web Service:
<beapolicy:Expires Expires="P1D" optional="true"/>
Specifies an amount of time after which the reliable Web Service expires and does not accept any new sequences. Client applications invoking this instance of the reliable Web Service will receive an error if they try to invoke an operation after the expiration duration.
The default value of this element, if not specified in the WS-Policy file, is for the Web Service to never expires.
Specifies the delivery assurance (or Quality Of Service) of the Web Service:
The default value of this element, if not specified in the WS-Policy file, is
If you specify one of the
Specifies the maximum interval, in milliseconds, in which the destination endpoint must transmit a stand alone acknowledgement.
A destination endpoint can send an acknowledgement on the return message immediately after it has received a message from a source endpoint, or it can send one separately in a stand alone acknowledgement. In the case that a return message is not available to send an acknowledgement, a destination endpoint may wait for up to the acknowledgement interval before sending a stand alone acknowledgement. If there are no unacknowledged messages, the destination endpoint may choose not to send an acknowledgement.
This assertion does not alter the formulation of messages or acknowledgements as transmitted. Its purpose is to communicate the timing of acknowledgements so that the source endpoint may tune appropriately.
This element is optional. If you do not specify this element, the default value is set by the store and forward (SAF) agent configured for the destination endpoint.
Specifies the interval, in milliseconds, that the source endpoint waits after transmitting a message and before it retransmits the message.
If the source endpoint does not receive an acknowledgement for a given message within the interval specified by this element, the source endpoint retransmits the message. The source endpoint can modify this retransmission interval at any point during the lifetime of the sequence of messages. This assertion does not alter the formulation of messages as transmitted, only the timing of their transmission.
This element can be used in conjunctions with the
<wsrm:ExponentialBackoff> element to specify that the retransmission interval will be adjusted using the algorithm specified by the
This element is optional. If you do not specify this element, the default value is set by the store and forward (SAF) agent configured for the source endpoint. If using the Administration Console to configure the SAF agent, this value is labeled Retry Delay Base.
Specifies that the retransmission interval will be adjusted using the exponential backoff algorithm.
This element is used in conjunction with the
<wsrm:BaseRetransmissionInterval> element. If a destination endpoint does not acknowledge a sequence of messages for the amount of time specified by
<wsrm:BaseRetransmissionInterval>, the exponential backoff algorithm will be used for timing of successive retransmissions by the source endpoint, should the message continue to go unacknowledged.
The exponential backoff algorithm specifies that successive retransmission intervals should increase exponentially, based on the base retransmission interval. For example, if the base retransmission interval is 2 seconds, and the exponential backoff element is set in the WS-Policy file, successive retransmission intervals if messages continue to be unacknowledged are 2, 4, 8, 16, 32, and so on.
This element is optional. If not set, the same retransmission interval is used in successive retries, rather than the interval increasing exponentially.
This element has no attributes.
Specifies (in milliseconds) a period of inactivity for a sequence of messages. A sequence of messages is defined as a set of messages, identified by a unique sequence number, for which a particular delivery assurance applies; typically a sequence originates from a single source endpoint. If, during the duration specified by this element, a destination endpoint has received no messages from the source endpoint, the destination endpoint may consider the sequence to have been terminated due to inactivity. The same applies to the source endpoint.
This element is optional. If it is not set in the WS-Policy file, then sequences never time-out due to inactivity.
Main Web Service reliable messaging assertion that groups all the other assertions under a single element.
The presence of this assertion in a WS-Policy file indicates that the corresponding Web Service must be invoked reliably.