axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Mitchell (JIRA)" <>
Subject [jira] Created: (AXIS2C-838) For a ComplexType with attributes but no child entities, the generated stub fails to compile
Date Mon, 17 Dec 2007 21:47:43 GMT
For a ComplexType with attributes but no child entities, the generated stub fails to compile

                 Key: AXIS2C-838
             Project: Axis2-C
          Issue Type: Bug
          Components: code generation
    Affects Versions: Current (Nightly)
         Environment: Windows XP, VisualStudio 2005
            Reporter: Bill Mitchell
            Priority: Minor

In my wsdl file, there is a request message of the form:
            <element name="delete">
                    <attribute name="name" type="string" use="required"/>
                    <attribute name="handle" type="string" use="required"/>
                    <attribute name="exemplarHandle" type="string" use="required"/>
                    <attribute name="userId" type="string" use="optional"/>
                    <attribute name="userName" type="string" use="optional"/>

In the generated stub, adb__delete.c, the deserialize function gets a compilation error because
current_element is used but not defined.  It is used in the code fragment that verifies the
qname of the received object against the expected qname:
                    current_element = (axiom_element_t *)axiom_node_get_data_element(parent,
                    qname = axiom_element_get_qname(current_element, env, parent);
                    if (axutil_qname_equals(qname, env, __delete-> qname))
                          first_node = axiom_node_get_first_child(parent, env);
                        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
                              "Failed in building adb object for delete : "
                              "Expected %s but returned %s", 
                              axutil_qname_to_string(qname, env),
                              axutil_qname_to_string(__delete-> qname, env));
                        return AXIS2_FAILURE;

Obviously the workaround is to add a declaration of the current_element in the deserialize
method in each generated stub that has this problem:
        axiom_element_t *current_element = NULL;

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:
For additional commands, e-mail:

View raw message