none
Does 'RelatesTo' relate response message to request message RRS feed

  • Question

  • As I understand it, 'RelatesTo' relates response to request and the value of  'RelateTo' should be the same as 'MessageID' in request message. However, I can not  find them matched. Am I wrong?

    Request:
     
     <s:Header>
        <a:Action s:mustUnderstand="1">http://tempuri.org/ISay/Say</a:Action>
        <a:MessageID>urn:uuid:23d909b6-0cc7-4010-9763-5945d3087115</a:MessageID>
        <a:ReplyTo>
          <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
        </a:ReplyTo>
      </s:Header>
    
    Response:
    
     <s:Header>
        <a:Action s:mustUnderstand="1">http://tempuri.org/ISay/SayResponse</a:Action>
        <a:RelatesTo>urn:uuid:a3e9fa73-dc63-4df5-b0d7-07a0bcf49ce5</a:RelatesTo>
        <a:To s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/anonymous</a:To>
      </s:Header>


    • Edited by Ryon Cui Wednesday, June 26, 2013 11:39 AM
    Wednesday, June 26, 2013 11:38 AM

Answers

  • Hi,

    All SOAP messages that are WS-Addressing compliant contain a <MessageID> element in the message header that uniquely identifies them.

    When a reply or a fault is sent to a service, the reply or fault message header contains a <RelatesTo> element that specifies the MessageID of the original message to which the reply or fault applies. So there are not same.

    The following XML fragment is part of the message header for a reply message and shows <MessageID> and <RelatesTo> elements:

    <wsa:MessageID>urn:uuid:8b82a730-269d-4b5a-b736-65334ebff728</wsa:MessageID> 
    <wsa:RelatesTo>urn:uuid:c6fb4d0f-d7fd-43fb-985b-9e0e20fcfbd9</wsa:RelatesTo>

    For more information, please try to refer to this MSDN article:

    http://msdn.microsoft.com/en-us/library/bb972781.aspx .

    Hope it can help you.

    Best Regards.



    Amy Peng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Ryon Cui Wednesday, July 3, 2013 8:49 AM
    Thursday, June 27, 2013 2:40 AM
    Moderator

All replies

  • Hi,

    All SOAP messages that are WS-Addressing compliant contain a <MessageID> element in the message header that uniquely identifies them.

    When a reply or a fault is sent to a service, the reply or fault message header contains a <RelatesTo> element that specifies the MessageID of the original message to which the reply or fault applies. So there are not same.

    The following XML fragment is part of the message header for a reply message and shows <MessageID> and <RelatesTo> elements:

    <wsa:MessageID>urn:uuid:8b82a730-269d-4b5a-b736-65334ebff728</wsa:MessageID> 
    <wsa:RelatesTo>urn:uuid:c6fb4d0f-d7fd-43fb-985b-9e0e20fcfbd9</wsa:RelatesTo>

    For more information, please try to refer to this MSDN article:

    http://msdn.microsoft.com/en-us/library/bb972781.aspx .

    Hope it can help you.

    Best Regards.



    Amy Peng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Ryon Cui Wednesday, July 3, 2013 8:49 AM
    Thursday, June 27, 2013 2:40 AM
    Moderator
  • Thank you Amy. Sorry for not describing question clear.

    I agree with you that <RelateTo> and <MessageID> in the same message like reply or fault are not the same. But, I mean that <RelateTo> in reply message did not match <MessageID> in request message.  

    • Edited by Ryon Cui Friday, June 28, 2013 5:39 AM Edit Statement
    Friday, June 28, 2013 3:04 AM
  • Friday, June 28, 2013 3:20 AM