I have a schema defined as this:
<complexType name="x">
<sequence>
<element name="year" type="date"/>
<choice>
<element name="comuneNascita" type="string" nillable="true"/>
<element name="statoNascita" type="string" nillable="true"/>
</choice>
</sequence>
</complexType>
When I try to marshall the class generated with xjc ( with xjc:simple option ) and I get this result:
[...]
<statoNascita xsi:nil="true"/>
<comuneNascita>xxx</comuneNascita>
[...]
Removing nillable="true" solve this problem but then I have to specify a valid element ( not nilled ).
Any workaround?