Implementing a web service with a Camel route
The Camel CXF Component allows a Camel route to act as a SOAP (or REST) web service listener. This allows you to create web service frontends for other systems, including acting as a web service proxy—something that is discussed in-depth in the Web service proxying recipe.
This recipe will show you the basic steps of exposing a Camel route as a web service consumer/listener.
Getting ready
This recipe assumes that you have a project with JAX-WS artifacts created as shown 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> <artifactId>ws-payments-api</artifactId> <version>1.0-SNAPSHOT</version> </dependency>
This recipe's example is based on paymentService.wsdl
, whose interface has one operation, transferFunds
.
<wsdl:portType name...