axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Sharman (JIRA)" <>
Subject [jira] Created: (AXIS-1813) Incorrect treatment of ComplexTypes containing <choice>
Date Fri, 11 Feb 2005 16:11:12 GMT
Incorrect treatment of  ComplexTypes containing <choice>

         Key: AXIS-1813
     Project: Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: current (nightly)    
    Reporter: Nick Sharman

Consider a request type of the form:

  <xs:complexType name="MIRStoreEntityRequestType">
      <xs:element name="alt1" type="xx:Alt1"/>
      <xs:element name="alt2" type="xx:Alt2"/>
      <xs:element name="alt3" type="xx:Alt3"/>

and suppose an instance type xx:Alt3 is to be serialized.

Then serialization fails with an exception, with the message: Non nillable element 'alt1' is null.

This appears to be coming from org.apache.axis.encoding.ser.BeanSerializer, and reflects changes
for nillable and omitable in revision 1.79.

If we change the definition to:

  <xs:complexType name="MIRStoreEntityRequestType">
      <xs:element name="alt1" type="xx:Alt1" minOccurs="0"/>
      <xs:element name="alt2" type="xx:Alt2"/>
      <xs:element name="alt3" type="xx:Alt3"/>

then the failure message becomes: Non nillable element 'alt2' is null.

It appears that BeanSerializer is taking account only of local attributes in elements alt1,
alt2, etc, and not taking account of their nesting in a <choice>.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message