camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Working with CXF web service beans
Date Wed, 24 Feb 2010 03:28:48 GMT
Did you try to use the cxfbean[1]?
[1] http://camel.apache.org/cxf.html#CXF-CXFBeanComponent%282.0orlater%29

Willem

Alexandros Karypidis wrote:
> Hello,
> 
> I'm going through the tutorial: 
> http://camel.apache.org/tutorial-example-reportincident-part5.html
> 
> Basically, there's two things I don't like about CXF's integration with 
> Camel:
> 
> (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:route>
> <camel:from uri="cxf:bean:myCXFBean" />
> <camel:to uri="log:logger" />
> (1) <camel:convertBodyTo type="my.ParameterClass" />
> (2) <camel:process ref="processorThatSetsOutMessage" />
> </camel:route>
> </camel:camelContext>
> 
> 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)?
> 
> 


Mime
View raw message