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

svn commit: r332464 - /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_languageClient.cpp

Author: jamejose
Date: Thu Nov 10 22:13:00 2005
New Revision: 332464

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

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

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_languageClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_languageClient.cpp?rev=332464&r1=332463&r2=332464&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_languageClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_languageClient.cpp Thu Nov 10 22:13:00 2005
@@ -300,17 +300,17 @@
         // Test array
         xsd__language_Array arrayInput;
 		int arraySize=2;
-		xsd__language * array = new xsd__language[arraySize]();        
+		xsd__language * array = new xsd__language[arraySize];        
         for (int inputIndex=0 ; inputIndex < arraySize ; inputIndex++)
         {
-            input = new char[25];
-            strcpy (input, simplelanguage);
-            array[inputIndex] = input;
+            array[inputIndex] = new char[25];
+            strcpy (array[inputIndex], simplelanguage);
+            
         }
 		arrayInput.set(array,arraySize);
-        xsd__language_Array arrayResult = ws->asArray(arrayInput);
+        xsd__language_Array* arrayResult = ws->asArray(&arrayInput);
 		int outputSize=0;
-		const xsd__language *output = arrayResult.get(outputSize);
+		const xsd__language *output = arrayResult->get(outputSize);
         cout << "array of " << outputSize << " elements" << endl;
         for (int index = 0; index < outputSize ; index++)
         {
@@ -331,10 +331,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];