axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Mitchell (JIRA)" <>
Subject [jira] Updated: (AXIS2C-843) Generated deserialize method does not handle complex type containing sequence of type any
Date Tue, 18 Dec 2007 19:01:47 GMT


Bill Mitchell updated AXIS2C-843:


The attached original adb_exemplar_type0.c was generated from the attached unrolled.wsdl and
illustrates the stub code in question.  The new version of adb_exemplar_type0.c reflects modifications
made by hand to make the sequence of any entities have code similar to that generated for
a list of a simple type, and removes the verification of the entity names against the artificially
generated name "extraElement".  I have executed the modified deserialize routine successfully
in an application.  

> Generated deserialize method does not handle complex type containing sequence of type
> -----------------------------------------------------------------------------------------
>                 Key: AXIS2C-843
>                 URL:
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>    Affects Versions: 1.1.0
>         Environment: Windows XP, Visual Studio 2005, guththila parser, libcurl
>            Reporter: Bill Mitchell
>         Attachments:, adb_exemplar_type0.orig.c, unrolled.wsdl
> When WSDL2C generates a stub for the following response message description, it constructs
a stub for entity exemplar.  For this entity, it defines a single property of type axiom_node_t,
the deserialize routine parses only the first of the "any" elements, and ignores the remainder.
 The second issue is that it parses the "any" entity only if its name is "extraElement", which
is not very useful as it has some name, unknown at compilation time, but which is not likely
to be "extraElement".   
>             <element name="getExemplarResponse">
>                 <complexType>
>                     <complexContent>
>                         <restriction base="anyType">
>                             <sequence>
>                                 <element name="exemplar">
>                                     <complexType>
>                                         <sequence>
>                                             <any namespace="##local" minOccurs="1"
>                                         </sequence>
>                                         <attribute name="handle" type="string" use="required"/>
>                                     </complexType>
>                                 </element>
>                             </sequence>
>                             <attribute name="responseCode" type="integer" use="optional"
>                             <attribute name="responseMessage" type="string" use="optional"/>
>                             <attribute name="supportedMethods" type="fw:MethodListType"
>                         </restriction>
>                     </complexContent>
>                 </complexType>
>             </element>
> My suggestion is that the comparison for the QName "extraElement" should be removed,
and the property of extraElement should be an array of axiom_node_t representing all of the
sequence of "any" entities.  This impacts the deserialize and serialize routines, and the
resetter method to avoid the potential memory leak.  I've seen such code generated for a sequence
of elements of a simple type, so it should not be too hard to generate the same code here
in a complexType.  

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