Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 710E118876 for ; Wed, 20 Apr 2016 23:27:44 +0000 (UTC) Received: (qmail 64163 invoked by uid 500); 20 Apr 2016 23:27:44 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 64112 invoked by uid 500); 20 Apr 2016 23:27:43 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 64101 invoked by uid 99); 20 Apr 2016 23:27:43 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Apr 2016 23:27:43 +0000 Received: from mail-oi0-f48.google.com (mail-oi0-f48.google.com [209.85.218.48]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id A6AD71A0094 for ; Wed, 20 Apr 2016 23:27:43 +0000 (UTC) Received: by mail-oi0-f48.google.com with SMTP id p188so67735542oih.2 for ; Wed, 20 Apr 2016 16:27:43 -0700 (PDT) X-Gm-Message-State: AOPr4FXrZI0Aen5txmWgKtf7jyB/no5cgTvjzlnnUDdOXlFCS+wM0fpiAscKSwHbxiXog6GFt9FPn2lTOMA7Tw== MIME-Version: 1.0 X-Received: by 10.157.44.147 with SMTP id p19mr4959344otb.37.1461194862901; Wed, 20 Apr 2016 16:27:42 -0700 (PDT) Received: by 10.157.25.203 with HTTP; Wed, 20 Apr 2016 16:27:42 -0700 (PDT) Received: by 10.157.25.203 with HTTP; Wed, 20 Apr 2016 16:27:42 -0700 (PDT) In-Reply-To: <00BCD2BEF4977149A7C7303B4BAEBBE622075A8F@ORD2MBX01E.mex05.mlsrvr.com> References: <00BCD2BEF4977149A7C7303B4BAEBBE622075A8F@ORD2MBX01E.mex05.mlsrvr.com> Date: Wed, 20 Apr 2016 19:27:42 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Not seeing query params on REST DSL From: "John D. Ament" To: users@camel.apache.org Content-Type: multipart/alternative; boundary=001a113e2756c044f30530f2f0c1 --001a113e2756c044f30530f2f0c1 Content-Type: text/plain; charset=UTF-8 Steve Could you share your dependencies as well? Which rest runtime are you using? On Apr 20, 2016 17:12, "Steve Huston" 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 > --001a113e2756c044f30530f2f0c1--