I have a requirement to generate POJO using JAXB from the following XSD (partial). The elements is a collection of domain type and I want this to be Set<domainType>
. I get List<domainType>
in generated pojo with the following XSD. How can I instruct JAXB to generate this type as Set instead?
<xs:element name="sampleSetElements">
<xs:complexType>
<xs:sequence>
<xs:element name="elements" type="xyz:domainType" minOccurs="1" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>