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 ja...@apache.org on 2005/11/11 07:09:22 UTC

svn commit: r332463 - /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_normalizedStringClient.cpp

Author: jamejose
Date: Thu Nov 10 22:09:12 2005
New Revision: 332463

URL: http://svn.apache.org/viewcvs?rev=332463&view=rev
Log:
Updated the testcase with new Array APIs

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

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_normalizedStringClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_normalizedStringClient.cpp?rev=332463&r1=332462&r2=332463&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_normalizedStringClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_normalizedStringClient.cpp Thu Nov 10 22:09:12 2005
@@ -300,17 +300,16 @@
         // Test array
         xsd__normalizedString_Array arrayInput;
 		int arraySize=2;
-		xsd__normalizedString * array = new xsd__normalizedString[arraySize]();        
+		xsd__normalizedString * array = new xsd__normalizedString[arraySize];        
         for (int inputIndex=0 ; inputIndex < arraySize ; inputIndex++)
         {
-            input = new char[25];
-            strcpy (input, simplenormalizedString);
-            array[inputIndex] = input;
+            array[inputIndex] = new char[25];
+            strcpy (array[inputIndex], simplenormalizedString);            
         }
 		arrayInput.set(array,arraySize);
-        xsd__normalizedString_Array arrayResult = ws->asArray(arrayInput);
+        xsd__normalizedString_Array* arrayResult = ws->asArray(&arrayInput);
 		int outputSize=0;
-		const xsd__normalizedString * output = arrayResult.get(outputSize);
+		const xsd__normalizedString * output = arrayResult->get(outputSize);
         cout << "array of " << outputSize << " elements" << endl;
         for (int index = 0; index < outputSize ; index++)
         {
@@ -331,10 +330,12 @@
                 cout << "  element[" << index << "]=<nil>" << endl;
             }
         }
-        // Clear up input array  
-        
+         // Clear up input array        
+        for (int deleteIndex = 0 ; deleteIndex < arraySize ; deleteIndex++ )
+        {
+            delete [] array[deleteIndex];
+        }
         delete [] array;
-
 
         // Test complex type
         input = new char[25];