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:31:58 UTC
svn commit: r332469 -
/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_NameClient.cpp
Author: jamejose
Date: Thu Nov 10 22:31:44 2005
New Revision: 332469
URL: http://svn.apache.org/viewcvs?rev=332469&view=rev
Log:
Updated the testcase with new Array APIs
Modified:
webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_NameClient.cpp
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_NameClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_NameClient.cpp?rev=332469&r1=332468&r2=332469&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_NameClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/XSD_NameClient.cpp Thu Nov 10 22:31:44 2005
@@ -261,17 +261,17 @@
// Test array
xsd__Name_Array arrayInput;
int arraySize=2;
- xsd__Name *array = new xsd__Name[arraySize]();
+ xsd__Name *array = new xsd__Name[arraySize];
for (int inputIndex=0 ; inputIndex <arraySize ; inputIndex++)
{
- input = new char[25];
- strcpy (input, simpleName);
- array[inputIndex] = input;
+ array[inputIndex] = new char[25];
+ strcpy (array[inputIndex], simpleName);
+
}
arrayInput.set(array,arraySize);
- xsd__Name_Array arrayResult = ws->asArray(arrayInput);
+ xsd__Name_Array* arrayResult = ws->asArray(&arrayInput);
int outputSize=0;
- const xsd__Name *output = arrayResult.get(outputSize);
+ const xsd__Name *output = arrayResult->get(outputSize);
cout << "array of " << outputSize << " elements" << endl;
for (int index = 0; index < outputSize ; index++)
{
@@ -297,6 +297,7 @@
delete array[deleteIndex];
}
delete [] array;
+
// Test complex type
input = new char[25];