cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CXF-4849) WebClient needs to support JAX-RS 2.0 GenericType
Date Mon, 04 Mar 2013 14:51:16 GMT

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

Sergey Beryozkin edited comment on CXF-4849 at 3/4/13 2:50 PM:
---------------------------------------------------------------

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, keyed by MyResponse.class,
and next getB() fails.

with extraClass property we can simply add both A & B to the context; 
                
      was (Author: sergey_beryozkin):
    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

Mime
View raw message