axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamej...@apache.org
Subject svn commit: r332257 - /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_dateTimeClient.cpp
Date Thu, 10 Nov 2005 09:58:38 GMT
Author: jamejose
Date: Thu Nov 10 01:58:24 2005
New Revision: 332257

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

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

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_dateTimeClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_dateTimeClient.cpp?rev=332257&r1=332256&r2=332257&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_dateTimeClient.cpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_dateTimeClient.cpp
Thu Nov 10 01:58:24 2005
@@ -117,26 +117,32 @@
 		delete optionalAttributeResult;
 */
 		// Test array
-        xsd__dateTime_Array arrayInput;
-        arrayInput.m_Array = new xsd__dateTime*[2];
-        xsd__dateTime * array = new xsd__dateTime[2];
-        arrayInput.m_Size = 2;
-        for (int inputIndex=0 ; inputIndex < 2 ; inputIndex++)
+        xsd__date_Array arrayInput;
+		int arraySize = 2;
+		xsd__date ** array = new xsd__date*[arraySize];
+        
+        for (int inputIndex=0 ; inputIndex < arraySize ; inputIndex++)
         {
-            array[inputIndex] = time;
-            arrayInput.m_Array[inputIndex] = &array[inputIndex];
+            array[inputIndex] =new xsd__date(time);
+            
+        }
+		arrayInput.set(array,arraySize);
+        xsd__date_Array* arrayResult = ws->asArray(&arrayInput);
+		int outputSize = 0;
+		const xsd__date **output = arrayResult->get(outputSize);
+        cout << "array of " << outputSize << " elements" << endl;
+        for (int index = 0; index < outputSize ; index++)
+        {
+            strftime(returnString, 50, "%a %b %d %Y", output[index]);
+            cout << "  element[" << index << "]=" << returnString
<< endl;
+            
+        }
+         // Clear up input array        
+        for (int deleteIndex = 0 ; deleteIndex < arraySize ; deleteIndex++ )
+        {
+            delete array[deleteIndex];
         }
-		xsd__dateTime_Array arrayResult = ws->asArray(arrayInput);
-        cout << "array of " << arrayResult.m_Size << " elements" <<
endl;
-		for (int index = 0; index < arrayResult.m_Size ; index++)
-		{
-            strftime(returnString, 50, "%a %b %d %H:%M:%S %Y", arrayResult.m_Array[index]);
-			cout << "  element[" << index << "]=" << returnString <<
endl;
-			delete arrayResult.m_Array[index];
-		}
         delete [] array;
-        delete [] arrayInput.m_Array;
-		delete [] arrayResult.m_Array;
 
 		// Test complex type
 		SimpleComplexType complexTypeInput;



Mime
View raw message