<?xml version="1.0"?>

<!-- 
OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.

OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.

Copyright (C) OASIS Open (2004). All Rights Reserved.

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English. 

The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. 

This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-->

<wsdl:definitions name="WS-BrokeredNotification"
   xmlns="http://schemas.xmlsoap.org/wsdl/"
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"
   xmlns:wsbn=
   "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.xsd"
   xmlns:wsbnw=
   "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.wsdl"
   xmlns:wsnt=
   "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
   xmlns:wsntw=
   "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
   xmlns:wsbf=
   "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
   xmlns:wsrp=
   "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
   xmlns:wsrpw=
   "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
   xmlns:wsrl=
   "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
   xmlns:wsrlw=
   "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
   targetNamespace=
   "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.wsdl">

   <!-- ========================== Imports =========================== -->
   <wsdl:import
      namespace=
      "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
      location=
      "../wsrf/WS-ResourceProperties-1_2-Draft_01.wsdl"/>

   <wsdl:import
      namespace=
      "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
      location=
      "../wsrf/WS-ResourceLifetime-1_2-Draft_01.wsdl"/>

   <wsdl:import
      namespace=
      "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
      location=
      "WS-BaseNotification-1_2-Draft_01.wsdl"/>

   <!-- ===================== Types Definitions ====================== -->
   <wsdl:types>
      <xsd:schema
         targetNamespace=
         "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.xsd"
         elementFormDefault="qualified">

         <xsd:include schemaLocation="WS-BrokeredNotification-1_2-Draft_01.xsd"/>

         <xsd:import
            namespace=
            "http://schemas.xmlsoap.org/ws/2003/03/addressing"
            schemaLocation=
            "../wsa/WS-Addressing-2003_03.xsd"
            />

         <xsd:import namespace=
  "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
            schemaLocation=
            "WS-BaseNotification-1_2-Draft_01.xsd"
            />

         <xsd:import
            namespace=
            "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
            schemaLocation=
            "../wsrf/WS-BaseFaults-1_2-Draft_01.xsd"
            />

         <xsd:import namespace=
  "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
            schemaLocation=
            "../wsrf/WS-ResourceProperties-1_2-Draft_01.xsd"
            />

         <xsd:import
            namespace=
            "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
            schemaLocation=
            "../wsrf/WS-ResourceLifetime-1_2-Draft_01.xsd"
            />

         <!-- =============== Resource Property Related  =================== -->

         <!-- ======== Resource Properties for NotificationBroker ========== -->
         <xsd:element name="NotificationBrokerRP">
            <xsd:complexType>
               <xsd:sequence>
                  <!-- From NotificationProducer -->
                  <xsd:element ref="wsnt:Topic"
                     minOccurs="1" maxOccurs="unbounded"/>
                  <xsd:element ref="wsnt:FixedTopicSet"
                     minOccurs="1" maxOccurs="1"/>
                  <xsd:element ref="wsnt:TopicExpressionDialects"
                     minOccurs="1" maxOccurs="unbounded"/>
                  <!-- NotificationBroker specific  -->
                  <xsd:element ref="wsbn:RequiresRegistration"
                     minOccurs="1" maxOccurs="1"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>

         <!-- ====== Resource Properties for PublisherRegistration ========= -->
         <xsd:element name="PublisherRegistrationRP">
            <xsd:complexType>
               <xsd:sequence>
                  <!-- From WS-ResourceLifetime ScheduledResourceTermination -->
                  <xsd:element ref="wsrl:CurrentTime"
                     minOccurs="1" maxOccurs="1"/>
                  <xsd:element ref="wsrl:TerminationTime"
                     minOccurs="1" maxOccurs="1"/>

                  <!-- PublisherRegistration specific  -->
                  <xsd:element ref="wsbn:PublisherReference"
                     minOccurs="0" maxOccurs="1"/>
                  <xsd:element ref="wsbn:Topic"
                     minOccurs="0" maxOccurs="unbounded"/>
                  <xsd:element ref="wsbn:Demand"
                     minOccurs="1" maxOccurs="1"/>
                  <xsd:element ref="wsbn:CreationTime"
                     minOccurs="0" maxOccurs="1"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>

         <!-- ========== Message Types for NotificationBroker  ============ -->
         <xsd:element name="RegisterPublisher">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element name="PublisherReference"
                     type="wsa:EndpointReferenceType"
                     minOccurs="0" maxOccurs="1"/>
                  <xsd:element name="Topic"
                     type="wsnt:TopicExpressionType"
                     minOccurs="0" maxOccurs="unbounded"/>
                  <xsd:element name="Demand"
                     type="xsd:boolean" default="false"
                     minOccurs="0" maxOccurs="1"/>
                  <xsd:element name="InitialTerminationTime"
                     type="xsd:dateTime"
                     minOccurs="0" maxOccurs="1"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>

         <xsd:element name="RegisterPublisherResponse">
            <xsd:complexType>
               <xsd:sequence>
                  <xsd:element name="PublisherRegistrationReference"
                     type="wsa:EndpointReferenceType"
                     minOccurs="0" maxOccurs="1"/>
               </xsd:sequence>
            </xsd:complexType>
         </xsd:element>

         <xsd:complexType name="ResourceUnknownFaultType">
            <xsd:complexContent>
               <xsd:extension base="wsbf:BaseFaultType"/>
            </xsd:complexContent>
         </xsd:complexType>
         <xsd:element name="ResourceUnknownFault"
            type="wsbn:ResourceUnknownFaultType"/>

         <xsd:complexType name="InvalidTopicExpressionFaultType">
            <xsd:complexContent>
               <xsd:extension base="wsbf:BaseFaultType"/>
            </xsd:complexContent>
         </xsd:complexType>
         <xsd:element name="InvalidTopicExpressionFault"
            type="wsbn:InvalidTopicExpressionFaultType"/>

         <xsd:complexType name="TopicNotSupportedFaultType">
            <xsd:complexContent>
               <xsd:extension base="wsbf:BaseFaultType"/>
            </xsd:complexContent>
         </xsd:complexType>
         <xsd:element name="TopicNotSupportedFault"
            type="wsbn:TopicNotSupportedFaultType"/>

         <xsd:complexType name="PublisherRegistrationFailedFaultType">
            <xsd:complexContent>
               <xsd:extension base="wsbf:BaseFaultType"/>
            </xsd:complexContent>
         </xsd:complexType>
         <xsd:element name="PublisherRegistrationFailedFault"
            type="wsbn:PublisherRegistrationFailedFaultType"/>

      </xsd:schema>
   </wsdl:types>

   <!-- ========== NotificationBroker::RegisterPublisher =============
      RegisterPublisher(PublisherReference, TopicExpression* ,
                        [Demand], [InitialTerminationTime])
      returns: WS-Resource qualified EPR to a PublisherRegistration -->
   <wsdl:message name="RegisterPublisherRequest">
      <wsdl:part name="RegisterPublisherRequest"
         element="wsbn:RegisterPublisher"/>
   </wsdl:message>

   <wsdl:message name="RegisterPublisherResponse">
      <wsdl:part name="RegisterPublisherResponse"
         element="wsbn:RegisterPublisherResponse"/>
   </wsdl:message>

   <wsdl:message name="ResourceUnknownFault">
      <part name="ResourceUnknownFault"
         element="wsbn:ResourceUnknownFault"/>
   </wsdl:message>

   <wsdl:message name="InvalidTopicExpressionFault">
      <part name="InvalidTopicExpressionFault"
         element="wsbn:InvalidTopicExpressionFault"/>
   </wsdl:message>

   <wsdl:message name="TopicNotSupportedFault">
      <part name="TopicNotSupportedFault"
         element="wsbn:TopicNotSupportedFault"/>
   </wsdl:message>

   <wsdl:message name="PublisherRegistrationFailedFault">
      <part name="PublisherRegistrationFailedFault"
         element="wsbn:PublisherRegistrationFailedFault"/>
   </wsdl:message>

   <!-- =================== PortType Definitions ===================== -->
   <!-- ========== NotificationBroker PortType Definition ============ -->
   <wsdl:portType name="NotificationBroker"
                  wsrp:ResourceProperties="wsbn:NotificationBrokerRP">

      <!-- ============= extends NotificationConsumer ============= -->
      <wsdl:operation name="Notify">
         <wsdl:input message="wsntw:Notify"/>
      </wsdl:operation>

      <!-- ========== extends wsrp:ResourceProperties ============= -->
      <wsdl:operation name="GetResourceProperty">
         <wsdl:input name="GetResourcePropertyRequest" message="wsrpw:GetResourcePropertyRequest"/>
         <wsdl:output name="GetResourcePropertyResponse" message="wsrpw:GetResourcePropertyResponse"/>
         <wsdl:fault name="ResourceUnknownFault" message="wsrpw:ResourceUnknownFault"/>
         <wsdl:fault name="InvalidResourcePropertyQNameFault" message="wsrpw:InvalidResourcePropertyQNameFault"/>
      </wsdl:operation>
      
      <!-- ============= extends NotificationProducer ============= -->
      <wsdl:operation name="Subscribe">
         <wsdl:input message="wsntw:SubscribeRequest"/>
         <wsdl:output message="wsntw:SubscribeResponse"/>
         <wsdl:fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault"/>
         <wsdl:fault name="SubscribeCreationFailedFault" message="wsntw:SubscribeCreationFailedFault"/>
      </wsdl:operation>

      <wsdl:operation name="GetCurrentMessage">
         <wsdl:input message="wsntw:GetCurrentMessageRequest"/>
         <wsdl:output message="wsntw:GetCurrentMessageResponse"/>
         <wsdl:fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault"/>
         <wsdl:fault name="InvalidTopicExpressionFault" message="wsntw:InvalidTopicExpressionFault"/>
         <wsdl:fault name="TopicNotSupportedFault" message="wsntw:TopicNotSupportedFault"/>
         <wsdl:fault name="NoCurrentMessageOnTopicFault" message="wsntw:NoCurrentMessageOnTopicFault"/>
      </wsdl:operation>
      
      <!-- ========= NotificationBroker specific operations ======= -->
      <wsdl:operation name="RegisterPublisher">
         <wsdl:input message="wsbnw:RegisterPublisherRequest"/>
         <wsdl:output message="wsbnw:RegisterPublisherResponse"/>
         <wsdl:fault name="ResourceUnknownFault"
            message="wsbnw:ResourceUnknownFault"/>
         <wsdl:fault name="InvalidTopicExpressionFault"
            message="wsbnw:InvalidTopicExpressionFault"/>
         <wsdl:fault name="TopicNotSupportedFault"
            message="wsbnw:TopicNotSupportedFault"/>
         <wsdl:fault name="PublisherRegistrationFailedFault"
            message="wsbnw:PublisherRegistrationFailedFault"/>
      </wsdl:operation>
   </wsdl:portType>

   <!-- ===== PublisherRegistrationManager PortType Definition ====== -->
   <wsdl:portType name="PublisherRegistrationManager"
                  wsrp:ResourceProperties="wsbn:PublisherRegistrationManagerRP">

      <!-- ========== extends wsrp:ResourceProperties ============= -->
