Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 59C68200B53 for ; Tue, 12 Jul 2016 12:21:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 58440160A6A; Tue, 12 Jul 2016 10:21:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9F24A160A56 for ; Tue, 12 Jul 2016 12:21:14 +0200 (CEST) Received: (qmail 47719 invoked by uid 500); 12 Jul 2016 10:21:13 -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 47705 invoked by uid 99); 12 Jul 2016 10:21:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jul 2016 10:21:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id B39431A04FF for ; Tue, 12 Jul 2016 10:21:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.802 X-Spam-Level: X-Spam-Status: No, score=-0.802 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id A-lAkU5AFIpo for ; Tue, 12 Jul 2016 10:21:10 +0000 (UTC) Received: from mail-io0-f182.google.com (mail-io0-f182.google.com [209.85.223.182]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 7B1955F2C4 for ; Tue, 12 Jul 2016 10:21:10 +0000 (UTC) Received: by mail-io0-f182.google.com with SMTP id q83so12148937iod.1 for ; Tue, 12 Jul 2016 03:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=cv+6BODH6llxAWdZpN49Z4gLHD2b79DAZWRGhZAtwRk=; b=haCGXIzJbjjeQ13+BO0Tri+GUnHShuY8KU9PPxTC99f0qCLYoxbM8Xn1+FMF0upCj1 z+Oacgthtd3VffvjTKskc5/X6NK++pPw0ocDhF0fy249cpzRnYk7Wd9xf1s4uCfYVmLc eaMhw7FPT5kygjVPlVG39GfGJrMNiwVNHKFDCl7SQbqa09cvgD5Vg8d8UIsOpE89uWH2 na1UsCkoyw0aUoZKKut3x+2ae8dcmI6u/kTtByswPrGlvN2nqVsWdZtx0m2M1PSwfyNO 5BsTLxRqRAEFFrJea+4LSkJRGSIr7YbD4lUH1FglHRovOP4bJ7ju4/2prysT0JixHRTi 2RRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=cv+6BODH6llxAWdZpN49Z4gLHD2b79DAZWRGhZAtwRk=; b=WydanIFKABOOSoQdG8d7pv/UmmUBtqKcrSlIvAPGnRnwXhebLCyzHgcrIUOB0IXCxi l6yuzeJxYtM+Ycntn6EGpccfIYS2AdhpyGFw+y3lsrzkMwo14ajhKVZE/AWU9tJc/p9t VqLxZwFaqThVs/9WTcdJq60guEboRHYVDfhjq1NrlDrkyu7TgLa93b/gx0FiFOfkmkbK N07dv4aD4oAekcaMQBkeO7DBJ66fOf77m9fsLKlsTjmsFk/0sZkDH2jwV7K7HZ4zhbYz FMVqh+/seCFVeljOdJ+V52iAfO5funAI7hiimadzY93C8L1A4w1653xEEFa5rHEVxXoO lkzg== X-Gm-Message-State: ALyK8tKpCNYmXlYmz+N6NES1iCjWcgsyCmTtFTYVuUWhqSvOF2BR8gvsZ+bc+mu+PHzvfJc4ScCE4xq8zw0sTw== X-Received: by 10.107.138.40 with SMTP id m40mr1767284iod.181.1468318869312; Tue, 12 Jul 2016 03:21:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.126.220 with HTTP; Tue, 12 Jul 2016 03:20:49 -0700 (PDT) In-Reply-To: References: From: Claus Ibsen Date: Tue, 12 Jul 2016 11:20:49 +0100 Message-ID: Subject: Re: Rest DSL and "no matching path found" To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 archived-at: Tue, 12 Jul 2016 10:21:15 -0000 The rest-dsl is syntax sugar. Its what the underlying component you use to handle what it can support. In this case you use undertow. So in camel-undertow its creating 2 routes, where one is for GET and the other is for PUT. So ideally it should be able from undertow to route to the one that matches. But I didn't write the camel-undertow code so it may have "bug" ;) You can try with another component like jetty/netty4-http/restlet to see how they work. On Tue, Jul 12, 2016 at 10:36 AM, Steve973 wrote: > The error (if it is truly an error and not some mistake or misconfiguration > on my part) seems to happen when the same verb with the same path is used > in the Camel DSL. The last verb specified in the chain seems to override > the verb before it. For instance, if I change the line to have the "put" > before the "get", then the "get" works. The way the command is in the > listing of the previous email resulst in the "put" working. So, both rest > paths are valid, but something with the Camel DSL (or the way that I am > specifying them) results in not being able to have multiple verbs for the > same rest resource with the same parameter. Also, if I change the "get" in > the example above to have the path of "new/{timesheetId"} then both verbs > work. > > Thanks, > Steve > > On Tue, Jul 12, 2016 at 12:43 AM, Charles Moulliard > wrote: > >> Hi Steve, >> >> I suggest that first, you verify the endpoint registered by Camel when the >> routes have been started, curl it and that you perform the same test using >> Jetty component. >> >> According to the REST Defintion, you try to reach the URL >> >> http://localhost:8181/timesheet/123 where 123 is a timesheetId >> >> Regards, >> >> Charles >> >> On Mon, Jul 11, 2016 at 10:48 PM, Steve973 wrote: >> >> > I have my rest dsl route like this: >> > >> > restConfiguration().component("undertow").host("localhost").port("8181"); >> > rest("/timesheet") >> > .get("/{timesheetId}").produces(MediaType.TEXT_PLAIN) >> > .to("bean:timesheetService?method=getTimesheetById") >> > .put("/{timesheetId}").produces(MediaType.TEXT_PLAIN) >> > .to("bean:timesheetService?method=updateTimesheet"); >> > >> > It's odd because the "put" works just fine, but when I try using the >> "get", >> > it responds with a 404 error and "no matching path found". What am I >> doing >> > wrong? >> > >> >> >> >> -- >> Charles Moulliard >> Apache Committer & PMC / Architect @RedHat >> Twitter : @cmoulliard | Blog : http://cmoulliard.github.io >> -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2