Using Web Services Reliable Messaging 3-13
The following example shows a simple Web service reliable messaging WS-Policy file: ?xml version=1.0?
wsp:Policy xmlns:wsrm=http:schemas.xmlsoap.orgws200502rmpolicy
xmlns:wsp=http:schemas.xmlsoap.orgws200409policy xmlns:beapolicy=http:www.bea.comwsrmpolicy
wsrm:RMAssertion wsrm:InactivityTimeout
Milliseconds=600000 wsrm:BaseRetransmissionInterval
Milliseconds=500 wsrm:ExponentialBackoff
wsrm:AcknowledgementInterval Milliseconds=2000
wsrm:RMAssertion wsp:Policy
For more information about Reliable Messaging policy assertions in the WS-Policy file, see Web Service Reliable Messaging Policy Assertion Reference in WebLogic Web
Services Reference for Oracle WebLogic Server.
3.5.3 Using Multiple Policy Alternatives
You can configure multiple policy alternatives—also referred to as smart policy alternatives—for a single Web service by creating a custom policy file. At runtime,
WebLogic Server selects which of the configured policies to apply. It excludes policies that are not supported or have conflicting assertions and selects the appropriate
policy, based on your configured preferences, to verify incoming messages and build the response messages.
wsrm:AcknowledgmentInterval Maximum interval, in milliseconds, in which the destination
endpoint must transmit a stand-alone acknowledgement. The default value is set by the SAF agent on the destination endpoints
WebLogic Server instance.
beapolicy:Expires Amount of time after which the reliable Web service expires and
does not accept any new sequence messages. The default value is to never expire. This element has a single attribute, Expires, whose
data type is an XML Schema duration type see
http:www.w3.orgTR2001REC-xmlschema-2-20010502 duration
. For example, if you want to set the expiration time to one day, use the following: beapolicy:Expires
Expires=P1D .
beapolicy:QOS Delivery assurance level, as described in
Table 3–9 . The element has
one attribute, QOS, which you set to one of the following values: AtMostOnce
, AtLeastOnce, or ExactlyOnce. You can also include the InOrder string to specify that the messages be in order.
The default value is ExactlyOnce InOrder. This element is typically not set.
Table 3–7 Cont. Web Service Reliable Messaging Assertions Version 1.0
Assertion Description
3-14 Programming Advanced Features of JAX-RPC Web Services for Oracle WebLogic Server
The following example provides an example of a security policy that supports both 1.1and 1.0 WS-Reliable Messaging. Each policy alternative is enclosed in a wsp:All
element.
wsp:Policy xmlns:wsp=http:schemas.xmlsoap.orgws200409policy wsp:ExactlyOne
wsp:All wsrmp10:RMAssertion
xmlns:wsrmp10=http:schemas.xmlsoap.orgws200502rmpolicy wsrmp10:InactivityTimeout Milliseconds=1200000
wsrmp10:BaseRetransmissionInterval Milliseconds=60000 wsrmp10:ExponentialBackoff
wsrmp10:AcknowledgementInterval Milliseconds=800 wsrmp10:RMAssertion
wsp:All wsp:All
wsrmp:RMAssertion xmlns:wsrmp=http:docs.oasis-open.orgws-rxwsrmp200702
wsrmp:SequenceSTR wsrmp:DeliveryAssurance
wsp:Policy wsrmp:AtMostOnce
wsp:Policy wsrmp:DeliveryAssurance
wsrmp:RMAssertion wsp:All
wsp:ExactlyOne wsp:Policy
For more information about multiple policy alternatives, see Smart Policy Selection in Configuring Message-Level Security in Securing WebLogic Web Services for Oracle
WebLogic Server.
3.6 Programming Guidelines for the Reliable JWS File