Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 24565 invoked from network); 1 Apr 2006 05:17:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Apr 2006 05:17:05 -0000 Received: (qmail 79736 invoked by uid 500); 1 Apr 2006 05:17:03 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 79335 invoked by uid 500); 1 Apr 2006 05:17:02 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 79324 invoked by uid 99); 1 Apr 2006 05:17:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Mar 2006 21:17:02 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Mar 2006 21:17:01 -0800 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 4CC966ACB2 for ; Sat, 1 Apr 2006 06:16:40 +0100 (BST) Message-ID: <568170912.1143868600311.JavaMail.jira@ajax> Date: Sat, 1 Apr 2006 06:16:40 +0100 (BST) From: "Ajith Harshana Ranabahu (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Resolved: (AXIS2-538) Nulls for fields in generated classes not handled properly In-Reply-To: <657591531.1143821489252.JavaMail.jira@ajax> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ 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 > > 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