Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2) subscribe (pullPoint)

>>>>>

Code Block
xml
xml
 
<!--

...

 	
	Sample Subscribe request sent to http://localhost:8192/Broker/

...

   
-->

...


<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

...


	<env:Header />

...


	<env:Body>

...


		<wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"

...


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

...


			<wsnt:ConsumerReference>

...


				<wsa:Address>

...


				    <!-- returned from createPullPoint -->

...


				    endpoint:http://servicemix.org/wsnotification/PullPoint/ID-some-host-38972-1188922931357-6-0

...


				</wsa:Address>

...


			</wsnt:ConsumerReference>

...


			<wsnt:Filter>

...


				<wsnt:TopicExpression

...


					Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">

...


					BrewProcess
				</wsnt:TopicExpression>

...


			</wsnt:Filter>

...


		</wsnt:Subscribe>

...


	</env:Body>

...


</env:Envelope>

<<<<<

Code Block
xml
xml
 
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

...


	<env:Body>

...


		<ns4:SubscribeResponse

...


			xmlns:ns2="http://www.w3.org/2005/08/addressing"

...


			xmlns:ns4="http://docs.oasis-open.org/wsn/b-2"

...


			xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"

...


			xmlns:ns5="http://docs.oasis-open.org/wsn/t-1"

...


			xmlns:ns6="http://docs.oasis-open.org/wsn/br-2">

...


			<ns4:SubscriptionReference>

...


				<ns2:Address>

...


					http://servicemix.org/wsnotification/Subscription/ID-some-host-38972-1188922931357-3-1

...


				</ns2:Address>

...


			</ns4:SubscriptionReference>

...


			<ns4:TerminationTime xsi:nil="true"

...


				xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

...


		</ns4:SubscribeResponse>

...


	</env:Body>

...


</env:Envelope>

3) notify
>>>>>

Code Block
xml
xml
 
<!--

...

 	
	Sample Notify request sent to http://localhost:8192/Broker/

...

    
-->

...


<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

...


	<env:Header />

...


	<env:Body>

...


		<wsnt:Notify xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">

...


			<wsnt:NotificationMessage>

...


				<wsnt:Topic

...


					Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">

...


					BrewProcess
				</wsnt:Topic>

...


				<wsnt:Message>

...


					<alarm:Alarm

...


						xmlns:alarm="http://alarms.some-host">

...


						<Name>Kettle Overfill</Name>

...


						<Desc>Kettle Overfill Alarm</Desc>

...


						<Date>2007-09-22-12:00:30:100</Date>

...


						<Severity>3</Severity>

...


						<Value>110.2</Value>

...


						<Ack>false</Ack>

...


					</alarm:Alarm>

...


				</wsnt:Message>

...


			</wsnt:NotificationMessage>

...


		</wsnt:Notify>

...


	</env:Body>

...


</env:Envelope>

>>>>>
<no response, in only)

4) getMessages
>>>>>

Code Block
xml
xml
 
<!--

...

 
	Sample getMessages request sent to http://localhost:8192/Broker/

...

   
-->

...


<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"

...


	xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"

...


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

...


	<env:Header>

...


		<wsa:To>

...


			http://servicemix.org/wsnotification/PullPoint/ID-some-host-38972-1188922931357-6-0

...


		</wsa:To>

...


	</env:Header>

...


	<env:Body>

...


		<wsnt:GetMessages>

...


			<wsnt:MaximumNumber>10</wsnt:MaximumNumber>

...


		</wsnt:GetMessages>

...


	</env:Body>

...


</env:Envelope>

<<<<<

Code Block
xml
xml
 
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

...


	<env:Body>

...


		<ns4:GetMessagesResponse

...


			xmlns:ns2="http://www.w3.org/2005/08/addressing"

...


			xmlns:ns4="http://docs.oasis-open.org/wsn/b-2"

...


			xmlns:ns3="http://docs.oasis-open.org/wsrf/bf-2"

...


			xmlns:ns5="http://docs.oasis-open.org/wsn/t-1">

...


			<ns4:NotificationMessage>

...


				<ns4:Topic

...


					Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">

...


					BrewProcess
				</ns4:Topic>

...


				<ns4:Message>

...


					<alarm:Alarm

...


						xmlns:alarm="http://alarms.some-host">

...


						<Name>Kettle Overfill</Name>

...


						<Desc>Kettle Overfill Alarm</Desc>

...


						<Date>2007-09-22-12:00:30:100</Date>

...


						<Severity>3</Severity>

...


						<Value>110.2</Value>

...


						<Ack>false</Ack>

...


					</alarm:Alarm>

...


				</ns4:Message>

...


			</ns4:NotificationMessage>

...


		</ns4:GetMessagesResponse>

...


	</env:Body>

...


</env:Envelope>

Notes:

  • requests must include URL trailing slash (http://localhost:8192/Broker/) due to smx bug
  • pay special attention to the WS-Addressing syntax
  • all requests are directed at the /Broker endpoint, except the createPullPoint
  • only SimpleTopic expressions appear to be supported at this time