Petals-SE-Notification

compared with
Version 6 by Thierry Dejean
on Jul 09, 2010 14:35.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (53)

View Page History
Basic WS-Notification usecases consist on sending "notification" requests - Subscribe, Unsubscribe, RegisterPublisher, DestroyRegistration or Notify requests - to the petals-se-notification component from other components that acts as Notification consumer or Notification Producer. Two components named petals-se-Wsnconsumer and petals-se-WsnProducer are available on Petals website under the [Download/tool section|http://petals.ow2.org/download-tools.html]


{note}Note : these two components are only "template component" and can help you to implement your own ones.{note}


You can test Petals ESB WS-Notification features using the webconsole test section or you can deploy and start petals-se-Wsn Producer/Consumer components that will automatically process Notification Requests("Subscribe" and "RegisterPublisher requests on start;"Notify" request each 30 seconds) when their services assemblies are deployed and started.

h3. using petals-se-Wsn{Producer/Consumer} componentsInstalling petals-se-Wsn {Producer/Consumer} components and their service assemblies will automatically launch usecases. No interactions are needed. On Service assembly start, the  petals-se-WsnProducer sends a RegisterPublisher request to the petals-se-notification and the petals-se-WsnConsumer do the same by sending a "Subscribe" request to the petals-se-notification component. Its Subscribe request is then forwarded to the petals-se-WsnProducer as soon as the petals-se-WsnProducer is registered.

    name="WS-BrokeredNotification" targetNamespace="http://petals.ow2.org/petals-se-notification">

&nbsp;&nbsp; &nbsp; <\!-\- ================================================== \-->
&nbsp;&nbsp; &nbsp; <\!-\- ================== imports ======================= \-->
&nbsp;&nbsp; &nbsp; <\!-\- ================================================== \-->
&nbsp;&nbsp; &nbsp; <wsdl:import location="brw-2.wsdl"
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;namespace="http://docs.oasis-open.org/wsn/brw-2" />
&nbsp;&nbsp; &nbsp; <wsdl:import location="bw-2.wsdl" namespace="http://docs.oasis-open.org/wsn/bw-2" />
&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; <\!-\- ========================================================= \-->
&nbsp;&nbsp; &nbsp; <\!-\- ========= Extended or Custom Types Definitions ========== \-->
&nbsp;&nbsp; &nbsp; <\!-\- \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\~ \-->
&nbsp;&nbsp; &nbsp; <\!-\- this section describes some custom types used in child \-->
&nbsp;&nbsp; &nbsp; <\!-\- nodes where allowed element type - see associated \-->
&nbsp;&nbsp; &nbsp; <\!-\- XML schema - is "anyType". For example "QueryExpressionType" \-->
&nbsp;&nbsp; &nbsp; <\!-\- defined in the "b-2.xsd" XML schema file - which is a part of \-->
&nbsp;&nbsp; &nbsp; <\!-\- "WS-BaseNotification" specification - allowed "anyType" child \-->
&nbsp;&nbsp; &nbsp; <\!-\- node. In this specific case a simple "string" child node&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; \-->
&nbsp;&nbsp; &nbsp; <\!-\- called "xpath" is used. Of course, this choice is not \-->
&nbsp;&nbsp; &nbsp; <\!-\- restrictive and "any other type" child node can still be used instead \-->
&nbsp;&nbsp; &nbsp; <\!-\- \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\~ \-->
&nbsp;&nbsp; &nbsp; <\!-\- ========================================================= \-->
&nbsp; &nbsp;
&nbsp; &nbsp;
&nbsp;&nbsp;&nbsp; </wsdl:types>
&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; <\!-\- ================================================== \-->
&nbsp;&nbsp; &nbsp; <\!-\- ========= Message part definition ================ \-->
&nbsp;&nbsp; &nbsp; <\!-\- ================================================== \-->
&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; <wsdl:message name="EmptyMessage"/>
&nbsp;&nbsp; &nbsp; </wsdl:message>

&nbsp;&nbsp; &nbsp; <\!-\- =============================================== \-->
&nbsp;&nbsp; &nbsp; <\!-\- =========&nbsp; PortType definition ================ \-->
&nbsp;&nbsp; &nbsp; <\!-\- =============================================== \-->
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp; &nbsp; <wsdl:portType name="SupportedTopicsSet">
&nbsp;&nbsp; &nbsp; </wsdl:portType>

&nbsp;&nbsp; &nbsp; <\!-\- ============================================= \-->
&nbsp;&nbsp; &nbsp; <\!-\- ========== Binding definition =============== \-->
&nbsp;&nbsp; &nbsp; <\!-\- ============================================= \-->
&nbsp;&nbsp; &nbsp; <\!-\- NotificationBroker binding definition \-->
&nbsp;&nbsp; &nbsp; <wsdl:binding name="NotificationBrokerBinding" type="wsn-brw:NotificationBroker">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <soap:binding style="document"
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <wsdl:operation>
&nbsp;&nbsp; &nbsp; </wsdl:binding>
&nbsp;&nbsp; &nbsp; <\!-\- PublisherRegistrationManager binding definition \-->
&nbsp;&nbsp; &nbsp; <wsdl:binding name="PublisherRegistrationManagerBinding"
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;type="wsn-brw:PublisherRegistrationManager">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; </wsdl:operation>
&nbsp;&nbsp; &nbsp; </wsdl:binding>
&nbsp;&nbsp; &nbsp; <\!-\- SubscriptionManager binding definition \-->
&nbsp;&nbsp; &nbsp; <wsdl:binding name="SubscriptionManagerBinding" type="wsn-bw:SubscriptionManager">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <soap:binding style="document"
&nbsp;&nbsp; &nbsp; </wsdl:binding>

&nbsp;&nbsp; &nbsp; <\!\--&nbsp; SupportedTopicsSet portType Service binding definition \-->
&nbsp;&nbsp; &nbsp; <wsdl:binding name="SupportedTopicsSetBinding"
&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;type="tns:SupportedTopicsSet">

&nbsp;&nbsp; &nbsp; <\!-\- ============================================= \--v
&nbsp;&nbsp; &nbsp; <\!-\- =========== Service part definition ========= \-->
&nbsp;&nbsp; &nbsp; <\!-\- ============================================= \-->
&nbsp;&nbsp; &nbsp; <wsdl:service name="NotificationBrokerService">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; <wsdl:port name="NotificationBrokerServiceEndpoint" binding="tns:NotificationBrokerBinding">
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; </wsdl:port>
&nbsp;&nbsp; &nbsp; </wsdl:service>
&nbsp;</wsdl:definitions></screen></para>

&nbsp;&nbsp; &nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </section>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <section id="filet-request-templates">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <title>Ws-Notification requests templates</title>
&nbsp;&nbsp;&nbsp; <para>Subscribe Request Payload template : <screen><wsnt:Subscribe
&nbsp;</wsdl:definitions>{code}

h2. Ws-Notification requests templates
&nbsp; Subscribe Request Payload template :

{code}<wsnt:Subscribe
&nbsp;xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
&nbsp;xmlns:wsa="http://www.w3.org/2005/08/addressing"
&nbsp;<wsnt:InitialTerminationTime>PT1H</wsnt:InitialTerminationTime>
&nbsp;<wsnt:SubscriptionPolicy/>
</wsnt:Subscribe></screen></para>

&nbsp;&nbsp;&nbsp; <para>Unsubscribe Request Payload template : <screen><wsnt:Unsubscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
</wsnt:Subscribe>{code}

Unsubscribe Request Payload template :

{code}<wsnt:Unsubscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
&nbsp;xmlns:wsa="http://www.w3.org/2005/08/addressing"
&nbsp;xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes"
&nbsp; <ebm:Uuid>\[Copy_and_Paste_Uuid_value_returned_in_SubscribeResponse\]</ebm:Uuid>
&nbsp;</ebm:ResourceUuidList>
</wsnt:Unsubscribe></screen></para> </wsnt:Unsubscribe>{code}

&nbsp;&nbsp;&nbsp; <para>RegisterPublisher Request Payload template : <screen><wsn-br:RegisterPublisher
RegisterPublisher Request Payload template :

{code}<wsn-br:RegisterPublisher
&nbsp;xmlns:wsn-br="http://docs.oasis-open.org/wsn/br-2" &nbsp;
&nbsp;xmlns:wsa="http://www.w3.org/2005/08/addressing"
&nbsp;<wsn-br:Demand>true</wsn-br:Demand>
&nbsp;<wsn-br:InitialTerminationTime>2009-12-25T00:00:00.00000Z</wsn-br:InitialTerminationTime>
</wsn-br:RegisterPublisher></screen></para> </wsn-br:RegisterPublisher>{code}

&nbsp;&nbsp;&nbsp; <para>DestroyRegistration Request Payload template : <screen><wsn-br:DestroyRegistration
DestroyRegistration Request Payload template :

{code}<wsn-br:DestroyRegistration
&nbsp;xmlns:wsn-br="http://docs.oasis-open.org/wsn/br-2"
&nbsp;xmlns:wsa="http://www.w3.org/2005/08/addressing"
&nbsp; <ebm:Uuid>\[Copy_and_Paste_Uuid_value_returned_in_RegisterPublisherResponse\]</ebm:Uuid>
&nbsp;</ebm:ResourceUuidList>
</wsn-br:DestroyRegistration></screen></para> </wsn-br:DestroyRegistration>{code}

&nbsp;&nbsp;&nbsp; <para>Notify Request Payload template : <screen><wsnt:Notify xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
&nbsp;Notify Request Payload template :

{code}<wsnt:Notify xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
&nbsp;xmlns:wsa="http://www.w3.org/2005/08/addressing"
&nbsp;xmlns:ebm="http://www.ebmwebsourcing.com/wsnotification/specificTypes"
&nbsp; </wsnt:Message>
&nbsp;</wsnt:NotificationMessage>
</wsnt:Notify></screen></para> </wsnt:Notify>{code}
&nbsp; </section>
&nbsp; </chapter>
</book>

{column}
{column:width=350px}
{panel:title=Contributors}{contributors:order=name|mode=list}{panel}
{column}
{section}h3.