cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neal Hu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6764) Should add RI JAXB Namespacemapper support
Date Fri, 29 Jan 2016 17:58:39 GMT

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

Neal Hu commented on CXF-6764:
------------------------------

If we have none internal JAXB, then we will create none internal prefix mapper. Otherwise
create internal prefix mapper(RI). Have not tried add ASM, but the previous problematic code
will create none internal prefix mapper for RI JAXB marshaller, which    caused ClassCastException.

Neal




> Should add RI JAXB Namespacemapper support
> ------------------------------------------
>
>                 Key: CXF-6764
>                 URL: https://issues.apache.org/jira/browse/CXF-6764
>             Project: CXF
>          Issue Type: Bug
>          Components: Core, JAX-RS
>    Affects Versions: 3.0.7, 3.1.4
>         Environment: Windows
>            Reporter: Neal Hu
>             Fix For: 3.1.5, 3.0.8, 3.2.0
>
>
> /cxf-core/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java:1097
> {code:java}
>         if (cls == null
>             && (mcls.getName().contains(".internal.") || mcls.getName().contains("com.sun")))
{
>             try {
>                 cls = ClassLoaderUtils.loadClass("org.apache.cxf.common.jaxb.NamespaceMapper",

>                                                  JAXBUtils.class);
>             } catch (ClassNotFoundException ex2) {
>                 // ignore
>             }
>         }
> {code}
> CXF only add org.apache.cxf.common.jaxb.NamespaceMapper which extends com.sun.xml.bind.marshaller.NamespacePrefixMapper,
but the RI JAXB need a mapper extends com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper
> So when we add namespace mapper in JAXBElementProvider subclass, the RI JAXB cann't add
the namespace mapping correctly.



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

Mime
View raw message