cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaitanya Choleti (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-2514) Custom ContextResolver is not picked up for marshal/unmarshal calls for application/json and application/xml media types.
Date Mon, 02 Nov 2009 07:42:59 GMT

     [ https://issues.apache.org/jira/browse/CXF-2514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chaitanya Choleti updated CXF-2514:
-----------------------------------

    Attachment: sources.zip
                json_test.war

The sources and the war application are attached.

> Custom ContextResolver is not picked up for marshal/unmarshal calls for application/json
and application/xml media types.
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2514
>                 URL: https://issues.apache.org/jira/browse/CXF-2514
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.4
>         Environment: Windows, jdk1.5.0_06
>            Reporter: Chaitanya Choleti
>         Attachments: json_test.war, sources.zip
>
>
> In the method org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.getJAXBContext(Class<?>
type, Type genericType) 
>             ContextResolver<JAXBContext> resolver = mc.getResolver(ContextResolver.class,
JAXBContext.class);
> getResolver(...) always returns null.
> 			
> 			This happens because in org.apache.cxf.jaxrs.utils.JAXRSUtils.createContextResolver(Type
genericType, Message m) method there is a check (genericType instanceof ParameterizedType)
in this case genericType is JAXBContext.class which is not an instance of ParameterizedType
so the check fails and a null value is returned.
> 			
> Suggested Fix : Inject the context resolver directly in to AbstractJAXBProvider as it
was done in an earlier version.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message