[ http://issues.apache.org/jira/browse/AXISCPP-41?page=history ]
     
John Hawkins closed AXISCPP-41:
-------------------------------


Does not appear to have re-occurred.

> nested array -> deserialization fails
> -------------------------------------
>
>          Key: AXISCPP-41
>          URL: http://issues.apache.org/jira/browse/AXISCPP-41
>      Project: Axis-C++
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.0 Final
>  Environment: Operating System: Other
> Platform: Other
>     Reporter: Roland Kosovsky
>      Fix For: current (nightly)

>
> I have something like the following code and want to serialize an object of 
> type
> "FindResult" (stl syntax is just for easier understanding).
> struct Row {
>   string syskey;
>   vector<string> fieldValues;
> };
> struct FindResult {
>   int status3;
>   string errorMsg3;
>   vector<Row> rows;
> };
> Therefore my WSDL looks like this:
> <xsd:complexType name="Row">
>  <xsd:all>
>   <xsd:element name="syskey" type="xsd:string"/>
>   <xsd:element name="fieldValues" type="impl:FieldArray"/>
>  </xsd:all>
> </xsd:complexType>
> <xsd:complexType name="RowArray">
>  <xsd:complexContent>
>   <xsd:restriction base="soapenc:Array">
>   <xsd:attribute ref="soapenc:arrayType" arrayType="impl:Row[]"/>
>  </xsd:restriction>
> </xsd:complexContent>
> </xsd:complexType>
>  <xsd:complexType name="FindResult">
>   <xsd:all>        
>    <xsd:element name="status3" type="xsd:int"/>
>    <xsd:element name="errorMsg3" type="xsd:string"/>
>    <xsd:element name="rows" type="impl:RowArray"/>
>   </xsd:all>
> </xsd:complexType>
> What I get on the client side looks like this (3 rows, 10 fields):
> 1
> errorMsg
> (MyKey100) 
> 0/0;0/1;0/2;0/3;0/4;0/5;0/6;0/7;0/8;0/9;;MyKey101;;;;;;;;;;;;;;;;;;;
> (1/1) 
> (1/4) 
> What I would expect is:
> 1
> errorMsg
> (MyKey100) 0/0;0/1;0/2;0/3;0/4;0/5;0/6;0/7;0/8;0/9;
> (MyKey101) 1/0;1/1;1/2;1/3;1/4;1/5;1/6;1/7;1/8;1/9;
> (MyKey102) 2/0;2/1;2/2;2/3;2/4;2/5;2/6;2/7;2/8;2/9;
> The first nested array gets 30 elements instead of 10, the other rows stay 
> empty. 
> Resolution: arraybean.cpp, Ln 183
> int ArrayBean::GetArrayBlockSize(list<int>::iterator it)
> {
>   return m_size.back();  // replaces old code
> }
> The old code always calculates the size of a 2 dimensional array (in my case
> 3*10=30) instead of the current array size (10).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to