You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Hendy Irawan (JIRA)" <ji...@apache.org> on 2009/07/01 03:46:47 UTC

[jira] Updated: (CXF-2326) @PathParam cannot be used by subresource if @Path("{...}") is declared by parent resource

     [ https://issues.apache.org/jira/browse/CXF-2326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hendy Irawan updated CXF-2326:
------------------------------

    Description: 
The parent resource:

class SessionsResource {

    @Path("{id}")
    public SessionResource getSessionResource() {
       return new SessionResource();
    }

}

The subresource:

class SessionResource {

    @GET
    public int get(@PathParam("id") String id) {
       return id;
    }

}

Problem is: SessionResource.get() gets a null 'id' parameter even if we fill it.

The use case above works in JAX-RS RI (Jersey), and is the default resource layout generated by NetBeans 6.7.

  was:
The parent resource:

class SessionsResource {

    @Path("{id}")
    public SessionResource getSessionResource() {
       return new SessionResource();
    }

}

The subresource:

class SessionResource {

    @GET
    public int get(@PathParam("id) String id) {
       return id;
    }

}

Problem is: SessionResource.get() gets a null 'id' parameter even if we fill it.

The use case above works in JAX-RS RI (Jersey), and is the default resource layout generated by NetBeans 6.7.


> @PathParam cannot be used by subresource if @Path("{...}") is declared by parent resource
> -----------------------------------------------------------------------------------------
>
>                 Key: CXF-2326
>                 URL: https://issues.apache.org/jira/browse/CXF-2326
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.2.2
>         Environment: Tomcat 6, Spring, Ubuntu 9.04
>            Reporter: Hendy Irawan
>
> The parent resource:
> class SessionsResource {
>     @Path("{id}")
>     public SessionResource getSessionResource() {
>        return new SessionResource();
>     }
> }
> The subresource:
> class SessionResource {
>     @GET
>     public int get(@PathParam("id") String id) {
>        return id;
>     }
> }
> Problem is: SessionResource.get() gets a null 'id' parameter even if we fill it.
> The use case above works in JAX-RS RI (Jersey), and is the default resource layout generated by NetBeans 6.7.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.