Subject should be minOccurs='0'
----- Original Message ----
From: Bradley Rintoul <brintoul_at_sbcglobal.net>
To: users_at_jaxb.dev.java.net
Sent: Thursday, July 6, 2006 3:06:23 PM
Subject: Required while MinOccurs = 1
Hello:
I hope this hasn't been covered before... I am generating some Java classes from an XSD document using JAXB 2 and finding a rather curious attribute in my XmlElement annotations. For all of my XmlElements that involve collections I'm getting a "required = true" attribute thrown in when the XSD claims that minOccurs for that element is "0".
What could be going on here?
The XSD:
<xs:element name="DOWN_PAYMENT" type="AUS_DOWN_PAYMENT" minOccurs="0" maxOccurs="unbounded" />
the declaration in the derived class:
@XmlElement(name = "DOWN_PAYMENT", required = true)
protected List<DownPayment> downPayment;
I am using a "camel case" plugin, if that might have something to do with it...
Thanks,
B. Rintoul