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 pr...@apache.org on 2006/02/21 15:55:01 UTC

svn commit: r379467 - in /webservices/axis/trunk/c: src/soap/ tests/auto_build/testcases/ tests/auto_build/testcases/client/cpp/ tests/auto_build/testcases/output/

Author: prestonf
Date: Tue Feb 21 06:54:58 2006
New Revision: 379467

URL: http://svn.apache.org/viewcvs?rev=379467&view=rev
Log:
General tidy of tests to remove ones that contain function that will not be available in this release and increasing time-outs, filter output to be more generic, etc.  There was on fix to the code in SoapDeSerializer because Xerces is removing the namespaces from its internal list before the parsing of that tag is complete (see comments in code at around line 2550).

Modified:
    webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/AxisBenchClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/LargeReturningStringClient.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/OtherFaultExceptionTest.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest8Client.cpp
    webservices/axis/trunk/c/tests/auto_build/testcases/output/OtherFaultExceptionTest.cpp.out
    webservices/axis/trunk/c/tests/auto_build/testcases/output/TestTransportTimeout.expected
    webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list

Modified: webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp?rev=379467&r1=379466&r2=379467&view=diff
==============================================================================
--- webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp (original)
+++ webservices/axis/trunk/c/src/soap/SoapDeSerializer.cpp Tue Feb 21 06:54:58 2006
@@ -2655,9 +2655,65 @@
     	     */
     	    if (pchPrefix && (strcmp (pchPrefix, "") != 0))
     	    {
-    		xmlStr += pchPrefix;
-    		xmlStr += ":";
+    			xmlStr += pchPrefix;
+    			xmlStr += ":";
     	    }
+			else
+			{
+// This code is required because the namespace for the closing tag may have
+// been deleted before it can be checked (m_pParser->getPrefix4NS).  If it has
+// been deleted, then the code needs to look at the opening tag and use that
+// namespace for the closing tag.
+// This is because:-
+// [2511] m_pNode = m_pParser->anyNext() calls
+//   XercesHandler::endPrefixMapping() and this deletes the namespace before it
+//                                     can be looked up by m_pParser->getPrefix4NS!
+// Check if NameOrValue is the same as the tag name at the beginning of the XML
+// string.  If it is, check if it has a namespace.  If it has, then add the
+// same namespace to the XML string.  This test needs to be done because the
+// namespace is being deleted before it can be checked.
+//
+// There has got to be a better way of doing this, but it was not obvious at
+// the time!
+				const char *	pszXML = xmlStr.c_str();
+				char *			pNSEnd = strchr( pszXML, ':');
+				char *			pTagEnd = strchr( pszXML, '>');
+
+				if( pNSEnd && (pNSEnd < pTagEnd))
+				{
+					int				iNSStart = 1;
+					int				iNSEnd = (int) (strchr( pszXML, ':') - pszXML) - iNSStart;
+					string			sNamespace = xmlStr.substr( iNSStart, iNSEnd);
+					int				iTagEnd = 0;
+					char *			pSpace = strchr( pszXML, ' ');
+					char *			pBrace = strchr( pszXML, '>');
+
+					if( pSpace == NULL)
+					{
+						iTagEnd = pSpace - pszXML;
+					}
+					else if( pBrace == NULL)
+					{
+						iTagEnd = pBrace - pszXML;
+					}
+					else if( pBrace < pSpace)
+					{
+						iTagEnd = pBrace - pszXML;
+					}
+					else if( pSpace <= pBrace)
+					{
+						iTagEnd = pSpace - pszXML;
+					}
+
+					string	sTag = xmlStr.substr( iNSEnd + iNSStart + 1, iTagEnd - (iNSEnd + iNSStart + 1));
+
+					if( !sTag.compare( node->m_pchNameOrValue))
+					{
+	    				xmlStr += sNamespace;
+						xmlStr += ":";
+					}
+				}
+			}
     	}
 
         xmlStr += node->m_pchNameOrValue;

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/AxisBenchClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/AxisBenchClient.cpp?rev=379467&r1=379466&r2=379467&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/AxisBenchClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/AxisBenchClient.cpp Tue Feb 21 06:54:58 2006
@@ -38,76 +38,83 @@
 
 #define WSDL_DEFAULT_ENDPOINT "http://localhost:9080/AxisBench/services/AxisBenchSoapImpl"
 
