You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Michele <mi...@finconsgroup.com> on 2016/01/12 19:59:11 UTC
Jetty Producer Dynamic uri based on info in header
Hi everyone,
How to create dynamically uri for Jetty Component retrieving info in header
of exchange?
Es.
<route >
<from uri="...."/>
<setHeader
headerName="CRMTicketId"><simple>${body[id]}</simple></setHeader>
<marshal ref="Gson" />
<inOut
uri="jetty:host/static-path/$simple{in.headers.CRMTicketId}?matchOnUriPrefix=true"
/>
<log message="Received Message ${body}" />
</route>
Thanks in advance.
Best Regards
Michele
--
View this message in context: http://camel.465427.n5.nabble.com/Jetty-Producer-Dynamic-uri-based-on-info-in-header-tp5776187.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Jetty Producer Dynamic uri based on info in header
Posted by Michele <mi...@finconsgroup.com>.
Hi Claus,
Thanks a lot for your suggestion. It works fine.
I change my route like this:
....
<setHeader
headerName="CRMUpdatePath"><simple>jetty:{{CRM.RS.host.name}}:{{CRM.RS.port}}{{CRM.RS.context.path}}/tk_rt_ticket/${body[id]}</simple></setHeader>
<log message="Record normalized - ${body} $simple{in.header.OAuth-Token}" />
<process ref="UpdateStatusProcessor" />
<marshal ref="Gson" />
<recipientList>
<header>CRMUpdatePath</header>
</recipientList>
....
Have a nice day.
Greetings
Michele
--
View this message in context: http://camel.465427.n5.nabble.com/Jetty-Producer-Dynamic-uri-based-on-info-in-header-tp5776187p5776192.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Jetty Producer Dynamic uri based on info in header
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 Tue, Jan 12, 2016 at 7:59 PM, Michele
<mi...@finconsgroup.com> wrote:
> Hi everyone,
>
> How to create dynamically uri for Jetty Component retrieving info in header
> of exchange?
>
> Es.
>
> <route >
> <from uri="...."/>
> <setHeader
> headerName="CRMTicketId"><simple>${body[id]}</simple></setHeader>
> <marshal ref="Gson" />
> <inOut
> uri="jetty:host/static-path/$simple{in.headers.CRMTicketId}?matchOnUriPrefix=true"
> />
> <log message="Received Message ${body}" />
> </route>
>
> Thanks in advance.
>
> Best Regards
>
> Michele
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Jetty-Producer-Dynamic-uri-based-on-info-in-header-tp5776187.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2