Addressing: Message Identification and Correlation
Each message can be assigned a unique identifier. These identifiers can be assigned by either an application or the underlying messaging infrastructure. Message identifiers are particularly helpful for tracking and auditing messages and when correlating collections of asynchronous request and response messages. Message identifiers are contained in the MessageID SOAP header element defined in WS-Addressing.
Lines 0305 The MessageID element is carried in the SOAP message header. Although the specification allows the value to be any URI, a common approach is to use a universally unique identifier (UUID), as specified in the DCE 1.1 Remote Procedure Call specification [UUID].When a response to this message is returned, the MessageID in the request is transmitted in the RelatesTo SOAP header element. The full sequence of MessageID and RelatesTo elements can be used to determine message sequences and to help ensure correct processing. This element is required to be used in all reply messages if received in a request.
Message ID
(01) ...
(02) <env:Header>
(03) <wsa:MessageID>
(04) uuid:aaaabbbb-cccc-dddd-eeee-ffffffffffff
(05) </wsa:MessageID>
(06) ...
(07) </env:Header>
Lines 0406 The value of the RelatesTo element is the message ID of the corresponding request. Because the default RelationshipType is Reply, this attribute is not strictly required in the response message. However, any message might include multiple RelatesTo elements with different values for RelationshipType, supporting alternate approaches for message correlation.Note
RelatesTo
(01) ...
(02) <env:Header>
(03) <wsa:MessageID> ... </wsa:MessageID>
(04) <wsa:RelatesTo RelationshipType="Reply">
(05) uuid:aaaabbbb-cccc-dddd-eeee-ffffffffffff
(06) </wsa:RelatesTo>
...
(07) </env:Header>
![]() | WS-Addressing currently defines only one valueReplyfor the value of the RelationshipType attribute. Other relationship types might be defined in subsequent versions of WS-Addressing or in other specifications. |