You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by na...@apache.org on 2007/02/04 23:13:00 UTC

svn commit: r503496 - /webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp

Author: nadiramra
Date: Sun Feb  4 14:13:00 2007
New Revision: 503496

URL: http://svn.apache.org/viewvc?view=rev&rev=503496
Log:
AXISCPP-1019 - Arrays returned with 0 size (in axis client)

Modified:
    webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp

Modified: webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp?view=diff&rev=503496&r1=503495&r2=503496
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp Sun Feb  4 14:13:00 2007
@@ -632,8 +632,12 @@
     
     while(RPC_ENCODED != m_nStyle || count < arraySize)
     {
+        // For RPC-encoded arrays, the element name in array cannot be derived - 
+        // within an array value element names are not significant - so  
+        // we read until end-of-element is encountered (i.e. null string 
+        // is returned from peek()). 
         elementName = m_pParser->peek();
-        if(strcmp(elementName, pName) == 0)
+        if ((RPC_ENCODED == m_nStyle && 0x00 != *elementName) || strcmp(elementName, pName) == 0)
             pArray->addElement(getCmplxObject(pDZFunct, pCreFunct, pDelFunct, pName, pNamespace));
         else
             break;    
@@ -686,8 +690,12 @@
                 
         while(RPC_ENCODED != m_nStyle || count < size)
         {
+            // For RPC-encoded arrays, the element name in array cannot be derived - 
+            // within an array value element names are not significant -   
+            // so we read until end-of-element is encountered (i.e. null string 
+            // is returned from peek()). 
             elementName = m_pParser->peek();
-            if(strcmp(elementName, pName) == 0)
+            if ((RPC_ENCODED == m_nStyle && 0x00 != *elementName) || strcmp(elementName, pName) == 0)
             {
                 if (0 == count)
                     pSimpleType = AxisUtils::createSimpleTypeObject(nType);



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org