Hi Stephan and Roman,

Was there any progress on this recently? Otherwise, I suggest than an RFE is
entered in the issue tracker to make sure this is remembered. Roman, could
you take care of this?

See instructions here:
http://www.restlet.org/community/issues

Best regards,
Jérôme Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-----Message d'origine-----
De : Roman Geus [mailto:[EMAIL PROTECTED] 
Envoyé : vendredi 22 août 2008 09:58
À : [email protected]
Objet : Re: Routing in Restlet JAX-RS applications

Hi Stephan

Thanks for your reply and for looking into this.

My expectation was, that path parameters should only be assigned a 
single path segment, with the exception of the last path parameter when 
the "limited" flag is set to false (but I might be wrong).

Feel free to use my code fragments for unit testing.

Best regards,
Roman

Stephan Koops wrote:
> Hi Roman,
>
> after a short review this seems to me to be a bug. The matching needs 
> a rework, because the specification changes at some points in JAX-RS 
> 0.10. I hope I have time for it the next days. I will also take a look 
> into your message about UriInfo.getPath().
>
> If it is ok, I will use your code fragments as JUnit test cases.
>
> best regards
>  Stephan
>
> P.S.: I've had a small holiday from tuesday, so sorry for the delay.
>
> Roman Geus schrieb:
>> Hallo all
>>
>> I'm using restlet 1.1-m5 and I have a problem with routing http 
>> requests to JAX-RS  resource methods:
>>
>> My resource class looks as follows:
>>
>> @Path("admin")
>> public class RestAdminServiceResource {
>>
>>    /**
>>     * Provides both static and dynamic, per-request information, 
>> about the
>>     * components of a request URI.
>>     */
>>    @Context
>>    UriInfo uriInfo;
>>
>>    @GET
>>    @Produces("text/html")
>>    public Response root() {
>>        ...
>>    }
>>
>>    @GET
>>    @Path("{project}")
>>    @Produces("text/html")
>>    public Response project(@PathParam("project") String project) {
>>        ...
>>    }
>>
>>    @GET
>>    @Path("{project}/{repository}")
>>    @Produces("text/html")
>>    public Response repository(@PathParam("project") String project,
>>            @PathParam("repository") String repository) {
>>        ...
>>    }
>>
>>    @GET
>>    @Path("{project}/{repository}/schema")
>>    @Produces("text/html")
>>    public Response schemaDir(@PathParam("project") String project,
>>            @PathParam("repository") String repository) {
>>        ...
>>    }
>>
>>    @GET
>>    @Path("{project}/{repository}/schema/{schema}")
>>    @Produces("text/html")
>>    public Response schema(@PathParam("project") String project,
>>            @PathParam("repository") String repository,
>>            @PathParam("schema") String schema) {
>>        ...
>>    }
>>
>> }
>>
>> The following requests are routed as expected:
>>
>> http://host/admin
>> http://host/admin/PRJ
>> http://host/admin/PRJ/REPO
>>
>> However requests containing the "schema" path segment are all routed 
>> to the repository method, instead of the schemaDir and schema method:
>>
>> http://host/admin/PRJ/REPO/schema
>> http://host/admin/PRJ/REPO/schema/SCM
>>
>> Is this working as intended? If yes, how can I implement resources 
>> for {project}/{repository}/schema and 
>> {project}/{repository}/schema/{schema}.
>>
>> Thanks,
>> Roma 

Reply via email to