<!--
      <wsdl:operation name="GetResourceProperty">
         <wsdl:input name="GetResourcePropertyRequest"
            message="wsrpw:GetResourcePropertyRequest"/>
         <wsdl:output name="GetResourcePropertyResponse"
            message="wsrpw:GetResourcePropertyResponse"/>
         <wsdl:fault name="ResourceUnknownFault"
            message="wsrpw:ResourceUnknownFault"/>
         <wsdl:fault name="InvalidResourcePropertyQNameFault"
            message="wsrpw:InvalidResourcePropertyQNameFault"/>
      </wsdl:operation>
-->

      <!-- === extends wsrl:ImmediateResourceTermination ========== -->
      <wsdl:operation name="Destroy">
         <wsdl:input message="wsrlw:DestroyRequest"/>
         <wsdl:output message="wsrlw:DestroyResponse"/>
         <wsdl:fault name="ResourceUnknownFault" message="wsrlw:ResourceUnknownFault"/>
         <wsdl:fault name="ResourceNotDestroyedFault" message="wsrlw:ResourceNotDestroyedFault"/>
      </wsdl:operation>

      <!-- === extends wsrl:ScheduledResourceTermination ========== -->
      <wsdl:operation name="SetTerminationTime">
         <wsdl:input message="wsrlw:SetTerminationTimeRequest"/>
         <wsdl:output message="wsrlw:SetTerminationTimeResponse"/>
         <wsdl:fault name="ResourceUnknownFault" message="wsrlw:ResourceUnknownFault"/>
         <wsdl:fault name="UnableToSetTerminationTimeFault" message="wsrlw:UnableToSetTerminationTimeFault"/>
         <wsdl:fault name="TerminationTimeChangeRejectedFault" message="wsrlw:TerminationTimeChangeRejectedFault"/>
      </wsdl:operation>

      <!-- ==== PublisherRegistrationManager specific operations == -->
   </wsdl:portType>

</wsdl:definitions>
