You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gerald Preissler <gp...@talend.com> on 2012/06/21 10:33:54 UTC

Web Service Provider with Camel - best practises?

Hi all,

I am looking at implementing a Web Service provider with several service operations using Camel and CXF. Currently I'm thinking about the best way to do this. Basically I see 2 options:

1. The "pure Camel" way would be to use the cxf component as the start of a route and then split processing to different sub-routes according to the service operation using the in.header.operationName property as described here:
http://www.slideshare.net/trenaman/implementing-webservices-with-camel-and-cxf-in-servicemix

2. The other approach that I can see would be to implement a classical Web Service provider using CXF and kick off a route in the handler method for each implementation using the proxy feature describe in ch. 14.2 of the "Camel  in Action" book.

Of course the first approach is more Camel-like, but I see a couple of advantages to the second approach that I'd like to discuss:

When using the second option, it is easily possible to set a breakpoint for individual service operations when debugging. Would that be possible with pure Camel as well? Dito for selectively setting log output levels for individual service operations.

The project will be running in OSGi, and I'd like to register the service provider as an OSGi service as well. How could I do that in Camel.

Thanks in advance for any hints, thoughts or comments.

Regards
    Jerry