-int main(int argc, char* argv[])
+int main( int argc, char * argv[])
 { 
-    AxisBench *ws;
+    AxisBench *	ws;
 
-    BenchDataType *input = NULL;
-    BenchDataType *output = NULL;
-    xsd__unsignedByte* buffer = NULL;
+    BenchDataType *		input = NULL;
+    BenchDataType *		output = NULL;
+    xsd__unsignedByte *	buffer = NULL;
 
-    char *endpoint = WSDL_DEFAULT_ENDPOINT;
-    bool endpoint_set = false;
-    int returnValue = 1; // Assume Failure
+    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)
+            if( endpoint_set)
             {
-                ws = new AxisBench(endpoint, APTHTTP1_1);
-                free(endpoint);
-                endpoint_set = false;
+                ws = new AxisBench( endpoint, APTHTTP1_1);
+
+                free( endpoint);
+                
+				endpoint_set = false;
             }
             else
+			{
                 ws = new AxisBench();
+			}
+
+// Extend transport timeout to 60 seconds (default is 10).
+			ws->setTransportTimeout( 60);
 
             int request = 1;
       
             input = new BenchDataType();
             input->count = 100;
       
-            BenchBasicDataType_Array arrayIn;
-            BenchBasicDataType **	ppBBDT = new BenchBasicDataType *[input->count];
-
-            xsd__long ll = 10000;
+            BenchBasicDataType_Array	arrayIn;
+            BenchBasicDataType **		ppBBDT = new BenchBasicDataType *[input->count];
+            xsd__long					ll = 10000;
+            time_t						tim = 1100246323;
+            struct tm *					temp = gmtime( &tim);
+            struct tm					lt;
 
-            time_t tim;
-            tim = 1100246323;
-            struct tm *temp = gmtime(&tim);
-            struct tm lt;
-            memcpy(&lt, temp, sizeof(struct tm));
+            memcpy( &lt, temp, sizeof( struct tm));
             
-            char *letterA_String = stringToAscii("A");
-            buffer = (xsd__unsignedByte*)calloc (1, input->count + 2);
+            char *	letterA_String = stringToAscii( "A");
             
-            strcpy ( (char *)buffer, letterA_String);  
+			buffer = (xsd__unsignedByte *) calloc( 1, input->count + 2);
+            
+            strcpy( (char *) buffer, letterA_String);  
 
-            for ( int i = 0; i < input->count ; i++ )
+            for( int i = 0; i < input->count ; i++)
             {
-                BenchBasicDataType *type = new BenchBasicDataType();
+                BenchBasicDataType *	type = new BenchBasicDataType();
+
                 type->StringType = "StringType";
-                type->IntegerType = 10*(i+1);
-                type->DoubleType = 11.111 * (i+1);
+                type->IntegerType = 10 * (i + 1);
+                type->DoubleType = 11.111 * (i + 1);
                 type->BooleanType = true_;
-                type->DateTimeType = lt ;
-                type->TimeType = lt ;
-                type->DateType = lt ;
-                type->IntType = (i+1);
+                type->DateTimeType = lt;
+                type->TimeType = lt;
+                type->DateType = lt;
+                type->IntType = (i + 1);
                 type->ByteType = '1';
-                type->DecimalType = 10*(i+1);
-                type->FloatType = (float)((float)(11*(i+1))/(float)2.0);
+                type->DecimalType = 10 * (i + 1);
+                type->FloatType = (float) ((float) (11 * (i + 1)) / (float) 2.0);
                 type->LongType = ll;
                 type->QNameType = "toto";
-                type->ShortType = (i+1);
-                type->Base64BinaryType.set(buffer, i);
-                type->HexBinary.set(buffer, i);
+                type->ShortType = (i + 1);
+                type->Base64BinaryType.set( buffer, i);
+                type->HexBinary.set( buffer, i);
             
                 ppBBDT[i] = type;
 
@@ -120,72 +127,96 @@
                     ll += 10000;
                 }
 
-                strcat ( (char *)buffer, letterA_String);
+                strcat ( (char *) buffer, letterA_String);
             }
 
