Hi,
I am trying to run xjc ant task. First I tried running my schema with out
any custom bindings and i get these errors:
[xjc] Compiling file:/C:/oagis/TestSchema.xsd
[xjc] [ERROR] Property "Type" is already defined. Use
<jaxb:property> to resolve this conflict.
[xjc] line 1468 of
file:/C:/oagis/Common/OAGi/Components/Components.xsd
[xjc] [ERROR] The following location is relevant to the above error
[xjc] line 1475 of
file:/C:/oagis/Common/OAGi/Components/Components.xsd
[xjc] failure in the XJC task. Use the Ant -verbose switch for more
details
In the Components.xsd file (line 1468) i have <xsd:element ref="Type"
minOccurs="0"/>
and line 1475 has <xsd:attribute name="type" type="TokenType"/>
Realizing Type is defined for element and attribute i added an external
custom binding file which looks as:
<jxb:bindings version="1.0"
xmlns:jxb="
http://java.sun.com/xml/ns/jaxb"
xmlns:xs="
http://www.w3.org/2001/XMLSchema"
<jxb:bindings schemaLocation="c:/Common/OAGi/Components/Components.xsd
node=".//xs:attribute[@name='type']">
<jxb:property name="TypeAttribute"/>
</jxb:bindings>
</jxb:bindings>
After adding this binding i get this error:
[xjc] Compiling file:/C:/oagis/TestSchema.xsd
[xjc] [ERROR] "c:/oagis/Common/OAGi/Components/Components.xsd" is not
a part of this compilation. Is this a mistake for
"file:/C:/oagis/Common/OAGi/Components/Components.xsd"?
[xjc] line 8 of file:/C:/development/OAGIS/binding.xjb
[xjc] [ERROR] Property "Type" is already defined. Use
<jaxb:property> to resolve this conflict.
[xjc] line 1468 of
file:/C:/oagis/Common/OAGi/Components/Components.xsd
[xjc] [ERROR] The following location is relevant to the above error
[xjc] line 1475 of
file:/C:/oagis/Common/OAGi/Components/Components.xsd
How do i resolve this issue? Please help me out
Thanks,
csr
--
View this message in context: http://old.nabble.com/-xjc---ERROR--xsd-is-not-a-part-of-this-compilation.-Is-this-a-mistake-tp28111598p28111598.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.