axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From perr...@apache.org
Subject cvs commit: ws-axis/c/tests/auto_build/testcases/client/cpp CalculatorDocClient.cpp ExceptionTestDocClient.cpp FaultMappingDocClient.cpp InteropTestRound1DocClient.cpp MathOpsDocClient.cpp SimpleArrayDocClient.cpp SimpleRefDocClient.cpp
Date Wed, 20 Oct 2004 15:02:13 GMT
perryan     2004/10/20 08:02:13

  Modified:    c/tests/auto_build/testcases/client/cpp
                        CalculatorDocClient.cpp ExceptionTestDocClient.cpp
                        FaultMappingDocClient.cpp
                        InteropTestRound1DocClient.cpp MathOpsDocClient.cpp
                        SimpleArrayDocClient.cpp SimpleRefDocClient.cpp
  Log:
  Removed output of "send request to ..." as this broke the auto test when a different endpoint
URL was specified.
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.2       +18 -23    ws-axis/c/tests/auto_build/testcases/client/cpp/CalculatorDocClient.cpp
  
  Index: CalculatorDocClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/CalculatorDocClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CalculatorDocClient.cpp	5 Oct 2004 15:46:39 -0000	1.1
  +++ CalculatorDocClient.cpp	20 Oct 2004 15:02:13 -0000	1.2
  @@ -8,18 +8,15 @@
   int main(int argc, char* argv[])
   {
   	char endpoint[256];
  -	const char* url="http://192.168.101.4:80/axis/Calculator";
  +	const char* url="http://localhost:80/axis/Calculator";
   	const char* op = 0;
   	int i1=0, i2=0;
  -        int iResult;
  -        char* pcDetail;
  -        pcDetail = 0;
  +	int iResult;
   
   	url = argv[1];
   
   	try
  -        {
  -		printf("Sending Requests to Server %s .......\n\n", url);
  +	{
   		sprintf(endpoint, "%s", url);
   		Calculator ws(endpoint);
   
  @@ -29,30 +26,28 @@
   
   		if (strcmp(op, "add") == 0)
   		{
  -        	        iResult = ws.add(i1, i2);
  -                	//ws.getFaultDetail(&pcDetail);
  -	                printf("%d\n", iResult);
  -        	        /*printf("pcDetail:%s\n", pcDetail);*/
  +			iResult = ws.add(i1, i2);
  +			printf("%d\n", iResult);
   		}
  -        }
  -        catch(AxisException& e)
  -        {
  -            printf("Exception : %s\n", e.what());
  -        }
  -        catch(exception& e)
  -        {
  -            printf("Unknown exception has occured\n" );
  -        }
  +	}
  +	catch(AxisException& e)
  +	{
  +	    printf("Exception : %s\n", e.what());
  +	}
  +	catch(exception& e)
  +	{
  +	    printf("Unknown exception has occured\n" );
  +	}
   	catch(...)
  -        {
  -            printf("Unknown exception has occured\n" );
  -        }
  +	{
  +	    printf("Unknown exception has occured\n" );
  +	}
   	return 0;
   }
   
   void PrintUsage()
   {
  -	printf("Usage :\n Calculator <server> <port> <operation> <parameter>
<parameter>\n\n");
  +	printf("Usage :\n Calculator <url>\n\n");
   	exit(1);
   }
   
  
  
  
  1.2       +81 -80    ws-axis/c/tests/auto_build/testcases/client/cpp/ExceptionTestDocClient.cpp
  
  Index: ExceptionTestDocClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/ExceptionTestDocClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ExceptionTestDocClient.cpp	5 Oct 2004 15:46:39 -0000	1.1
  +++ ExceptionTestDocClient.cpp	20 Oct 2004 15:02:13 -0000	1.2
  @@ -14,10 +14,10 @@
   	const char* op = 0;
   	char* p1 = 0;
   	const char* p2 = 0;
  -        int p3 = 0;
  +	int p3 = 0;
   	int i1=0, i2=0;
  -        int iResult;
  -        char* pcDetail;
  +	int iResult;
  +	char* pcDetail;
   
   	url = argv[1];
   
  @@ -28,84 +28,85 @@
   
   	if (strcmp(op, "div") == 0)
   	{
  -            for(p3 = 0; p3 < 3; p3++)
  -            {
  -                try
  -                {     
  -                    switch(p3)
  -                    {
  -                        case 0:
  -                            /* Sends a normal request. the result should be the division
of
  -                             *  two numbers the user has provided
  -                             */
  -	                    //sprintf(endpoint, "http://%s:%s/axis/MathOps", server, port);
  -	                    sprintf(endpoint, "%s", url);
  -                            break;
  -            
  -                        case 1:
  -                            /* Service name is missing. The message
  -                             *  Exception : AxisSoapException:Soap action is empty
  -                             *  should be returned to the user.
  -                             */
  -	                    //sprintf(endpoint, "http://%s:%s/axis", server, port);
  -	                    sprintf(endpoint, "%s", url);
  -	                    p1 = strrchr(endpoint, '/');
  -	                    *p1 = (char)NULL; // Set a NULL at the last '/' char to strip the
service endpoint interface
  -                            break;
  -          
  -                       case 2: 
  -                           /* Service name is wrong. The message
  -                            * Exception : AxisWsddException:Requested service not found
  -                            * should be returned to the user.
  -                            */
  -	                    //sprintf(endpoint, "http://%s:%s/axis/Math", server, port);
  -	                    sprintf(endpoint, "%s", url);
  -	                    p1 = endpoint + (strlen(endpoint) - 3);
  -	                    *p1 = (char)NULL; // Set a NULL to strip the last 3 chars
  -                            break;
  -
  -                       case 3:
  -                             /* Service path is empty. The message  
  -                              * The corresponding http fail message
  -                              * should be returned to the user.
  -                              */
  -	                    /*sprintf(endpoint, "http://%s:%s/", server, port);*/
  -                            printf("This test has been temporarily terminated" \
  -                            " due to an unresolved bug\n");
  -                            exit(0); /* This is temporary code*/
  -                            break;
  -
  -                       case 4:
  -                            /* Exception : AxisTransportException:Unexpected string
  -                             * received. Most probably server returned an empty stream
  -                             */
  -	                    sprintf(endpoint, "", server, port);
  -	                    //sprintf(endpoint, "http://%s:%s", server, port);
  -                            break;
  -                 
  -                       default:
  -                            printf("Invalid option for the last parameter\n\n");
  -                            return 0;
  -                    }
  -	            //sprintf(endpoint, "http://%s:%s/axis/MathOps", server, port);
  -	            printf("ENDPOINT = %s\n", endpoint);
  -	            MathOps ws(endpoint);
  +	    for(p3 = 0; p3 < 3; p3++)
  +	    {
  +		try
  +		{     
  +		    switch(p3)
  +		    {
  +			case 0:
  +			    /* Sends a normal request. the result should be the division of
  +			     *  two numbers the user has provided
  +			     */
  +			    //sprintf(endpoint, "http://%s:%s/axis/MathOps", server, port);
  +			    sprintf(endpoint, "%s", url);
  +			    break;
  +	    
  +			case 1:
  +			    /* Service name is missing. The message
  +			     *  Exception : AxisSoapException:Soap action is empty
  +			     *  should be returned to the user.
  +			     */
  +			    //sprintf(endpoint, "http://%s:%s/axis", server, port);
  +			    sprintf(endpoint, "%s", url);
  +			    p1 = strrchr(endpoint, '/');
  +			    *p1 = (char)NULL; // Set a NULL at the last '/' char to strip the service endpoint
interface
  +			    break;
  +	  
  +		       case 2: 
  +			   /* Service name is wrong. The message
  +			    * Exception : AxisWsddException:Requested service not found
  +			    * should be returned to the user.
  +			    */
  +			    //sprintf(endpoint, "http://%s:%s/axis/Math", server, port);
  +			    sprintf(endpoint, "%s", url);
  +			    p1 = endpoint + (strlen(endpoint) - 3);
  +			    *p1 = (char)NULL; // Set a NULL to strip the last 3 chars
  +			    break;
  +
  +		       case 3:
  +			     /* Service path is empty. The message  
  +			      * The corresponding http fail message
  +			      * should be returned to the user.
  +			      */
  +			    /*sprintf(endpoint, "http://%s:%s/", server, port);*/
  +			    printf("This test has been temporarily terminated" \
  +			    " due to an unresolved bug\n");
  +			    exit(0); /* This is temporary code*/
  +			    break;
  +
  +		       case 4:
  +			    /* Exception : AxisTransportException:Unexpected string
  +			     * received. Most probably server returned an empty stream
  +			     */
  +			    sprintf(endpoint, "", server, port);
  +			    //sprintf(endpoint, "http://%s:%s", server, port);
  +			    break;
  +		 
  +		       default:
  +			    printf("Invalid option for the last parameter\n\n");
  +			    return 0;
  +		    }
  +		    //sprintf(endpoint, "http://%s:%s/axis/MathOps", server, port);
  +		    printf("ENDPOINT = %s\n", endpoint);
  +		    MathOps ws(endpoint);
   		    iResult = ws.div(i1, i2);		
  -                    printf("Result is:%d\n", iResult);
  -                }
  -                catch(AxisException& e)
  -                {
  -                    printf("%s\n", e.what());
  -                }
  -                catch(exception& e)
  -                {
  +		    printf("Result is:%d\n", iResult);
  +		}
  +		catch(AxisException& e)
  +		{
  +		    //printf("%s\n", e.what());
  +		    printf("AxisException has occured\n");
  +		}
  +		catch(exception& e)
  +		{
   		    printf("Unknown exception has occured\n");
  -                }
  -                catch(...)
  -                {
  -		    printf("Unknown exception has occured\n");
  -                }
  -            }
  +		}
  +		catch(...)
  +		{
  +		    printf("Unspecified exception has occured\n");
  +		}
  +	    }
   	}
   	else 
   	{
  @@ -117,7 +118,7 @@
   
   void PrintUsage()
   {
  -	printf("Usage :\n MathOps <server> <port> <operation> <parameter>
<parameter> <parameter>\n\n");
  +	printf("Usage :\n MathOps <url>\n\n");
   	exit(1);
   }
   
  
  
  
  1.2       +35 -33    ws-axis/c/tests/auto_build/testcases/client/cpp/FaultMappingDocClient.cpp
  
  Index: FaultMappingDocClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/FaultMappingDocClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FaultMappingDocClient.cpp	5 Oct 2004 15:46:39 -0000	1.1
  +++ FaultMappingDocClient.cpp	20 Oct 2004 15:02:13 -0000	1.2
  @@ -15,8 +15,8 @@
   	const char* p1 = 0;
   	const char* p2 = 0;
   	int i1=0, i2=0;
  -        int iResult;
  -        char* pcDetail;
  +	int iResult;
  +	char* pcDetail;
   
   	url = argv[1];
   
  @@ -27,36 +27,38 @@
   
   	if (strcmp(op, "div") == 0)
   	{
  -            for(int i = 0; i < 4; i++)
  -            {
  -                printf("%d\n", i);
  -                switch(i)
  -                {
  -                    case 0: i1 = 10; i2 = 5; break;
  -                    case 1: i1 = 10; i2 = 0; break;
  -                    case 2: i1 = 1000; i2 = 5; break;
  -                    case 3: i1 = 10; i2 = -5; break;
  -                }
  -                try
  -                {
  -		    iResult = ws.div(i1, i2);		
  -                    printf("Result is:%d\n", iResult);
  -                }
  -                catch(MathOpsService_AxisClientException& e)
  -                {
  -                    printf("%s\n", e.what());
  -                }
  -                catch(AxisException& e)
  -                {
  -                    printf("Exception : %s\n", e.what());
  -                }
  -                catch(exception& e)
  -                {
  -                }
  -                catch(...)
  -                {
  -                }
  -            }
  +	    for(int i = 0; i < 4; i++)
  +	    {
  +			printf("%d\n", i);
  +			switch(i)
  +			{
  +				case 0: i1 = 10; i2 = 5; break;
  +				case 1: i1 = 10; i2 = 0; break;
  +				case 2: i1 = 1000; i2 = 5; break;
  +				case 3: i1 = 10; i2 = -5; break;
  +			}
  +			try
  +			{
  +				iResult = ws.div(i1, i2);		
  +				printf("Result is:%d\n", iResult);
  +			}
  +			catch(MathOpsService_AxisClientException& e)
  +			{
  +				printf("MathOpsService Exception: %s\n", e.what());
  +			}
  +			catch(AxisException& e)
  +			{
  +				printf("AxisException : %s\n", e.what());
  +			}
  +			catch(exception& e)
  +			{
  +				printf("Unknown Exception : \n");
  +			}
  +			catch(...)
  +			{
  +				printf("Unspecified Exception : \n");
  +			}
  +	    }
   	}
   	else 
   	{
  @@ -68,7 +70,7 @@
   
   void PrintUsage()
   {
  -	printf("Usage :\n MathOps <server> <port> <operation> <parameter>
<parameter>\n\n");
  +	printf("Usage :\n FaultMappingDoc <url>\n\n");
   	exit(1);
   }
   
  
  
  
  1.2       +1 -1      ws-axis/c/tests/auto_build/testcases/client/cpp/InteropTestRound1DocClient.cpp
  
  Index: InteropTestRound1DocClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/InteropTestRound1DocClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InteropTestRound1DocClient.cpp	5 Oct 2004 15:46:39 -0000	1.1
  +++ InteropTestRound1DocClient.cpp	20 Oct 2004 15:02:13 -0000	1.2
  @@ -16,7 +16,7 @@
   	const char* port="80";
   	sprintf(endpoint, "http://%s:%s/axis/base", server, port);
   	try
  -        {
  +	{
   	   InteropTestPortType ws(endpoint, APTHTTP);
   
   
  
  
  
  1.2       +32 -28    ws-axis/c/tests/auto_build/testcases/client/cpp/MathOpsDocClient.cpp
  
  Index: MathOpsDocClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/MathOpsDocClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MathOpsDocClient.cpp	5 Oct 2004 15:46:39 -0000	1.1
  +++ MathOpsDocClient.cpp	20 Oct 2004 15:02:13 -0000	1.2
  @@ -8,53 +8,57 @@
   int main(int argc, char* argv[])
   {
   	char endpoint[256];
  +	const char* url="http://localhost:80/axis/MathOps";
   	const char* server="localhost";
   	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;
  -        try
  -        {
  -	sprintf(endpoint, "http://%s:%s/axis/MathOps", server, port);
  -	MathOps ws(endpoint);
  +	int iResult;
  +	char* pcDetail;
   
  -	op = "div";/*Operation name*/
  -	i1 = 10;/*First parameter*/
  -	i2 = 5;/*Second parameter*/
  +	url = argv[1];
   
  -	if (strcmp(op, "div") == 0)
  +	try
   	{
  -	    iResult = ws.div(i1, i2);		
  -            printf("Result is:%d\n", iResult);
  +		sprintf(endpoint, "%s", url);
  +		MathOps ws(endpoint);
  +
  +		op = "div";/*Operation name*/
  +		i1 = 10;/*First parameter*/
  +		i2 = 5;/*Second parameter*/
  +
  +		if (strcmp(op, "div") == 0)
  +		{
  +			iResult = ws.div(i1, i2);		
  +			printf("Result is:%d\n", iResult);
  +		}
  +		else 
  +		{
  +			printf("Invalid operation %s\n\n", op);
  +			PrintUsage();
  +		}
   	}
  -	else 
  +	catch(AxisException& e)
   	{
  -		printf("Invalid operation %s\n\n", op);
  -		PrintUsage();
  +	    printf("%s\n", e.what());
   	}
  -        }
  -        catch(AxisException& e)
  -        {
  -            printf("%s\n", e.what());
  -        }
  -        catch(exception& e)
  -        {
  -	    printf("Unknown exception has occured\n");
  -        }
  -        catch(...)
  -        {
  +	catch(exception& e)
  +	{
   	    printf("Unknown exception has occured\n");
  -        }
  +	}
  +	catch(...)
  +	{
  +	    printf("Unspecified exception has occured\n");
  +	}
   	
   	return 0;
   }
   
   void PrintUsage()
   {
  -	printf("Usage :\n MathOps <server> <port> <operation> <parameter>
<parameter>\n\n");
  +	printf("Usage :\n MathOps <url>\n\n");
   	exit(1);
   }
   
  
  
  
  1.2       +28 -29    ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleArrayDocClient.cpp
  
  Index: SimpleArrayDocClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleArrayDocClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SimpleArrayDocClient.cpp	5 Oct 2004 15:46:39 -0000	1.1
  +++ SimpleArrayDocClient.cpp	20 Oct 2004 15:02:13 -0000	1.2
  @@ -18,35 +18,34 @@
   	const char* port="80";
   	url = argv[1];
   	try
  -        {
  -	printf("Sending Requests to Server %s ........\n\n", url);
  -	sprintf(endpoint, "%s", url);
  -	ArrayTestPortType ws(endpoint);
  -	//testing echoIntArray
  -         IntArrayType arrin;
  -         arrin.intItem.m_Array = new int[ARRAYSIZE];
  -         arrin.intItem.m_Size = ARRAYSIZE;
  -         for (x=0;x<ARRAYSIZE;x++)
  -         {
  -           arrin.intItem.m_Array[x] = x;
  -         }
  -         printf("invoking echoIntArray...\n");
  -         if (ws.echoIntArray(&arrin)->intItem.m_Array != NULL)
  -	          printf("successful \n");
  -      else
  -	          printf("failed \n");		
  +	{
  +		sprintf(endpoint, "%s", url);
  +		ArrayTestPortType ws(endpoint);
  +		//testing echoIntArray
  +		IntArrayType arrin;
  +		arrin.intItem.m_Array = new int[ARRAYSIZE];
  +		arrin.intItem.m_Size = ARRAYSIZE;
  +		for (x=0;x<ARRAYSIZE;x++)
  +		{
  +			arrin.intItem.m_Array[x] = x;
  +		}
  +		printf("invoking echoIntArray...\n");
  +		if (ws.echoIntArray(&arrin)->intItem.m_Array != NULL)
  +			printf("successful \n");
  +		else
  +			printf("failed \n");		
  +	}
  +	catch(AxisException& e)
  +	{
  +	    printf("Exception : %s\n", e.what());
  +	}
  +	catch(exception& e)
  +	{
  +	    printf("Unknown exception has occured\n");
  +	}
  +	catch(...)
  +	{
  +	    printf("Unknown exception has occured\n");
   	}
  -        catch(AxisException& e)
  -        {
  -            printf("Exception : %s\n", e.what());
  -        }
  -        catch(exception& e)
  -        {
  -            printf("Unknown exception has occured\n");
  -        }
  -        catch(...)
  -        {
  -            printf("Unknown exception has occured\n");
  -        }
   	return 0;
   }
  
  
  
  1.2       +24 -28    ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleRefDocClient.cpp
  
  Index: SimpleRefDocClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/client/cpp/SimpleRefDocClient.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SimpleRefDocClient.cpp	5 Oct 2004 15:46:39 -0000	1.1
  +++ SimpleRefDocClient.cpp	20 Oct 2004 15:02:13 -0000	1.2
  @@ -13,40 +13,36 @@
   	int x;
   	char buffer1[100];
   	char endpoint[256];
  -	const char* url="http://localhost:80/axis/MathOps";
  +	const char* url="http://localhost:80/axis/RefTest";
   	const char* server="localhost";
   	const char* port="80";
   	url = argv[1];
   	try
  -        {
  -	printf("Sending Requests to Server %s ........\n\n", url);
  -	sprintf(endpoint, "%s", url);
  -	//endpoint for Axis Java sample
  -	//sprintf(endpoint, "http://%s:%s/axis/services/echo", server, port);
  -	
  -	RefTestPortType ws(endpoint);
  +	{
  +		sprintf(endpoint, "%s", url);
  +		RefTestPortType ws(endpoint);
   
  -	printf("invoking echoInt..\n");
  -	IntType refint;
  -  	refint.intItem =56;
  +		printf("invoking echoInt..\n");
  +		IntType refint;
  +		refint.intItem =56;
   
  -        if ((ws.echoInt(&refint))->intItem == 56)
  -        printf("successful\n");
  -        else
  -        printf("failed \n");
  +		if ((ws.echoInt(&refint))->intItem == 56)
  +			printf("successful\n");
  +		else
  +			printf("failed \n");
   
  -        }
  -        catch(AxisException& e)
  -        {
  -            printf("Exception : %s\n", e.what());
  -        }
  -        catch(exception& e)
  -        {
  -            printf("Unknown exception has occured\n");
  -        }
  -        catch(...)
  -        {
  -            printf("Unknown exception has occured\n");
  -        }
  +	}
  +	catch(AxisException& e)
  +	{
  +	    printf("Exception : %s\n", e.what());
  +	}
  +	catch(exception& e)
  +	{
  +	    printf("Unknown exception has occured\n");
  +	}
  +	catch(...)
  +	{
  +	    printf("Unknown exception has occured\n");
  +	}
   	return 0;
   }
  
  
  

Mime
View raw message