axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damitha Kumarage <damith...@gmail.com>
Subject Re: [jira] Created: (AXIS2C-329) segfault when I try to create dynamic invocation
Date Thu, 12 Oct 2006 09:34:26 GMT
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


Mime
View raw message