For a ComplexType with attributes but no child entities, the generated stub
fails to compile
--------------------------------------------------------------------------------------------
Key: AXIS2C-838
URL: https://issues.apache.org/jira/browse/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">
<complexType>
<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"/>
</complexType>
</element>
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, env);
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);
}
else
{
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]