-            int t1,t2;
 #ifndef WIN32  
-            struct timeval mstart;
-            struct timeval mstop;
-            gettimeofday( &mstart, NULL );
+            struct timeval	mstart;
+            struct timeval	mstop;
+
+            gettimeofday( &mstart, NULL);
 #else
-            struct timeb mstart;
-            struct timeb mstop;
-            ftime(&mstart);
+            struct timeb	mstart;
+            struct timeb	mstop;
+
+            ftime( &mstart);
 #endif
 
-            arrayIn.set(ppBBDT, input->count);
-            input->setinfos(&arrayIn);    
-            for ( int ii = 0; ii < request ; ii++ )
+            arrayIn.set( ppBBDT, input->count);
+
+            input->setinfos( &arrayIn);    
+
+            for( int ii = 0; ii < request; ii++)
             {
-                if (output)
+                if( output)
                 { // Samisa: memory management BP
-                    int outputSize =0;
-                    BenchBasicDataType ** outArray =output->infos->get(outputSize); 
-                    for (int i = 0; i < outputSize; i++)
+                    int						outputSize = 0;
+                    BenchBasicDataType **	outArray = output->infos->get( outputSize); 
+                    
+					for( int i = 0; i < outputSize; i++)
+					{
                         delete outArray[i];
+					}
+
                     delete output;
+
                     output = NULL;
                 }
-                output = ws->doBenchRequest(input);
+
+                output = ws->doBenchRequest( input);
             }
 
-            for (int count = 0 ; count < input->count ; count++ )
+            for( int count = 0; count < input->count; count++)
             {
                 delete ppBBDT[count];
             }
+
             delete [] ppBBDT;
-            free(buffer);
+            
+			free( buffer);
+
+            int t1;
+			int	t2;
 
 #ifndef WIN32
-            gettimeofday( &mstop, NULL );
-            t1 = mstart.tv_sec*1000 + mstart.tv_usec/1000;
-            t2 = mstop.tv_sec*1000 + mstop.tv_usec/1000;
+            gettimeofday( &mstop, NULL);
+
+            t1 = (int) (mstart.tv_sec * 1000 + mstart.tv_usec / 1000);
+            t2 = (int) (mstop.tv_sec * 1000 + mstop.tv_usec / 1000);
 #else
-            ftime(&mstop);
-            t1 = mstart.time*1000 + mstart.millitm;
-            t2 = mstop.time*1000 + mstop.millitm;
+            ftime( &mstop);
+
+            t1 = (int) (mstart.time * 1000 + mstart.millitm);
+            t2 = (int) (mstop.time * 1000 + mstop.millitm);
 #endif
 
-            int total = t2-t1;
+            int total = t2 - t1;
 
-            if ( ws->getStatus() == AXIS_FAIL )
+            if( ws->getStatus() == AXIS_FAIL)
+			{
                 cout << "Failed" << endl;
+			}
             else 
             {
                 bSuccess = true;
-                char dateTime[50];
-                int i = 0;
-                if ( argc > 1 )
-                    i = output->count -1;
-                
+
+                char	dateTime[50];
+                int		i = 0;
+
+                if( argc > 1)
+				{
+                    i = output->count - 1;
+				}
+
                 cout << "Input Count : " << input->count << endl;
                 cout << "Count : " << output->count << endl;
-                int outputSize = 0;
-                BenchBasicDataType ** outArray =output->infos->get(outputSize); 
-                for ( ; i < output->count ; i++ ) 
+
+                int						outputSize = 0;
+                BenchBasicDataType **	outArray = output->infos->get( outputSize);
+
+                for( ; i < output->count; i++)
                 {
-                    if( outArray[i] != (BenchBasicDataType *) 0xcdcdcdcd)
+                    if( outArray[i] != NULL)
                     {
                         cout << " ----------------------------------------------" << endl;
                         cout << " StringType " << outArray[i]->StringType << endl;
@@ -204,8 +235,10 @@
 
 // Following check for os/400 - the mock server will return ascii char which needs to be converted
 #ifdef __OS400__
-                        if (outArray[i]->ByteType == 0x31) 
+                        if( outArray[i]->ByteType == 0x31) 
+						{
                             outArray[i]->ByteType = '1';
+						}
 #endif
                         cout << " ByteType " << outArray[i]->ByteType << endl;
                         cout << " DecimalType " << outArray[i]->DecimalType << endl;
@@ -214,8 +247,8 @@
                         cout << " QNameType " << outArray[i]->QNameType << endl;
                         cout << " ShortType " << outArray[i]->ShortType << endl;
 
-                        int size = 0;
-                        xsd__unsignedByte * base64BinaryData = outArray[i]->Base64BinaryType.get(size);
+                        int					size = 0;
+                        xsd__unsignedByte *	base64BinaryData = outArray[i]->Base64BinaryType.get( size);
 
                         cout << " Base64BinaryType " << size << endl;
 
@@ -231,13 +264,14 @@
                         }
 */
                         size = 0;
+
                         xsd__unsignedByte * hexBinaryData = outArray[i]->HexBinary.get(size);
 
                         cout << " HexBinaryType " << size << endl;
 
                         if( size > 0)
                         {
-                            cout << " HexBinaryType " << asciiToString((char *)hexBinaryData) << endl;
+                            cout << " HexBinaryType " << asciiToString( (char *) hexBinaryData) << endl;
                         }
 
 /* Not Required
@@ -248,11 +282,12 @@
                         }
 */
                     }
-                    returnValue=0;
+
+                    returnValue = 0;
                 }
             }
 
