Women in Technology

Hear us Roar



Article:
  Understanding JAXB: Java Binding Customization
Subject:   error when running the example
Date:   2003-12-22 10:52:29
From:   anonymous2
Hello,


When I attempt to run the modified version of the XSD file, jxc throws a parsing error:
parsing a schema...
[ERROR] In "strict" mode, the following schema feature is not allowed (See App E
.2).Use the "-extension" switch:
vendor extension bindings (jaxb:extensionBindingPrefixes) are not suppor
ted
line 5 of purchase.xsd


Failed to parse a schema.


Any ideas??


It fails on the following line:
jaxb:version="1.0" jaxb:extensionBindingPrefixes="xjc">


Thanks


Khalid

Full Threads Newest First

Showing messages 1 through 1 of 1.

  • error when running the example
    2003-12-22 12:20:55  hashimisayed [View]

    Anytime you refer to JAXB extensions in your xsd, you have to compile with the "-extension" switch. An example of this:

    <simpleType name="Age">
    <xs:annotation>
    <xs:appinfo>
    <xs:javaType name="int" />
    </xs:appinfo>
    </xs:annotation>
    <xs:restriction base="xs:positiveInteger"/>
    </simpleType>

    Because I am using the javaType vendor extension in my customization, I have to tell the schema compiler to compile with extensions:

    xjc schemafilename.xsd -extension

    sayed