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

Sergey Beryozkin commented on CXF-4849:
---------------------------------------

But this will not work if we have

{code:java}
public class Root {
  @GET 
  public MyResponse<A> getA() {}
  @GET 
  public MyResponse<B> getB() {}
}
{code}

getA gets invoked and MyResponse context becomes MyResponse.class + A.class, 
queued by MyResponse.class, and next getB() fails.

with extraClass property we can simply add both A & B to the context; 
                
> WebClient needs to support JAX-RS 2.0 GenericType
> -------------------------------------------------
>
>                 Key: CXF-4849
>                 URL: https://issues.apache.org/jira/browse/CXF-4849
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>            Reporter: Sergey Beryozkin
>            Assignee: Sergey Beryozkin
>             Fix For: 2.8.0, 2.7.4
>
>         Attachments: cxf-4849.patch
>
>
> This is useful for processing generic responses, example,
> {code:java}
> GenericType<List<Book>> genericResponseType = new GenericType<List<Book>>() 
> {};
> List<Book> books = webClient.get(genericResponseType);
> // or
> List<Book> books = webClient.post(someObject, genericResponseType);
> {code}

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

Reply via email to