This page last changed on Mar 01, 2009 by agazzarini.
GetCurrentMessage
Description
Allows a requestor to retrieve the last published message on a given topic. Note that this will be a non destructive read of the message,
which won't be dequeued and therefore will be available to other requestors.
Request
01. <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
02. <soap:Header>
03. <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">
04. http://localhost:8080/qman/services/adapter
05. </wsa:To>
06. <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">
07. http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/GetCurrentMessageRequest
08. </wsa:Action>
09. <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">
10. uuid:0cdb5112-09e0-ac39-06ba-393843f06e42
11. </wsa:MessageID>
12. <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
13. <wsa:Address>
14. http://www.w3.org/2005/08/addressing/role/anonymous
15. </wsa:Address>
16. </wsa:From>
17. </qman:ResourceId>
</soap:Header>
<soap:Body>
18. <wsnt:GetCurrentMessage>
19. <wsnt:Topic Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete">
20. qman:EventsLifeCycleTopic
21. </wsnt:Topic>
22. </wsnt:GetCurrentMessage>
23. </soap:Body>
</soap:Envelope>
Line(s) |
Description |
01 |
The SOAP <Envelope> is the root element in every SOAP message, and contains two child elements, <Header> and <Body>. |
02 |
The SOAP Header will contain all metadata used for identifying the conversation participants (requestor and provider). |
03 - 05 |
Convey the target endpoint also known (in the request phase) as service provider. |
06 - 08 |
Indicate this is a GetCurrentMessage request. |
09 - 11 |
Convey a unique identifier associated with the current message. This will be used for request / response messages correlation. |
12 - 15 |
Provide the address of the source endpoint also known (in the request phase) as service requestor. |
18 - 22 |
The GetCurrentMessage request. As you can see requested the example shows how to request the current message of the qman:EventsLifeCycleTopic topic.
This is the topic where event lifecylcle notifications are published. |
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/GetCurrentMessageResponse
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>
20. </wsa:From>
</soap:Header>
<soap:Body>
21. <wsnt:GetCurrentMessageResponse>
22. <wsnt:Message>
<qman:LifeCycleEvent
xmlns:qman="http://amqp.apache.org/qpid/management/qman"
TimeMillis="1234295015000" Type="CREATED">
<qman:Resource>
<qman-wsa:ResourceId
xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing">
aff2f6ec-2e5c-4768-ae87-6da2c8a005ff
</qman-wsa:ResourceId>
<qman:PackageName>org.apache.qpid.broker</qman:PackageName>
<qman:Name>connection</qman:Name>
</qman:Resource>
</qman:LifeCycleEvent>
23. </wsnt:Message>
24. </wsnt:GetCurrentMessageResponse>
</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 GetCurrentMessage 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 - 20 |
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 - 20 |
As part of wsa:From element, this contains (specifically on line 18) additional information needed for identifying the originator of this message. |
21 - 24 |
This is the GetCurrentMessage response. That will contain as a nested child the last published message (lines 22 - 23). |
Faults
- ResourceUnknownFault : There's no resource on QMan associated with the given reference information (soap address and identifier).
- ResourceUnavailableFault : The requested resource is unavailable. This fault should indicate a transient condition. That means a requester might resend the message.
- TopicExpressionDialectUnknownFault : The topic expression dialect is unknown.
- InvalidTopicExpressionFault : The topic expression is not valid for the specified dialect.
- TopicNotSupportedFault : The requested topic is not supported.
- MultipleTopicsSpecifiedFault : The topic expression is ambiguous because is referring to multiple topic.
- NoCurrentMessageOnTopicFault : There's no message available on the requested topic.
Quick links
Web Services Base Notification
Web Services Topics
|