9.1 EventSource Assertion

The mechanism for indicating that a binding or endpoint conforms to the WS-Eventing specification's definition of an event source is through the use of the Web Services Policy - Framework [WS-Policy] and Web Services Policy - Attachment [WS-Policy Attachment] specifications.

This specification defines a policy assertion (wse:EventSource). The wse:EventSource policy assertion applies to the endpoint policy subject.

For WSDL 1.1, these assertions MAY be attached to wsdl11:port or wsdl11:binding. For WSDL 2.0, they MAY be attached to wsdl20:endpoint or wsdl20:binding. A policy expression containing the wse:EventSource policy assertion MUST NOT be attached to a wsdl:portType or wsdl20:interface.

The wse:EventSource policy assertion is a nested policy container assertion. The meaning of this assertion, when present in a policy alternative, is that WS-Eventing is required to communicate with the subject and that the subject is a WS-Eventing event source.

In order to indicate that the subject supports WS-Eventing but does not require its use, an additional policy alternative SHOULD be provided which does not contain this assertion. The compact authoring style for an OPTIONAL policy assertion (the wsp:Optional attribute) provided by WS-Policy MAY be used to indicate two policy alternatives, one which contains the policy assertion, and another which does not.

The normative outline of this assertion is:

<wse:EventSource ...>

  <wse:DateTimeSupported .../> ?

  <wse:FilterDialect ...> xs:anyURI </wse:FilterDialect> *

  <wse:MaxExpires ...> xs:duration </wse:MaxExpires> ?

  <wse:FormatName ...> xs:anyURI </wse:FormatName> *

  <wse:EndToSupported .../> ?

  <wse:NotificationPolicy ...>

    xs:any +

  </wse:NotificationPolicy> ?

  ...

</wse:EventSource>

The following describes additional, normative constraints on the outline listed above:

/wse:EventSource

A policy assertion that specifies that WS-Eventing protocol MUST be used when communicating with this endpoint and that the subject is an event source. This assertion has Endpoint Policy Subject.

/wse:EventSource/wse:DateTimeSupported

When present, this OPTIONAL parameter indicates support for expiration time expressed as specific time (rather than duration).

/wse:EventSource/wse:FilterDialect

When present, this OPTIONAL parameter indicates support for the specified filter dialect IRI.

/wse:EventSource/wse:MaxExpires

When present, this OPTIONAL parameter indicates the maximum subscription expiration time that this endpoint will support. The implied default is indefinite (no expiry). Note: a value of "PT0S" indicates that this endpoint supports subscriptions with an infinite lifetime.

/wse:EventSource/wse:FormatName

When present, this OPTIONAL parameter indicates support for the specified event delivery format name URI.

/wse:EventSource/wse:EndToSupported

When present, this OPTIONAL parameter indicates support for the /wse:Subscribe/wse:EndTo semantics. That is, when a subscription request contains a wse:EndTo element, a SubscriptionEnd message will be sent to the EPR contained in the wse:EndTo element, if the subscription terminates unexpectedly.

/wse:EventSource/wse:NotificationPolicy

When present, this OPTIONAL parameter includes the set of Policy expressions that the event source supports for sending notifications. This element MUST have at least one child element - typically a wsp:Policy element or a wsp:PolicyReference element. A subscriber can use this information to know the valid set of Policy expressions that MAY be used within a wse:NotifyTo EPR. If the event source advertises Notification WSDL then any Policy expressions associated with those WSDLs MUST be included within this parameter.

B XML Schema

A normative copy of the XML Schema [XMLSchema - Part 1], [XMLSchema - Part 2] description for this specification can be retrieved from the following address:

http://www.w3.org/2009/09/ws-evt/eventing.xsd

A non-normative copy of the XML schema is listed below for convenience.

<xs:schema

  targetNamespace='http://www.w3.org/2009/09/ws-evt'

  xmlns:tns='http://www.w3.org/2009/09/ws-evt'

  xmlns:wsa='http://www.w3.org/2005/08/addressing'

  xmlns:xs='http://www.w3.org/2001/XMLSchema'

  elementFormDefault='qualified'

  blockDefault='#all'>

 

  <xs:import

    namespace='http://www.w3.org/XML/1998/namespace'

    schemaLocation='http://www.w3.org/2001/xml.xsd' />

  <xs:import

    namespace='http://www.w3.org/2005/08/addressing'

    schemaLocation='http://www.w3.org/2005/08/addressing/ws-addr.xsd' />

 

  <!-- Types and global elements -->

  <xs:complexType name='DeliveryType' mixed='true'>

    <xs:sequence>

      <xs:element ref='tns:NotifyTo' minOccurs='0' maxOccurs='1' />

      <xs:any namespace='##other' processContents='lax'

              minOccurs='0' maxOccurs='unbounded' />

    </xs:sequence>

    <xs:anyAttribute namespace='##other' processContents='lax' />

  </xs:complexType>

 

  <xs:complexType name='FormatType' mixed='true'>

    <xs:sequence>

      <xs:any namespace='##any' processContents='lax'

              minOccurs='0' maxOccurs='unbounded' />

    </xs:sequence>

    <xs:attribute name='Name' type='xs:anyURI' use='optional'

      default='http://http://www.w3.org/2009/09/ws-evt/DeliveryFormats/Unwrap' />

    <xs:anyAttribute namespace='##other' processContents='lax' />

  </xs:complexType>

 

  <xs:simpleType name='NonNegativeDurationType'>

    <xs:restriction base='xs:duration'>

      <xs:minInclusive value='P0Y0M0DT0H0M0S' />

    </xs:restriction>

  </xs:simpleType>

 

  <xs:simpleType name='DurationDateTime'>

      <xs:union memberTypes='xs:dateTime tns:NonNegativeDurationType' />

  </xs:simpleType>

 

  <xs:complexType name='MiniExpirationType'>

    <xs:simpleContent>

      <xs:extension base='tns:DurationDateTime'>

        <xs:anyAttribute namespace='##other' processContents='lax'/>

      </xs:extension>

    </xs:simpleContent>

  </xs:complexType>

 

  <xs:complexType name='ExpirationType'>

    <xs:simpleContent>

      <xs:extension base='tns:MiniExpirationType'>

        <xs:attribute name='min' type='tns:DurationDateTime' use='optional'/>

        <xs:attribute name='max' type='tns:DurationDateTime' use='optional'/>

        <xs:anyAttribute namespace='##other' processContents='lax'/>

      </xs:extension>

    </xs:simpleContent>

  </xs:complexType>

 

  <xs:complexType name='FilterType' mixed='true'>

    <xs:sequence>

      <xs:any namespace='##other' processContents='lax'

              minOccurs='0' maxOccurs='unbounded' />

    </xs:sequence>

    <xs:attribute name='Dialect' type='xs:anyURI' use='optional'

      default='http://www.w3.org/2009/09/ws-evt/Dialects/XPath10' />

    <xs:anyAttribute namespace='##other' processContents='lax' />

  </xs:complexType>

 

  <xs:complexType name='LanguageSpecificStringType'>

    <xs:simpleContent>

      <xs:extension base='xs:string'>

        <xs:attribute ref='xml:lang' />

        <xs:anyAttribute namespace='##other' processContents='lax' />

      </xs:extension>

    </xs:simpleContent>

  </xs:complexType>

 

  <xs:element name='NotifyTo' type='wsa:EndpointReferenceType' />

 

  <xs:complexType name='NotificationPolicy'>

    <xs:complexType>

      <xs:sequence>

        <xs:any namespace='##other' processContents='lax'

                maxOccurs='unbounded'/>

      </xs:sequence>

    </xs:complexType>

  </xs:complexType>

 

  <!-- Subscribe request -->

  <xs:element name='Subscribe'>

    <xs:complexType>

      <xs:sequence>

        <xs:element name='EndTo' type='wsa:EndpointReferenceType'

                    minOccurs='0' />

        <xs:element name='Delivery' type='tns:DeliveryType' />

        <xs:element name='Format' type='tns:FormatType'

                    minOccurs='0' />

        <xs:element name='Expires' type='tns:ExpirationType'

                    minOccurs='0' />

        <xs:element name='Filter' type='tns:FilterType'

                    minOccurs='0' />

        <xs:any namespace='##other' processContents='lax'

                minOccurs='0' maxOccurs='unbounded' />

      </xs:sequence>

      <xs:anyAttribute namespace='##other' processContents='lax' />

    </xs:complexType>

  </xs:element>

 

  <!-- Subscribe response -->

  <xs:element name='SubscribeResponse'>

    <xs:complexType>

      <xs:sequence>

        <xs:element name='SubscriptionManager'

                    type='wsa:EndpointReferenceType' />

        <xs:element name='GrantedExpires' type='tns:MiniExpirationType' />

        <xs:any namespace='##other' processContents='lax'

                minOccurs='0' maxOccurs='unbounded' />

      </xs:sequence>

      <xs:anyAttribute namespace='##other' processContents='lax' />

    </xs:complexType>

  </xs:element>

 

  <!-- Used in a fault if there's an unsupported dialect -->

  <xs:element name='SupportedDialect' type='xs:anyURI' />

 

  <!-- Used in a fault if there's an unsupported format name -->

  <xs:element name='SupportedDeliveryFormat' type='xs:anyURI' />

 

  <!-- Renew request -->

  <xs:element name='Renew'>

    <xs:complexType>

      <xs:sequence>

        <xs:element name='Expires' type='tns:ExpirationType'

                    minOccurs='0' />

        <xs:any namespace='##other' processContents='lax'

                minOccurs='0' maxOccurs='unbounded' />

      </xs:sequence>

      <xs:anyAttribute namespace='##other' processContents='lax' />

    </xs:complexType>

  </xs:element>

 

  <!-- Renew response -->

  <xs:element name='RenewResponse'>

    <xs:complexType>

      <xs:sequence>

        <xs:element name='GrantedExpires' type='tns:MiniExpirationType'

                    minOccurs='0' />

        <xs:any namespace='##other' processContents='lax'

                minOccurs='0' maxOccurs='unbounded' />

      </xs:sequence>

      <xs:anyAttribute namespace='##other' processContents='lax' />

    </xs:complexType>

  </xs:element>

 

  <!-- GetStatus request -->

  <xs:element name='GetStatus'>

    <xs:complexType>

      <xs:sequence>

        <xs:any namespace='##other' processContents='lax'

                minOccurs='0' maxOccurs='unbounded' />

      </xs:sequence>

      <xs:anyAttribute namespace='##other' processContents='lax' />

    </xs:complexType>

  </xs:element>

 

  <!-- GetStatus response -->

  <xs:element name='GetStatusResponse'>

    <xs:complexType>

      <xs:sequence>

        <xs:element name='GrantedExpires' type='tns:MiniExpirationType'

                    minOccurs='0' />

        <xs:any namespace='##other' processContents='lax'

                minOccurs='0' maxOccurs='unbounded' />

      </xs:sequence>

      <xs:anyAttribute namespace='##other' processContents='lax' />

    </xs:complexType>

  </xs:element>

 

  <!-- Unsubscribe request -->

  <xs:element name='Unsubscribe'>

    <xs:complexType>

      <xs:sequence>

        <xs:any namespace='##other' processContents='lax'

                minOccurs='0' maxOccurs='unbounded' />

      </xs:sequence>

      <xs:anyAttribute namespace='##other' processContents='lax' />

    </xs:complexType>

  </xs:element>

 

  <!-- Unsubscribe response -->

  <xs:element name='UnsubscribeResponse'>

    <xs:complexType>

      <xs:sequence>

        <xs:any namespace='##other' processContents='lax'

                minOccurs='0' maxOccurs='unbounded' />

      </xs:sequence>

      <xs:anyAttribute namespace='##other' processContents='lax' />

    </xs:complexType>

  </xs:element>

 

  <!-- SubscriptionEnd message -->

  <xs:element name='SubscriptionEnd'>

    <xs:complexType>

      <xs:sequence>

        <xs:element name='Status'

                    type='tns:OpenSubscriptionEndCodeType' />

        <xs:element name='Reason'

                    type='tns:LanguageSpecificStringType'

                    minOccurs='0' maxOccurs='unbounded' />

        <xs:any namespace='##other' processContents='lax'

                minOccurs='0' maxOccurs='unbounded' />

      </xs:sequence>

      <xs:anyAttribute namespace='##other' processContents='lax' />

    </xs:complexType>

  </xs:element>

 

  <xs:simpleType name='SubscriptionEndCodeType'>

    <xs:restriction base='xs:anyURI'>

      <xs:enumeration value=

  'http://www.w3.org/2009/09/ws-evt/DeliveryFailure' />

      <xs:enumeration value=

  'http://www.w3.org/2009/09/ws-evt/SourceShuttingDown' />

      <xs:enumeration value=

  'http://www.w3.org/2009/09/ws-evt/SourceCancelling' />

    </xs:restriction>

  </xs:simpleType>

 

  <xs:simpleType name='OpenSubscriptionEndCodeType'>

    <xs:union memberTypes='tns:SubscriptionEndCodeType xs:anyURI' />

  </xs:simpleType>

 

  <!-- RetryAfter Fault Detail Element -->

  <xs:element name='RetryAfter'  type='tns:RetryAfterType'/>

  <xs:complexType name='RetryAfterType'>

    <xs:simpleContent>

      <xs:extension base='xs:nonNegativeInteger'>

        <xs:anyAttribute namespace='##other' processContents='lax' />

      </xs:extension>

    </xs:simpleContent>

  </xs:complexType>

 

  <!-- Wrapped Events -->

  <xs:complexType name='EventType' mixed='true'>

    <xs:sequence>

      <xs:any namespace='##any' processContents='lax' minOccurs='0'

              maxOccurs='unbounded'/>

    </xs:sequence>

    <xs:attribute name='actionURI' type='xs:anyURI' use='optional' />

    <xs:anyAttribute namespace='##other' processContents='lax' />

  </xs:complexType>

 

  <xs:element name='Notify' type='tns:EventType' />

 

  <!-- Policy -->

  <xs:complexType name='Duration'>

    <xs:simpleContent>

      <xs:extension base='tns:NonNegativeDurationType'>

       <xs:anyAttribute namespace='##other' processContents='lax'/>

      </xs:extension>

    </xs:simpleContent>

  </xs:complexType>

 

  <xs:complexType name='URI'>

    <xs:simpleContent>

      <xs:extension base='xs:anyURI'>

        <xs:anyAttribute namespace='##other' processContents='lax'/>

      </xs:extension>

    </xs:simpleContent>

  </xs:complexType>

 

  <xs:complexType name='Empty'>

    <xs:sequence/>

    <xs:anyAttribute namespace='##other' processContents='lax'/>

  </xs:complexType>

 

  <xs:element name='EventSource'>

    <xs:complexType>

      <xs:sequence>

        <xs:element name='DateTimeSupported' type='tns:Empty' minOccurs='0'/>

        <xs:element name='FilterDialect' type='tns:URI' minOccurs='0'

                                         maxOccurs='unbounded'/>

        <xs:element name='MaxExpires' type='tns:Duration' minOccurs='0'/>

        <xs:element name='FormatName' type='tns:URI' minOccurs='0'

                                      maxOccurs='unbounded'/>

        <xs:element name='EndToSupported' type='tns:Empty' minOccurs='0'/>

        <xs:element name='NotificationPolicy' type='tns:NotificationPolicy'

                                              minOccurs='0'/>

        <xs:any namespace='##other' processContents='lax' minOccurs='0'

                                    maxOccurs='unbounded'/>

      </xs:sequence>

      <xs:anyAttribute namespace='##other' processContents='lax' />

    </xs:complexType>

  </xs:element>

 

  <xs:element name='SubscriptionManager'>

    <xs:complexType>

      <xs:sequence>

        <xs:element name='DateTimeSupported' type='tns:Empty' minOccurs='0'/>

        <xs:element name='GetStatusOperationSupported' type='tns:Empty'

                                                       minOccurs='0'/>

        <xs:element name='UnsubscribeOperationSupported' type='tns:Empty'

                                                         minOccurs='0'/>

        <xs:element name='MaxExpires' type='tns:Duration' minOccurs='0'/>

        <xs:any namespace='##other' processContents='lax' minOccurs='0'

                                    maxOccurs='unbounded'/>

      </xs:sequence>

      <xs:anyAttribute namespace='##other' processContents='lax' />

    </xs:complexType>

  </xs:element>

</xs:schema>