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

XMLBeans - XmlBeansSchemaInitializer (Lline #177) can't handle xs:include

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.1.1
    • 2.1.2
    • None
    • None

    Description

      XMLBeans binding can't seem to handle an xs:include. see XmlBeansSchemaInitializer.java (Lline #177) Here is sample .xsd to reproduce this problem.

      <?xml version="1.0" encoding="UTF-8"?>
      <xs:schema
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      targetNamespace="http://sample.com/procure"
      xmlns:po="http://sample.com/procure"
      elementFormDefault="qualified">
      <xs:include schemaLocation="./commonSchemas.xsd"/>
      <xs:element name="purchase-order">
      <xs:complexType>
      <xs:sequence>
      <xs:element name="customer" type="po:customer"/>
      <xs:element name="shipper" type="po:shipper" minOccurs="0"/>
      </xs:sequence>
      </xs:complexType>
      </xs:element>
      </xs:schema>

      <?xml version="1.0" encoding="UTF-8"?>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://sample.com/procure" targetNamespace="http://sample.com/procure" elementFormDefault="qualified" attributeFormDefault="unqualified">
      <xs:complexType name="customer">
      <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="address" type="xs:string"/>
      </xs:sequence>
      </xs:complexType>
      <xs:complexType name="shipper">
      <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="per-ounce-rate" type="xs:decimal"/>
      </xs:sequence>
      </xs:complexType>
      </xs:schema>

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            leon30338 Leon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: