Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

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

...

Here is code for starting the JMS broker and the CXF server:

...

Now we setup the router for the two endpoint URIs 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.

...

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

...

In this example, we setup a load balancing Camel context in the Camel destination.

...

...

When CXF loads this configuration, it will publish the CXF endpoint to the Camel endpoint that is found in the Camel context.

...

...

The code below shows how to publish the endpoint to different Camel context endpoints. You can specify the Camel endpoint URI as the endpoint address parameter.

...

...

CXF example for using the WebServiceProvider API

...

First, let's have a look at the Camel context's configuration. Here we start a CxfConsumer to listen to the address and pass SOAP messages to the test bean.

...

Below is the WebServiceProvider implementor's annotation. In this code, we just want to handle SOAPMessages in the Message mode:

...

Since the CXF-Camel component will replace the CXF invoker to call the processor when starting a CXF endpoint, the CXF-Camel consumer will never call the provider implementor's invoke method here.

...

...

Now we can implement the bean for handling the invocation of the SOAP message:

...