ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Understanding JAXB: Java Binding Customization
Subject:   error when running the example
Date:   2003-12-22 12:20:55
From:   hashimisayed
Response to: error when running the example

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