camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Setting url {params} in REST call with Camel
Date Tue, 03 Aug 2010 13:49:54 GMT
Hi

I have created a ticket to track this
https://issues.apache.org/activemq/browse/CAMEL-3021

On Tue, Aug 3, 2010 at 3:22 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
> Hi
>
> Can you try with restletMethod=get
> Could be that the post method doesn't parse the uri for { } placeholders.
>
>
>
> On Thu, Jul 29, 2010 at 3:12 AM, LaSalle, Craig
> <Craig_LaSalle@intuit.com> wrote:
>> Hi -
>>
>>
>>
>> I'm using the "restlet" component to make a call to an external REST
>> api.
>>
>>
>>
>> The route endpoint looks like:
>>
>>
>>
>> to("restlet:http://localhost:8080/pscore/datajobs/{jobid}/patientaccount
>> ?restletMethod=post").
>>
>>
>>
>> To substitute the "jobid" at runtime, I've set the "jobid" in the
>> message header like:
>>
>>
>>
>> exchange.getOut().setHeader("jobid", "1234");
>>
>> exchange.getOut().setHeader("Content-Type", "application/xml");
>>
>> exchange.getOut().setBody("<test>foo</test>");
>>
>>
>>
>> In the external REST service, the "{jobid}" portion of the URL is not
>> getting set to the jobid value of "1234".
>>
>>
>>
>> I haven't been able to find a clear example of how to substitute the url
>> parameters of a REST call with values at runtime. Has anyone else had
>> this problem, and worked through it?
>>
>>
>>
>> Thanks,
>>
>> -Craig LaSalle
>>
>>
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message