You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

CXF Example

The Camel CXF example] is a demo of the camel-cxf component to show how to route the message between to CXF endpoints , one endpoint consumes the SOAP over JMS request , the other endpoint provides the SOAP over http request for the actual CXF Service endpoint. This camel router just routs the SOAP over HTTP CXF client request to the SOAP over HTTP CXF service.

To run the example we use the maven exec plugin. For example from the source or binary distribution the following should work

cd examples/camel-example-cxf
mvn compile exec:java

We start with creating a CamelContext - which is a container for Components, Routes etc:

Error formatting macro: snippet: java.lang.NullPointerException

There is the JMS broker and CXF server set up code

Error formatting macro: snippet: java.lang.NullPointerException

Now we setup the router for the two endpoint URI which we mentioned before, ROUTER_ENDPOINT_URI is the endpoint for consuming the request of SOAP over HTTP, SERVICE_ENDPOINT_URI is the endpoint for providing the request for the SOAP over JMS service.

Error formatting macro: snippet: java.lang.NullPointerException

Then we start up the camel context and create the CXF client to kick off the request.

Error formatting macro: snippet: java.lang.NullPointerException
  • No labels