Rest DSL and "no matching path found"

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Rest DSL and "no matching path found"

Steve973
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?
Reply | Threaded
Open this post in threaded view
|

Re: Rest DSL and "no matching path found"

Charles Moulliard-2
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Rest DSL and "no matching path found"

Steve973
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 <[hidden email]>
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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Rest DSL and "no matching path found"

Claus Ibsen-2
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 <[hidden email]> 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 <[hidden email]>
> 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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Rest DSL and "no matching path found"

Steve973
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
> > 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 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Rest DSL and "no matching path found"

Claus Ibsen-2
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
>> > 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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Rest DSL and "no matching path found"

Charles Moulliard-2
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
> 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 <[hidden email]> 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 <[hidden email]
> >
> >> > 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 <[hidden email]>
> 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
Reply | Threaded
Open this post in threaded view
|

Re: Rest DSL and "no matching path found"

Claus Ibsen-2
In reply to this post by Claus Ibsen-2
And btw I think you may have hit a bug in camel-undertow. You are
welcome to log a JIRA so we wont forget about this.

On Tue, Jul 12, 2016 at 12:03 PM, Claus Ibsen <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]>
>>> > 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 <[hidden email]> 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



--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2
Reply | Threaded
Open this post in threaded view
|

Re: Rest DSL and "no matching path found"

Steve973
I submitted https://issues.apache.org/jira/browse/CAMEL-10139 but if you
can give me some pointers, I will try to fix it and submit a pull request.
I looked at it very briefly, and since I'm not very familiar with the code,
nothing really stood out to me as broken.

Thanks,
Steve

On Wed, Jul 13, 2016 at 2:30 AM, Claus Ibsen <[hidden email]> wrote:

> And btw I think you may have hit a bug in camel-undertow. You are
> welcome to log a JIRA so we wont forget about this.
>
> On Tue, Jul 12, 2016 at 12:03 PM, Claus Ibsen <[hidden email]>
> 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 <[hidden email]> 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 <[hidden email]>
> 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 <[hidden email]> 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 <
> [hidden email]>
> >>> > 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 <[hidden email]>
> 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
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>