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/15 08:08:40 UTC
svn commit: r344320 -
/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/UnboundedChoiceClient.cpp
Author: jamejose
Date: Mon Nov 14 23:08:29 2005
New Revision: 344320
URL: http://svn.apache.org/viewcvs?rev=344320&view=rev
Log:
Updated the testcase with new Array APIs
Modified:
webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/UnboundedChoiceClient.cpp
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/UnboundedChoiceClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/UnboundedChoiceClient.cpp?rev=344320&r1=344319&r2=344320&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/UnboundedChoiceClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/UnboundedChoiceClient.cpp Mon Nov 14 23:08:29 2005
@@ -16,26 +16,31 @@
Value0=new ChoiceComplexType();
Value0->StringValue=NULL;
-
+
cout<< "Calling the Service..."<<endl;
-
- Value0->IntValue->m_Array=new xsd__int*[5];
- xsd__int * intArray = new xsd__int[5];
- Value0->IntValue->m_Size = 5;
+ xsd__int_Array * arrayIn = new xsd__int_Array();
+ xsd__int ** array = new xsd__int*[5];
for (int x=0; x<5; x++)
{
- intArray[x] = x+1;
- Value0->IntValue->m_Array[x] = &intArray[x];
+ array[x] = new xsd__int(x+1);
}
-
-
+ arrayIn->set(array,5);
+ Value0->setIntValue(&arrayIn);
url = argv[1];
ChoiceTestSoap ws(url);
Value1=ws.echoChoice(Value0);
+ int outputSize=0;
for(int i=0;i<5;i++)
- cout<<"Value1->IntValue->m_Array["<<i<<"] = "<<*(Value1->IntValue->m_Array[i])<<endl;
+ cout<<"Value1->IntValue->m_Array["<<i<<"] = "<<*((*(Value1->IntValue))->get(outputSize)[i])<<endl;
+ // Clear up input array
+ for (int deleteIndex = 0 ; deleteIndex < 5 ; deleteIndex++ )
+ {
+ delete [] array[deleteIndex];
+ }
+
+ delete arrayIn;
}catch (AxisException & e)
{