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/11 14:13:42 UTC
svn commit: r332541 -
/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/PrimitiveAndArrayClient.cpp
Author: jamejose
Date: Fri Nov 11 05:13:25 2005
New Revision: 332541
URL: http://svn.apache.org/viewcvs?rev=332541&view=rev
Log:
Updated the testcase with new Array APIs
Modified:
webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/PrimitiveAndArrayClient.cpp
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/PrimitiveAndArrayClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/PrimitiveAndArrayClient.cpp?rev=332541&r1=332540&r2=332541&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/PrimitiveAndArrayClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/PrimitiveAndArrayClient.cpp Fri Nov 11 05:13:25 2005
@@ -38,23 +38,26 @@
single=37;
- xsd__int * arrayOfInt = new xsd__int[ARRAYSIZE];
- intArray.m_Size = ARRAYSIZE;
- intArray.m_Array = new xsd__int*[ARRAYSIZE];
- arrayOfInt[0] = 6;
- intArray.m_Array[0] = &arrayOfInt[0];
- arrayOfInt[1] = 7;
- intArray.m_Array[1] = &arrayOfInt[1];
-
- response = ws->sendPrimitiveAndArray(single, intArray);
- cout << response->returnInt << " " << *(response->returnArray.m_Array[0]) << " " << *(response->returnArray.m_Array[1]) << endl;
+ xsd__int ** arrayOfInt = new xsd__int*[ARRAYSIZE];
+ arrayOfInt[0] = new xsd__int(6);
+ arrayOfInt[1] = new xsd__int(7);
+ intArray.set(arrayOfInt,ARRAYSIZE);
+ response = ws->sendPrimitiveAndArray(single, &intArray);
+ int outputSize = 0;
+ const xsd__int **output = response->getreturnArray()->get(outputSize);
+ cout << response->returnInt << " " << *(output[0]) << " " << *(output[1]) << endl;
single=43;
- arrayOfInt[0] = 13;
- arrayOfInt[1] = 17;
- response = ws->sendArrayAndPrimitive(intArray, single);
- cout << response->returnInt << " " << *(response->returnArray.m_Array[0]) << " " << *(response->returnArray.m_Array[1]) << endl;
-
+ *arrayOfInt[0] = 13;
+ *arrayOfInt[1] = 17;
+ intArray.set(arrayOfInt,ARRAYSIZE);
+ response = ws->sendArrayAndPrimitive(&intArray, single);
+ outputSize = 0;
+ output = response->getreturnArray()->get(outputSize);
+ cout << response->returnInt << " " << *(output[0]) << " " << *(output[1]) << endl;
+ delete arrayOfInt[0];
+ delete arrayOfInt[1];
+ delete [] arrayOfInt;
delete ws;
}
catch(AxisException& e)