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/15 08:09:13 UTC

svn commit: r344321 - /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/UnboundedStringChoiceClient.cpp

Author: jamejose
Date: Mon Nov 14 23:08:59 2005
New Revision: 344321

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

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

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/UnboundedStringChoiceClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/UnboundedStringChoiceClient.cpp?rev=344321&r1=344320&r2=344321&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/UnboundedStringChoiceClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/UnboundedStringChoiceClient.cpp Mon Nov 14 23:08:59 2005
@@ -16,25 +16,16 @@
 		Value0 = new	ChoiceComplexType();
 		
 		cout<< "Calling the Service..."<<endl;
-		
-		Value0->StringValue->m_Array = new xsd__string[5];
-		xsd__string * StringArray = new xsd__string[5];
-		Value0->StringValue->m_Size = 5;
-		
-        StringArray[0] = "a";
-		Value0->StringValue->m_Array[0] = StringArray[0];
- 
-		StringArray[1] = "b";
-		Value0->StringValue->m_Array[1] = StringArray[1];
-		
-		StringArray[2] = "c";
-		Value0->StringValue->m_Array[2] = StringArray[2];
-
-		StringArray[3] = "d";
-		Value0->StringValue->m_Array[3] = StringArray[3];
 
-		StringArray[4] = "e";
-		Value0->StringValue->m_Array[4] = StringArray[4];
+		xsd__string_Array * arrayIn =new xsd__string_Array();
+		xsd__string *array = new xsd__string[5];		
+        array[0] = "a"; 
+		array[1] = "b";
+		array[2] = "c";
+		array[3] = "d";
+		array[4] = "e";		
+		arrayIn->set(array,5);
+		Value0->setStringValue(&arrayIn);
 	
 		if ( argc > 1 )
             url = argv[1];
@@ -42,10 +33,21 @@
 		ChoiceTestSoap ws(url);
 
 		Value1 = ws.echoChoice(Value0);
+		int outputSize =0;
 		
 		for (int i=0;i<5;i++)
-			cout<<"Value1->StringValue->m_Array["<<i<<"] = "<<*(Value1->StringValue->m_Array[i])<<endl;
-	//	cout<<"Value1->IntValue = "<<(Value1->StringValue)<<endl;
+			cout<<"Value1->StringValue->m_Array["<<i<<"] = "<<*((*(Value1->StringValue))->get(outputSize)[i])<<endl;
+
+		  // Clear up input array        
+        for (int deleteIndex = 0 ; deleteIndex < 5 ; deleteIndex++ )
+        {
+            delete [] array[deleteIndex];
+        }
+        delete [] array;
+		delete arrayIn;
+
+
+	
 
 	}catch (AxisException & e)
     {