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 na...@apache.org on 2006/04/28 05:04:04 UTC
svn commit: r397747 [3/17] -
/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSL1Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSL1Client.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSL1Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSL1Client.cpp Thu Apr 27 20:03:51 2006
@@ -31,29 +31,29 @@
char endpoint[256];
const char* url="https://localhost:80/axis/Calculator";
int iResult;
- const char* sslkeyhome = 0;
+ const char* sslkeyhome = 0;
char keylocation[255];
- signal(SIGILL, sig_handler);
- signal(SIGABRT, sig_handler);
- signal(SIGSEGV, sig_handler);
- //signal(SIGQUIT, sig_handler);
- //signal(SIGBUS, sig_handler);
- signal(SIGFPE, sig_handler);
+ signal(SIGILL, sig_handler);
+ signal(SIGABRT, sig_handler);
+ signal(SIGSEGV, sig_handler);
+ //signal(SIGQUIT, sig_handler);
+ //signal(SIGBUS, sig_handler);
+ signal(SIGFPE, sig_handler);
url = argv[1];
- bool bSuccess = false;
- int iRetryIterationCount = 3;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- do
- {
+ do
+ {
try
{
sprintf(endpoint, "%s", url);
Calculator ws(endpoint);
//ws.SetSecure("/home/axistest/ssl/myKeyRing.kdb", "axxxis4all", "AXIS", "NONE", "05", "NONE", false);
- sslkeyhome=getenv("SSL_KEYS_HOME");
+ sslkeyhome=getenv("SSL_KEYS_HOME");
if (!sslkeyhome)
{ cout << "SSL_KEYS_HOME not set" << endl;
@@ -66,29 +66,29 @@
iResult = ws.add(2,3);
cout << iResult <<endl;
- bSuccess = true;
+ bSuccess = true;
}
catch(AxisException& e)
{
- bool bSilent = false;
+ bool bSilent = false;
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- // Since OS400 error message is different, ensure that
- // correct error message is returned and then return
- // what is expected to match verification file.
+ {
+ // Since OS400 error message is different, ensure that
+ // correct error message is returned and then return
+ // what is expected to match verification file.
#ifdef __OS400__
char *errorText = (char *)e.what();
if (strstr(errorText, "GSKit Error 408") != NULL)
@@ -96,9 +96,9 @@
else
cout << "Exception : " << e.what() << endl;
#else
- cout << "Exception : " << e.what() << endl;
+ cout << "Exception : " << e.what() << endl;
#endif
- }
+ }
}
catch(exception& e)
{
@@ -108,15 +108,15 @@
{
cout << "Unknown exception has occured" << endl;
}
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
void sig_handler(int sig) {
- signal(sig, sig_handler);
+ signal(sig, sig_handler);
cout << "SIGNAL RECEIVED " << sig << endl;
- exit(1);
+ exit(1);
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSLClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSLClient.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSLClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSLClient.cpp Thu Apr 27 20:03:51 2006
@@ -29,26 +29,26 @@
int main(int argc, char* argv[])
{
char endpoint[256];
- const char* sslkeyhome = 0;
+ const char* sslkeyhome = 0;
char keylocation[255];
const char* url="https://localhost:80/axis/Calculator";
- signal(SIGILL, sig_handler);
- signal(SIGABRT, sig_handler);
- signal(SIGSEGV, sig_handler);
- //signal(SIGQUIT, sig_handler);
- //signal(SIGBUS, sig_handler);
- signal(SIGFPE, sig_handler);
+ signal(SIGILL, sig_handler);
+ signal(SIGABRT, sig_handler);
+ signal(SIGSEGV, sig_handler);
+ //signal(SIGQUIT, sig_handler);
+ //signal(SIGBUS, sig_handler);
+ signal(SIGFPE, sig_handler);
int iResult;
url = argv[1];
- bool bSuccess = false;
- int iRetryIterationCount = 3;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- do
- {
+ do
+ {
try
{
sprintf(endpoint, "%s", url);
@@ -58,7 +58,7 @@
if (!sslkeyhome)
{
- cout << "SSL_KEYS_HOME not set" << endl;
+ cout << "SSL_KEYS_HOME not set" << endl;
return 1;
}
@@ -67,28 +67,28 @@
iResult = ws.add(2,3);
cout << iResult << endl;
- bSuccess = true;
+ bSuccess = true;
}
catch(AxisException& e)
{
- bool bSilent = false;
+ bool bSilent = false;
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- cout << "Exception : " << e.what() << endl;
- }
+ {
+ cout << "Exception : " << e.what() << endl;
+ }
}
catch(exception& e)
{
@@ -98,15 +98,15 @@
{
cout << "Unknown exception has occured" << endl;
}
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
void sig_handler(int sig) {
- signal(sig, sig_handler);
+ signal(sig, sig_handler);
cout << "SIGNAL RECEIVED " << sig << endl;
- exit(1);
+ exit(1);
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSLConfigFileClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSLConfigFileClient.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSLConfigFileClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDocSSLConfigFileClient.cpp Thu Apr 27 20:03:51 2006
@@ -29,27 +29,27 @@
int main(int argc, char* argv[])
{
char endpoint[256];
- const char* sslkeyhome = 0;
+ const char* sslkeyhome = 0;
char keylocation[255];
const char* url="https://localhost:80/axis/Calculator";
- signal(SIGILL, sig_handler);
- signal(SIGABRT, sig_handler);
- signal(SIGSEGV, sig_handler);
- //signal(SIGQUIT, sig_handler);
- //signal(SIGBUS, sig_handler);
- signal(SIGFPE, sig_handler);
+ signal(SIGILL, sig_handler);
+ signal(SIGABRT, sig_handler);
+ signal(SIGSEGV, sig_handler);
+ //signal(SIGQUIT, sig_handler);
+ //signal(SIGBUS, sig_handler);
+ signal(SIGFPE, sig_handler);
int iResult;
url = argv[1];
- bool bSuccess = false;
- int iRetryIterationCount = 3;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- do
- {
+ do
+ {
try
{
sprintf(endpoint, "%s", url);
@@ -58,28 +58,28 @@
iResult = ws.add(2,3);
cout << iResult << endl;
- bSuccess = true;
+ bSuccess = true;
}
catch(AxisException& e)
{
- bool bSilent = false;
+ bool bSilent = false;
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- cout << "Exception : " << e.what() << endl;
- }
+ {
+ cout << "Exception : " << e.what() << endl;
+ }
}
catch(exception& e)
{
@@ -89,15 +89,15 @@
{
cout << "Unknown exception has occured" << endl;
}
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
return 0;
}
void sig_handler(int sig) {
- signal(sig, sig_handler);
+ signal(sig, sig_handler);
cout << "SIGNAL RECEIVED " << sig << endl;
- exit(1);
+ exit(1);
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDoc_TTestClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDoc_TTestClient.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDoc_TTestClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CalculatorDoc_TTestClient.cpp Thu Apr 27 20:03:51 2006
@@ -47,155 +47,155 @@
In linux it is void * */
RETTYPE ThreadFunc(ARGTYPE Param)
{
- /*Type casting the url to char * */
- char * p = (char *) Param;
- char endpoint[256];
- char * url="http://puppet.in.ibm.com:9060/Calculator/services/Calculator";
-
- if( p != NULL)
- {
- url = p;
- }
-
- int iResult;
- bool bSuccess = false;
- int iRetryIterationCount = 3;
-
- do
- {
- try
- {
- sprintf( endpoint, "%s", url);
-
- Calculator ws( endpoint);
-
- iResult = ws.add( 3, 2);
-
- cout << iResult;
-
- 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 << "Exception : " << e.what() << endl;
- }
- }
- catch( exception& e)
- {
- cout << "Unknown exception has occured" << endl;
- }
- catch( ...)
- {
- cout << "Unknown exception has occured" << endl;
- }
-
- iRetryIterationCount--;
-
- } while( iRetryIterationCount > 0 && !bSuccess);
-
- #ifndef WIN32
- pthread_exit( 0);
- #endif
+ /*Type casting the url to char * */
+ char * p = (char *) Param;
+ char endpoint[256];
+ char * url="http://puppet.in.ibm.com:9060/Calculator/services/Calculator";
+
+ if( p != NULL)
+ {
+ url = p;
+ }
+
+ int iResult;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
+
+ do
+ {
+ try
+ {
+ sprintf( endpoint, "%s", url);
+
+ Calculator ws( endpoint);
+
+ iResult = ws.add( 3, 2);
+
+ cout << iResult;
+
+ 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 << "Exception : " << e.what() << endl;
+ }
+ }
+ catch( exception& e)
+ {
+ cout << "Unknown exception has occured" << endl;
+ }
+ catch( ...)
+ {
+ cout << "Unknown exception has occured" << endl;
+ }
+
+ iRetryIterationCount--;
+
+ } while( iRetryIterationCount > 0 && !bSuccess);
+
+ #ifndef WIN32
+ pthread_exit( 0);
+ #endif
- return 0;
+ return 0;
}
//-----------------------------------------------------------------------------
int main( int argc, char * argv[])
{
- Axis::initialize( false);
+ Axis::initialize( false);
- try
- {
- int i;
+ try
+ {
+ int i;
#ifdef WIN32
- // Windows specific code comes here
- HANDLE hThread[NUM_THREADS];
+ // Windows specific code comes here
+ HANDLE hThread[NUM_THREADS];
- for( i = 0; i < NUM_THREADS; i++)
- {
- DWORD dwThreadId;
- //LPVOID dwThrdParam = LPVOID(argv[1]);
-
- hThread[i] = CreateThread( NULL, // no security attributes
- 0, // use default stack size
- ThreadFunc, // thread function
- LPVOID(argv[1]), // argument to thread function
- 0,
- &dwThreadId); // returns the thread identifier
-
- if( hThread[i] == NULL)
- {
- cout << "Thread creation Failed";
- }
- }
- // Waiting for threads to terminate
- WaitForMultipleObjects( NUM_THREADS, hThread, true, INFINITE);
-
- for( i = 0; i < NUM_THREADS; i++)
- {
- CloseHandle( hThread[i]);
- }
-#else
- pthread_t thread[NUM_THREADS];
- pthread_attr_t attr;
- int rc;
- int t;
- void * status;
-
- // Initialize and set thread detached attribute
- pthread_attr_init( &attr);
- pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_JOINABLE);
-
- for( t = 0; t < NUM_THREADS; t++)
- {
- //Creating threads
- rc = pthread_create( &thread[t], &attr, ThreadFunc, (void *) argv[1]);
-
- if( rc)
- {
- cout << "Thread Creation Failed";
- }
- }
-
- //Free attribute and wait for the other threads
- pthread_attr_destroy( &attr);
-
- // Wait for the threads to terminate
- for( t = 0; t < NUM_THREADS; t++)
- {
- rc = pthread_join( thread[t], &status);
-
- if( rc)
- {
- cout << "ERROR from pthread_join()" << endl;
- }
- }
+ for( i = 0; i < NUM_THREADS; i++)
+ {
+ DWORD dwThreadId;
+ //LPVOID dwThrdParam = LPVOID(argv[1]);
+
+ hThread[i] = CreateThread( NULL, // no security attributes
+ 0, // use default stack size
+ ThreadFunc, // thread function
+ LPVOID(argv[1]), // argument to thread function
+ 0,
+ &dwThreadId); // returns the thread identifier
+
+ if( hThread[i] == NULL)
+ {
+ cout << "Thread creation Failed";
+ }
+ }
+ // Waiting for threads to terminate
+ WaitForMultipleObjects( NUM_THREADS, hThread, true, INFINITE);
+
+ for( i = 0; i < NUM_THREADS; i++)
+ {
+ CloseHandle( hThread[i]);
+ }
+#else
+ pthread_t thread[NUM_THREADS];
+ pthread_attr_t attr;
+ int rc;
+ int t;
+ void * status;
+
+ // Initialize and set thread detached attribute
+ pthread_attr_init( &attr);
+ pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_JOINABLE);
+
+ for( t = 0; t < NUM_THREADS; t++)
+ {
+ //Creating threads
+ rc = pthread_create( &thread[t], &attr, ThreadFunc, (void *) argv[1]);
+
+ if( rc)
+ {
+ cout << "Thread Creation Failed";
+ }
+ }
+
+ //Free attribute and wait for the other threads
+ pthread_attr_destroy( &attr);
+
+ // Wait for the threads to terminate
+ for( t = 0; t < NUM_THREADS; t++)
+ {
+ rc = pthread_join( thread[t], &status);
+
+ if( rc)
+ {
+ cout << "ERROR from pthread_join()" << endl;
+ }
+ }
#endif
- }
- catch( exception &e)
- {
- cout << e.what();
- }
+ }
+ catch( exception &e)
+ {
+ cout << e.what();
+ }
- cout << endl << "----------------------------------TEST COMPLETE--------------------------------" << endl;
+ cout << endl << "----------------------------------TEST COMPLETE--------------------------------" << endl;
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CombinedAllTestClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CombinedAllTestClient.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CombinedAllTestClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CombinedAllTestClient.cpp Thu Apr 27 20:03:51 2006
@@ -12,10 +12,10 @@
usage (char *programName, char *defaultURL)
{
cout << "\nUsage:\n"
- << programName << " [-? | service_url] " << endl
- << " -? Show this help.\n"
- << " service_url URL of the service.\n"
- << " Default service URL is assumed to be " << defaultURL << endl;
+ << programName << " [-? | service_url] " << endl
+ << " -? Show this help.\n"
+ << " service_url URL of the service.\n"
+ << " Default service URL is assumed to be " << defaultURL << endl;
}
int
@@ -24,101 +24,101 @@
char endpoint[256];
sprintf (endpoint, "%s", WSDL_DEFAULT_ENDPOINT);
- int returnValue = 1; // Assume Failure
+ int returnValue = 1; // Assume Failure
if (argc > 1)
{
- // Watch for special case help request
- if (!strncmp (argv[1], "-", 1)) // Check for - only so that it works for
- //-?, -h or --help; -anything
- {
- usage (argv[0], endpoint);
- return 2;
- }
- sprintf (endpoint, argv[1]);
- }
+ // Watch for special case help request
+ if (!strncmp (argv[1], "-", 1)) // Check for - only so that it works for
+ //-?, -h or --help; -anything
+ {
+ usage (argv[0], endpoint);
+ return 2;
+ }
+ sprintf (endpoint, argv[1]);
+ }
- bool bSuccess = false;
+ bool bSuccess = false;
int iRetryIterationCount = 3;
- do
+ do
{
- try
- {
- AllTestSoap ws (endpoint, APTHTTP1_1);
- AllComplexType* inParam = new AllComplexType();
-
- inParam->NonAllIntValue = 3;
- inParam->Value0 = new int;
- *(inParam->Value0) = 5;
- inParam->Value2 = "TINTIN";
- inParam->NonAllStringValue = "HELLO";
-
- printf("\nSending.................");
- printf("\nNonAllIntValue = %d",inParam->NonAllIntValue);
- printf("\nAllValue0 = %d",*(inParam->Value0));
- printf("\nAllValue2 = %s",inParam->Value2);
- printf("\nNonAllStringValue = %s",inParam->NonAllStringValue);
-
- ws.setTransportProperty("SOAPAction" , "CombinedAll#echoAll");
- AllComplexType* outParam = ws.echoAll(inParam);
-
- if (outParam != NULL)
- {
- printf("\n\nReceived................");
- printf("\nNonAllIntValue = %d",outParam->NonAllIntValue);
- printf("\nAllValue0 = %d",*(outParam->Value0));
- printf("\nAllValue2 = %s",outParam->Value2);
- printf("\nNonAllStringValue = %s",outParam->NonAllStringValue);
- printf("\n\nSuccessfull\n");
- }
- else
- printf("\nFault\n");
-
- bSuccess = true;
- delete inParam;
- delete outParam;
- }
- catch (AxisException & e)
- {
- bool bSilent = false;
-
- if (e.getExceptionCode () ==
- CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if (iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
-
- if (!bSilent)
- {
- printf ("%s\n", e.what ());
- }
- }
- catch (exception & e)
- {
- printf ("%s\n", e.what ());
- }
- catch (...)
- {
- cout << "Unknown Exception occured." << endl;
- }
+ try
+ {
+ AllTestSoap ws (endpoint, APTHTTP1_1);
+ AllComplexType* inParam = new AllComplexType();
+
+ inParam->NonAllIntValue = 3;
+ inParam->Value0 = new int;
+ *(inParam->Value0) = 5;
+ inParam->Value2 = "TINTIN";
+ inParam->NonAllStringValue = "HELLO";
+
+ printf("\nSending.................");
+ printf("\nNonAllIntValue = %d",inParam->NonAllIntValue);
+ printf("\nAllValue0 = %d",*(inParam->Value0));
+ printf("\nAllValue2 = %s",inParam->Value2);
+ printf("\nNonAllStringValue = %s",inParam->NonAllStringValue);
+
+ ws.setTransportProperty("SOAPAction" , "CombinedAll#echoAll");
+ AllComplexType* outParam = ws.echoAll(inParam);
+
+ if (outParam != NULL)
+ {
+ printf("\n\nReceived................");
+ printf("\nNonAllIntValue = %d",outParam->NonAllIntValue);
+ printf("\nAllValue0 = %d",*(outParam->Value0));
+ printf("\nAllValue2 = %s",outParam->Value2);
+ printf("\nNonAllStringValue = %s",outParam->NonAllStringValue);
+ printf("\n\nSuccessfull\n");
+ }
+ else
+ printf("\nFault\n");
+
+ bSuccess = true;
+ delete inParam;
+ delete outParam;
+ }
+ catch (AxisException & e)
+ {
+ bool bSilent = false;
+
+ if (e.getExceptionCode () ==
+ CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if (iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
+
+ if (!bSilent)
+ {
+ printf ("%s\n", e.what ());
+ }
+ }
+ catch (exception & e)
+ {
+ printf ("%s\n", e.what ());
+ }
+ catch (...)
+ {
+ cout << "Unknown Exception occured." << endl;
+ }
- iRetryIterationCount--;
+ iRetryIterationCount--;
- }while (iRetryIterationCount > 0 && !bSuccess);
+ }while (iRetryIterationCount > 0 && !bSuccess);
fflush(stdout); // Need to flush output from printf's before cout
cout <<
- "---------------------- TEST COMPLETE -----------------------------"
- << endl;
+ "---------------------- TEST COMPLETE -----------------------------"
+ << endl;
- return returnValue;
+ return returnValue;
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CombinedChoiceClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CombinedChoiceClient.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CombinedChoiceClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/CombinedChoiceClient.cpp Thu Apr 27 20:03:51 2006
@@ -5,46 +5,46 @@
int main(int argc, char *argv[])
{
-
- try
- {
- const char* url="http://localhost:80/axis/CombinedChoice";
- ChoiceComplexType* Value0=new ChoiceComplexType();
- ChoiceComplexType* Value1;
- Value0->NonChoiceIntValue = 5;
- Value0->IntValue = new int;
- *(Value0->IntValue) = 5;
- Value0->StringValue = NULL;
+
+ try
+ {
+ const char* url="http://localhost:80/axis/CombinedChoice";
+ ChoiceComplexType* Value0=new ChoiceComplexType();
+ ChoiceComplexType* Value1;
+ Value0->NonChoiceIntValue = 5;
+ Value0->IntValue = new int;
+ *(Value0->IntValue) = 5;
+ Value0->StringValue = NULL;
Value0->NonChoiceStringValue = "NonChoiceStringValue";
- if ( argc > 1 )
+ if ( argc > 1 )
url = argv[1];
- ChoiceTestSoap ws(url);
+ ChoiceTestSoap ws(url);
- cout<< "Calling the Service..."<<endl;
-
- Value1=ws.echoChoice(Value0);
+ cout<< "Calling the Service..."<<endl;
+
+ Value1=ws.echoChoice(Value0);
- cout<<"Value1->NonChoiceIntValue = "<<Value1->NonChoiceIntValue<<endl;
- cout<<"Value1->IntValue = "<<*(Value1->IntValue)<<endl;
- cout<<"Value1->NonChoiceStringValue = "<<Value1->NonChoiceStringValue<<endl;
+ cout<<"Value1->NonChoiceIntValue = "<<Value1->NonChoiceIntValue<<endl;
+ cout<<"Value1->IntValue = "<<*(Value1->IntValue)<<endl;
+ cout<<"Value1->NonChoiceStringValue = "<<Value1->NonChoiceStringValue<<endl;
- }catch (AxisException & e)
+ }catch (AxisException & e)
{
- printf ("Exception : %s\n", e.what ());
+ printf ("Exception : %s\n", e.what ());
}
catch (exception & e)
{
- printf ("Unknown exception has occured\n");
+ printf ("Unknown exception has occured\n");
}
catch (...)
{
- printf ("Unknown exception has occured\n");
+ printf ("Unknown exception has occured\n");
}
- return 0;
+ return 0;
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexListsClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexListsClient.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexListsClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexListsClient.cpp Thu Apr 27 20:03:51 2006
@@ -56,38 +56,38 @@
cout << "ale->errorcode is NULL" << endl;
}
- if (ale->attrlist_Ref != NULL)
- {
- int outputSize =0;
- namepair ** output =ale->attrlist_Ref->getitem()->get(outputSize);
- //if (ale->attrlist_Ref->item.m_Array[0] != NULL)
- if (output[0] != NULL)
- {
- if (output[0]->name != NULL)
- {
- cout << output[0]->name << endl;
- }
- else
- {
- cout << "ale->attrlist_Ref->item.m_Array[0]->name is NULL" << endl;
- }
-
- if (output[0]->m_list_Ref != NULL)
- {
- outputSize = 0;
- const xsd__string * outString = output[0]->m_list_Ref->item->get(outputSize);
- if (outString[0]
- && *(outString[0]))
- {
- cout << outString[0] << endl;
- }
- else
- {
- cout << "ale->attrlist_Ref->item.m_Array[0]->m_list_Ref->item.m_Array[0]" << endl;
- }
- }
- }
- }
+ if (ale->attrlist_Ref != NULL)
+ {
+ int outputSize =0;
+ namepair ** output =ale->attrlist_Ref->getitem()->get(outputSize);
+ //if (ale->attrlist_Ref->item.m_Array[0] != NULL)
+ if (output[0] != NULL)
+ {
+ if (output[0]->name != NULL)
+ {
+ cout << output[0]->name << endl;
+ }
+ else
+ {
+ cout << "ale->attrlist_Ref->item.m_Array[0]->name is NULL" << endl;
+ }
+
+ if (output[0]->m_list_Ref != NULL)
+ {
+ outputSize = 0;
+ const xsd__string * outString = output[0]->m_list_Ref->item->get(outputSize);
+ if (outString[0]
+ && *(outString[0]))
+ {
+ cout << outString[0] << endl;
+ }
+ else
+ {
+ cout << "ale->attrlist_Ref->item.m_Array[0]->m_list_Ref->item.m_Array[0]" << endl;
+ }
+ }
+ }
+ }
}
else
{
@@ -97,129 +97,129 @@
int main(int argc, char* argv[])
{
- char endpoint[256];
- const char* url="http://localhost:80/axis/ComplexLists";
+ char endpoint[256];
+ const char* url="http://localhost:80/axis/ComplexLists";
- if(argc>1) url = argv[1];
+ if(argc>1) url = argv[1];
- bool bSuccess = false;
- int iRetryIterationCount = 3;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- do
- {
- try
- {
- sprintf(endpoint, "%s", url);
- ComplexLists* ws = new ComplexLists(endpoint);
-
- m_list ml; // xsd__string array
- m_list *mlnp = new m_list; // used for 1st namepair item of array
- m_list *mlnp2 = new m_list; // used for 2nd namepair item of array
- attrlist al; // attrlist has namepair array
- namepair *np1 = new namepair; // namepair has m_list and name
- namepair *np2 = new namepair;
- namepair_Array npArr;
-
- // m_list arg to numtilist
- xsd__string * array = new xsd__string[ARRAYSIZE];
- NEWCOPY(array[0], "never odd or even"); // should be returned in errortext element of attrlisterr
- NEWCOPY(array[1], "any data string"); // add data
- ml.item->set(array,ARRAYSIZE);
- delete array[0];
- delete array[1];
- delete [] array;
-
- // To set into namepair item of namepair array of attrlist arg of multilist
- xsd__string * array1 = new xsd__string[ARRAYSIZE];
- NEWCOPY(array1[0], "Apache");
- NEWCOPY(array1[1], "Axis C++");
- mlnp->item->set(array1,ARRAYSIZE);
- delete array1[0];
- delete array1[1];
- delete [] array1;
-
- // To set into namepair item of namepair array of attrlist arg of multilist
- xsd__string * array2 = new xsd__string[ARRAYSIZE];
- NEWCOPY(array2[0], "Test");
- NEWCOPY(array2[1], "Complex");
- mlnp2->item->set(array2,ARRAYSIZE);
- delete array2[0];
- delete array2[1];
- delete [] array2;
-
- // set first namepair item to put into array
- np1->m_list_Ref = mlnp;
- np1->setname("namepair1");
-
- // set second namepair item to put into array
- np2->m_list_Ref = mlnp2;
- np2->setname("namepair2");
-
- // create a namepair array to add into attrlist
- namepair ** nArray = new namepair *[ARRAYSIZE];
- nArray[0]=np1;
- nArray[1]=np2;
- npArr.set(nArray,ARRAYSIZE);
- delete nArray[0];
- delete nArray[1];
- delete [] nArray;
+ do
+ {
+ try
+ {
+ sprintf(endpoint, "%s", url);
+ ComplexLists* ws = new ComplexLists(endpoint);
+
+ m_list ml; // xsd__string array
+ m_list *mlnp = new m_list; // used for 1st namepair item of array
+ m_list *mlnp2 = new m_list; // used for 2nd namepair item of array
+ attrlist al; // attrlist has namepair array
+ namepair *np1 = new namepair; // namepair has m_list and name
+ namepair *np2 = new namepair;
+ namepair_Array npArr;
+
+ // m_list arg to numtilist
+ xsd__string * array = new xsd__string[ARRAYSIZE];
+ NEWCOPY(array[0], "never odd or even"); // should be returned in errortext element of attrlisterr
+ NEWCOPY(array[1], "any data string"); // add data
+ ml.item->set(array,ARRAYSIZE);
+ delete array[0];
+ delete array[1];
+ delete [] array;
+
+ // To set into namepair item of namepair array of attrlist arg of multilist
+ xsd__string * array1 = new xsd__string[ARRAYSIZE];
+ NEWCOPY(array1[0], "Apache");
+ NEWCOPY(array1[1], "Axis C++");
+ mlnp->item->set(array1,ARRAYSIZE);
+ delete array1[0];
+ delete array1[1];
+ delete [] array1;
+
+ // To set into namepair item of namepair array of attrlist arg of multilist
+ xsd__string * array2 = new xsd__string[ARRAYSIZE];
+ NEWCOPY(array2[0], "Test");
+ NEWCOPY(array2[1], "Complex");
+ mlnp2->item->set(array2,ARRAYSIZE);
+ delete array2[0];
+ delete array2[1];
+ delete [] array2;
+
+ // set first namepair item to put into array
+ np1->m_list_Ref = mlnp;
+ np1->setname("namepair1");
+
+ // set second namepair item to put into array
+ np2->m_list_Ref = mlnp2;
+ np2->setname("namepair2");
+
+ // create a namepair array to add into attrlist
+ namepair ** nArray = new namepair *[ARRAYSIZE];
+ nArray[0]=np1;
+ nArray[1]=np2;
+ npArr.set(nArray,ARRAYSIZE);
+ delete nArray[0];
+ delete nArray[1];
+ delete [] nArray;
- // set attrlist argument
- al.setitem(&npArr);
+ // set attrlist argument
+ al.setitem(&npArr);
- attrlisterr* ale = ws->multilist(&ml, &al);
+ attrlisterr* ale = ws->multilist(&ml, &al);
printResponse(ale);
- delete ale;
+ delete ale;
- ale = ws->multilist((m_list*)NULL, &al);
+ ale = ws->multilist((m_list*)NULL, &al);
printResponse(ale);
- delete ale;
+ delete ale;
- // Have nil elements in response
- ale = ws->multilistnil((m_list*)NULL, &al);
+ // Have nil elements in response
+ ale = ws->multilistnil((m_list*)NULL, &al);
printResponse(ale);
- delete ale;
+ delete ale;
- ale = ws->complexlist(&al, "hoohah!", &al);
+ ale = ws->complexlist(&al, "hoohah!", &al);
printResponse(ale);
- delete ale;
+ delete ale;
- delete ws;
- bSuccess = true;
- }
- catch(AxisException& e)
- {
- bool bSilent = false;
-
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ delete ws;
+ 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 << "Exception : " << e.what() << endl;
- }
- }
- catch(exception& e)
- {
- cout << "Unknown exception has occured : " << e.what() << endl;
- }
- catch(...)
- {
- cout << "Unknown exception has occured" << endl;
- }
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
- cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
-
- return 0;
+ {
+ cout << "Exception : " << e.what() << endl;
+ }
+ }
+ catch(exception& e)
+ {
+ cout << "Unknown exception has occured : " << e.what() << endl;
+ }
+ catch(...)
+ {
+ cout << "Unknown exception has occured" << endl;
+ }
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
+ cout<< "---------------------- TEST COMPLETE -----------------------------"<< endl;
+
+ return 0;
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll1Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll1Client.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll1Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll1Client.cpp Thu Apr 27 20:03:51 2006
@@ -32,105 +32,105 @@
int main(int argc, char* argv[])
{
-
+
operations *ws;
char *endpoint = WSDL_DEFAULT_ENDPOINT;
bool endpoint_set = false;
int returnValue = 1; // Assume Failure
- endpoint_set = parse_args_for_endpoint(&argc, argv, &endpoint);
+ 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 operations(endpoint, APTHTTP1_1);
- free(endpoint);
- endpoint_set = false;
- } else
- ws = new operations();
-
- aRecord* input=new aRecord();
-
- xsd__int* fieldone=new xsd__int();
- *fieldone=12345;
- input->field1=fieldone;
-
- input->field2 = "I'm still here!";
-
- xsd__byte* fieldthree=new xsd__byte();
- *fieldthree=65;
- input->field3=fieldthree;
-
- xsd__boolean result;
- result = ws->myOperation(input);
-
- if (result!= NULL)
- cout<< "Result= " << result << endl;
- else
- cout << "result is NULL" << endl;
-
- bSuccess = true;
-
- returnValue = 0; // Success
-
- } 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(exception& exception){
-
- cout << "Exception on clean up of ws : " << exception.what()<<endl;
-
- } catch(...) {
-
- cout << "Unknown Exception occured" << endl;
- }
+ do
+ {
+ try {
+
+ if(endpoint_set) {
+ ws = new operations(endpoint, APTHTTP1_1);
+ free(endpoint);
+ endpoint_set = false;
+ } else
+ ws = new operations();
+
+ aRecord* input=new aRecord();
+
+ xsd__int* fieldone=new xsd__int();
+ *fieldone=12345;
+ input->field1=fieldone;
+
+ input->field2 = "I'm still here!";
+
+ xsd__byte* fieldthree=new xsd__byte();
+ *fieldthree=65;
+ input->field3=fieldthree;
+
+ xsd__boolean result;
+ result = ws->myOperation(input);
+
+ if (result!= NULL)
+ cout<< "Result= " << result << endl;
+ else
+ cout << "result is NULL" << endl;
+
+ bSuccess = true;
+
+ returnValue = 0; // Success
+
+ } 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(exception& exception){
+
+ cout << "Exception on clean up of ws : " << exception.what()<<endl;
+
+ } catch(...) {
+
+ cout << "Unknown Exception occured" << endl;
+ }
// Samisa : clean up memory allocated for stub
- 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);
+ 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;
+ cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
- return returnValue;
+ return returnValue;
}
/* Spin through args list and check for -e -p and -s options.
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll2Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll2Client.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll2Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll2Client.cpp Thu Apr 27 20:03:51 2006
@@ -40,11 +40,11 @@
endpoint_set = parse_args_for_endpoint(&argc, argv, &endpoint);
- bool bSuccess = false;
- int iRetryIterationCount = 3;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- do
- {
+ do
+ {
try {
if(endpoint_set) {
ws = new operations(endpoint, APTHTTP1_1);
@@ -61,32 +61,32 @@
result = ws->myOperation(input);
cout << "Result field1 is = " << result->field1 << endl;
- cout << "Result field2 is = " << result->field2 << endl;
- cout << "Result field3 is = " << result->field3 << endl;
+ cout << "Result field2 is = " << result->field2 << endl;
+ cout << "Result field3 is = " << result->field3 << endl;
- bSuccess = true;
+ bSuccess = true;
returnValue = 0; // Success
} catch(AxisException &e) {
- bool bSilent = false;
+ bool bSilent = false;
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ 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;
}
@@ -94,18 +94,18 @@
// Samisa : clean up memory allocated for stub
try
{
- delete ws;
+ delete ws;
}
catch(exception& exception)
{
- cout << "Exception on clean up of ws : " << exception.what()<<endl;
+ cout << "Exception on clean up of ws : " << exception.what()<<endl;
}
catch(...)
{
- cout << "Unknown exception on clean up of ws : " << endl;
+ cout << "Unknown exception on clean up of ws : " << endl;
}
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
if(endpoint_set)
free(endpoint);
cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAllClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAllClient.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAllClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAllClient.cpp Thu Apr 27 20:03:51 2006
@@ -40,11 +40,11 @@
endpoint_set = parse_args_for_endpoint(&argc, argv, &endpoint);
- bool bSuccess = false;
- int iRetryIterationCount = 3;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- do
- {
+ do
+ {
try {
if(endpoint_set) {
ws = new operations(endpoint, APTHTTP1_1);
@@ -62,29 +62,29 @@
cout << "Result " << result << endl;
- bSuccess = true;
+ bSuccess = true;
returnValue = 0; // Success
} catch(AxisException &e) {
- bool bSilent = false;
+ bool bSilent = false;
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ 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;
}
@@ -92,18 +92,18 @@
// Samisa : clean up memory allocated for stub
try
{
- delete ws;
+ delete ws;
}
catch(exception& exception)
{
- cout << "Exception on clean up of ws : " << exception.what()<<endl;
+ cout << "Exception on clean up of ws : " << exception.what()<<endl;
}
catch(...)
{
- cout << "Unknown exception on clean up of ws : " << endl;
+ cout << "Unknown exception on clean up of ws : " << endl;
}
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
if(endpoint_set)
free(endpoint);
cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAllComplexChildClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAllComplexChildClient.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAllComplexChildClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAllComplexChildClient.cpp Thu Apr 27 20:03:51 2006
@@ -40,11 +40,11 @@
endpoint_set = parse_args_for_endpoint(&argc, argv, &endpoint);
- bool bSuccess = false;
- int iRetryIterationCount = 3;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- do
- {
+ do
+ {
try {
if(endpoint_set) {
ws = new XSD_byte(endpoint);
@@ -53,9 +53,9 @@
} else
ws = new XSD_byte();
-
- oneSimpleComplexType* onesimplecomplextype = new oneSimpleComplexType();
- onesimplecomplextype->onecomplexTypeElement=xsd__byte(65);
+
+ oneSimpleComplexType* onesimplecomplextype = new oneSimpleComplexType();
+ onesimplecomplextype->onecomplexTypeElement=xsd__byte(65);
SimpleComplexType* input = new SimpleComplexType();
@@ -72,32 +72,32 @@
if (theByte == 0x41) theByte = 'A';
#endif
cout << "Result field1 is = " << theByte << endl;
- cout << "Result field2 is = " << result->field2 << endl;
- cout << "Result field3 is = " << *(result->field3) << endl;
+ cout << "Result field2 is = " << result->field2 << endl;
+ cout << "Result field3 is = " << *(result->field3) << endl;
- bSuccess = true;
+ bSuccess = true;
returnValue = 0; // Success
} catch(AxisException &e) {
- bool bSilent = false;
+ bool bSilent = false;
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ 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;
}
@@ -105,18 +105,18 @@
// Samisa : clean up memory allocated for stub
try
{
- delete ws;
+ delete ws;
}
catch(exception& exception)
{
- cout << "Exception on clean up of ws : " << exception.what()<<endl;
+ cout << "Exception on clean up of ws : " << exception.what()<<endl;
}
catch(...)
{
- cout << "Unknown exception on clean up of ws : " << endl;
+ cout << "Unknown exception on clean up of ws : " << endl;
}
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
if(endpoint_set)
free(endpoint);
cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll_TTestClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll_TTestClient.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll_TTestClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeAll_TTestClient.cpp Thu Apr 27 20:03:51 2006
@@ -54,47 +54,47 @@
if(p!=NULL)
url=p;
int iResult;
- bool bSuccess = false;
- int iRetryIterationCount = 3;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- do
- {
+ do
+ {
try
{
sprintf(endpoint, "%s", url);
- operations *ws=new operations(endpoint, APTHTTP1_1);
- aRecord* input = new aRecord();
- input->field1 = "Hello World!";
- input->field2 = "I'm still here!";
- input->field3 = "Now I go!";
- xsd__boolean result = (xsd__boolean)0;
- result = ws->myOperation(input);
- cout << result;
- free(ws);
- free(input);
- bSuccess = true;
+ operations *ws=new operations(endpoint, APTHTTP1_1);
+ aRecord* input = new aRecord();
+ input->field1 = "Hello World!";
+ input->field2 = "I'm still here!";
+ input->field3 = "Now I go!";
+ xsd__boolean result = (xsd__boolean)0;
+ result = ws->myOperation(input);
+ cout << result;
+ free(ws);
+ free(input);
+ bSuccess = true;
}
catch(AxisException& e)
{
- bool bSilent = false;
+ bool bSilent = false;
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+ {
+ if( iRetryIterationCount > 0)
+ {
+ bSilent = true;
+ }
+ }
+ else
+ {
+ iRetryIterationCount = 0;
+ }
if( !bSilent)
- {
- cout << "Exception : " << e.what() << endl;
- }
+ {
+ cout << "Exception : " << e.what() << endl;
+ }
}
catch(exception& e)
{
@@ -104,8 +104,8 @@
{
cout << "Unknown exception has occured" << endl;
}
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
#ifndef WIN32
pthread_exit(0);
#endif
@@ -118,60 +118,60 @@
int main(int argc, char *argv[])
{
Axis::initialize(false);
- try{
- int i;
- #ifdef WIN32
- /*Windows specific code comes here */
- HANDLE hThread[NUM_THREADS];
- for(i=0;i<NUM_THREADS;i++){
- DWORD dwThreadId;
- //LPVOID dwThrdParam = LPVOID(argv[1]);
- hThread[i] = CreateThread(
- NULL, // no security attributes
- 0, // use default stack size
- ThreadFunc, // thread function
- LPVOID(argv[1]), // argument to thread function
- 0,
- &dwThreadId); // returns the thread identifier
-
- if (hThread[i] == NULL)
- {
- cout<<"Thread creation Failed";
- }
- }
- /* Waiting for threads to terminate */
- WaitForMultipleObjects(NUM_THREADS,hThread,true, INFINITE);
- for(i=0;i<NUM_THREADS;i++)
- CloseHandle( hThread[i] );
-
- #else
- pthread_t thread[NUM_THREADS];
- pthread_attr_t attr;
- int rc, t;
+ try{
+ int i;
+ #ifdef WIN32
+ /*Windows specific code comes here */
+ HANDLE hThread[NUM_THREADS];
+ for(i=0;i<NUM_THREADS;i++){
+ DWORD dwThreadId;
+ //LPVOID dwThrdParam = LPVOID(argv[1]);
+ hThread[i] = CreateThread(
+ NULL, // no security attributes
+ 0, // use default stack size
+ ThreadFunc, // thread function
+ LPVOID(argv[1]), // argument to thread function
+ 0,
+ &dwThreadId); // returns the thread identifier
+
+ if (hThread[i] == NULL)
+ {
+ cout<<"Thread creation Failed";
+ }
+ }
+ /* Waiting for threads to terminate */
+ WaitForMultipleObjects(NUM_THREADS,hThread,true, INFINITE);
+ for(i=0;i<NUM_THREADS;i++)
+ CloseHandle( hThread[i] );
+
+ #else
+ pthread_t thread[NUM_THREADS];
+ pthread_attr_t attr;
+ int rc, t;
void *status;
- // Initialize and set thread detached attribute
- pthread_attr_init(&attr);
- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
- for (t = 0; t < NUM_THREADS; t++)
- {
- /*Creating threads */
- rc = pthread_create(&thread[t], &attr, ThreadFunc,(void *)argv[1]);
- if (rc)
- {
- cout<<"Thread Creation Failed";
- }
- }
- //Free attribute and wait for the other threads
- pthread_attr_destroy(&attr);
- /* Wait for the threads to terminate */
- for(t=0;t<NUM_THREADS;t++){
- rc = pthread_join(thread[t], &status);
- if (rc)
- {
- cout<<"ERROR from pthread_join()"<<endl;
- }
- }
- #endif
+ // Initialize and set thread detached attribute
+ pthread_attr_init(&attr);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+ for (t = 0; t < NUM_THREADS; t++)
+ {
+ /*Creating threads */
+ rc = pthread_create(&thread[t], &attr, ThreadFunc,(void *)argv[1]);
+ if (rc)
+ {
+ cout<<"Thread Creation Failed";
+ }
+ }
+ //Free attribute and wait for the other threads
+ pthread_attr_destroy(&attr);
+ /* Wait for the threads to terminate */
+ for(t=0;t<NUM_THREADS;t++){
+ rc = pthread_join(thread[t], &status);
+ if (rc)
+ {
+ cout<<"ERROR from pthread_join()"<<endl;
+ }
+ }
+ #endif
}catch(exception &e){
cout<< e.what();
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoice1Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoice1Client.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoice1Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoice1Client.cpp Thu Apr 27 20:03:51 2006
@@ -32,7 +32,7 @@
int main(int argc, char* argv[])
{
-
+
operations *ws;
char *endpoint = WSDL_DEFAULT_ENDPOINT;
@@ -41,87 +41,87 @@
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 operations(endpoint, APTHTTP1_1);
- free(endpoint);
- endpoint_set = false;
- } else
- ws = new operations();
-
- aRecord* input=new aRecord();
- xsd__int* fieldone=new xsd__int();
- *fieldone=12345;
- input->field1=fieldone;
-
- input->field2 = "I'm still here!";
-
- xsd__byte* fieldthree=new xsd__byte();
- *fieldthree=65;
- input->field3=fieldthree;
-
- xsd__string result ;
- result = ws->myOperation(input);
- cout << "Result is = " << result << endl;
-
- bSuccess = true;
-
- returnValue = 0; // Success
-
- } 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(exception& exception){
-
- cout << "Exception on clean up of ws : " << exception.what()<<endl;
-
- } catch(...) {
-
- cout << "Unknown Exception occured 1 2 3" << endl;
- }
+ do
+ {
+ try {
+
+ if(endpoint_set) {
+ ws = new operations(endpoint, APTHTTP1_1);
+ free(endpoint);
+ endpoint_set = false;
+ } else
+ ws = new operations();
+
+ aRecord* input=new aRecord();
+ xsd__int* fieldone=new xsd__int();
+ *fieldone=12345;
+ input->field1=fieldone;
+
+ input->field2 = "I'm still here!";
+
+ xsd__byte* fieldthree=new xsd__byte();
+ *fieldthree=65;
+ input->field3=fieldthree;
+
+ xsd__string result ;
+ result = ws->myOperation(input);
+ cout << "Result is = " << result << endl;
+
+ bSuccess = true;
+
+ returnValue = 0; // Success
+
+ } 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(exception& exception){
+
+ cout << "Exception on clean up of ws : " << exception.what()<<endl;
+
+ } catch(...) {
+
+ cout << "Unknown Exception occured 1 2 3" << endl;
+ }
// Samisa : clean up memory allocated for stub
- 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--;
+ 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);
+ } while( iRetryIterationCount > 0 && !bSuccess);
- if(endpoint_set)
- free(endpoint);
+ if(endpoint_set)
+ free(endpoint);
cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
- return returnValue;
+ return returnValue;
}
/* Spin through args list and check for -e -p and -s options.
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoice2Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoice2Client.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoice2Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoice2Client.cpp Thu Apr 27 20:03:51 2006
@@ -32,7 +32,7 @@
int main(int argc, char* argv[])
{
-
+
ComplexTypeChoice2* ws;
char *endpoint = WSDL_DEFAULT_ENDPOINT;
@@ -41,96 +41,96 @@
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 ComplexTypeChoice2(endpoint, APTHTTP1_1);
- free(endpoint);
- endpoint_set = false;
- } else
- ws = new ComplexTypeChoice2();
-
- SimpleComplexType1* input=new SimpleComplexType1();
- xsd__int* fieldone=new xsd__int();
- *fieldone=12345;
- input->field1=fieldone;
-
- input->field2 = "I'm still here!";
-
- xsd__byte* fieldthree=new xsd__byte();
- *fieldthree=65;
- input->field3=fieldthree;
-
- SimpleComplexType1* result = NULL;
- result = ws->asComplexType(input);
- if ( result == NULL )
- cout << "result object is null" << endl;
-
- if ( result->field1 == NULL )
- cout << "result field is null" << endl;
- else
- cout << "Result is = " << *(result->field1) << endl;
-
- //cout << "Result field2 is = " << result->field2 << endl;
- //cout << "Result field3 is = " << result->field3 << endl;
-
- bSuccess = true;
-
- returnValue = 0; // Success
-
- } 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(exception& exception){
-
- cout << "Exception on clean up of ws : " << exception.what()<<endl;
-
- } catch(...) {
-
- cout << "Unknown Exception occured " << endl;
- }
+ do
+ {
+ try {
+
+ if(endpoint_set) {
+ ws = new ComplexTypeChoice2(endpoint, APTHTTP1_1);
+ free(endpoint);
+ endpoint_set = false;
+ } else
+ ws = new ComplexTypeChoice2();
+
+ SimpleComplexType1* input=new SimpleComplexType1();
+ xsd__int* fieldone=new xsd__int();
+ *fieldone=12345;
+ input->field1=fieldone;
+
+ input->field2 = "I'm still here!";
+
+ xsd__byte* fieldthree=new xsd__byte();
+ *fieldthree=65;
+ input->field3=fieldthree;
+
+ SimpleComplexType1* result = NULL;
+ result = ws->asComplexType(input);
+ if ( result == NULL )
+ cout << "result object is null" << endl;
+
+ if ( result->field1 == NULL )
+ cout << "result field is null" << endl;
+ else
+ cout << "Result is = " << *(result->field1) << endl;
+
+ //cout << "Result field2 is = " << result->field2 << endl;
+ //cout << "Result field3 is = " << result->field3 << endl;
+
+ bSuccess = true;
+
+ returnValue = 0; // Success
+
+ } 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(exception& exception){
+
+ cout << "Exception on clean up of ws : " << exception.what()<<endl;
+
+ } catch(...) {
+
+ cout << "Unknown Exception occured " << endl;
+ }
// Samisa : clean up memory allocated for stub
- 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--;
+ 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);
+ } while( iRetryIterationCount > 0 && !bSuccess);
- if(endpoint_set)
- free(endpoint);
+ if(endpoint_set)
+ free(endpoint);
cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
- return returnValue;
+ return returnValue;
}
/* Spin through args list and check for -e -p and -s options.
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoiceArrayChildClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoiceArrayChildClient.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoiceArrayChildClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoiceArrayChildClient.cpp Thu Apr 27 20:03:51 2006
@@ -40,11 +40,11 @@
endpoint_set = parse_args_for_endpoint(&argc, argv, &endpoint);
- bool bSuccess = false;
- int iRetryIterationCount = 3;
+ bool bSuccess = false;
+ int iRetryIterationCount = 3;
- do
- {
+ do
+ {
try {
if(endpoint_set) {
ws = new XSD_byte(endpoint);
@@ -53,14 +53,14 @@
} else
ws = new XSD_byte();
- SimpleArray *simpleArray1 = new SimpleArray();
- xsd__int_Array arrayIn;
- xsd__int **array = new xsd__int*[3];
- array[0]=new xsd__int(5);
- array[1]=new xsd__int(6);
- array[2]=new xsd__int(7);
- arrayIn.set(array,3);
- simpleArray1->setintArray(&arrayIn);
+ SimpleArray *simpleArray1 = new SimpleArray();
+ xsd__int_Array arrayIn;
+ xsd__int **array = new xsd__int*[3];
+ array[0]=new xsd__int(5);
+ array[1]=new xsd__int(6);
+ array[2]=new xsd__int(7);
+ arrayIn.set(array,3);
+ simpleArray1->setintArray(&arrayIn);
SimpleComplexType1* input = new SimpleComplexType1();
input->arrayElement = simpleArray1;
@@ -69,38 +69,38 @@
SimpleComplexType1* result = NULL;
result = ws->asComplexType(input);
- int outputSize = 0;
- const xsd__int ** arrayOut = result->arrayElement->intArray->get(outputSize);
+ int outputSize = 0;
+ const xsd__int ** arrayOut = result->arrayElement->intArray->get(outputSize);
- cout << "Array Size = " << outputSize << endl;
+ cout << "Array Size = " << outputSize << endl;
- cout << "First element in Array = " << *arrayOut[0] << endl;
- cout << "Second element in Array = " << *arrayOut[1] << endl;
- cout << "Third element in Array = " << *arrayOut[2] << endl;
-
- bSuccess = true;
+ cout << "First element in Array = " << *arrayOut[0] << endl;
+ cout << "Second element in Array = " << *arrayOut[1] << endl;
+ cout << "Third element in Array = " << *arrayOut[2] << endl;
+
+ bSuccess = true;
returnValue = 0; // Success
} catch(AxisException &e) {
- bool bSilent = false;
+ bool bSilent = false;
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ 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;
}
@@ -108,18 +108,18 @@
// Samisa : clean up memory allocated for stub
try
{
- delete ws;
+ delete ws;
}
catch(exception& exception)
{
- cout << "Exception on clean up of ws : " << exception.what()<<endl;
+ cout << "Exception on clean up of ws : " << exception.what()<<endl;
}
catch(...)
{
- cout << "Unknown exception on clean up of ws : " << endl;
+ cout << "Unknown exception on clean up of ws : " << endl;
}
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
if(endpoint_set)
free(endpoint);
cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoiceComplexChildClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoiceComplexChildClient.cpp?rev=397747&r1=397746&r2=397747&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoiceComplexChildClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/ComplexTypeChoiceComplexChildClient.cpp Thu Apr 27 20:03:51 2006
@@ -32,30 +32,30 @@
int main(int argc, char* argv[])
{
- XSD_byte* ws;
+ XSD_byte* ws;
- char *endpoint = WSDL_DEFAULT_ENDPOINT;
- bool endpoint_set = false;
- int returnValue = 1; // Assume Failure
-
- endpoint_set = parse_args_for_endpoint(&argc, argv, &endpoint);
-
- bool bSuccess = false;
- int iRetryIterationCount = 1;
-
- do
- {
- try {
- if(endpoint_set) {
- ws = new XSD_byte(endpoint);
- free(endpoint);
- endpoint_set = false;
- } else
- ws = new XSD_byte();
-
-
- oneSimpleComplexType* onesimplecomplextype = new oneSimpleComplexType();
- onesimplecomplextype->onecomplexTypeElement=xsd__byte(65);
+ char *endpoint = WSDL_DEFAULT_ENDPOINT;
+ bool endpoint_set = false;
+ int returnValue = 1; // Assume Failure
+
+ endpoint_set = parse_args_for_endpoint(&argc, argv, &endpoint);
+
+ bool bSuccess = false;
+ int iRetryIterationCount = 1;
+
+ do
+ {
+ try {
+ if(endpoint_set) {
+ ws = new XSD_byte(endpoint);
+ free(endpoint);
+ endpoint_set = false;
+ } else
+ ws = new XSD_byte();
+
+
+ oneSimpleComplexType* onesimplecomplextype = new oneSimpleComplexType();
+ onesimplecomplextype->onecomplexTypeElement=xsd__byte(65);
SimpleComplexType* input = new SimpleComplexType();
@@ -66,41 +66,41 @@
SimpleComplexType* result = NULL;
result = ws->asComplexType(input);
- if ( result == NULL )
- {
- cout << "Returned result object is NULL" << endl;
- return -1;
- }
+ if ( result == NULL )
+ {
+ cout << "Returned result object is NULL" << endl;
+ return -1;
+ }
- // For ebcdic-based platforms, need to convert ascii 'A' (decimal 65) to ebcdic before
- // writing to stdout. Following assignment statement will do just that.
+ // For ebcdic-based platforms, need to convert ascii 'A' (decimal 65) to ebcdic before
+ // writing to stdout. Following assignment statement will do just that.
xsd__byte resultField1 = result->complexTypeElement->onecomplexTypeElement;
if (resultField1 == 65) resultField1 = 'A';
cout << "Result field1 is = " << resultField1 << endl;
- bSuccess = true;
+ bSuccess = true;
returnValue = 0; // Success
} catch(AxisException &e) {
- bool bSilent = false;
+ bool bSilent = false;
- if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
- {
- if( iRetryIterationCount > 0)
- {
- bSilent = true;
- }
- }
- else
- {
- iRetryIterationCount = 0;
- }
+ 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;
}
@@ -108,18 +108,18 @@
// Samisa : clean up memory allocated for stub
try
{
- delete ws;
+ delete ws;
}
catch(exception& exception)
{
- cout << "Exception on clean up of ws : " << exception.what()<<endl;
+ cout << "Exception on clean up of ws : " << exception.what()<<endl;
}
catch(...)
{
- cout << "Unknown exception on clean up of ws : " << endl;
+ cout << "Unknown exception on clean up of ws : " << endl;
}
- iRetryIterationCount--;
- } while( iRetryIterationCount > 0 && !bSuccess);
+ iRetryIterationCount--;
+ } while( iRetryIterationCount > 0 && !bSuccess);
if(endpoint_set)
free(endpoint);
cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;