You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Jiaqi Guo (JIRA)" <ax...@ws.apache.org> on 2005/03/15 22:42:29 UTC

[jira] Commented: (AXIS-1813) Incorrect treatment of ComplexTypes containing

     [ http://issues.apache.org/jira/browse/AXIS-1813?page=comments#action_60879 ]
     
Jiaqi Guo commented on AXIS-1813:
---------------------------------

What is the status of this bug?
I just got the same error. Is there any solutions so far?

> Incorrect treatment of  ComplexTypes containing <choice>
> --------------------------------------------------------
>
>          Key: AXIS-1813
>          URL: http://issues.apache.org/jira/browse/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:choice>
>       <xs:element name="alt1" type="xx:Alt1"/>
>       <xs:element name="alt2" type="xx:Alt2"/>
>       <xs:element name="alt3" type="xx:Alt3"/>
>     </xs:choice>
>   </xs:complexType>
> and suppose an instance type xx:Alt3 is to be serialized.
> Then serialization fails with an exception, with the message:
>   java.io.IOException: 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:choice>
>       <xs:element name="alt1" type="xx:Alt1" minOccurs="0"/>
>       <xs:element name="alt2" type="xx:Alt2"/>
>       <xs:element name="alt3" type="xx:Alt3"/>
>     </xs:choice>
>   </xs:complexType>
> then the failure message becomes:
>   java.io.IOException: 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira