You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Max Bridgewater <ma...@gmail.com> on 2014/10/02 17:58:23 UTC

REST DSL Hello World Not working

Hi,

The following hello word example provided in the documentation does not
seem to work well:

<rest path="/say">
    <get uri="/hello">
      <to uri="direct:hello"/>
    </get>
    <get uri="/bye" consumes="application/json">
      <to uri="direct:bye"/>
    </get>
    <post uri="/bye">
      <to uri="mock:update"/>
    </post>
  </rest>

Calling GET /say/bye returns "Error 405 Method Not Allowed". My guess is
that the  REST implementation does not allow methods with the exact same
path, even if the verb is different. This was already the case with the
RESTLET implementation.

Would anybody be able to confirm?

Thanks a lot.
Max

Re: REST DSL Hello World Not working

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah spotted this first now.
What component are you using? Is it camel-restlet?

On Thu, Oct 2, 2014 at 5:58 PM, Max Bridgewater
<ma...@gmail.com> wrote:
> Hi,
>
> The following hello word example provided in the documentation does not
> seem to work well:
>
> <rest path="/say">
>     <get uri="/hello">
>       <to uri="direct:hello"/>
>     </get>
>     <get uri="/bye" consumes="application/json">
>       <to uri="direct:bye"/>
>     </get>
>     <post uri="/bye">
>       <to uri="mock:update"/>
>     </post>
>   </rest>
>
> Calling GET /say/bye returns "Error 405 Method Not Allowed". My guess is
> that the  REST implementation does not allow methods with the exact same
> path, even if the verb is different. This was already the case with the
> RESTLET implementation.
>
> Would anybody be able to confirm?
>
> Thanks a lot.
> Max



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/