axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lawrence Sepulveda <>
Subject Possible <xsd:choice> bug introduced in Axis 1.2 RC2
Date Sat, 04 Dec 2004 17:07:45 GMT

Hello all.  I have a schema with the below structure.  In Axis 1.2 RC1
no exception was thrown for the below structure.  I traced Axis code
to locate the exception being thrown from the
org.apache.axis.encoding.ser.BeanSerializer class.  The message used is "nullNonNillableElement".

In my research, I could not find why an exception must be thrown
for an <xsd:element> contained within a <xsd:choice> definition
if only one <xsd:element> is used.  Does Axis 1.2 RC2 require an
<xsd:element> to be defined with a *nillable* attribute when
contained within a <xsd:choice> if only one <xsd:element> is
to be used?

<xsd:complexType name="Options">
         <xsd:element name="OptionA" type="xsd:string" />
         <xsd:element name="OptionB" type="xsd:string" />
         <xsd:element name="OptionC" type="xsd:string" />
         <xsd:element name="OptionD" type="xsd:string" />

Is the below xml valid for the above schema?
If so, then Axis 1.2 RC2 throws an exception.


Or must the remaining elements appear if no *nillable*
attribute is defined?

     <OptionB />
     <OptionC />
     <OptionD />

Thanks for your time,

View raw message