cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hendy Irawan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-2326) @PathParam cannot be used by subresource if @Path("{...}") is declared by parent resource
Date Wed, 01 Jul 2009 01:46:47 GMT

     [ 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.


Mime
View raw message