Hi,
A List holds an Interface bound with XmlElementRefs to specific classes. The
Wrapper typ should be mandatory, so I added "required=true":
@XmlElementRefs( {
@XmlElementRef(type=TypeOne.class),
@XmlElementRef(type=TypeTwo.class)
}
)
@XmlElementWrapper(name="type", required=true)
private ArrayList<Type> types;
Creating an xsd i get:
<xs:element name="type" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="typeone"/>
<xs:element ref="typetwo"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
But i want <xs:element name="type" minOccurs="1"> or rather <xs:element
name="type">
Thanx for support.
tim
--
View this message in context: http://old.nabble.com/%40XmlElementWrapper%28required%3Dtrue%29-ignored-tp26405498p26405498.html
Sent from the java.net - jaxb dev mailing list archive at Nabble.com.