Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 82508 invoked from network); 26 Nov 2007 10:35:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Nov 2007 10:35:12 -0000 Received: (qmail 97141 invoked by uid 500); 26 Nov 2007 10:35:00 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 97127 invoked by uid 500); 26 Nov 2007 10:35:00 -0000 Mailing-List: contact axis-c-dev-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: "Apache AXIS C Developers List" Reply-To: "Apache AXIS C Developers List" Delivered-To: mailing list axis-c-dev@ws.apache.org Received: (qmail 97116 invoked by uid 99); 26 Nov 2007 10:35:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2007 02:35:00 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2007 10:34:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C88C471420E for ; Mon, 26 Nov 2007 02:34:43 -0800 (PST) Message-ID: <23415817.1196073283818.JavaMail.jira@brutus> Date: Mon, 26 Nov 2007 02:34:43 -0800 (PST) From: "Dimuthu Gamage (JIRA)" To: axis-c-dev@ws.apache.org Subject: [jira] Resolved: (AXIS2C-753) Program crashes if optional elements are not provided In-Reply-To: <26484804.1194275210813.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2C-753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dimuthu Gamage resolved AXIS2C-753. ----------------------------------- Resolution: Fixed Fixed in the Axis2/Java svn revision 598207 > Program crashes if optional elements are not provided > ----------------------------------------------------- > > Key: AXIS2C-753 > URL: https://issues.apache.org/jira/browse/AXIS2C-753 > Project: Axis2-C > Issue Type: Bug > Components: code generation > Affects Versions: 1.1.0 > Reporter: Michael Mole > Priority: Critical > Attachments: case19.tar.gz > > > I am using the code generation tool from approx. 11/1/2007 Axis2/Java nightly snapshot. I am using it to generate C databindings > My generated adb databinding code is writing elements in the serialize method even when minOccurs="0". I think if anything has a minOccurs="0", the generated serialize should check if the element has been provided by surrounding the code block with an "if ( foo-element !- NULL )". Otherwise, the program will crash if the optional element has not been provided. > I have a datatype defined as follows: > > > minOccurs="0"> > > > > In my serialize method I'm seeing something like this: > start_input_str = " > start_input_str_len = axutil_strlen(start_input_str); > end_input_str = ""; > end_input_str_len = axutil_strlen(end_input_str); > > axutil_stream_write(stream, env, start_input_str, start_input_str_len); > > adb_foo-element_serialize(_Foo->foo-element, > env, current_node, > AXIS2_FALSE > ); > > axutil_stream_write(stream, env, end_input_str, end_input_str_len); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-dev-help@ws.apache.org