Skip to main content

Relation between Request and Callback Messages

Availability-noteDeprecated

The relationship between a request sent and a response received is achieved by adding a special callId header to both request and callback messages:

For this Request message

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header>
      <callId xmlns="http://www.talend.com/esb/requestcallback">urn:uuid:8b64f8f3-d72b-4a6f-a206-8a3309920998</callId>
      <Action xmlns="http://www.w3.org/2005/08/addressing">http://cxf.apache.org/jaxws/dispatch/Library/InvokeOneWayRequest</Action>
      <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:1d1dce72-66b3-4c47-aebe-dd462b1e5d32</MessageID>
      <To xmlns="http://www.w3.org/2005/08/addressing">http://localhost:9090/tesb-library-tutorial/services/LibraryProvider</To>
      <ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
         <Address>http://consumer.example.com:7777/soap/LibraryConsumer</Address>
      </ReplyTo>
      <RelatesTo xmlns="http://www.w3.org/2005/08/addressing" 
                 RelationshipType="message"/>
   </soap:Header>
   <soap:Body>
       <!-- some data here -->
   </soap:Body>
</soap:Envelope>

The response for this message may look like the following:

Corresponding Callback reponse

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header>
      <callId xmlns="http://www.talend.com/esb/requestcallback">urn:uuid:8b64f8f3-d72b-4a6f-a206-8a3309920998</callId>
      <callbackId xmlns="http://www.talend.com/esb/requestcallback">urn:uuid:bb7176ae-e6e2-44cf-91c6-7b1238c3d6f5</callbackId>
      <Action xmlns="http://www.w3.org/2005/08/addressing">seekBookInBasementResponse</Action>
      <MessageID xmlns="http://www.w3.org/2005/08/addressing">urn:uuid:511793d8-74a6-4b7c-a1bd-e852a2795fed</MessageID>
      <To xmlns="http://www.w3.org/2005/08/addressing">http://127.0.0.1:6666/soap/LibraryConsumer</To>
      <ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
         <Address>http://www.w3.org/2005/08/addressing/none</Address>
      </ReplyTo>
      <RelatesTo xmlns="http://www.w3.org/2005/08/addressing" RelationshipType="message">urn:uuid:1d1dce72-66b3-4c47-aebe-dd462b1e5d32</RelatesTo>
   </soap:Header>
   <soap:Body>
     <!-- some data here -->
   </soap:Body>
</soap:Envelope>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!