...
The SOAP messages are as follows:
1) createPullPoint
>>>>>
Code Block |
---|
|
<!--
Sample CreatePullPoint request sent to http://localhost:8192/CreatePullPoint/
-->
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header />
<env:Body>
<wsnt:CreatePullPoint
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" />
</env:Body>
</env:Envelope>
|
<<<<<
Code Block |
---|
|
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<ns4:CreatePullPointResponse
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:PullPoint>
<ns2:Address>
http://servicemix.org/wsnotification/PullPoint/ID-some-host-38972-1188922931357-6-0
</ns2:Address>
</ns4:PullPoint>
</ns4:CreatePullPointResponse>
</env:Body>
</env:Envelope>
|
2) subscribe (pullPoint)>>>>>
Code Block |
---|
|
<!--
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 |
---|
|
<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 |
---|
|
<!--
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 (no response, in only)
4) getMessages
>>>>>
Code Block |
---|
|
<!--
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 |
---|
|
<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>
|
...
- 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