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 <steve...@gmail.com> 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 <ch0...@gmail.com> > 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 <steve...@gmail.com> 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