title: apache camel request response and how to route to next transformer
body: <p>The concept of routing is nice in theory but in practice, I am a bit confused.  I have a CXF method in my webservice</p>
  
  <pre><code>public Response someMethod(Request r) {
  }
  </code></pre>
  
  <p>what I don't get is I need to route the Request to some further node so am I really supposed to do that in the java code or will camel generate an interface(asynch hopefully) that I can wire that node up to some transformer to a next node validator to some store and forward, etc and then finally have the store and forward reply with a Response that is somehow sent out the socket the Request came in from originally.  </p>
  
  <p>In the above method, I am forced to return the response back to the client in that method, right?  </p>
  
  <p>If I am supposed to put the code in the webservices method, is there some camel context I am supposed to call into?</p>
  
  <p>Also, I want the "RAW" parameters of the SOAP method call and don't want to deal with SOAP Header and then also need to expose some REST apis as well that just accept a String.</p>
  
  <p>EDIT: The proxy example from the answer below is the closest I have seen but even that one if I want to short cut and not even call the real webservice at an earlier node in the pipeline, I can't.  I seem to have to call the end webservice code which is not wanted as we don't have any webservice code.  We are trying to run it through existing pojos from a webservice call.  If the validation node fails, we want to return a response, if it succeeds we want to forward the request on to another node where if that node fails we return a response or if it succeeds we want to forward the request on.  There seems to be nothing for this???  Also, this seems like a pretty typical case to me so I am surprised or I am not getting something with all these ESB frameworks(mule, camel so far).</p>
  
  <p>thanks,
  Dean</p>