cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bc Wong (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5065) Subresource operations do not see root resource Produces or Consumes annotations
Date Thu, 22 Aug 2013 04:30:52 GMT

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

bc Wong commented on CXF-5065:
------------------------------

The fix seems to ignore any {{@Produces}} annotation on the subresource class. It will go
straight to the root. For example, if the root class doesn't specify anything, then regardless
of what the subresource class says, the fix always default to application/xml.

Is that intentional? (Doesn't seem intuitive to me.)
                
> Subresource operations do not see root resource Produces or Consumes annotations 
> ---------------------------------------------------------------------------------
>
>                 Key: CXF-5065
>                 URL: https://issues.apache.org/jira/browse/CXF-5065
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>            Reporter: Sergey Beryozkin
>            Assignee: Sergey Beryozkin
>             Fix For: 2.5.11, 2.6.9, 2.7.6, 3.0.0
>
>
> If we have 
> {code:java}
> @Path("/root")
> @Produces("text/xml")
> public class Root {
>   @Path("/sub")  
>   public SubRoot getSubRoot() {
>   } 
> }
> public class SubRoot {
>   @GET
>   public Order get() {
>   }
> }
> {code}
> then SubRoot.get() method will not inherit Root's @Produces

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message