title: How to get Response from another channel in mirth
body: <p>We have two channels called <code>channelA</code> and <code>channelB.</code></p>
  
  <p>In channelA we have two destinations </p>
  
  <ul>
  <li><p>a. first destination will invoke the channelB with XML data as input and get the response from the channelB in XML format.</p></li>
  <li><p>b. retrieve the response of first destination in xml format and process it.</p></li>
  </ul>
  
  <p><code>var dest1 = responseMap.get("destination1");
  var resMessage = dest1.getMessage();</code></p>
  
  <p>I am getting channelB response as <code>"Message routed successfully".</code></p>
  
  <p>How I will get actual XML from <code>channelB</code> instead of <code>"Message routed successfully"</code> message.</p>
  
  <p>We are doing above steps to define generic channels such that we can reuse it in different scenarios in the mirth application.</p>
  
  <p>We using mirth 2.2.1.5861 version.</p>