uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

23.4 Settings using WS-Policy

In the WS-RM 1.2 functionality, unique settings are coded in the WSDL as WS-Policy in addition to the WS-RM Policy settings. This section describes the properties to be added in the WSDL.

For details on how to add the WS-RM Policy, see 34.4 How to add the WS-RM Policy.

Table 23-4 Properties to be added in the WSDL

No. Property Explanation Unit Range Default value
1 <net35rmp:InactivityTimeout Milliseconds = "set-value"/> Specifies the sequence validity period. To set up the re-transmission interval for the application messages, specify a value that is equal to or more than the re-transmission interval for the application messages.

If there is no communication during the set period
The validity period of the sequence expires and the sequence closes automatically.

If a message is sent after the validity period expires
The SequenceTerminatedException or UnknownSequenceException exceptions, which are the child classes of WebServiceException, occur.

If a message is received after the validity period expires
The SequenceTerminated fault or UnknownSequence fault is sent back.

If the communication continues
You must re-acquire the port object and re-generate the sequence.

If the specified value is out of range
A warning message is output and the operation is executed with the default value (KDJR16017-W).
milliseconds 1 to 9,223,372,036,854,775,807 600,000
2 <cwsrm:MaxMessageNumber value="set-value"/> Specifies the maximum number of messages that can be handled in 1 sequence.

If sent messages exceed the set number of messages
The MessageNumberRolloverException exception, which is a child class of WebServiceException, occurs.

If received messages exceed the set number of messages
The MessageNumberRollover fault is sent back.

If the communication continues
To terminate the existing sequence, invoke the close method by casting the port object to com.sun.xml.ws.Closeable. Then you must re-acquire the port object and re-generate the sequence.

If the specified value is out of range
A warning message is output and the operation is executed with the default value (KDJR16017-W).
-- 1 to 100,000 10,000
3 <metro:AckRequestInterval Milliseconds="set-value"/> Specifies the interval for sending the Ack messages that are automatically sent by the WS-RM 1.2 functionality in the background. Depending on the timing, an interval that is about twice the set value might be opened.
If the specified value is out of range, a warning message is output and the operation is executed with the default value (KDJR16017-W).
milliseconds 1 to 9,223,372,036,854,775,807 2,000
4 <metro:RetransmissionConfig>
<metro:Interval Milliseconds="set-value"/>
</metro:RetransmissionConfig>
Specifies the re-transmission interval for the application messages.
If the specified value is out of range, a warning message is output and the operation is executed with the default value (KDJR16017-W).
milliseconds 1 to 9,223,372,036,854,775,807 2,000
5 <metro:RetransmissionConfig>
<metro:MaxRetries>set-value</metro:MaxRetries>
</metro:RetransmissionConfig>
Specifies the number of re-transmitted application messages. If the specified re-transmission count is exceeded, the re-transmission process is stopped, and the error that occurred is returned to the application.

If 0 is specified
The re-transmission count becomes infinite.

If the specified value is out of range
A warning message is output and the operation is executed with the default value (KDJR16017-W).
-- 0 to 9,223,372,036,854,775,807 3

Legend:
--: None

The following is an example of WS-RM Policy in which the sequence validity period is set at 300,000 milliseconds (5 min) and the maximum number of messages in the sequence is set at 1,000:

 <wsp:Policy wsu:Id="WSRM_policy">
  <wsp:ExactlyOne>
   <wsp:All>
    <wsrmp:RMAssertion>
     <wsp:Policy>
      <wsrmp:DeliveryAssurance>
       <wsp:Policy>
        <wsrmp:ExactlyOnce/>
       </wsp:Policy>
      </wsrmp:DeliveryAssurance>
     </wsp:Policy>
    </wsrmp:RMAssertion>
    <wsaw:UsingAddressing/>
    <net35rmp:InactivityTimeout Milliseconds="300000"/>
    <cwsrm:MaxMessageNumber value="1000"/>
   </wsp:All>
  </wsp:ExactlyOne>
 </wsp:Policy>