-            if(verbose)
+            if( verbose)
             {
                 cout << " ----------------------------------------------" << endl;
                 cout << input->count << " input paramters, and " << request << " requests" << endl;
@@ -260,7 +295,7 @@
                 cout << "Average time = " << total/request << " ms" << endl;
             }
         }
-        catch(AxisException &e)
+        catch( AxisException &e)
         {
             bool bSilent = false;
 
@@ -291,16 +326,17 @@
         {
             delete ws; 
             delete input;
+
             if (output)
             {
                 delete output;
             }
         }
-        catch(AxisException& e)
+        catch( AxisException& e)
         {
             cout << e.what() << endl;
         }
-        catch(exception& e)
+        catch( exception& e)
         {
             cout << "Exception : " << e.what() << endl;
         }
@@ -312,11 +348,14 @@
     }
     while( iRetryIterationCount > 0 && !bSuccess);
 
-    if(endpoint_set)
-        free(endpoint);
-
-    cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;
-    return returnValue;
+    if( endpoint_set)
+	{
+        free( endpoint);
+	}
+
+    cout << "---------------------- TEST COMPLETE -----------------------------" << endl;
+    
+	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/LargeReturningStringClient.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/LargeReturningStringClient.cpp?rev=379467&r1=379466&r2=379467&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/LargeReturningStringClient.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/LargeReturningStringClient.cpp Tue Feb 21 06:54:58 2006
@@ -59,6 +59,9 @@
 			int			input = 2 * 1024 * 1024;
 			xsd__string	result = "";
 
+// Extend transport timeout to 60 seconds (default is 10).
+			ws->setTransportTimeout( 60);
+
 			result = ws->getLargeString(input);
 
 			cout << "Result" << endl;
@@ -70,7 +73,7 @@
 
 			if( strlen( result) == input)
 			{
-				cout << strlen( result) << endl;
+				cout << (int) strlen( result) << endl;
 			}
 			else
 			{
@@ -87,7 +90,7 @@
 				}
 
 				cout << "There where " << iError << " errors." << endl;
-				cout << "Requested " << input << " bytes.  Received " << strlen( result) << " bytes." << endl;
+				cout << "Requested " << input << " bytes.  Received " << (int) strlen( result) << " bytes." << endl;
 		
 				returnValue = 0; // Success
 			}

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/OtherFaultExceptionTest.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/OtherFaultExceptionTest.cpp?rev=379467&r1=379466&r2=379467&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/OtherFaultExceptionTest.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/OtherFaultExceptionTest.cpp Tue Feb 21 06:54:58 2006
@@ -28,106 +28,178 @@
 void sig_handler(int);
 using namespace std;
 
