<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:tns="http://petals.ow2.org/components/petals-se-WsNotificationBroker" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsn-bw="http://docs.oasis-open.org/wsn/bw-2"
	xmlns:wsn-brw="http://docs.oasis-open.org/wsn/brw-2" xmlns:wsn-br="http://docs.oasis-open.org/wsn/br-2"
	xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
	xmlns:wsn-b="http://docs.oasis-open.org/wsn/b-2"
	name="WS-BrokeredNotification" targetNamespace="http://petals.ow2.org/components/petals-se-WsNotificationBroker">

	<!-- ================================================== -->
	<!-- ================== imports ======================= -->
	<!-- ================================================== -->
	<wsdl:import location="brw-2.wsdl"
		namespace="http://docs.oasis-open.org/wsn/brw-2" />
	<wsdl:import location="bw-2.wsdl" namespace="http://docs.oasis-open.org/wsn/bw-2" />
	
	<!-- ========================================================= -->
	<!-- ========= Extended or Custom Types Definitions ========== -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!-- this section describes some custom types used in child -->
	<!-- nodes where allowed element type - see associated -->
	<!-- XML schema - is "anyType". For example "QueryExpressionType" -->
	<!-- defined in the "b-2.xsd" XML schema file - which is a part of -->
	<!-- "WS-BaseNotification" specification - allowed "anyType" child -->
	<!-- node. In this specific case a simple "string" child node	   -->
	<!-- called "xpath" is used. Of course, this choice is not -->
	<!-- restrictive and "any other type" child node can still be used instead-->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<!-- ========================================================= -->	
	
	<!-- 
	<wsdl:types>
	  <xsd:schema targetNamespace="http://petals.ow2.org/components/petals-se-WsNotificationBroker">
	-->
		<!-- xsd:import namespace="http://www.ebmwebsourcing.com/wsnotification/specificTypes" 
		schemaLocation="specificTypesForNotification.xsd" /-->
     <!-- 
		<xsd:import namespace="http://docs.oasis-open.org/wsn/t-1" 
		schemaLocation="t-1.xsd"/>

		<xsd:element name="SupportedTopicsMsgResponse" type="wstop:TopicSetType"/>
	  </xsd:schema>
	</wsdl:types>
    -->  	
	<!-- ==================================================
