If the request is SOAP based and you validate the request against an XML schema, CXF can already do that. No processor needed for this requirement. To transform between different types/objects, I recommend to use the Camel TypeConverter mechanism [1] and implement your own type converters. No processor needed for this requirement. Your route could looks like (without error handling):
from("cxf:...") .convertBodyTo(MyOtherRequest.class) .to("cxf:...") .convertBodyTo(MyResponse.class); [1] http://camel.apache.org/type-converter.html Best, Christian ----------------- Software Integration Specialist Apache Member V.P. Apache Camel | Apache Camel PMC Member | Apache Camel committer Apache Incubator PMC Member https://www.linkedin.com/pub/christian-mueller/11/551/642 On Mon, Sep 15, 2014 at 6:38 AM, Subbu <subramaniam.ven...@gmail.com> wrote: > Hello All, > > Currently in my application we are defining a Processor for a particular > functionality to be achieved. > > For example, we have a webservice based service, we are using CXF to expose > a webservice the endpoint. > > At the start of the route, the "camel:from" is configured as the webservice > endpoint, then followed a Processor for RequestValidation then followed by > Processors. This service which we are developing is more of integration > between multiple services, so after the RequestValidation, there is a > Processor to construct the Request to be sent to DownStream System and > invoke of downstream service using cxf client, then there is another > Processor created for handling the response and constructing the response > and return to calling client of our service. > > So, if you consider an operation in our service we have some 3 or 4 > processor written for a specific route. > > Can someone tell me whether this is good approach to write a Processor to > fulfill a given functionality or is it better to consider a Camel Processor > in parlance with Struts Action classes. Where we receive the request and > hand it over to a business delegate, which then taken returns the final > response to be send to the GUI. > > Thanks & Warm Regards, > Subbu. > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Best-Practice-to-write-Processor-tp5756514.html > Sent from the Camel Development mailing list archive at Nabble.com. >