[ 
https://issues.apache.org/jira/browse/AXIS2C-843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552895
 ] 

Bill Mitchell commented on AXIS2C-843:
--------------------------------------

Your observation is correct.  That's what I get for assuming that the .wsdl I 
receive matches the responses I see from the server.  As the server side is not 
wsdl based, it can, and in this case does, act differently than the wsdl says.  

A corrected version of the wsdl would read:
            <element name="getExemplarResponse">
                <complexType>
                    <complexContent>
                        <restriction base="anyType">
                            <sequence>
                                <element name="exemplar" minOccurs="1" 
maxOccurs="1">
                                    <complexType>
                                        <sequence>
                                            <any namespace="##local" 
minOccurs="1" maxOccurs="unbounded"/>
                                        </sequence>
                                        <attribute name="handle" type="string" 
use="required"/>
                                    </complexType>
                                </element>
                            </sequence>
                            <attribute name="responseCode" type="integer" 
use="optional" default="0"/>
                            <attribute name="responseMessage" type="string" 
use="optional"/>
                            <attribute name="supportedMethods" 
type="fw:MethodListType" use="optional"/>
                        </restriction>
                    </complexContent>
                </complexType>
            </element>

After making this change to the .wsdl, I now see a different set of errors, now 
compilation errors.  I can detail these in a separate issue, but the one that 
is immediately obvious is that the generated .h and .c files refer to the type 
axis_array_list_t where I expect it means axutil_array_list_t *.  

> Generated deserialize method does not handle complex type containing sequence 
> of type any
> -----------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-843
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-843
>             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
>            Assignee: Dimuthu Gamage
>         Attachments: adb_exemplar_type0.new.c, 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" maxOccurs="1"/>
>                                         </sequence>
>                                         <attribute name="handle" 
> type="string" use="required"/>
>                                     </complexType>
>                                 </element>
>                             </sequence>
>                             <attribute name="responseCode" type="integer" 
> use="optional" default="0"/>
>                             <attribute name="responseMessage" type="string" 
> use="optional"/>
>                             <attribute name="supportedMethods" 
> type="fw:MethodListType" use="optional"/>
>                         </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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to