Question

Hi 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>
  [...]

That it's plain wrong!

Removing nillable="true" solve this problem but then I have to specify a valid element ( not nilled ). Any workaround?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top