September 30, 2014
Hot Topics:
RSS RSS feed Download our iPhone app

Web Services Security and More, Part 2: The Global XML Web Services Architecture (GXA)

  • May 20, 2003
  • By Joseph M. Chiusano, Booz Allen Hamilton
  • Send Email »
  • More Articles »

Policy Assertions

WS-ReliableMessaging introduces several new policy assertions that can be used for the description of messaging-related endpoint policies. Some of these are listed here:

  • Delivery Assurance: Described earlier in the article;
  • Sequence Expiration: Also described earlier in the article;
  • Inactivity Timeout: Specifies (in milliseconds) the amount of time after which an endpoint may consider a sequence to have been terminated due to inactivity;
  • Retransmission Interval: Specifies (in milliseconds) the amount of time after which a Source will retransmit a message if no acknowledgement has been received;

Policy assertions can be attached to individual sequences, or to a set of sequences (through the specification of an identifier prefix). WS-ReliableMessaging leverages the WS-PolicyAttachment specification for this capability. In order to attach a policy to an individual sequence, a <wsrm:SequenceRef> element is included within the <wsp:PolicyAttachment> element that specifies the sequence identifier, while the policy is specified within the <wsp:Policy> element. This is shown below:

<wsp:PolicyAttachment>
  <wsp:AppliesTo>
    <wsrm:SequenceRef match="Exact">
      <wsu:Identifier>http://sequence1.com</wsu:Identifier>
    </wsrm:SequenceRef>
  </wsp:AppliesTo>
  <wsp:Policy>
    <wsrm:DeliveryAssurance Value="wsrm:AtMostOnce"
          wsp:Usage="wsp:Required"/>
  </wsp:Policy>
</wsp:PolicyAttachment>

In the preceding example, a delivery assurance policy of "AtMostOnce" is associated with the exact sequence whose identifier is "http://sequence1.com" (note the value of the "match" attribute). This policy could also have been associated with all sequences whose identifier began (for example) with "http://sequence" by specifying the following (changes are in bold):

<wsp:PolicyAttachment>
  <wsp:AppliesTo>
    <wsrm:SequenceRef match="Prefix">
      <wsu:Identifier>http://sequence</wsu:Identifier>
    </wsrm:SequenceRef>
  </wsp:AppliesTo>
  <wsp:Policy>
    <wsrm:DeliveryAssurance Value="wsrm:AtMostOnce"
          wsp:Usage="wsp:Required"/>
  </wsp:Policy>
</wsp:PolicyAttachment>

Specification Location

The WS-ReliableMessaging specification can be found at msdn.microsoft.com/ws/2003/03/ws-reliablemessaging.

Addressing Web Services and Messages: WS-Addressing

The WS-Addressing specification advances current mechanisms for addressing Web services and messages by defining transport-neutral mechanisms for identifying Web service endpoints and securing end-to-end endpoint identification in messages. For the former capability (identifying Web service endpoints), it addresses what are described as "current limits" to the WSDL 1.1 extensibility model through the definition of a lightweight and extensible mechanism to satisfy these limits. For the latter capability (securing end-to-end endpoint identification), it defines a standard representation for message information headers that convey endpoint information.

Endpoint References

WS-Addressing defines a standard representation for endpoint references that incorporates information from a WSDL description as well as policy information. The following are examples of the information that is represented:

  • Address: A URI that represents a logical address or identifier for the service endpoint;
  • Reference Properties: One or more individual properties that are specific to the endpoint;
  • Port type: The port type of the endpoint;
  • ServiceName: The <wsdl:service> definition that contains a WSDL description of the endpoint being referenced;
  • Policy: A policy that is relevant to the interaction with the endpoint;

The following example illustrates an endpoint reference:

<wsa:EndpointReference xmlns:myns="www.mynamespace.com">
  <wsa:Address>http://www.someendpoint.com</wsa:Address>
  <wsa:ReferenceProperties>
    <myns:SenderID>135790</myns:SenderID>
  </wsa:ReferenceProperties>
  <wsa:PortType>InventoryPortType</wsa:PortType>
  <wsa:ServiceName>InventoryService</wsa:ServiceName>
  <wsp:Policy>
    <wsp:TextEncoding wsp:Usage="wsp:Required"
                      Encoding="iso-8859-5"/>
  </wsp:Policy>
</wsa:EndpointReference>

In the preceding example, the <myns:Sender ID> element contains a value that presumably is used by the endpoint to identify the sender. The example also contains a "Text Encoding" assertion (as defined in WS-PolicyAssertions) that indicates the character encoding that is supported by the endpoint.

Binding Endpoint References to SOAP

SOAP messages addressed to endpoints can be constructed by using endpoint reference information through the use of a SOAP binding specified in the WS-Addressing specification. This binding is defined by the following two rules:

  1. For SOAP message destination:
    • The "Address" value in the endpoint reference is copied into the <wsa:To> element (which is defined by this specification) the SOAP header;
  2. For reference properties:
    • Each reference property element becomes a header block in the SOAP message;

By using the earlier endpoint reference definition as a starting point, the header of a SOAP message constructed using this endpoint reference definition and the above binding rules would look as follows:

<S:Header>
      ...
  <wsa:To>http://www.someendpoint.com</wsa:To>
  <myns:SenderID>35790</myns:SenderID>
      ...
</S:Header>




Page 4 of 5



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Sitemap | Contact Us

Rocket Fuel