Hello Bruno,

>Using @Get or @Post (from org.restlet) didn't work at all.
These annotations are totally not part of the jaxrs api and cannot be used
in conjunction with the @Path annotation.

In order to use these annotations, you only need the core module
(org.restlet.jar). I wonder if the annotated ServerResourcehas been attached
to the application's router. Could you have a look here for a detailled
sample code? http://wiki.restlet.org/docs_2.1/13-restlet/303-restlet.html.

I think you will find some answert to your questions.

Best regards,
Thierry Boileau

I'm developing an application where a POST to /operations will create a new
> Operation, a GET to /operations/{code} will either return the Operation in
> XML or in JSON, depending on the Header parameter Accept.
>
> In order to achieve the path, I had to use @Path("operations") in the class
> declaration and @Path("{code}") in the GET methods.
>
> Using @Get or @Post (from org.restlet) didn't work at all. But when I
> changed it to @GET and @POST (from javax.ws) it worked as expected.
>
> So I have three questions:
>
> 1- Is it possible to use @Get and @Post with @Path?
> 2- What are the differences between: @Get and @GET; and between @Post and
> @POST (because it seems using @GET and @POST I can do more things)?
> 3- If they have different purposes, then am I supposed to annotate my
> methods with both @Get and @GET?
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2730188

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2747986

Reply via email to