-->
	<!-- ========= Message part definition ================ -->
	<!-- ================================================== -->
	
	<wsdl:message name="EmptyMessage"/>
	
    <wsdl:message name="GetSupportedTopicsResponseMessage">
      <wsdl:part name="body" element="wstop:TopicSet"/>
    </wsdl:message>
    
    <wsdl:message name="AddNewSupportedTopicMessage">
      <wsdl:part name="body" element="wsn-b:TopicExpression"/>
    </wsdl:message>
	<!-- =============================================== -->
	<!-- =========  PortType definition ================ -->
	<!-- =============================================== -->
      
	<wsdl:portType name="SupportedTopicsSet">
	  <wsdl:documentation>
	    This port type defines a Web service that provides 
		information about Topics currently supported by the Broker.
		Also allow to add new supported topic during runtime (EXPERIMENTAL)
	  </wsdl:documentation>

	  <wsdl:operation name="GetSupportedTopics">
         <wsdl:input message="tns:EmptyMessage"/>
         <wsdl:output message="tns:GetSupportedTopicsResponseMessage"/>
      </wsdl:operation>

      <wsdl:operation name="AddNewSupportedTopic">
         <wsdl:input message="tns:AddNewSupportedTopicMessage"/>
      </wsdl:operation>
	</wsdl:portType>
	<!-- ================================================== -->
	<!-- ========== Binding part definition =============== -->
	<!-- ================================================== -->
	<!-- NotificationBroker binding definition -->
	<wsdl:binding name="NotificationBrokerBinding" type="wsn-brw:NotificationBroker">
		<soap:binding style="document"
			transport="http://schemas.xmlsoap.org/soap/http" />
		<wsdl:operation name="Notify">
			<soap:operation soapAction="http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify" />
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
		</wsdl:operation>
		<wsdl:operation name="Subscribe">
			<soap:operation
				soapAction="http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest" />
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
			<wsdl:fault name="ResourceUnknownFault">
				<soap:fault use="literal" name="ResourceUnknownFault" />
			</wsdl:fault>
			<wsdl:fault name="InvalidFilterFault">
				<soap:fault use="literal" name="InvalidFilterFault" />
			</wsdl:fault>
			<wsdl:fault name="TopicExpressionDialectUnknownFault">
				<soap:fault use="literal" name="TopicExpressionDialectUnknownFault" />
			</wsdl:fault>
			<wsdl:fault name="InvalidTopicExpressionFault">
				<soap:fault use="literal" name="InvalidTopicExpressionFault" />
			</wsdl:fault>
			<wsdl:fault name="TopicNotSupportedFault">
				<soap:fault use="literal" name="TopicNotSupportedFault" />
			</wsdl:fault>
			<wsdl:fault name="InvalidProducerPropertiesExpressionFault">
				<soap:fault use="literal"
					name="InvalidProducerPropertiesExpressionFault" />
			</wsdl:fault>
			<wsdl:fault name="InvalidMessageContentExpressionFault">
				<soap:fault use="literal" name="InvalidMessageContentExpressionFault" />
			</wsdl:fault>
			<wsdl:fault name="UnacceptableInitialTerminationTimeFault">
				<soap:fault use="literal" name="UnacceptableInitialTerminationTimeFault" />
			</wsdl:fault>
			<wsdl:fault name="UnrecognizedPolicyRequestFault">
				<soap:fault use="literal" name="UnrecognizedPolicyRequestFault" />
			</wsdl:fault>
			<wsdl:fault name="UnsupportedPolicyRequestFault">
				<soap:fault use="literal" name="UnsupportedPolicyRequestFault" />
			</wsdl:fault>
			<wsdl:fault name="NotifyMessageNotSupportedFault">
				<soap:fault use="literal" name="NotifyMessageNotSupportedFault" />
			</wsdl:fault>
			<wsdl:fault name="SubscribeCreationFailedFault">
				<soap:fault use="literal" name="SubscribeCreationFailedFault" />
			</wsdl:fault>
		</wsdl:operation>
		<wsdl:operation name="GetCurrentMessage">
			<soap:operation
				soapAction="http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest" />
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
			<wsdl:fault name="ResourceUnknownFault">
				<soap:fault use="literal" name="ResourceUnknownFault" />
			</wsdl:fault>
			<wsdl:fault name="TopicExpressionDialectUnknownFault">
				<soap:fault use="literal" name="TopicExpressionDialectUnknownFault" />
			</wsdl:fault>
			<wsdl:fault name="InvalidTopicExpressionFault">
				<soap:fault use="literal" name="InvalidTopicExpressionFault" />
			</wsdl:fault>
			<wsdl:fault name="TopicNotSupportedFault">
				<soap:fault use="literal" name="TopicNotSupportedFault" />
			</wsdl:fault>
			<wsdl:fault name="NoCurrentMessageOnTopicFault">
				<soap:fault use="literal" name="NoCurrentMessageOnTopicFault" />
			</wsdl:fault>
			<wsdl:fault name="MultipleTopicsSpecifiedFault">
				<soap:fault use="literal" name="MultipleTopicsSpecifiedFault" />
			</wsdl:fault>
		</wsdl:operation>
		<wsdl:operation name="RegisterPublisher">
			<soap:operation
				soapAction="http://docs.oasis-open.org/wsn/brw-2/RegisterPublisher/RegisterPublisherRequest" />
			<wsdl:input>
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output>
				<soap:body use="literal" />
			</wsdl:output>
			<wsdl:fault name="ResourceUnknownFault">
				<soap:fault use="literal" name="ResourceUnknownFault" />
			</wsdl:fault>
			<wsdl:fault name="InvalidTopicExpressionFault">
				<soap:fault use="literal" name="InvalidTopicExpressionFault" />
			</wsdl:fault>
			<wsdl:fault name="TopicNotSupportedFault">
				<soap:fault use="literal" name="TopicNotSupportedFault" />
			</wsdl:fault>
			<wsdl:fault name="PublisherRegistrationRejectedFault">
				<soap:fault use="literal" name="PublisherRegistrationRejectedFault" />
			</wsdl:fault>
			<wsdl:fault name="PublisherRegistrationFailedFault">
				<soap:fault use="literal" name="PublisherRegistrationFailedFault" />
			</wsdl:fault>
			<wsdl:fault name="UnacceptableInitialTerminationTimeFault">
				<soap:fault use="literal" name="UnacceptableInitialTerminationTimeFault" />
			</wsdl:fault>
		</wsdl:operation>
	</wsdl:binding>
	<!-- PublisherRegistrationManager binding definition -->
	<!--wsdl:binding name="PublisherRegistrationManagerBinding"
		type="wsn-brw:PublisherRegistrationManager">
		<soap:binding style="document"
			transport="http://schemas.xmlsoap.org/soap/http" />
		<wsdl:operation name="DestroyRegistration">
			<soap:operation
				soapAction="http://docs.oasis-open.org/wsn/brw-2/PublisherRegistrationManager/DestroyRegistrationRequest" />
			<wsdl:input name="DestroyRegistrationRequest">
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output name="DestroyRegistrationResponse">
				<soap:body use="literal" />
			</wsdl:output>
			<wsdl:fault name="ResourceUnknownFault">
				<soap:fault use="literal" name="ResourceUnknownFault" />
			</wsdl:fault>
			<wsdl:fault name="ResourceNotDestroyedFault">
				<soap:fault use="literal" name="ResourceNotDestroyedFault" />
			</wsdl:fault>
		</wsdl:operation>
	</wsdl:binding>
	<SubscriptionManager binding definition -->
	<!--wsdl:binding name="SubscriptionManagerBinding" type="wsn-bw:SubscriptionManager">
		<soap:binding style="document"
			transport="http://schemas.xmlsoap.org/soap/http" />
		<wsdl:operation name="Renew">
			<soap:operation soapAction="http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/RenewRequest" />
			<wsdl:input name="RenewRequest">
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output name="RenewResponse">
				<soap:body use="literal" />
			</wsdl:output>
			<wsdl:fault name="ResourceUnknownFault">
				<soap:fault use="literal" name="ResourceUnknownFault" />
			</wsdl:fault>
			<wsdl:fault name="UnacceptableTerminationTimeFault">
				<soap:fault use="literal" name="UnacceptableTerminationTimeFault" />
			</wsdl:fault>
		</wsdl:operation>
		<wsdl:operation name="Unsubscribe">
			<soap:operation
				soapAction="http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/UnsubscribeRequest" />
			<wsdl:input name="UnsubscribeRequest">
				<soap:body use="literal" />
			</wsdl:input>
			<wsdl:output name="UnsubscribeResponse">
				<soap:body use="literal" />
			</wsdl:output>
			<wsdl:fault name="ResourceUnknownFault">
				<soap:fault use="literal" name="ResourceUnknownFault" />
			</wsdl:fault>
			<wsdl:fault name="UnableToDestroySubscriptionFault">
				<soap:fault use="literal" name="UnableToDestroySubscriptionFault" />
			</wsdl:fault>
		</wsdl:operation>
	</wsdl:binding-->
	
	<!--  SupportedTopicsSet portType Service binding definition -->
	<wsdl:binding name="SupportedTopicsSetBinding"
	  	type="tns:SupportedTopicsSet">
	  	<soap:binding style="document"
  			transport="http://schemas.xmlsoap.org/soap/http" />
	  	<wsdl:operation name="GetSupportedTopics">
			<soap:operation
  				soapAction="http://www.ebmwebsourcing.com/WS-BrokeredNotification/GetSupportedTopics" />
			<wsdl:input>				
	  			<soap:body use="literal" />
	  		</wsdl:input>	
			<wsdl:output>
	  			<soap:body use="literal" />
	  		</wsdl:output>			
  		</wsdl:operation>
  		<wsdl:operation name="AddNewSupportedTopic">
            <soap:operation
                soapAction="http://www.ebmwebsourcing.com/WS-BrokeredNotification/AddNewSupportedTopic" />
            <wsdl:input>                
                <soap:body use="literal" />
            </wsdl:input>                     
        </wsdl:operation>
  	</wsdl:binding>
	<!-- ============================================= -->
	<!-- =========== Service part definition ========= -->
	<!-- ============================================= -->
	<wsdl:service name="NotificationBrokerService">
		<wsdl:port name="NotificationBrokerServiceEndpoint" binding="tns:NotificationBrokerBinding">
			<soap:address location="http://localhost:8085/petals/services/NotificationBrokerService" />
		</wsdl:port>
	</wsdl:service>
	<!--wsdl:service name="PublisherRegistrationManagerService">
		<wsdl:port name="PublisherRegistrationManagerServiceEndpoint" binding="tns:PublisherRegistrationManagerBinding">
			<soap:address location="http://localhost:8085/petals/services/PublisherRegistrationManagerService" />
		</wsdl:port>
	</wsdl:service>
	<wsdl:service name="SubscriptionManagerService">
		<wsdl:port name="SubscriptionManagerServiceEndpoint" binding="tns:SubscriptionManagerBinding">
			<soap:address location="http://localhost:8085/petals/services/SubscriptionManagerService" />
		</wsdl:port>
	</wsdl:service-->
	<wsdl:service name="SupportedTopicsService">   
		<wsdl:port name="SupportedTopicsServiceEndpoint" binding="tns:SupportedTopicsSetBinding">
			<soap:address location="http://localhost:8085/petals/services/SupportedTopicsService" />
		</wsdl:port>
	</wsdl:service>
</wsdl:definitions>
