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/14 07:14:53 UTC
svn commit: r344049 -
/webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Combo_TTestClient.cpp
Author: jamejose
Date: Sun Nov 13 22:14:41 2005
New Revision: 344049
URL: http://svn.apache.org/viewcvs?rev=344049&view=rev
Log:
Updated the testcase with new Array APIs
Modified:
webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Combo_TTestClient.cpp
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Combo_TTestClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Combo_TTestClient.cpp?rev=344049&r1=344048&r2=344049&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Combo_TTestClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/dynamic/Combo_TTest/Combo_TTestClient.cpp Sun Nov 13 22:14:41 2005
@@ -139,10 +139,12 @@
// Debug ^ Must be removed
//testing echoIntArray
- IntArrayType arrin;
+ intArrayType arrin;
+ xsd__int_Array arrayIn;
+ xsd__int ** array = new xsd__int*[ARRAYSIZE];
- arrin.intItem.m_Size = ARRAYSIZE; // Set the array size.
- arrin.intItem.m_Array = new int*[ARRAYSIZE]; // Create an array of integer pointers.
+ //arrin.intItem.m_Size = ARRAYSIZE; // Set the array size.
+ //arrin.intItem.m_Array = new int*[ARRAYSIZE]; // Create an array of integer pointers.
/*
int * intArray = new int[ARRAYSIZE]; // Create a pointer to an integer array.
@@ -159,17 +161,19 @@
// pointer of the integer array.
for( int y = 0; y < ARRAYSIZE; y++)
{
- int * intArray = new int[ARRAYSIZE]; // Create a pointer to an integer array.
+ //int * intArray = new int[ARRAYSIZE]; // Create a pointer to an integer array.
for( x = 0; x < ARRAYSIZE; x++)
{
- intArray[x] = x;
+ array[x] =new xsd__int(x);
}
- arrin.intItem.m_Array[y] = intArray;
+ //arrin.intItem.m_Array[y] = intArray;
}
-/**/
- if( ws.echoIntArray( &arrin)->intItem.m_Array != NULL)
+ arrayIn.set(array,ARRAYSIZE);
+ arrin.setintItem(&arrayIn);
+/**/ int outputSize =0;
+ if( ws.echoIntArray( &arrin)->intItem->get(outputSize) != NULL)
{
cout << "successful ";
}
@@ -177,6 +181,12 @@
{
cout << "failed " << endl;
}
+ // Clear up input array
+ for (int deleteIndex = 0 ; deleteIndex < ARRAYSIZE ; deleteIndex++ )
+ {
+ delete array[deleteIndex];
+ }
+ delete [] array;
}
catch( AxisException& e)
@@ -317,33 +327,39 @@
Type * output;
xsd__int_Array array_input;
int i;
-
- array_input.m_Array = new int*[ARRAYSIZE_STT];
- array_input.m_Size = ARRAYSIZE_STT;
+ xsd__int ** array = new xsd__int*[ARRAYSIZE_STT];
+ //array_input.m_Array = new int*[ARRAYSIZE_STT];
+ //array_input.m_Size = ARRAYSIZE_STT;
for( int j = 0; j < ARRAYSIZE_STT; j++)
{
- int * piEntries = new int[ARRAYSIZE_STT];
+ //int * piEntries = new int[ARRAYSIZE_STT];
for( i = 0; i < ARRAYSIZE_STT; i++)
{
- piEntries[i] = i;
+ array[i] = new xsd__int(i);
}
- array_input.m_Array[j] = piEntries;
+ //array_input.m_Array[j] = piEntries;
}
-
+ array_input.set(array,ARRAYSIZE_STT);
input = new Type();
- input->item = array_input;
+ input->setitem(&array_input);
output = ws->getInput( input);
i = 0;
-
- if( *(output->item.m_Array[i]) == 0)
+ int outputSize = 0;
+ if( *(output->item->get(outputSize)[0]) == 0)
{
cout << "successful ";
}
+ // Clear up input array
+ for (int deleteIndex = 0 ; deleteIndex < ARRAYSIZE_STT ; deleteIndex++ )
+ {
+ delete array[deleteIndex];
+ }
+ delete [] array;
delete ws;
}