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 "Fred Preston (JIRA)" <ax...@ws.apache.org> on 2006/04/05 15:05:09 UTC

[jira] Closed: (AXISCPP-39) string[] - empty values: previous string is returned instead of an empty string

     [ http://issues.apache.org/jira/browse/AXISCPP-39?page=all ]
     
Fred Preston closed AXISCPP-39:
-------------------------------


> string[] - empty values: previous string is returned instead of an empty string
> -------------------------------------------------------------------------------
>
>          Key: AXISCPP-39
>          URL: http://issues.apache.org/jira/browse/AXISCPP-39
>      Project: Axis-C++
>         Type: Bug

>   Components: Serialization
>     Versions: 1.0 Final
>  Environment: Operating System: Other
> Platform: Other
>     Reporter: Roland Kosovsky
>      Fix For: current (nightly)

>
> 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

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira