title: How to configure Request Reply from 2 Different Routes in Apache Camel?
body: <p>currently I am working with apache camel. In my application I have 2 routes.</p>
  
  <p>The first route contain HTTP as the input, some processes, and WMQ (this WMQ used for write only)</p>
  
  <p>On the second route, I have WMQ (used for read only) for the from tag and some mapping processes.</p>
  
  <p>What I want to do is sending the response from the WMQ on my second route to my HTTP on my first route.</p>
  
  <p>How to do so?</p>
  
  <p>Here is my configuration so far.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:p="http://www.springframework.org/schema/p" default-init-method="init" xmlns:util="http://www.springframework.org/schema/util" xmlns:osgi="http://www.springframework.org/schema/osgi" xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xs http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd http://www.springframework.org/schema/osgi  http://www.springframework.org/schema/osgi/spring-osgi.xsd"&gt;
  
      &lt;import resource="classpath:/META-INF/spring/components.xml"/&gt;
  
      &lt;camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"&gt;
  
          &lt;dataFormats&gt;
              &lt;xmljson id="xmljson" forceTopLevelObject="true" skipNamespaces="true" removeNamespacePrefixes="true"/&gt;
          &lt;/dataFormats&gt;
  
          &lt;route&gt;
              &lt;from uri="jetty:http://localhost:8888/uebermittleAusweisdaten"/&gt;
              &lt;process ref="TransformToXML"/&gt;
              &lt;to uri ="xslt:soap-template.xsl"/&gt;
              &lt;setHeader headerName="CamelJmsDestinationName"&gt;
                  &lt;constant&gt;queue:///Queue.w?targetClient=1&lt;/constant&gt;    
              &lt;/setHeader&gt;
              &lt;setHeader headerName="JMS_IBM_Character_Set"&gt;
                  &lt;constant&gt;ISO8859_1&lt;/constant&gt;    
              &lt;/setHeader&gt;
              &lt;to uri="jms:queue:Queue.w"/&gt;
              &lt;inOut uri="mock:result"/&gt;
          &lt;/route&gt;
          &lt;route&gt;
              &lt;from uri="jms:queue:queue.r"/&gt;
              &lt;marshal ref="xmljson"/&gt;
              &lt;setHeader headerName="CamelJmsDestinationName"&gt;
                  &lt;constant&gt;mock:result&lt;/constant&gt;    
              &lt;/setHeader&gt;
              &lt;to uri="stream:out"/&gt;
          &lt;/route&gt;
  
      &lt;/camelContext&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>