camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <ch0...@gmail.com>
Subject Re: Rest DSL and "no matching path found"
Date Tue, 12 Jul 2016 11:06:36 GMT
FYI: We can't use a different port number when using undertow with
wildfly-swarm unfortunately

On Tue, Jul 12, 2016 at 1:03 PM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> Ah yeah you may need to use a different port than what swarm/undertow
> uses. Otherwise it should be a matter of changing the component name
> and add the dependency.
>
> But then in swarm you got that fraction stuff so its maybe not so easy.
>
> You can get in touch with the wildfly-camel guys as they can help.
>
> On Tue, Jul 12, 2016 at 11:47 AM, Steve973 <steve973@gmail.com> wrote:
> > Thanks, Claus.  I am trying this in Wildfly Swarm, so I am not sure how
> > difficult it would be to use something like camel-netty4-http instead of
> > undertow, but I will look into it and I will let you know if the behavior
> > is improved.
> >
> > On Tue, Jul 12, 2016 at 6:20 AM, Claus Ibsen <claus.ibsen@gmail.com>
> wrote:
> >
> >> 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 <steve973@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 <ch007m@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 <steve973@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
> >>
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>



-- 
Charles Moulliard
Apache Committer & PMC / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message