-int main(int argc, char* argv[])
+int main( int argc, char * argv[])
 {
-	char endpoint[256];
-	const char* server="localhost";
-	const char* url="http://localhost:80/axis/MathOps";
-	const char* port="80";
-	const char* op = 0;
-	const char* p1 = 0;
-	const char* p2 = 0;
-	int i1=0, i2=0;
-	int iResult;
-	char* pcDetail;
-
-	signal(SIGILL, sig_handler);
-	signal(SIGABRT, sig_handler);
-	signal(SIGSEGV, sig_handler);
-	//signal(SIGQUIT, sig_handler);
-	//signal(SIGBUS, sig_handler);
-	signal(SIGFPE, sig_handler);
+	char			endpoint[256];
+	const char *	server = "localhost";
+	const char *	url = "http://localhost:80/axis/MathOps";
+	const char *	port = "80";
+	const char *	op = 0;
+	const char *	p1 = 0;
+	const char *	p2 = 0;
+	int				i1 = 0;
+	int				i2 = 0;
+	int				iResult;
+
+	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];
 
-	sprintf(endpoint, "%s", url);
+	sprintf( endpoint, "%s", url);
 
 	op = "div";
 
-	if (strcmp(op, "div") == 0)
+	if( strcmp( op, "div") == 0)
 	{
-	    for(int i = 1; i < 4; i++)
+	    for( int i = 1; i < 4; i++)
 	    {
-
-			switch(i)
+			switch( i)
 			{
-				case 1: i1 = 10; i2 = 0; break;
-				case 2: i1 = 1000; i2 = 5; break;
-				case 3: i1 = 10; i2 = -5; break;
-			}
-		bool bSuccess = false;
-		int	iRetryIterationCount = 3;
+				case 1:
+				{
+					i1 = 10;
+					i2 = 0;
+					break;
+				}
 
-		do
-		{
-			try
-			{
-				MathOps ws(endpoint);
-				if( iRetryIterationCount == 3)
-					cout <<endl<<endl<< "Trying to " << op << " " << i1 << " by " << i2 << endl;
-				iResult = ws.div(i1, i2);		
-				cout << "Result is " << iResult << endl;
-				bSuccess = true;
-			}
-			catch(OtherFaultException& ofe)
-			{
-				cout <<"Fault Detail - "<< ofe.getFaultDetail() << endl;
-				cout <<"Fault String - "<< ofe.getFaultString() << endl;
-				cout <<"Fault code   - "<< ofe.getFaultCode()<<endl;
-				bSuccess = true;
-			}	
-			catch(SoapFaultException& sfe)
-			{
-				cout << "SoapFaultException: " << sfe.what() << endl;
+				case 2:
+				{
+					i1 = 1000;
+					i2 = 5;
+					break;
+				}
+
+				case 3:
+				{
+					i1 = 10;
+					i2 = -5;
+					break;
+				}
 			}
-			catch(AxisException& e)
-			{
-				bool bSilent = false;
+            
+			bool	bSuccess = false;
+			int		iRetryIterationCount = 3;
 
-				if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+			do
+			{
+				try
 				{
-					if( iRetryIterationCount > 0)
+					MathOps	ws( endpoint);
+
+					if( iRetryIterationCount == 3)
 					{
-						bSilent = true;
+						cout << endl << endl << "Trying to " << op << " " << i1 << " by " << i2 << endl;
+
+						iResult = ws.div( i1, i2);
+
+						cout << "Result is " << iResult << endl;
+				
+						bSuccess = true;
 					}
 				}
-				else
+				catch( OtherFaultException& ofe)
 				{
-					iRetryIterationCount = 0;
+					const char *	pszDetail = ofe.getFaultDetail();
+					const char *	pszCode = ofe.getFaultCode();
+
+// This is the expected 'Fault Detail'.  But, the namespace is not necessarily 717 so the test fails...  Need to replace the given namespace with the expected one.
+// <p717:DivByZeroStruct><p717:varString>Division by zero exception</p717:varString><p717:varInt>1</p717:varInt><p717:varFloat>10.52</p717:varFloat></DivByZeroStruct>
+// <p717:SpecialDetailStruct><p717:varString>You have entered 1000 for the first parameter. 1000 is reserved. Please do not use it</p717:varString></SpecialDetailStruct>
+// <p717:OutOfBoundStruct><p717:varString>Out of bounds exception</p717:varString><p717:varInt>2</p717:varInt><p717:specialDetail><p717:varString>This bounds exception is a forced exception</p717:varString></p717:specialDetail></OutOfBoundStruct>
+
+// The namespace is always the first item to appear after the opening '<'.  We
+// can use this fact to find and extract the namespace.
+					int		iNSStart = 1;
+					char *	pNSEnd = strchr( pszDetail, ':');
+					char *	pTagEnd = strchr( pszDetail, '>');
+					string	sDetail = pszDetail;
+					string	sExpectedNS = "p717";
+
+					if( pNSEnd && (pNSEnd < pTagEnd))
+					{
+						int	iNSEnd = (int) (pNSEnd - pszDetail) - iNSStart;
+
+						string	sNamespace = ((string) pszDetail).substr( iNSStart, iNSEnd);
+						int		iNSPos = (int) sDetail.find( sNamespace);
+
+						while( iNSPos != std::string::npos)
+						{
+							sDetail.replace( iNSPos, sNamespace.length(), sExpectedNS);
+
+							iNSPos = (int) sDetail.find( sNamespace);
+						}
+					}
+
+// This is the expected 'Fault code'.  But, the namespace is not necessarily 717 so the test fails...  Need to replace the given namespace with the expected one.
+// p717:DivByZeroStruct
+// p717:SpecialDetailStruct
+// p717:OutOfBoundStruct
+					string	sCode = pszCode;
+
+					int	iNSEnd = (int) (strchr( pszCode, ':') - pszCode);
+
+					if( iNSEnd > 0)
+					{
+						sCode.replace( 0, iNSEnd, sExpectedNS);
+					}
+
+					cout << "Fault Detail - "<< sDetail << endl;
+					cout << "Fault String - "<< ofe.getFaultString() << endl;
+					cout << "Fault code   - "<< sCode << endl;
+
+					bSuccess = true;
+				}	
+				catch( SoapFaultException& sfe)
+				{
+					cout << "SoapFaultException: " << sfe.what() << endl;
 				}
+				catch( AxisException& e)
+				{
+					bool bSilent = false;
+
+					if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+					{
+						if( iRetryIterationCount > 1)
+						{
+							bSilent = true;
+						}
+					}
+					else
+					{
+						iRetryIterationCount = 0;
+					}
 
-				if( !bSilent)
+					if( !bSilent)
+					{
+						cout << "Exception : " << e.what() << endl;
+					}
+				}
+				catch( exception& e)
 				{
-					cout << "Exception : " << e.what() << endl;
+					cout << "Unknown Exception: " << e.what() << endl;
 				}
-			}
-			catch(exception& e)
-			{
-                cout << "Unknown Exception: " << endl;
-			}
-			catch(...)
-			{
-                cout << "Unspecified Exception: " << endl;
-			}
-			iRetryIterationCount--;
-		} while( iRetryIterationCount > 0 && !bSuccess);
-	    }
+				catch( ...)
+				{
+					cout << "Unspecified Exception: " << endl;
+				}
+			
+				iRetryIterationCount--;
+
+			} while( iRetryIterationCount > 0 && !bSuccess);
+		}
 	}
 	else 
 	{
 		cout << "Invalid operation " << op << endl;
 	}
