Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6764

Should add RI JAXB Namespacemapper support

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.7, 3.1.4
    • 3.1.6, 3.0.9
    • Core, JAX-RS
    • None
    • Windows

    • Unknown

    Description

      /cxf-core/src/main/java/org/apache/cxf/common/jaxb/JAXBUtils.java:1097

              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
                  }
              }
      

      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.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            nbqyqx@163.com Neal Hu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: