axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ajith Harshana Ranabahu (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-538) Nulls for fields in generated classes not handled properly
Date Sat, 01 Apr 2006 05:16:40 GMT
     [ http://issues.apache.org/jira/browse/AXIS2-538?page=all ]
     
Ajith Harshana Ranabahu resolved AXIS2-538:
-------------------------------------------

    Resolution: Invalid

I'm marking this invalid and closing the issue since the XMLSchema specification has been
interpreted wrongly 

> Nulls for fields in generated classes not handled properly
> ----------------------------------------------------------
>
>          Key: AXIS2-538
>          URL: http://issues.apache.org/jira/browse/AXIS2-538
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug
>   Components: databinding
>     Versions: 0.95
>     Reporter: Dmitriy Kiriy
>     Priority: Blocker

>
> If I have in XML Schema
> <xsd:element name="SomeDate" type="xsd:date" />
> it mean that minOccurs="0" (from XML Schema specification)
> but generated code not handling case that field can be setted up as null:
> if (localSomeDateTracker){
>                              elementList.add(new javax.xml.namespace.QName("http://mycompany.com/schema/data",
>                                                                       "SomeDate"));
>                             
>                                 elementList.add(
>                                    org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSomeDate));
>                                 } 
> Should be something: 
> if (localSomeDateTracker && localSomeDate!= null && notRequired){
>                              elementList.add(new javax.xml.namespace.QName("http://mycompany.com/schema/data",
>                                                                       "SomeDate"));
>                             
>                                 elementList.add(
>                                    org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localSomeDate));
>                                 } else {
>     throw new Exception("Field SomeDate for entity Someentity required but null");
> }

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message