Issue Details (XML | Word | Printable)

Key: AXISCPP-41
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Assignee: Unassigned
Reporter: Roland Kosovsky
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Axis-C++

nested array -> deserialization fails

Created: 20/Jan/04 06:55 PM   Updated: 01/Feb/05 10:42 PM
Return to search
Component/s: Serialization
Affects Version/s: 1.0 Final
Fix Version/s: current (nightly)

Time Tracking:
Not Specified

Environment:
Operating System: Other
Platform: Other

Bugzilla Id: 26274
Resolution Date: 07/Apr/04 01:28 PM


 Description  « Hide
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).

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Serge Knystautas made changes - 24/Feb/04 12:40 AM
Field Original Value New Value
issue.field.bugzillaimportkey 26274 14642
Susantha Kumara made changes - 07/Apr/04 01:28 PM
Assignee Axis Developers Mailing List [ axis-dev@ws.apache.org ]
Resolution Cannot Reproduce [ 5 ]
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s current (nightly) [ 10476 ]
John Hawkins made changes - 01/Feb/05 10:42 PM
Status Resolved [ 5 ] Closed [ 6 ]