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 14:51:06 UTC
svn commit: r332552 -
/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ManyTypeRefRootClient.cpp
Author: jamejose
Date: Fri Nov 11 05:50:57 2005
New Revision: 332552
URL: http://svn.apache.org/viewcvs?rev=332552&view=rev
Log:
Updated the testcase with new Array APIs
Modified:
webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ManyTypeRefRootClient.cpp
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ManyTypeRefRootClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ManyTypeRefRootClient.cpp?rev=332552&r1=332551&r2=332552&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ManyTypeRefRootClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ManyTypeRefRootClient.cpp Fri Nov 11 05:50:57 2005
@@ -54,29 +54,35 @@
ws = new ManyTypeRefRoot();
Type1_Array input;
- Type1_Array result;
- Type1 types[10];
- Type1* current;
+ Type1_Array* result;
+ Type1 ** types = new Type1*[10];
+
int i;
for ( i = 0; i < 10; i++ ) {
- current = new Type1 ();
- NEWCOPY(current->kind, "Test type");
- current->index = i;
- types[i] = *current;
+ types[i] = new Type1 ();
+ NEWCOPY(types[i]->kind, "Test type");
+ types[i]->index = i;
}
- input.m_Array = types;
- input.m_Size = 10;
-
- result = ws->getInput(input);
+ input.set(types,10);
+ result = ws->getInput(&input);
cout << "Success " << endl;
- Type1 *arrayResult = result.m_Array;
- for ( i = 0; i < 10; i++, arrayResult++ ) {
- cout << " Result " << arrayResult->index << " : " << arrayResult->kind << endl;
+ int outputSize=0;
+ const Type1 **arrayResult = result->get(outputSize);
+ for ( i = 0; i < 10; i++) {
+ cout << " Result " << arrayResult[i]->index << " : " << arrayResult[i]->kind << endl;
}
returnValue = 0; // Success
+
+ // Clear up input array
+ for (int deleteIndex = 0 ; deleteIndex < 10 ; deleteIndex++ )
+ {
+ delete types[deleteIndex];
+ }
+ delete [] types;
+
bSuccess = true;