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

Upgrade to Xml Schema 1.4.6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.6, 2.2.10
    • 2.3, 2.2.11
    • JAX-WS Runtime
    • None

    Description

      When CXF is publishing web services, the following exception occurs:

      Caused by: java.lang.NullPointerException
              at org.apache.ws.commons.schema.utils.NamespaceMap.getNamespaceURI(NamespaceMap.java:47)
              at org.apache.ws.commons.schema.SchemaBuilder.getRefQName(SchemaBuilder.java:587)
              at org.apache.ws.commons.schema.SchemaBuilder.getRefQName(SchemaBuilder.java:566)
              at org.apache.ws.commons.schema.SchemaBuilder.handleElement(SchemaBuilder.java:1406)
      

      If an XML prefix is used without being declared, that exception occurs.

      In the following sample, the prefix is "pel" and it's correctly declared:

      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pel="http://www.X.com/is/xml/core/model/thirdparty/personlight" 
      xmlns:pol="http://www.X.com/is/xml/core/model/policy" xmlns:cov="http://www.X.com/is/xml/traditionallife/model/offer/coverage" 
      xmlns:prd="http://www.X.com/is/xml/traditionallife/model/product" xmlns:ind="http://www.X.com/is/xml/core/model/indexation" 
      targetNamespace="http://www.X.com/is/xml/traditionallife/model/policy" elementFormDefault="qualified">
      

      Unfortunately, there is a space in one of the usage of "pel":

      <xsd:element name="prospect" type=" pel:PersonLight" />
      

      Removing the space before the prefix avoids to have the exception.

      That bug is corrected in the newest version of Xml schema:

              <dependency>
                  <groupId>org.apache.ws.commons.schema</groupId>
                  <artifactId>XmlSchema</artifactId>
                  <version>1.4.6</version>
              </dependency>
      

      Path to the dependency:
      [INFO] +- com.bsb.sf.integration:bsb-sf-cxf-core-integration:jar:ws-migration-1-SNAPSHOT:compile
      [INFO] | +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.2.6:compile
      [INFO] | | +- org.apache.cxf:cxf-api:jar:2.2.6:compile
      [INFO] | | | +- org.apache.ws.commons.schema:XmlSchema:jar:1.4.5:compile

      Note that XmlSchema 1.4.5 is still present in the latest release.

      Attachments

        Activity

          People

            bmargulies Benson Margulies
            sebge2 Sébastien
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: