In Eventing, the Event Source is modeled by two sets of WSDL files (event source WSDL files and notification WSDL files), both having only inbound operations. The set of event source WSDL files specifies the services supported by the Event Source; whereas the set of notification WSDL files specifies the events that the Event Source can generate, as well as the requirements, such as bindings, etc. of the Event Source.
Operations in the notification WSDL files are specified from the perspective of the Event Sink, i.e. inbound operations, to make the Eventing WSDL interface WS-I BP 1.1 compliant. To align with this model, outbound operations in the event source WSDL MUST be reversed into inbound operations and moved to a separate notification WSDL. A notification WSDL file MUST NOT have any wsdl:service element. Event sink MUST implement a WSDL, e.g. unwrapped or wrapped, that is compatible to the notification WSDLs to receive the events.
The event source WSDL and notification WSDL MAY use WS-Policy and WS-Policy Attachment to indicate the event source requirements for the notification WSDL. If the event source WSDL and notification WSDL do not use WS-Policy, some out of band mechanism can be used to link these inbound operations in the notification WSDL with the event source.
If WS-Policy and Attachment are used, the following policy assertions MUST be used.
This policy assertion has Endpoint Subject (e.g. port type, port, binding, etc. as defined in [WS-Policy 1.5 -Attachment]) in the event source WSDL. It is attached to wsdl:definition and referred from a policy subject using <wsp:PolicyReference URI="URI">.
<wsp:Policy wsu:Id="xs:ID"?>
<out:Outbound>
out:Interface | out:Binding
</out:Outbound>
</wsp:Policy>
This assertion indicates that the port types and bindings identified by its parameters are required for the event source, the subscriber, and the event sink to register and receive event messages. For the event source, this assertion requires it to generate events identified by the policy parameter out:Interface element and deliver the events using the binding identified by the policy parameter out:Binding element. For the subscriber, this assertion requires it to subscribe to the port with this policy attachment. For the event sink, this assertion requires it to implement the subscribed operations and their bindings identified by the policy parameters in order to receive the event messages.
The policy parameter elements of this assertion are defined in the following subsections.
<out:Interface name="InterfaceName (xs:nmtoken)" >
Notification_WSDL_URI (xs:anyURI)
</out:Interface>
This interface policy parameter element is used when attaching the assertion to a port type or port. The interface policy parameter element indicates the policy subject is associated with the port type InterfaceName in the notification WSDL located at Notification_WSDL_URI.
<out:Binding name="BindingName (xs:qname)">
Notification_WSDL_URI (xs:anyURI)
</out:Binding>
This binding policy parameter element is used when attaching the policy to a port. It indicates that the policy subject is associated with the binding BindingName in the notification WSDL located at Notification_WSDL_URI.
If a wsdl:port in the event source WSDL is associated with multiple wsdl:binding in the notification WSDL, those bindings MUST be identical in their soap:binding elements. If a wsdl:port in the event source WSDL is associated with a port type in the notification WSDL (through a <out:Outbound> assertion with parameter <out:Interface>), and that port type has a wsdl:binding, then the wsdl:port MUST be associated with that wsdl:binding (using a <out:Outbound> assertion with parameter <out:Binding>).
An example Event Source WSDL 1.1 file with the WS-Policy attachments.
<wsdl:definitions <!-- many namespace declarations omitted for clairty --> xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:out="http://www.w3.org/ns/outbound" targetNamespace="http://www.example.com/source">
<!-- policy assertions for bindings -->
<wsp:Policy wsu:Id="StockNotificationBinding">
<out:Outbound>
<out:Binding name="StockBindingSOAPHTTP">concrete_notifications.wsdl</out:Binding>
</out:Outbound>
</wsp:Policy>
<wsp:Policy wsu:Id="WeatherNotificationBinding">
<out:Outbound>
<out:Binding name="WeatherBindingSOAPHTTP">concrete_notifications.wsdl</out:Binding>
</out:Outbound>
</wsp:Policy>
<wsdl:import namespace="http://www.example.com/source" location="abstract_source.wsdl"/> <!-- an explicit binding of WS-Eventing -->
<wsdl:binding name="EventSourceSOAPHTTP" type="evt:EventSource">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SubscribeOp">
...
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="eventsourceservice">
<!-- This port supports subscriptions to both notifications --> <wsdl:port name="SubscribePortAll" binding="tns:EventSourceSOAPHTTP">
<wsp:PolicyReference URI="#WeatherNotificationBinding" />
<wsp:PolicyReference URI="#StockNotificationBinding" /> <soap:address location="http://www.example.com/source/all"/>
</wsdl:port> <!-- This port supports subscriptions to only weather notifications. -->
<wsdl:port name="SubscribePortWeather" binding="tns:EventSourceSOAPHTTP">
<soap:address location="http://www.example.com/source/weather"/>
<wsp:PolicyReference URI="#WeatherNotificationBinding" />
</wsdl:port>
<!-- This port supports subscriptions to only stock notifications. --> <wsdl:port name="SubscribePortStock" binding="tns:EventSourceSOAPHTTP">
<soap:address location="http://www.example.com/source/stock"/>
<wsp:PolicyReference URI="#StockNotificationBinding" />
</wsdl:port>
</wsdl:service> </wsdl:definitions>
The Notification WSDL 1.1 file "concrete_notifications.wsdl" associated with the above Event Source WSDL file.
<wsdl:definitions <!-- many namespace declarations omitted for clairty --> >
<wsdl:import namespace="http://www.example.com/notifications" location="abstract_notifications.wsdl" />
<-- the bindings for the two notifications --> <wsdl:binding name="WeatherBindingSOAPHTTP" type="tns:WeatherReportPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="WeatherOperation">
... </wsdl:operation>
</wsdl:binding>
<wsdl:binding name="StockBindingSOAPHTTP" type="tns:StockReportPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="StockOperation">
...
</wsdl:operation>
</wsdl:binding>
<!-- there is no service or port definition -->
</wsdl:definitions>
An example Event Source WSDL 1.1 file with the WS-Policy attachments.
<wsdl:definitions <!-- many namespace declarations omitted for clairty --> xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:out="http://www.w3.org/ns/outbound" targetNamespace="http://www.example.com/source">
<!-- policy assertions for port types -->
<wsp:Policy wsu:Id="StockNotificationInterface">
<out:Outbound>
<out:Interface name="StockReportPortType">abstract_notifications.wsdl</out:Interface>
</out:Outbound>
</wsp:Policy>
<wsp:Policy wsu:Id="WeatherNotificationInterface">
<out:Outbound>
<out:Interface name="WeatherReportPortType">abstract_notifications.wsdl</out:Interface>
</out:Outbound>
</wsp:Policy> <!-- concrete_wse_wrapped.wsdl is a binding to the standard WS-Eventing Wrapped WSDL --> <wsp:Policy wsu:Id="WrappedNotificationBinding"> <out:Outbound> <out:Binding name="BindingOfWrappedSinkPortType">concrete_wse_wrapped.wsdl</out:Binding> </out:Outbound> </wsp:Policy>
<wsdl:import namespace="http://www.example.com/source" location="abstract_source.wsdl"/> <!-- an explicit binding of WS-Eventing -->
<wsdl:binding name="EventSourceSOAPHTTP" type="evt:EventSource">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SubscribeOp">
...
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="eventsourceservice">
<!-- This port supports subscription to two raw events with wrapped format event notification --> <!-- The association to both raw evnts is specified by the two policy assertions with interface policy parameter elements (Section A.1.1) The association to wrapped format notification is specified by the policy assertion with binding policy parameter element (Section A.1.2) Therefore, by the requirements of these policy assertions (Section A.1), the raw events will be delivered using the binding of the wrapped format, i.e. a binding to the standard WS-Eventing Wrapped WSDL -->
<wsdl:port name="SubscribePortAll" binding="tns:EventSourceSOAPHTTP">
<wsp:PolicyReference URI="#WeatherNotificationInterface" />
<wsp:PolicyReference URI="#StockNotificationInterface" /> <wsp:PolicyReference URI="#WrappedNotificationBinding" /> <soap:address location="http://www.example.com/source/all"/>
</wsdl:port>
</wsdl:service> </wsdl:definitions>
The abstract Notification WSDL 1.1 file "abstract_notifications.wsdl" associated with the above Event Source WSDL file.
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.example.com/notifications" targetNamespace="http://www.example.com/notifications"> <!-- schema definitions omitted for clarity -->
<wsdl:message name="StockMessage">
<wsdl:part name="parameter" element="tns:stockReport"/>
</wsdl:message>
<wsdl:message name="WeatherMessage">
<wsdl:part name="parameter" element="xs:weatherReport"/>
</wsdl:message>
<wsdl:portType name="WeatherReportPortType">
<wsdl:operation name="WeatherOperation">
<wsdl:input message="tns:WeatherMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="StockReportPortType">
<wsdl:operation name="StockOperation">
<wsdl:input message="tns:StockMessage"/>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
An example Event Source WSDL 1.1 file with the WS-Policy attachments.
<wsdl:definitions <!-- many namespace declarations omitted for clairty --> xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:out="http://www.w3.org/ns/outbound" targetNamespace="http://www.example.com/source"> <!-- policy assertions for port types -->
<wsp:Policy wsu:Id="StockNotificationInterface">
<out:Outbound>
<out:Interface name="StockReportPortType">abstract_notifications.wsdl</out:Interface>
</out:Outbound>
</wsp:Policy>
<wsp:Policy wsu:Id="WeatherNotificationInterface">
<out:Outbound>
<out:Interface name="WeatherReportPortType">abstract_notifications.wsdl</out:Interface>
</out:Outbound>
</wsp:Policy>
<!-- policy assertions for bindings to raw events -->
<wsp:Policy wsu:Id="StockNotificationBinding">
<out:Outbound>
<out:Binding name="StockBindingSOAPHTTP">concrete_notifications.wsdl</out:Binding>
</out:Outbound>
</wsp:Policy>
<wsp:Policy wsu:Id="WeatherNotificationBinding">
<out:Outbound>
<out:Binding name="WeatherBindingSOAPHTTP">concrete_notifications.wsdl</out:Binding>
</out:Outbound>
</wsp:Policy> <!-- policy assertion for binding to wrapped events --> <!-- concrete_wse_wrapped.wsdl is a binding to the standard WS-Eventing Wrapped WSDL --> <wsp:Policy wsu:Id="WrappedNotificationBinding"> <out:Outbound> <out:Binding name="BindingOfWrappedSinkPortType">concrete_wse_wrapped.wsdl</out:Binding> </out:Outbound> </wsp:Policy>
<wsdl:import namespace="http://www.example.com/source" location="abstract_source.wsdl"/> <!-- an explicit binding of WS-Eventing -->
<wsdl:binding name="EventSourceSOAPHTTP" type="evt:EventSource">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SubscribeOp">
...
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="eventsourceservice">
<!-- This port supports subscriptions to raw notifications --> <wsdl:port name="SubscribePortRAW" binding="tns:EventSourceSOAPHTTP">
<wsp:PolicyReference URI="#WeatherNotificationBinding" />
<wsp:PolicyReference URI="#StockNotificationBinding" /> <soap:address location="http://www.example.com/source/raw"/>
</wsdl:port>
<!-- This port supports subscriptions to wrapped notifications --> <wsdl:port name="SubscribePortWRAP" binding="tns:EventSourceSOAPHTTP"> <wsp:PolicyReference URI="#WeatherNotificationInterface" />
<wsp:PolicyReference URI="#StockNotificationInterface" /> <wsp:PolicyReference URI="#WrappedNotificationBinding" /> <soap:address location="http://www.example.com/source/wrap"/> </wsdl:port> </wsdl:service> </wsdl:definitions>