axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nadira...@apache.org
Subject svn commit: r724744 - /webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RecurseTypesClient.cpp
Date Tue, 09 Dec 2008 15:18:07 GMT
Author: nadiramra
Date: Tue Dec  9 07:18:06 2008
New Revision: 724744

URL: http://svn.apache.org/viewvc?rev=724744&view=rev
Log:
a field in test case was not being initialized...

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

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RecurseTypesClient.cpp
URL: http://svn.apache.org/viewvc/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RecurseTypesClient.cpp?rev=724744&r1=724743&r2=724744&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RecurseTypesClient.cpp
(original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RecurseTypesClient.cpp
Tue Dec  9 07:18:06 2008
@@ -47,102 +47,112 @@
 
   endpoint_set = parse_args_for_endpoint(&argc, argv, &endpoint);
 
-                bool bSuccess = false;
-                int     iRetryIterationCount = 3;
+    bool bSuccess = false;
+	int iRetryIterationCount = 3;
 
-                do
-                {
-  try {
-    if(endpoint_set) {
-      ws = new RecurseTypesWS(endpoint, APTHTTP1_1);
-    } else
-      ws = new RecurseTypesWS();
-
-    Type1 *input,*output;
-    int i;
-
-    input = new Type1 ();
-    input->att_kind = new char[strlen(Kind_CHEQUE) + 1];
-        strcpy(input->att_kind, Kind_CHEQUE);
-    input->kind = new char[strlen("Check In") + 1];
-        strcpy(input->kind, "Check In");
-
-        Type1_Array arrayIn;
-        Type1 ** array = new Type1*[10];
-
-    for ( i = 0; i < 10; i++ )
-        {
-                array[i]=new Type1();
-        array[i]->kind = new char[strlen("Sample") + 1];
-                strcpy(array[i]->kind, "Sample");
-                array[i]->index = 0;
-    }
-        arrayIn.set(array,10);
-        input->setfollowings(&arrayIn);
-    output = ws->getInput(input);
-
-    cout << "Result" << endl;
-    if ( output == NULL )
-      cout << "Invoke failed" << endl;
-    else {
-      cout << "\tAtt_kind = " << output->att_kind << endl;
-      cout << "\tKind = " << output->kind << endl;
-          int outputSize = 0;
-      Type1 ** outArray = output->followings->get(outputSize);;
-      for ( i = 0; i < outputSize; i++ ) {
-        cout << "\tKind [" << i << "] = " << outArray[i]->kind
<< endl;        
-      }
-            // Clear up input array        
-        for (i = 0 ; i < 10 ; i++ )
-        {
-            delete array[i];
-        }
-                delete [] array;
-                delete input;
-                delete output;
-      returnValue = 0; // Success
-
-          bSuccess = true;
-    }
-  } catch(AxisException &e) {
-                        bool bSilent = false;
-
-                        if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
-                        {
-                                if( iRetryIterationCount > 0)
-                                {
-                                        bSilent = true;
-                                }
-                        }
-                        else
-                        {
-                                iRetryIterationCount = 0;
-                        }
-
-            if( !bSilent)
-                        {
-    cout << e.what() << endl;
-                        }
-  } catch(...) {
-    cout << "Unknown Exception occured." << endl;
-  }
-  try
-  {
-          delete ws; 
-  }
-  catch(exception& exception)
-  {
-        cout << "Exception on clean up of ws: " << exception.what()<<endl;
-  }
-  catch(...)
-  {
-        cout << "Unknown exception on clean up of ws: " << endl;
-  }
-                iRetryIterationCount--;
-                } while( iRetryIterationCount > 0 && !bSuccess);
-    if(endpoint_set)
-      free(endpoint);
-  cout << "---------------------- TEST COMPLETE -----------------------------"<<
endl;
+	do
+	{
+		try
+		{
+			if(endpoint_set)
+				ws = new RecurseTypesWS(endpoint, APTHTTP1_1);
+			else
+			    ws = new RecurseTypesWS();
+
+			Type1 *input,*output;
+			int i;
+
+			input = new Type1 ();
+			input->att_kind = new char[strlen(Kind_CHEQUE) + 1];
+			strcpy(input->att_kind, Kind_CHEQUE);
+			input->kind = new char[strlen("Check In") + 1];
+			strcpy(input->kind, "Check In");
+			input->index = 99;
+
+			Type1_Array arrayIn;
+			Type1 ** array = new Type1*[10];
+
+			for ( i = 0; i < 10; i++ )
+			{
+				array[i]=new Type1();
+				array[i]->kind = new char[strlen("Sample") + 1];
+				strcpy(array[i]->kind, "Sample");
+				array[i]->index = 0;
+			}
+			arrayIn.set(array,10);
+			input->setfollowings(&arrayIn);
+			output = ws->getInput(input);
+
+			cout << "Result" << endl;
+			if ( output == NULL )
+			cout << "Invoke failed" << endl;
+			else
+			{
+				cout << "\tAtt_kind = " << output->att_kind << endl;
+				cout << "\tKind = " << output->kind << endl;
+				int outputSize = 0;
+				Type1 ** outArray = output->followings->get(outputSize);;
+				for ( i = 0; i < outputSize; i++ )
+				{
+					cout << "\tKind [" << i << "] = " << outArray[i]->kind <<
endl;
+				}
+				// Clear up input array        
+				for (i = 0; i < 10; i++ )
+				{
+					delete array[i];
+				}
+				delete [] array;
+				delete input;
+				delete output;
+				returnValue = 0; // Success
+
+				bSuccess = true;
+			}
+		}
+		catch(AxisException &e)
+		{
+			bool bSilent = false;
+
+			if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+			{
+				if( iRetryIterationCount > 0)
+				{
+					bSilent = true;
+				}
+			}
+			else
+			{
+				iRetryIterationCount = 0;
+			}
+
+			if( !bSilent)
+			{
+				cout << e.what() << endl;
+			}
+		}
+		catch(...)
+		{
+			cout << "Unknown Exception occured." << endl;
+		}
+		try
+		{
+			delete ws;
+		}
+		catch(exception& exception)
+		{
+			cout << "Exception on clean up of ws: " << exception.what()<<endl;
+		}
+		catch(...)
+		{
+			cout << "Unknown exception on clean up of ws: " << endl;
+		}
+		iRetryIterationCount--;
+	} while (iRetryIterationCount > 0&& !bSuccess);
+	if (endpoint_set)
+		free(endpoint);
+	cout
+			<< "---------------------- TEST COMPLETE -----------------------------"
+			<< endl;
   
   return returnValue;
 }



Mime
View raw message