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

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

well, I'd be OK with the proposed code but only if we have a "useSingleContext" 
property is set. It can make this branch safe, because for all but WebClient 
'path's, when useSingleContext is set then this branch won't even be executed, 
as init() will ensure all the introspected classes will be added to the 
context. And if the user knows that say only "MyResponse<A>" is there then 
setting this property will do.

In fact we already had a more involved patch to address "MyResponse<A>, 
MyResponse<B>" issue. IMHO, setting a basic property like "useSingleContext" is 
better as it avoids the extra complexity required to support the dynamic update 
of a given JAXB 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