I am using Camel 2.16.3 and restlet.

-Steve

> On Apr 20, 2016, at 7:27 PM, John D. Ament <johndam...@apache.org> wrote:
> 
> Steve
> 
> Could you share your dependencies as well?  Which rest runtime are you
> using?
> On Apr 20, 2016 17:12, "Steve Huston" <shus...@riverace.com> wrote:
> 
>> I am using the REST DSL in a Camel SCR unit test. I have a route (being
>> tested) that will initiate a http request at this URL:
>> 
>>        @Test
>>        public void testRoutes() throws Exception {
>>        context.addRoutes(new RouteBuilder() {
>>                @Override
>>                public void configure() throws Exception {
>> 
>> restConfiguration().component("restlet").port(9000);
>>                        rest("/asset")
>>                                .put("/{addr}/pong")
>> .param().name("id").type(RestParamType.query).endParam()
>>                                .to("log:steve?showAll=true")
>>                                .to("mock:result");
>>                }
>>        });
>> 
>>        MockEndpoint resultEndpoint = context.getEndpoint("mock:result",
>> MockEndpoint.class);
>>        resultEndpoint.expectedMessageCount(1);
>> 
>> resultEndpoint.message(0).header("addr").isEqualTo("my_test_value");
>>        resultEndpoint.message(0).header("id").isEqualTo("abcd1234");
>> 
>> 
>> At run time, the request does arrive as a PUT to
>> http://127.0.0.1:9000/asset/my_test_value/pong?id=abcd1234
>> 
>> However, I am only getting the "addr" path parameter in the header. The
>> query param "id" is missing.
>> Am I doing something wrong on the definition? I pieced together the way to
>> do it from disparate tidbits on the net.
>> 
>> Thanks,
>> -Steve
>> 

Reply via email to