Return-Path: Delivered-To: apmail-ws-axis-c-dev-archive@www.apache.org Received: (qmail 5751 invoked from network); 12 Oct 2006 09:34:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Oct 2006 09:34:49 -0000 Received: (qmail 97603 invoked by uid 500); 12 Oct 2006 09:34:48 -0000 Delivered-To: apmail-ws-axis-c-dev-archive@ws.apache.org Received: (qmail 97584 invoked by uid 500); 12 Oct 2006 09:34:48 -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 97573 invoked by uid 99); 12 Oct 2006 09:34:48 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2006 02:34:48 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 209.68.5.9 is neither permitted nor denied by domain of damitha23@gmail.com) Received: from [209.68.5.9] (HELO relay00.pair.com) (209.68.5.9) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 12 Oct 2006 02:34:47 -0700 Received: (qmail 83475 invoked from network); 12 Oct 2006 09:34:22 -0000 Received: from unknown (HELO ?10.100.1.217?) (unknown) by unknown with SMTP; 12 Oct 2006 09:34:22 -0000 X-pair-Authenticated: 124.43.228.80 Message-ID: <452E0C22.8000901@gmail.com> Date: Thu, 12 Oct 2006 15:04:26 +0530 From: Damitha Kumarage User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Apache AXIS C Developers List Subject: Re: [jira] Created: (AXIS2C-329) segfault when I try to create dynamic invocation References: <23340562.1160471359542.JavaMail.root@brutus> In-Reply-To: <23340562.1160471359542.JavaMail.root@brutus> Content-Type: text/plain; charset=UTF-8; format=flowed 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 Buddhika Semasinghe (JIRA) wrote: >segfault when I try to create dynamic invocation >-------------------------------------------------- > > Key: AXIS2C-329 > URL: http://issues.apache.org/jira/browse/AXIS2C-329 > Project: Axis2-C > Issue Type: Bug > Components: woden > Reporter: Buddhika Semasinghe > > >The sample code that I have tried; > >ele = AXIS2_ARRAY_LIST_GET(ele_decls, env, i); >if (ele) >{ >element_qname = WODEN_ELEMENT_DECL_GET_QNAME(ele, env); >tocompare = AXIS2_QNAME_GET_LOCALPART(element_qname, env); > >axis2_char_t *test = "add"; >cmp = AXIS2_STRCMP(test, tocompare); >if (cmp == 0) >{ > axis2_generic_obj_t *obj = NULL; > obj = WODEN_ELEMENT_DECL_GET_CONTENT(ele, env); > if (obj) > { > void *value = NULL; > value = AXIS2_GENERIC_OBJ_GET_VALUE(obj, env); > if(value) > { > void * types = NULL; > types = XML_SCHEMA_ELEMENT_GET_ELEMENT_TYPE(value, env); > } > > Above code should correct to ele = AXIS2_ARRAY_LIST_GET(ele_decls, env, i); if (ele) { element_qname = WODEN_ELEMENT_DECL_GET_QNAME(ele, env); tocompare = AXIS2_QNAME_GET_LOCALPART(element_qname, env); /* printf("\n test %s:", tocompare); */ /* this operation name should come from the user */ axis2_char_t *test = "add"; cmp = AXIS2_STRCMP(test, tocompare); if (cmp == 0) { om_builder_impl->decl_element = tocompare; axis2_generic_obj_t *obj = NULL; obj = WODEN_ELEMENT_DECL_GET_CONTENT(ele, env); if (obj) { xml_schema_types_t types = 0; types = XML_SCHEMA_OBJ_GET_TYPE(obj, env); printf("types:%d\n", types); } } } > >but it seg faults when calling the XML_SCHEMA_ELEMENT_GET_ELEMENT_TYPE function > > > > > >following is the gdb session > >(gdb) > >Program received signal SIGSEGV, Segmentation fault. >0x08048e82 in woden_dynamic_om_builder_init (om_builder=0x804b060, > wsdl_file_name=0xafcb97e9 "../CalculatorDoc.wsdl", env=0x804b048) > at dynamic_om_builder.c:276 >(gdb) bt >#0 0x08048e82 in woden_dynamic_om_builder_init (om_builder=0x804b060, > wsdl_file_name=0xafcb97e9 "../CalculatorDoc.wsdl", env=0x804b048) > at dynamic_om_builder.c:276 >#1 0x08049290 in main (argc=Cannot access memory at address 0xc >) at main.c:37 > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-c-dev-help@ws.apache.org