Thanks.
Just want to be sure - The second processor (
PrepearParameterForWebServiceB() ) will "know" to process the original input
and will not refer to the output recieved from webservice A as the input it
needs to process?
willem.jiang wrote:
>
> 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
>>
>>
>
>
>
--
View this message in context:
http://www.nabble.com/How-to-use-camel-for-calling-2-webservices-that-one-is-dependent-on-the-other-tp18608192s22882p18626263.html
Sent from the Camel - Users mailing list archive at Nabble.com.