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

Sergey Beryozkin commented on CXF-6514:
---------------------------------------

If so then see 4.2.2/4 of the final 2.0 spec. The reason it worked in CXF 3.1.1 
was that the custom providers were always selected first without the default 
providers being checked at all if a custom provider can handle the object. 
Unfortunately it was not compliant, and now default and custom providers are 
considered.
Thus we have a default String provider typed by String and a custom provider 
effectively typed by Object. Therefore the default provider gets selected, the 
generic type is a primary key (see 4.2.2/4).
If the default String provider had an generic Object type then the custom 
provider would win, but the default provider is typed by String due to TCK 
expectations. 
Can you please ping me on IRC if you'd like more clarifications ?

> endpoints returning String can't use a custom provider
> ------------------------------------------------------
>
>                 Key: CXF-6514
>                 URL: https://issues.apache.org/jira/browse/CXF-6514
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Romain Manni-Bucau
>            Assignee: Sergey Beryozkin
>
> Seems sorting of providers in ServerProviderFactory is done in a way you cant 
> override the provider used for String type even using a custom @Produces type 
> cause StringTextProvider si always selected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to