Java Reference
In-Depth Information
--uuid:23d59158-64d6-4555-89d3-5ccbfaa187f3
Content-Id: <2b048436-7fcb-4166-b142-65121d32008f>
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
[binary data]
--uuid:23d59158-64d6-4555-89d3-5ccbfaa187f3--
Let's examine the parts of this SOAP response to see how it correlates the message. The first
part of the SOAP header is related to WS-A. The first interesting WS-RM element is the
<Sequence>
element. The sequence contains an identifier and a message number to indicate
the ordinal position of this message in the flow.
The
<SequenceAcknowledgement>
header indicates the successful receipt of a message and
can be returned with an application message, or the WS-RM destination can send one inde-
pendently.
The sequence must include a
<LastMessage>
element to signal that this is the last message
to expect. In this case, the runtime must respond with a
<SequenceAcknowledgment>
header
(if there is an application message to be sent; if not, it can choose to send a message with an
empty body containing only the
<LastMessage>
header). Generally, after you get the response
to your request, the client runtime willoriginate a new request containing the
<LastMessage>
header, and the WS-RM destination (the service provider) will send a response containing a
<SequenceAcknowledgement>
header and a
<TerminateSequence>
message in the SOAP
body. This is the case in the Glassfish/Metro implementation of WS-RM, for example. A snip-
pet of such a response is shown here:
<S:Body>
<ns2:TerminateSequence
xmlns:ns2="http://schemas.xmlsoap.org/ws/2005/02/rm" ...>
<ns2:Identifier>
uuid:0ffa7ef6-bcea-4d63-ba2c-1a5c3d1a4832
</ns2:Identifier>
</ns2:TerminateSequence>
</S:Body>
The
<TerminateSequence>
element holds an
<Identifier>
that corresponds to the UUID
for the sequence as presented in the previous response, so that the runtime knows which se-
quence to end and free up its resources.
Next in the response message are the
<AckRequested>
and
<AcknowledgementRange>
ele-
ments. These elements indicate to the runtime the scope of what's being acknowledged as suc-
cessfully handled.
<AcknowledgementRange>
contains a set of message numbers indicating