title: Apache Camel http to http routing (Is it possible?)
body: <p>I am starting now with Camel. I have seen the http4 component for http clients and the jetty component for http servers.</p>
  
  <p>I have seen several examples that use one or the other.
  I would like to know if it is possible to combine them together.</p>
  
  <p>Example</p>
  
  <pre><code>from("jetty:http://0.0.0.0:8080/myapp/myservice")
  .to("http4://www.google.com");
  </code></pre>
  
  <p>This would make camel a simple http based router/proxy. Web browsers would hit the camel URL and instead get google. (Google is just an example, I have a real POST based service that I want to use)</p>
  
  <p>Is this route possible? Should I research Camel or do I need a different software framework for this? In the future I would also need to add transformations/filters in between.</p>
  
  <p>I have tried it and got a nullpointer exception</p>
  
  <pre><code>[qtp757856402-14] SendProcessor       DEBUG &gt;&gt;&gt;&gt; Endpoint[http4://www.google.com] Exchange[Message: [Body is instance of java.io.InputStream]]
  [qtp757856402-14] DefaultErrorHandler DEBUG Failed delivery for exchangeId: ID-IT12-53265-1302683969823-0-1. On delivery attempt: 0 caught: java.lang.NullPointerException
  [qtp757856402-14] DefaultErrorHandler ERROR Failed delivery for exchangeId: ID-IT12-53265-1302683969823-0-1. Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException
  java.lang.NullPointerException
  </code></pre>