You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Nasim Anza <na...@googlemail.com> on 2009/04/27 10:45:36 UTC

camel route : How to execute a list of operations on the same service

Hello,

I would like to use the Camel route to define the following workflow:

Invoke an operation AO1 on an external web-service A.

Transform the XML message result with an XQuery template “template.xquery”

Use the result of step2 as input for calling the operation AO2 of the same
service A.

 I’ve tried to do it as below:

 *from("jbi:endpoint:myENDPOINT")

//Step1

.to("jbi:service:urn:mySERVICE_A?operation={urn:mySERVICE_A}OperationA)

//Step2

.to("xquery://template1.xquery")

//Step3

.to("jbi:service:urn:mySERVICE_A?operation={urn:mySERVICE_A}OperationB)

.to("log: response");
*

This didn’t work for me, the invocation of the operation B on my service A
generates a bad request (error 400).

I’ve commented the step1
(.to("jbi:service:urn:mySERVICE_A?operation={urn:mySERVICE_A}OperationA)

And I put the XML message that I got after step2, as input of step3 : This
works

It seems that it is not possible to call more than one operation on the same
service!

Maybe my route is not correct.

I’m using the Camel 1.6 under ServiceMxi3.3

Any help or example would be appreciated.

Thanks,
Mostapha

Re: camel route : How to execute a list of operations on the same service

Posted by Gert Vanthienen <ge...@gmail.com>.
Mostapha,

This route should work, so there's not an issue there but perhaps
there's something wrong with the xquery output or we need to
explicitly set a mep (?mep=in-out) on some of the services you're
invoking.  Could you provide us with more detailed error messages
(e.g. the stack trace of the error you're getting)?  Also, could you
try enabling DEBUG logging and see if the correct exchanges are going
over the ESB?

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/4/27 Nasim Anza <na...@googlemail.com>:
> Hello,
>
> I would like to use the Camel route to define the following workflow:
>
> Invoke an operation AO1 on an external web-service A.
>
> Transform the XML message result with an XQuery template “template.xquery”
>
> Use the result of step2 as input for calling the operation AO2 of the same
> service A.
>
>  I’ve tried to do it as below:
>
>  *from("jbi:endpoint:myENDPOINT")
>
> //Step1
>
> .to("jbi:service:urn:mySERVICE_A?operation={urn:mySERVICE_A}OperationA)
>
> //Step2
>
> .to("xquery://template1.xquery")
>
> //Step3
>
> .to("jbi:service:urn:mySERVICE_A?operation={urn:mySERVICE_A}OperationB)
>
> .to("log: response");
> *
>
> This didn’t work for me, the invocation of the operation B on my service A
> generates a bad request (error 400).
>
> I’ve commented the step1
> (.to("jbi:service:urn:mySERVICE_A?operation={urn:mySERVICE_A}OperationA)
>
> And I put the XML message that I got after step2, as input of step3 : This
> works
>
> It seems that it is not possible to call more than one operation on the same
> service!
>
> Maybe my route is not correct.
>
> I’m using the Camel 1.6 under ServiceMxi3.3
>
> Any help or example would be appreciated.
>
> Thanks,
> Mostapha
>