You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Damitha Kumarage (JIRA)" <ji...@apache.org> on 2006/10/12 11:38:35 UTC

[jira] Commented: (AXIS2C-329) segfault when I try to create dynamic invocation

    [ http://issues.apache.org/jira/browse/AXIS2C-329?page=comments#action_12441679 ] 
            
Damitha Kumarage commented on AXIS2C-329:
-----------------------------------------

The 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);
                    }
                }
            }


> 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);
>    }
> 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

-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org