You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by sergarci <se...@gmail.com> on 2014/05/21 17:06:47 UTC

Can not resolve simple un http uri

Hi everyone

When I configure an endpoint wich uses "file" I can properly use simple
like:
<to uri="file:///Outbox?fileName=${body}.xml"/>
It resolves ${body} to the actual value of body

But when I use with "http" component it is not working:
<touri=&quot;http://localhost:7001/someURL?param=${body}&quot; />
it does not resolve ${body} to the actual value, it calls the url like:
"http://localhost:7001/someURL?param=${body}".

Is there any known solution?

Thanks you!



--
View this message in context: http://camel.465427.n5.nabble.com/Can-not-resolve-simple-un-http-uri-tp5751434.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can not resolve simple un http uri

Posted by sergarci <se...@gmail.com>.
Hi

I think it can work

<from...>
<setHeader headerName="CamelHttpMethod">
   <constant>GET</constant>
</setHeader>
<recipientList>
	<simple>http://localhost:7001/theUrl?param=${body}</simple>
</recipientList>
<to ...>

I hope this helps the next one.

Thansk



--
View this message in context: http://camel.465427.n5.nabble.com/Can-not-resolve-simple-un-http-uri-tp5751434p5751449.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can not resolve simple un http uri

Posted by sergarci <se...@gmail.com>.
Thanks it works well!



--
View this message in context: http://camel.465427.n5.nabble.com/Can-not-resolve-simple-un-http-uri-tp5751434p5751454.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can not resolve simple un http uri

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Use recipiennt list when you want dynamic to. So what you want to is:

<recipientList>
  <simple>http://localhost:7001/someURL?param=${body}<simple>
</recipientList>

On Thu, May 22, 2014 at 8:37 AM, sergarci <se...@gmail.com> wrote:
> Hi
> I'm very new to Camel and I can't understand this example.
> It seems like I need to add a template but I don't know where.
> I think I could use simple language just to translate ${body} to its actual
> value.
>
> Is there any more information please?
>
> Thanks!
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-not-resolve-simple-un-http-uri-tp5751434p5751448.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: Can not resolve simple un http uri

Posted by sergarci <se...@gmail.com>.
Hi 
I'm very new to Camel and I can't understand this example.
It seems like I need to add a template but I don't know where.
I think I could use simple language just to translate ${body} to its actual
value.

Is there any more information please?

Thanks!



--
View this message in context: http://camel.465427.n5.nabble.com/Can-not-resolve-simple-un-http-uri-tp5751434p5751448.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can not resolve simple un http uri

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See this FAQ
http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html

On Wed, May 21, 2014 at 5:06 PM, sergarci <se...@gmail.com> wrote:
> Hi everyone
>
> When I configure an endpoint wich uses "file" I can properly use simple
> like:
> <to uri="file:///Outbox?fileName=${body}.xml"/>
> It resolves ${body} to the actual value of body
>
> But when I use with "http" component it is not working:
> <touri=&quot;http://localhost:7001/someURL?param=${body}&quot; />
> it does not resolve ${body} to the actual value, it calls the url like:
> "http://localhost:7001/someURL?param=${body}".
>
> Is there any known solution?
>
> Thanks you!
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-not-resolve-simple-un-http-uri-tp5751434.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/