Hi ,

I think you could use choice [1] to implement the flow, since there are some requirements of the webservice request[2], you may need a processor to take care of the parameters.
Here is an example of DSL

from("YourStartPoint")
     .process(new PrepearParameterForWebServiceA()).to("cxf://WebServiceA")
.choice(when(body().isEqualTo(Boolean.TRUE))).process(new PrepearParameterForWebServiceB()).to("cxf://WebServiceB")

      .otherwise().process(new SetFaultBackProcessor());


[1]http://activemq.apache.org/camel/routes.html#Routes-Choices
[2]http://activemq.apache.org/camel/cxf.html#CXF-HowtopreparethemessageforthecamelcxfendpointinPOJOdataformat

Willem

docs123 wrote:
Hi,
I'm new to camel and I need help to see if I use camel for implementing the
following flow:
User calls camel with input containing A and B elements.
Camel will take element A and call webservice A (sending it element A as an
input):

1. In case webservice A returns true - camel will call webservice B with
element B (from the original input message) as an input, and the output back
to the user will be the output from webservice B.

2. In case A returns false - the user will recieve some error message.

Can I implement this flow with camel built-in processors or do I need to
write my own processors?

Thanks

Reply via email to