axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject cvs commit: ws-axis/c/src/client/samples/interoptests/base InteropBaseClient.cpp
Date Mon, 27 Oct 2003 06:30:21 GMT
damitha     2003/10/26 22:30:21

  Modified:    c/src/client/samples/interoptests/base Tag:
                        Release-2003_10_26-bugfixes_branch
                        InteropBaseClient.cpp
  Log:
  Currently when you run interbase client the output is empty. This fix give you
  nice information.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.4.2.1   +79 -21    ws-axis/c/src/client/samples/interoptests/base/InteropBaseClient.cpp
  
  Index: InteropBaseClient.cpp
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/client/samples/interoptests/base/InteropBaseClient.cpp,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- InteropBaseClient.cpp	24 Oct 2003 12:14:59 -0000	1.4
  +++ InteropBaseClient.cpp	27 Oct 2003 06:30:21 -0000	1.4.2.1
  @@ -1,7 +1,7 @@
   // InteropBaseClient.cpp : Defines the entry point for the console application.
   //
   
  -#include "InteropTestPortType.h" 
  +#include "InteropTestPortType.h"
   
   #define ARRAYSIZE 2
   
  @@ -11,9 +11,13 @@
   	char buffer[100];
   
   	InteropTestPortType ws;
  -	// testing echoString 
  -	ws.echoString("hello world");
  -	// testing echoStringArray 
  +	printf("invoking echoString...\n");
  +	//testing echoString
  +	if (ws.echoString("hello world") == "hello world")
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
  +	// testing echoStringArray
   	ArrayOfstring arrstr;
   	arrstr.m_Array = new string[ARRAYSIZE];
   	arrstr.m_Size = ARRAYSIZE;
  @@ -22,10 +26,18 @@
   		sprintf(buffer, "%dth element of string array", x);
   		arrstr.m_Array[x] = buffer;
   	}
  -	ws.echoStringArray(arrstr);
  -	// testing echoInteger 
  -	ws.echoInteger(56);
  -	// testing echoIntegerArray 
  +	printf("invoking echoStringArray...\n");
  +	if (ws.echoStringArray(arrstr).m_Array != NULL)
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
  +	// testing echoInteger
  +	printf("invoking echoInteger...\n");
  +	if (ws.echoInteger(56) == 56)
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
  +	// testing echoIntegerArray
   	ArrayOfint arrint;
   	arrint.m_Array = new int[ARRAYSIZE];
   	arrint.m_Size = ARRAYSIZE;
  @@ -33,10 +45,18 @@
   	{
   		arrint.m_Array[x] = x;
   	}
  -	ws.echoIntegerArray(arrint);
  -	// testing echoFloat 
  -	ws.echoFloat(1.4214);
  -	// testing echoFloat 
  +	printf("invoking echoIntegerArray...\n");
  +	if (ws.echoIntegerArray(arrint).m_Array != NULL)
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
  +	// testing echoFloat
  +	printf("invoking echoFloat...\n");
  +	if (ws.echoFloat(1.4214) > 1.42)
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
  +	// testing echoFloat
   	ArrayOffloat arrfloat;
   	arrfloat.m_Array = new float[ARRAYSIZE];
   	arrfloat.m_Size = ARRAYSIZE;
  @@ -44,13 +64,21 @@
   	{
   		arrfloat.m_Array[x] = 1.1111*x;
   	}
  -	ws.echoFloatArray(arrfloat);
  +	printf("invoking echoFloatArray...\n");
  +	if (ws.echoFloatArray(arrfloat).m_Array != NULL)
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
   	// testing echo Struct
   	SOAPStruct stct;
   	stct.varFloat = 12345.7346345;
   	stct.varInt = 5000;
   	stct.varString = "This is string in SOAPStruct";
  -	ws.echoStruct(&stct);
  +	printf("invoking echoStruct...\n");
  +	if (ws.echoStruct(&stct) != NULL)
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
   	//testing echo Array of Struct
   	ArrayOfSOAPStruct arrstct;
   	arrstct.m_Array = new SOAPStruct[ARRAYSIZE];
  @@ -63,19 +91,49 @@
   		arrstct.m_Array[x].varString = buffer;
   	}
   	//testing echo Struct Array
  -	ws.echoStructArray(arrstct);
  +	printf("invoking echoStructArray...\n");
  +	if (ws.echoStructArray(arrstct).m_Array != NULL)
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
   	//testing echo void
  +	printf("invoking echoVoid...\n");
   	ws.echoVoid();
  +	printf("successful\n");
   	//testing echo base 64 binary
  -	ws.echoBase64("BCDF675E234242WHRTKMJDGKGUEJ898636JFJFHEJDGWTDHFJRURYGBCDHTWRSG");
  +	printf("invoking echoBase64...\n");
  +	if (ws.echoBase64("BCDF675E234242WHRTKMJDGKGUEJ898636JFJFHEJDGWTDHFJRURYGBCDHTWRSG") ==
  +		"BCDF675E234242WHRTKMJDGKGUEJ898636JFJFHEJDGWTDHFJRURYGBCDHTWRSG")
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
   	time_t tim;
   	time(&tim);
  -	ws.echoDate(*gmtime(&tim));
  +	tm* lt = gmtime(&tim);
  +	printf("invoking echoDate...\n");
  +	if (memcmp(&ws.echoDate(*lt), lt, sizeof(tm)) == 0)
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
   	//testing echo hex binary
  -	ws.echoHexBinary("CCCFFA46552BC7D5A09BC5F23DE9E0FE7862AD45BC87D02FEE");
  +	printf("invoking echoHexBinary...\n");
  +	if (ws.echoHexBinary("CCCFFA46552BC7D5A09BC5F23DE9E0FE7862AD45BC87D02FEE") ==
  +		"CCCFFA46552BC7D5A09BC5F23DE9E0FE7862AD45BC87D02FEE")
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
   	//testing echo decimal
  -	ws.echoDecimal(1234.567890);
  +	printf("invoking echoDecimal...\n");
  +	if (ws.echoDecimal(1234.567890) > 1234.56)
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
   	//testing echo boolean
  -	ws.echoBoolean(1);
  -
  +	printf("invoking echoBoolean...\n");
  +	if (ws.echoBoolean(1) == 1)
  +		printf("successful\n");
  +	else
  +		printf("failed\n");
  +	getchar();
  +	return 0;
   }
  
  
  

Mime
View raw message