I have a xsd using xs:choice and need each element exposed as a collection.
<xs:complexType name="AType">
<xs:choice maxOccurs="unbounded" minOccurs="0">
<xs:element type="XType" name="X"/>
<xs:element type="YType" name="Y"/>
It simplifies, but only as a List<>, not as an array as requested in the global bindings:
<jaxb:globalBindings localScoping="toplevel" collectionType="indexed">
I see that it realizes it should be simplified:
[INFO] Parsing input schema(s)...
[DEBUG] Element property [XAndY] has several types and will be simplified.
[INFO] Compiling input schema(s)...
The result is a class with
List getX(), List getY()
when it should be
XType[] getX(), YType[] getY()
because of the collectionType="indexed" in the globalBindings.
Am I not doing it correctly with simplify? Other classes without xs:choice are generating arrays properly.