Versions Compared

Key

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

...

As you can see in the Camel route we use a CXF consumer to proxy the web service. Then we route the message to the enrich bean which validates and add the missing information. Then we just use the HTTP component to send the web service request to the real web service.
The reply from the real web service is then logged and use as reply for the proxied web service as well.TODO: e1

Wiki Markup
{snippet:id=e1|lang=xml|url=camel/trunk/examples/camel-example-cxf-proxy/src/main/resources/camel-config.xml}

Enrich bean

The enrich bean is Java code which in our simple example will just set the incidentId parameter to the fixed value of 456. In your implementation you can of course do a lot more.TODO: e1

Wiki Markup
{snippet:id=e1|lang=java|url=camel/trunk/examples/camel-example-cxf-proxy/src/main/java/org/apache/camel/example/cxf/proxy/EnrichBean.java}

Running the example

You start the example from the command line using the maven goal mvn jetty:run. There is also a build.xml file for ANT users.
You can also start the Camel application from your IDE, by running the org.apache.camel.example.cxf.proxy.MyMain main class.

...