axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whitl...@apache.org
Subject cvs commit: ws-axis/c/src/soap SoapDeSerializer.cpp
Date Thu, 24 Feb 2005 10:35:38 GMT
whitlock    2005/02/24 02:35:38

  Modified:    c/src/soap SoapDeSerializer.cpp
  Log:
  AXISCPP-371 Error deserializing empty arrays. This is Unai Uribarri's fix that I have reviewed
and committed.
  
  Revision  Changes    Path
  1.148     +13 -3     ws-axis/c/src/soap/SoapDeSerializer.cpp
  
  Index: SoapDeSerializer.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/soap/SoapDeSerializer.cpp,v
  retrieving revision 1.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- SoapDeSerializer.cpp	22 Feb 2005 03:44:08 -0000	1.147
  +++ SoapDeSerializer.cpp	24 Feb 2005 10:35:38 -0000	1.148
  @@ -589,7 +589,12 @@
   
   	Array.m_Size = getArraySize (m_pNode);
   
  -	if (Array.m_Size > 0)
  +	if (Array.m_Size == 0)
  +	{
  +		m_pNode = m_pParser->next ();	/* skip end element node too */
  +		return Array;
  +	}
  +	else if (Array.m_Size > 0)
   	{
   	    Array.m_Array =
   		((AXIS_OBJECT_CREATE_FUNCT) pCreFunct) (Array.m_Array, true,
  @@ -818,7 +823,7 @@
   int
   SoapDeSerializer::getArraySize (const AnyElement * pElement)
   {
  -    int nSize = 0;
  +    int nSize = -1;
       /* first check whether this is a start element node */
   
       if (START_ELEMENT != pElement->m_type)
  @@ -1275,7 +1280,12 @@
   	
   		Array.m_Size = getArraySize (m_pNode);
   	
  -		if (Array.m_Size > 0)
  +		if (Array.m_Size == 0)
  +		{
  +			m_pNode = m_pParser->next ();	/* skip end element node too */
  +			return Array;
  +		}
  +		else if (Array.m_Size > 0)
   		{
   		    switch (nType)
   		    {
  
  
  

Mime
View raw message