title: Integrating Apache Camel with CXF based RESTful webservices : Need Advice
body: <p>I am trying to integrate my CXF restful webservices with apache camel. the requirement is  that when someone hits my webservice, i take the request parameters and connect to google or some service provider to search for results using the request parameters. 
  lets say my webservice is  foo:bar and i want to connect to google after this foo:bar gets hit.
  this means my camel route would be something like that :</p>
  
  <pre><code>     &lt;camelContext&gt;
              &lt;route&gt;
               &lt;to uri:"cxf://bean://foo:bar/&gt;
               &lt;from uri="http://www.google.com"/&gt;
              &lt;/route&gt;
             &lt;/camelContext&gt;
  
      is this understanding correct.. 
      i am pasting a section of my config xml for review ..
  
  
  
  
  &lt;jaxrs:server id="restContainer" address="/" staticSubresourceResolution="true"&gt;
  &lt;jaxrs:serviceBeans&gt;
  &lt;ref bean="FooBar" /&gt;
  &lt;/jaxrs:serviceBeans&gt;
  &lt;jaxrs:providers&gt;
  &lt;bean class="org.apache.cxf.jaxrs.provider.JSONProvider"&gt;
  &lt;property name="dropRootElement" value="true" /&gt;
  &lt;property name="supportUnwrapped" value="true" /&gt;
  &lt;/jaxrs:providers&gt;
  &lt;camelcxf:rsServer id="rsServer"
  // this is the rest uri which is mapped to my resource class address="http://localhost:port/MyApplication/rest/foobar serviceClass="com.camel.example.FooBar" /&gt;
  &lt;camel:camelContext id="camelContext-1"&gt;
  &lt;camel:route&gt;
  &lt;camel:from uri="cxfrs:bean:rsServer" /&gt;
  &lt;camel:to uri="http://www.google.com" /&gt;
  &lt;/camel:route&gt;
  &lt;/camel:camelContext&gt;
  </code></pre>
  
  <p>Also apart from this i am getting following exception when i run my webservice :
   java.lang.ClassNotFoundException: org.eclipse.jetty.util.component.Container$Listener
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      ... 58 more
  I dont understand why i get this, as i am using tomcat for deployment.</p>