You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2004/01/19 16:18:50 UTC
DO NOT REPLY [Bug 26245] New: -
string[] - empty values: previous string is returned instead of an empty string
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26245>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26245
string[] - empty values: previous string is returned instead of an empty string
Summary: string[] - empty values: previous string is returned
instead of an empty string
Product: Axis-C++
Version: 1.0 Final
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Serialization/Deserialization
AssignedTo: axis-dev@ws.apache.org
ReportedBy: roland.kosovsky@abacus.ch
When an array of strings is serialized and deserialized empty values get the
value of the previous string.
SOAPArrayStruct* pInput = new SOAPArrayStruct;
pInput->varArray.m_Size = 4;
pInput->varArray.m_Array = new string[4];
pInput->varArray.m_Array[0] = "1";
pInput->varArray.m_Array[1] = "2";
pInput->varArray.m_Array[2] = ""; // empty value
pInput->varArray.m_Array[3] = "4";
the web service gets: "1,2,2,4" instead "1,2,,4"
reason: XMLStreamHandler::characters gets never called. Therefore the value is
never set.
my suggestion:
XMLStreamHandler.cpp, Ln 114 (XMLStreamHandler::startElement):
m_Param.SetEmpty(); // insert this
Param.h, Ln 123 (class Param):
void SetEmpty() { m_sValue.erase(); } // insert this