You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "sriniavas@gmail.com" <sr...@gmail.com> on 2013/04/22 10:51:43 UTC
xpath value as a parameter to an endpoint
Hi,
How to set a dynamic value as a parameter to an endpoint?
Payload :
<person>
<name>john</name>
<acno>9876543210</acno>
</person>
route :
<route>
<from uri="http://localhost:8092/test/"/>
<setProperty propertyName="acno">
<xpath resultType="java.lang.String">//person/acno</xpath>
</setProperty>
<setProperty propertyName="name">
<xpath resultType="java.lang.String">//person/name</xpath>
</setProperty>
<to
uri="https://server/rest/services/test?accountno=${property.acno}&accountname=${property.name}"/>
</route>
Any help in resolving this issue or providing a workaround would be very
appreciated.
--
View this message in context: http://camel.465427.n5.nabble.com/xpath-value-as-a-parameter-to-an-endpoint-tp5731216.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: xpath value as a parameter to an endpoint
Posted by Vas <sr...@gmail.com>.
Used Receipient List to solve this issue.
http://camel.apache.org/recipient-list.html
Thanks for your reply.
--
View this message in context: http://camel.465427.n5.nabble.com/xpath-value-as-a-parameter-to-an-endpoint-tp5731216p5731335.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: xpath value as a parameter to an endpoint
Posted by Christian Müller <ch...@gmail.com>.
Check out the link Claus provides and follow the other links on this page
if you need more details...
Best,
Christian
On Mon, Apr 22, 2013 at 11:31 AM, Vas <sr...@gmail.com> wrote:
> Hi Claus,
> Thanks for your reply.
> I want take the parameter value from the payload.
>
> -vas
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/xpath-value-as-a-parameter-to-an-endpoint-tp5731216p5731226.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Re: xpath value as a parameter to an endpoint
Posted by Vas <sr...@gmail.com>.
Hi Claus,
Thanks for your reply.
I want take the parameter value from the payload.
-vas
--
View this message in context: http://camel.465427.n5.nabble.com/xpath-value-as-a-parameter-to-an-endpoint-tp5731216p5731226.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: xpath value as a parameter to an endpoint
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
See this FAQ
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
On Mon, Apr 22, 2013 at 10:51 AM, sriniavas@gmail.com
<sr...@gmail.com> wrote:
> Hi,
> How to set a dynamic value as a parameter to an endpoint?
>
> Payload :
> <person>
> <name>john</name>
> <acno>9876543210</acno>
> </person>
>
> route :
> <route>
> <from uri="http://localhost:8092/test/"/>
> <setProperty propertyName="acno">
> <xpath resultType="java.lang.String">//person/acno</xpath>
> </setProperty>
> <setProperty propertyName="name">
> <xpath resultType="java.lang.String">//person/name</xpath>
> </setProperty>
> <to
> uri="https://server/rest/services/test?accountno=${property.acno}&accountname=${property.name}"/>
> </route>
>
> Any help in resolving this issue or providing a workaround would be very
> appreciated.
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/xpath-value-as-a-parameter-to-an-endpoint-tp5731216.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen