Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This example demonstrates how you can use CXF to proxy a real web service. For example in this case we want Camel to validate and enrich the input message before its send to the real web service. We do this to ensure the data is correct and that missing information is added automatic by Camel. In real life you may want to do this in case a client send bad/faulty data to a web service, and its costly/not possible to update and fix that client. Instead lets fix it by a proxy with Camel.

Tip
titlePure HTTP proxy

If you want a pure http based proxy then you can use Jetty or Servlet as front end in Camel. Then delegate those incoming HTTP requests to the real web service. You may want to do this if you want a simple straight thru proxy where the message should not be altered by Camel.
By using the CXF component you get access to all the web service features Apache CXF provides, where as with Jetty its just pure HTTP proxy.

Implementation

Since this is a example it provides both the Camel application and the real web service in the same JVM. In your use-case the real webs ervice will be hosted on another server etc.

...