users@jaxb.java.net

choice with included xml causes xjc error

From: Willem Vermeer <willem_at_wwwilpower.nl>
Date: Mon, 08 Feb 2010 10:37:00 +0100

Hi,

I'm trying to generate java classes from a given XSD using xjc. It fails
with an error message on both JAXB 2.1.12 and JAXB 2.2.

This is the XSD excerpt causing problems:

200 <xs:complexType name="otherNSElement">
201 <xs:choice>
202 <xs:any namespace="##other"
processContents="skip"/>
203 <xs:any namespace="##local"
processContents="skip"/>
204 </xs:choice>
205 </xs:complexType>

This is the error message:

parsing a schema...
[ERROR] Property "Any" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
 line 202 of
file:/Users/willem/kb/arrow/xsd/M2_ARROWResourceIdentification_V0.1.xsd

[ERROR] The following location is relevant to the above error
 line 203 of
file:/Users/willem/kb/arrow/xsd/M2_ARROWResourceIdentification_V0.1.xsd

Failed to parse a schema.

How can I work around this problem?

Thanks,
Willem