Providing multiple web service operations within a single route

The Camel CXF Component has the ability to allow a Camel route to act as a SOAP (or REST) web service listener as we saw in the Implementing a web service with a Camel route recipe. Most web services expose more than one operation as part of their interface. This recipe will show you a strategy for handling multiple web service operations within a single Camel route acting as a web service frontend.

Getting ready

This recipe assumes that you have a project with JAX-WS artifacts created as described in the Generating the service stubs from a WSDL recipe. To use the generated API, you need to include a dependency to that project in your build:

<dependency> <groupId>org.camelcookbook.examples</groupId> ...

Get Apache Camel Developer's Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.