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 ji...@apache.org on 2004/04/07 15:29:43 UTC
[jira] Resolved: (AXISCPP-41) nested array -> deserialization fails
Message:
The following issue has been resolved as CANNOT REPRODUCE.
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/AXISCPP-41
Here is an overview of the issue:
---------------------------------------------------------------------
Key: AXISCPP-41
Summary: nested array -> deserialization fails
Type: Bug
Status: Resolved
Resolution: CANNOT REPRODUCE
Project: Axis-C++
Components:
Serialization/Deserialization
Fix Fors:
current (nightly)
Versions:
1.0 Final
Assignee:
Reporter: Roland Kosovsky
Created: Tue, 20 Jan 2004 10:55 AM
Updated: Wed, 7 Apr 2004 6:28 AM
Environment: Operating System: Other
Platform: Other
Description:
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).
---------------------------------------------------------------------
JIRA INFORMATION:
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