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 "Dimuthu Gamage (JIRA)" <ji...@apache.org> on 2007/12/18 06:16:43 UTC
[jira] Resolved: (AXIS2C-838) For a ComplexType with attributes but
no child entities, the generated stub fails to compile
[ https://issues.apache.org/jira/browse/AXIS2C-838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dimuthu Gamage resolved AXIS2C-838.
-----------------------------------
Resolution: Fixed
This is due to having all attributes and no elements in the complex type. I just fixed it. Thanks for reporting it.
> 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
> Assignee: Dimuthu Gamage
> Priority: Minor
> Attachments: unrolled.wsdl
>
>
> 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: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org