[ 
https://issues.apache.org/jira/browse/CXF-4473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434110#comment-13434110
 ] 

Chris Eineke commented on CXF-4473:
-----------------------------------

Here's a snippet relevant to the service bean instantiation from my bean 
configuration:

  <bean id="restService" class="com.foo.RestService" scope="request">
    <aop:scoped-proxy/>
  </bean>
  <jaxrs:server address="/">
    <jaxrs:serviceFactories>
      <bean class="com.foo.util.ws.rs.RequestScopeResourceFactory">
        <property name="beanId" value="restService"/>
      </bean>
    </jaxrs:serviceFactories>
    <jaxrs:providers>
      <bean id="jaxbProvider" 
class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
        <property name="validateOutput" value="true"/>
        <property name="validateBeforeWrite" value="true"/>
      </bean>
      <bean id="jsonProvider" 
class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
      <bean class="org.apache.cxf.jaxrs.model.wadl.WadlGenerator">
        <property name="applicationTitle" value="restService"/>
        <property name="singleResourceMultipleMethods" value="false"/>
        <property name="addResourceAndMethodIds" value="true"/>
      </bean>
    </jaxrs:providers>
  </jaxrs:server>
                
> PathParam null when @Path annotations are the same
> --------------------------------------------------
>
>                 Key: CXF-4473
>                 URL: https://issues.apache.org/jira/browse/CXF-4473
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.5.4
>         Environment: java version "1.6.0_24"
> OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.12.04.1)
> OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
>            Reporter: Chris Eineke
>
> For some reason, the JAX-RS runtime doesn't provide the value of a 
> @GET-annotated method and @PathParam-annotated method parameter if another 
> @PUT-annotated method with the same @ParamParam-annotated method parameter 
> has the same @Path annotation:
>   @GET @Path("/users/{username}/foo")
>   public Foo getFoo(
>     @PathParam("username") String username)
>   @PUT @Path("/users/{username}/foo")
>   public Foo setFoo(
>     @PathParam("username") String username,
>     Foo foo)
> The runtime correctly invokes the first method for a GET. If I change the 
> last path segment of the first method to anything but "foo", the runtime will 
> provide the method parameter properly, but if I keep them the same the value 
> of username will always be null.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to