This page last changed on Feb 27, 2009 by agazzarini.
Subscribe
Description
This interface allows a requestor to register itself as a listener of one or more QMan topics.
Request
Depending on filter and termination time we could have different combination of subscribe requests.
In general let's say we could specify the following :
Response
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Header>
01. <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">
02. http://www.w3.org/2005/08/addressing/role/anonymous
03. </wsa:To>
04. <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">
05. http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeResponse
06. </wsa:Action>
07. <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">
08. uuid:980617c8-e3a0-ebf1-8f5a-2b43d3d6d416
09. </wsa:MessageID>
10. <wsa:RelatesTo RelationshipType="wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing">
11. uuid:0cdb5112-09e0-ac39-06ba-393843f06e42
12. </wsa:RelatesTo>
13. <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
14. <wsa:Address>
15. http://localhost:8080/qman/services/adapter
16. </wsa:Address>
</wsa:From>
</soap:Header>
<soap:Body>
17. <wsnt:SubscribeResponse xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">
18. <wsnt:SubscriptionReference>
19. <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">
20. http://localhost:8080/qman/services/SubscriptionManager
21. </wsa:Address>
22. <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
23. <qman-wsa:ResourceId xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing">
24. e067f34f-e7e9-4cb2-b13c-185a7e0d1d16
25. </qman-wsa:ResourceId>
26. </wsa:ReferenceParameters>
27. </wsnt:SubscriptionReference>
28. <wsnt:CurrentTime>2009-02-10T20:41:07+01:00</wsnt:CurrentTime>
29. <wsnt:TerminationTime>2009-02-10T20:41:26+01:00</wsnt:TerminationTime>
30. </wsnt:SubscribeResponse>
</soapBody>
</soap:Envelope>
Line(s) |
Description |
01 - 03 |
Convey the recipient of the response message. Note that this time we are talking about the service requestor; The address matches the <wsa:From> previously found in the corresponding request. |
04 - 06 |
Indicate this is a Subscribe response. This is done as usual using a wsa:Action that is part of WS-Addressing specification. |
07 - 09 |
Convey a unique identifier associated with the current response message. |
10 - 12 |
This element provides the identifier of the correlated (request) message. |
13 |
The <wsa:From> element (part of WS-Addressing specs too) identifies the source endpoint, the originator of this response message. |
14 - 16 |
This is the address of the source service endpoint. As said for lines 01-03 this time this is referred to service provider (the message originator). |
17 - 30 |
This is the body of the subscribe response. |
18 - 27 |
Conveys the details of the subscription that has been created. |
19 - 24 |
A subscription, as any other WS-Resource, has an address (20) and a resource identifier (24). |
28 |
The creation date of the subscription. |
29 |
The expiration / termination time of the subscription. |
Faults
- ResourceUnknownFault : There's no resource on QMan associated with the given reference information (soap address and identifier).
- InvalidFilterFault : The request contains a filter that is not supported.
- TopicExpressionDialectUnknownFault : The request contains a topic filter with an unknown / not supported dialect.
- TopicNotSupportedFault : The request contains a topic that is not supported.
- InvalidTopicExpressionFault : The request contains a topic filter with an invalid expression.
- InvalidProducerPropertiesExpressionFault : The request contains a producer properties filter with an invalid expression.
- InvalidMessageContentExpressionFault : The request contains a message properties filter with an invalid expression.
- SubscribeCreationFailedFault : The notification producer failed to process the subscribe request.
Quick links
Web Services Base Notification 1.3
|