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/14 08:22:00 UTC

svn commit: r344063 - /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/NillableArraysClient.cpp

Author: jamejose
Date: Sun Nov 13 23:21:50 2005
New Revision: 344063

URL: http://svn.apache.org/viewcvs?rev=344063&view=rev
Log:
Updated the testcase with new Array APIs

Modified:
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/NillableArraysClient.cpp

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/NillableArraysClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/NillableArraysClient.cpp?rev=344063&r1=344062&r2=344063&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/NillableArraysClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/NillableArraysClient.cpp Sun Nov 13 23:21:50 2005
@@ -41,31 +41,31 @@
 		NillableArrays ws(endpoint);
 
 		xsd__boolean_Array boolean_in;
-		xsd__boolean_Array boolean_out;
+		xsd__boolean_Array* boolean_out;
 		xsd__short_Array short_in;
-		xsd__short_Array short_out;
+		xsd__short_Array* short_out;
 		xsd__int_Array int_in;
-		xsd__int_Array int_out;
+		xsd__int_Array* int_out;
 		xsd__long_Array long_in;
-		xsd__long_Array long_out;
+		xsd__long_Array* long_out;
 		xsd__float_Array float_in;
-		xsd__float_Array float_out;
+		xsd__float_Array* float_out;
 		xsd__double_Array double_in;
-		xsd__double_Array double_out;
+		xsd__double_Array* double_out;
 		xsd__string_Array string_in;
-		xsd__string_Array string_out;
+		xsd__string_Array* string_out;
 
 
 		/* Test a boolean array */
 		xsd__boolean b1 = (xsd__boolean)0;
 		xsd__boolean b3 = (xsd__boolean)1;
-		boolean_in.m_Array = new xsd__boolean*[ARRAYSIZE];
-		boolean_in.m_Size = ARRAYSIZE;
-		boolean_in.m_Array[0] = &b1;
-		boolean_in.m_Array[1] = NULL;
-		boolean_in.m_Array[2] = &b3;
+		xsd__boolean **booleanInArray = new xsd__boolean*[ARRAYSIZE];
+		booleanInArray[0] = &b1;
+		booleanInArray[1] = NULL;
+		booleanInArray[2] = &b3;
+		boolean_in.set(booleanInArray,ARRAYSIZE);
 		cout << "invoking echoBooleanArray..."<<endl;
-		boolean_out = ws.echoBooleanArray(boolean_in);
+		boolean_out = ws.echoBooleanArray(&boolean_in);
 				cout << "successful "<<endl;
 /* The response is not being checked at present
 		if(boolean_out.m_Size == ARRAYSIZE) {
@@ -82,13 +82,13 @@
 		/* Test an short array */
 		xsd__short s1 = (xsd__short)252;
 		xsd__short s3 = (xsd__short)254;
-		short_in.m_Array = new xsd__short*[ARRAYSIZE];
-		short_in.m_Size = ARRAYSIZE;
-		short_in.m_Array[0] = &s1;
-		short_in.m_Array[1] = NULL;
-		short_in.m_Array[2] = &s3;
+		xsd__short ** shortInArray = new xsd__short*[ARRAYSIZE];
+		shortInArray[0] = &s1;
+		shortInArray[1] = NULL;
+		shortInArray[2] = &s3;
+		short_in.set(shortInArray,ARRAYSIZE);
 		cout << "invoking echoShortArray..."<<endl;
-		short_out = ws.echoShortArray(short_in);
+		short_out = ws.echoShortArray(&short_in);
 				cout << "successful "<<endl;
 /* The response is not being checked at present
 		if(short_out.m_Size == ARRAYSIZE) {
@@ -104,13 +104,13 @@
 		/* Test an int array */
 		xsd__int val1 = 1000000;
 		xsd__int val3 = 1000002;
-		int_in.m_Array = new xsd__int*[ARRAYSIZE];
-		int_in.m_Size = ARRAYSIZE;
-		int_in.m_Array[0] = &val1;
-		int_in.m_Array[1] = NULL;
-		int_in.m_Array[2] = &val3;
+		xsd__int ** intInArray = new xsd__int*[ARRAYSIZE];
+		intInArray[0] = &val1;
+		intInArray[1] = NULL;
+		intInArray[2] = &val3;
+		int_in.set(intInArray,ARRAYSIZE);
 		cout << "invoking echoIntArray..."<<endl;
-		int_out = ws.echoIntArray(int_in);
+		int_out = ws.echoIntArray(&int_in);
 				cout << "successful "<<endl;
 /* The response is not being checked at present
 		if(int_out.m_Size ==ARRAYSIZE) {
@@ -127,13 +127,13 @@
 		/* Test a long array */
 		xsd__long l1 = (xsd__long)200001;
 		xsd__long l3 = (xsd__long)200003;
-		long_in.m_Array = new xsd__long*[ARRAYSIZE];
-		long_in.m_Size = ARRAYSIZE;
-		long_in.m_Array[0] = &l1;
-		long_in.m_Array[1] = NULL;
-		long_in.m_Array[2] = &l3;
+		xsd__long ** longInArray = new xsd__long*[ARRAYSIZE];
+		longInArray[0] = &l1;
+		longInArray[1] = NULL;
+		longInArray[2] = &l3;
+		long_in.set(longInArray,ARRAYSIZE);
 		cout << "invoking echoLongArray..."<<endl;
-		long_out = ws.echoLongArray(long_in);
+		long_out = ws.echoLongArray(&long_in);
 				cout << "successful "<<endl;
 /* The response is not being checked at present
 		if(long_out.m_Size == ARRAYSIZE) {
@@ -150,14 +150,13 @@
 		/* Test a float array */
 		xsd__float f1 = (xsd__float)11.111;
 		xsd__float f3 = (xsd__float)33.111;
-
-		float_in.m_Array = new xsd__float*[ARRAYSIZE];
-		float_in.m_Size = ARRAYSIZE;
-		float_in.m_Array[0] = &f1;
-		float_in.m_Array[1] = NULL;
-		float_in.m_Array[2] = &f3;
+		xsd__float **floatInArray = new xsd__float*[ARRAYSIZE];
+		floatInArray[0] = &f1;
+		floatInArray[1] = NULL;
+		floatInArray[2] = &f3;
+		float_in.set(floatInArray,ARRAYSIZE);
 		cout << "invoking echoFloatArray..."<<endl;
-		float_out = ws.echoFloatArray(float_in);
+		float_out = ws.echoFloatArray(&float_in);
 				cout << "successful "<<endl;
 /* The response is not being checked at present
 		if(float_out.m_Size ==ARRAYSIZE) {
@@ -175,13 +174,13 @@
 		xsd__double d1 = (xsd__double)71.1565;
 		xsd__double d3 = (xsd__double)73.1565;
 
-		double_in.m_Array = new xsd__double*[ARRAYSIZE];
-		double_in.m_Size = ARRAYSIZE;
-		double_in.m_Array[0] = &d1;
-		double_in.m_Array[1] = NULL;
-		double_in.m_Array[2] = &d3;
+		xsd__double ** doubleInArray = new xsd__double*[ARRAYSIZE];		
+		doubleInArray[0] = &d1;
+		doubleInArray[1] = NULL;
+		doubleInArray[2] = &d3;
+		double_in.set(doubleInArray,ARRAYSIZE);
 		cout << "invoking echoDoubleArray..."<<endl;
-		double_out = ws.echoDoubleArray(double_in);
+		double_out = ws.echoDoubleArray(&double_in);
 				cout << "successful "<<endl;
 /* The response is not being checked at present
 		if(double_out.m_Size ==ARRAYSIZE) {
@@ -198,17 +197,19 @@
 		/* Test a string array */
 		static char* str1 = "Apache";
 		static char* str2 = "Axis C++";
-		string_in.m_Array = new xsd__string[ARRAYSIZE];
-		string_in.m_Size = ARRAYSIZE;
-		string_in.m_Array[0] = str1;
-		string_in.m_Array[1] = NULL;
-		string_in.m_Array[2] = str2;
+		xsd__string * stringInArray = new xsd__string[ARRAYSIZE];		
+		stringInArray[0] = str1;
+		stringInArray[1] = NULL;
+		stringInArray[2] = str2;
+		string_in.set(stringInArray,ARRAYSIZE);
 		cout << "invoking echoStringArray..."<<endl;
-		string_out = ws.echoStringArray(string_in);
-		if(string_out.m_Size ==ARRAYSIZE) {
-			if(string_out.m_Array[1])
+		string_out = ws.echoStringArray(&string_in);
+		int outputSize =0;
+		const xsd__string *output = string_out->get(outputSize);
+		if(outputSize ==ARRAYSIZE) {
+			if(output[1])
 				cout << "failed "<<endl;		
-			else if( (strcmp(string_out.m_Array[0], str1) == 0) && (strcmp(string_out.m_Array[2], str2) == 0) )
+			else if( (strcmp(output[0], str1) == 0) && (strcmp(output[2], str2) == 0) )
 				cout << "successful "<<endl;
 			else
 				cout << "failed "<<endl;