+	
 	cout << "---------------------- TEST COMPLETE -----------------------------"<< endl;	
+	
 	return 0;
 }
 

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest8Client.cpp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest8Client.cpp?rev=379467&r1=379466&r2=379467&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest8Client.cpp (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/cpp/RpcHttpHeaderTest8Client.cpp Tue Feb 21 06:54:58 2006
@@ -24,6 +24,7 @@
  */
 
 #include <string>
+#include <iostream>
 using namespace std;
 
 #include "InteropTestPortType.hpp"
@@ -31,79 +32,85 @@
 
 #define ARRAYSIZE 2
 
-int
-main(int argc, char *argv[])
+int main( int argc, char * argv[])
 {
-    int x;
-    char buffer1[100];
-    char endpoint[256];
-    const char *server = "localhost";
-    const char *port = "80";
+    char			endpoint[256];
+    const char *	server = "localhost";
+    const char *	port = "80";
     
     //endpoint for Axis CPP sample
-    sprintf(endpoint, "http://%s:%s/axis/base", server, port);
+    sprintf( endpoint, "http://%s:%s/axis/base", server, port);
     
 	// Set the endpoint from command line argument if set
-	if (argc > 1)
-		strcpy(endpoint, argv[1]);
-
+	if( argc > 1)
+	{
+		strcpy( endpoint, argv[1]);
+	}
 	
 	/*Set for HTTP transport */
-    InteropTestPortType ws(endpoint, APTHTTP1_1);
-	ws.setTransportProperty("SOAPAction" , "InteropBase#echoString");
+    InteropTestPortType	ws( endpoint, APTHTTP1_1);
+
+	ws.setTransportProperty( "SOAPAction" , "InteropBase#echoString");
 
     //set HTTP headers
-     ws.setTransportProperty(NULL, "lang2");
+     ws.setTransportProperty( NULL, "lang2");
+
+    cout << "invoking echoString..." << endl;
 
-    printf("invoking echoString...\n");
     //testing echoString 
-		bool bSuccess = false;
-		int	iRetryIterationCount = 3;
+		bool	bSuccess = false;
+		int		iRetryIterationCount = 3;
 
 		do
 		{
-    try {
-    if (0 == strcmp(ws.echoString("hello world"), "hello world"))
-	printf("successful\n");
-    else
-	printf("failed\n");
-
-				bSuccess = true;
-    }
-    catch(AxisException& e) 
-    {
-			bool bSilent = false;
-
-			if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+		    try
 			{
-				if( iRetryIterationCount > 0)
+				if (0 == strcmp( ws.echoString( "hello world"), "hello world"))
 				{
-					bSilent = true;
+					cout << "successful" << endl;
 				}
+				else
+				{
+					cout << "failed" << endl;
+				}
+
+				bSuccess = true;
 			}
-			else
+			catch( AxisException& e) 
 			{
-				iRetryIterationCount = 0;
-			}
+				bool bSilent = false;
 
-            if( !bSilent)
+				if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
+				{
+					if( iRetryIterationCount > 1)
+					{
+						bSilent = true;
+					}
+				}
+				else
+				{
+					iRetryIterationCount = 0;
+				}
+
+				if( !bSilent)
+				{
+					cout <<  e.what() << endl;
+				}
+			}
+			catch( ...)
 			{
-        printf("%s\n", e.what());
+				cout << "Unknown exception" << endl;
 			}
-    }
-    catch(...)
-    {
-        printf("Unknown exception\n");
-    }
-		iRetryIterationCount--;
+		
+			iRetryIterationCount--;
 		} while( iRetryIterationCount > 0 && !bSuccess);
 
-    printf("Test transport property accessors\n");
+    cout << "Test transport property accessors" << endl;
 
 // Extra lines added because printf in AIX dos not output (null) when the
 // parameter is NULL.  This just forces the printf to output (null) when it is.
-	char *	pszPropertyKey = ws.getFirstTransportPropertyKey();
-	char *	pszPropertyValue = ws.getCurrentTransportPropertyValue();
+	char *	pszPropertyKey = (char *) ws.getFirstTransportPropertyKey();
+	char *	pszPropertyValue = (char *) ws.getCurrentTransportPropertyValue();
 
 	if( pszPropertyKey == NULL)
 	{
@@ -132,27 +139,31 @@
     ws.deleteTransportProperty("Accept-Language");
 
     //now the request should not have these removed headers
-		bSuccess = false;
-		iRetryIterationCount = 3;
+	bSuccess = false;
+	iRetryIterationCount = 3;
 
-		do
+	do
+	{
+		try
 		{
-    try
-    {
-    if (0 == strcmp(ws.echoString("hello world"), "hello world"))
-        printf("successful\n");
-    else
-        printf("failed\n");
+			if( 0 == strcmp( ws.echoString( "hello world"), "hello world"))
+			{
+				cout << "successful" << endl;
+			}
+			else
+			{
+				cout << "failed" << endl;
+			}
 
-				bSuccess = true;
-    }
-    catch(AxisException& e)
-    {
-			bool bSilent = false;
+			bSuccess = true;
+		}
+		catch( AxisException& e)
+		{
+			bool	bSilent = false;
 
 			if( e.getExceptionCode() == CLIENT_TRANSPORT_OPEN_CONNECTION_FAILED)
 			{
-				if( iRetryIterationCount > 0)
+				if( iRetryIterationCount > 1)
 				{
 					bSilent = true;
 				}
@@ -162,19 +173,20 @@
 				iRetryIterationCount = 0;
 			}
 
-            if( !bSilent)
+			if( !bSilent)
 			{
-        printf("%s\n", e.what());
+				cout << e.what() << endl;
 			}
-    }
-    catch(...)
-    {
-        printf("Unknown exception\n");
-    }
+		}
+		catch( ...)
+		{
+			cout << "Unknown exception" << endl;
+		}
+
 		iRetryIterationCount--;
-		} while( iRetryIterationCount > 0 && !bSuccess);
+	} while( iRetryIterationCount > 0 && !bSuccess);
 
+	cout << "HTTP Header test end" << endl;
 
-    printf("HTTP Header test end\n");
     return 0;
 }

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/output/OtherFaultExceptionTest.cpp.out
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/OtherFaultExceptionTest.cpp.out?rev=379467&r1=379466&r2=379467&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/OtherFaultExceptionTest.cpp.out (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/OtherFaultExceptionTest.cpp.out Tue Feb 21 06:54:58 2006
@@ -1,19 +1,20 @@
 
 
 Trying to div 10 by 0
-Fault Detail - <DivByZeroStruct><varString>Division by zero exception</varString><varInt>1</varInt><varFloat>10.52</varFloat></DivByZeroStruct>
+Fault Detail - <p717:DivByZeroStruct><p717:varString>Division by zero exception</p717:varString><p717:varInt>1</p717:varInt><p717:varFloat>10.52</p717:varFloat></p717:DivByZeroStruct>
 Fault String - org.soapinterop.DivByZeroStruct
-Fault code   - ns2008922717:DivByZeroStruct
+Fault code   - p717:DivByZeroStruct
 
 
 Trying to div 1000 by 5
-Fault Detail - <SpecialDetailStruct><varString>You have entered 1000 for the first parameter. 1000 is reserved. Please do not use it</varString></SpecialDetailStruct>
+Fault Detail - <p717:SpecialDetailStruct><p717:varString>You have entered 1000 for the first parameter. 1000 is reserved. Please do not use it</p717:varString></p717:SpecialDetailStruct>
 Fault String - org.soapinterop.SpecialDetailStruct
-Fault code   - ns2008922717:SpecialDetailStruct
+Fault code   - p717:SpecialDetailStruct
 
 
 Trying to div 10 by -5
-Fault Detail - <OutOfBoundStruct><varString>Out of bounds exception</varString><varInt>2</varInt><specialDetail><varString>This bounds exception is a forced exception</varString></specialDetail></OutOfBoundStruct>
+Fault Detail - <p717:OutOfBoundStruct><p717:varString>Out of bounds exception</p717:varString><p717:varInt>2</p717:varInt><p717:specialDetail><p717:varString>This bounds exception is a forced exception</p717:varString></p717:specialDetail></p717:OutOfBoundStruct>
 Fault String - org.soapinterop.OutOfBoundStruct
-Fault code   - ns2008922717:OutOfBoundStruct
+Fault code   - p717:OutOfBoundStruct
 ---------------------- TEST COMPLETE -----------------------------
+

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/output/TestTransportTimeout.expected
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/output/TestTransportTimeout.expected?rev=379467&r1=379466&r2=379467&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/output/TestTransportTimeout.expected (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/output/TestTransportTimeout.expected Tue Feb 21 06:54:58 2006
@@ -1,3 +1,3 @@
 in AxisException block
-Exception :  HTTPTransportException:Channel error connection timeout before receving Channel error: connection timed out before receving
+Exception :  HTTPTransportException:Channel error connection timeout before receiving Channel error: connection timed out before receving
 ---------------------- TEST COMPLETE -----------------------------

Modified: webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/unitTest.list?rev=379467&r1=379466&r2=379467&view=diff
==============================================================================
Binary files - no diff available.