axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamej...@apache.org
Subject svn commit: r331782 - /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_hexBinaryClient.cpp
Date Tue, 08 Nov 2005 10:54:13 GMT
Author: jamejose
Date: Tue Nov  8 02:53:47 2005
New Revision: 331782

URL: http://svn.apache.org/viewcvs?rev=331782&view=rev
Log:
Updated the testcase with new memory model of Arrays

Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_hexBinaryClient.cpp

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_hexBinaryClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_hexBinaryClient.cpp?rev=331782&r1=331781&r2=331782&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_hexBinaryClient.cpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_hexBinaryClient.cpp
Tue Nov  8 02:53:47 2005
@@ -123,26 +123,31 @@
 
         // Test array
         xsd__hexBinary_Array arrayInput;
-        arrayInput.m_Array = new xsd__hexBinary*[2];
-        xsd__hexBinary * array = new xsd__hexBinary[2];
-        arrayInput.m_Size = 2;
-        for (int inputIndex=0 ; inputIndex < 2 ; inputIndex++)
+		int arraySize = 2;
+        xsd__hexBinary ** array = new xsd__hexBinary*[arraySize]();
+        for (int inputIndex=0 ; inputIndex < arraySize ; inputIndex++)
         {
-            array[inputIndex] = input;
-            arrayInput.m_Array[inputIndex] = &array[inputIndex];
+            array[inputIndex] = new xsd__hexBinary(input);            
         }
+		arrayInput.set(array,arraySize);
         xsd__hexBinary_Array arrayResult = ws->asArray(arrayInput);
-        cout << "array of " << arrayResult.m_Size << " elements" <<
endl;
-        for (int index = 0; index < arrayResult.m_Size ; index++)
+		int outputSize=0;
+		const xsd__hexBinary ** output =arrayResult.get(outputSize);
+        cout << "array of " << outputSize << " elements" << endl;
+        for (int index = 0; index < outputSize; index++)
         {
             cout << " element[" << index << "]" << endl;
-            cout << "  size=" << arrayResult.m_Array[index]->__size <<
endl;
-            cout << "  data=" << asciiToString((char *)arrayResult.m_Array[index]->__ptr)
<< endl;
-            delete arrayResult.m_Array[index];
+            cout << "  size=" << output[index]->__size << endl;
+            cout << "  data=" << asciiToString((char *)output[index]->__ptr)
<< endl;
+            
+        }
+        // Clear up input array        
+        for (int deleteIndex = 0 ; deleteIndex < arraySize ; deleteIndex++ )
+        {
+            delete array[deleteIndex];
         }
         delete [] array;
-        delete [] arrayInput.m_Array;
-        delete [] arrayResult.m_Array;
+
 
         // Test complex type
         SimpleComplexType complexTypeInput;



Mime
View raw message