camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandros Karypidis <>
Subject Working with CXF web service beans
Date Tue, 23 Feb 2010 19:00:31 GMT

I'm going through the tutorial:

Basically, there's two things I don't like about CXF's integration with 

(1) I must cast the input message to a parameter class manually
(2) I must call a processor set the output message

The points are illustrated below:

<camel-cxf:cxfEndpoint id="myCXFBean" 
serviceClass="some.jaxws.WebServiceClass" ... />
<camel:camelContext id="myCamelContext" trace="true">
<camel:from uri="cxf:bean:myCXFBean" />
<camel:to uri="log:logger" />
(1) <camel:convertBodyTo type="my.ParameterClass" />
(2) <camel:process ref="processorThatSetsOutMessage" />

My problem with the approach is that:

Regarding (1): since a web service has multiple operations, each with 
different parameters, one would need to cast to a different class type, 
depending on which operation is being called.

Regarding (2): I simply need Camel to do some magic prior to the web 
service implementation (i.e. in the "processor" I just need to call the 
method of "some.jaxws.WebServiceClass" that corresponds to the input 
message); is there a way to configure this simple behaviour, with the 
return value of the invocation automatically being set to become the 
body of the output message (i.e. not need to set 
exchange.getOut().out.setBody() explicitly)?

View raw message