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/24 04:47:58 UTC
svn commit: r396387 - in
/webservices/axis/trunk/c/tests/auto_build/testcases/client/c:
AxisBenchClient.c EnumerationClient.c SimpleTypeArrayClient.c
Author: nadiramra
Date: Sun Apr 23 19:47:57 2006
New Revision: 396387
URL: http://svn.apache.org/viewcvs?rev=396387&view=rev
Log:
C support fixes/enhancements.
Modified:
webservices/axis/trunk/c/tests/auto_build/testcases/client/c/AxisBenchClient.c
webservices/axis/trunk/c/tests/auto_build/testcases/client/c/EnumerationClient.c
webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeArrayClient.c
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/AxisBenchClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/AxisBenchClient.c?rev=396387&r1=396386&r2=396387&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/AxisBenchClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/AxisBenchClient.c Sun Apr 23 19:47:57 2006
@@ -60,7 +60,7 @@
ppBBDT = (BenchBasicDataType **)malloc(sizeof(BenchBasicDataType *) * 100);
- input = Axis_Create_BenchDataType(0,0,0);
+ input = Axis_Create_BenchDataType();
input->count = 100;
ll = 10000;
@@ -75,7 +75,7 @@
for( i = 0; i < input->count ; i++)
{
- BenchBasicDataType *type = Axis_Create_BenchBasicDataType(0,0,0);
+ BenchBasicDataType *type = Axis_Create_BenchBasicDataType();
type->StringType = "StringType";
type->IntegerType = 10 * (i + 1);
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/EnumerationClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/EnumerationClient.c?rev=396387&r1=396386&r2=396387&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/EnumerationClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/EnumerationClient.c Sun Apr 23 19:47:57 2006
@@ -13,37 +13,67 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+
+#include "CommonClientTestCode.h"
#include "EnumerationWS.h"
+#define WSDL_DEFAULT_ENDPOINT "http://localhost:80/Enumeration/services/sampleWS"
+
+#define NEWCOPY(ptr,str) {ptr=axiscAxisNew(XSDC_STRING, strlen(str)+1); strcpy(ptr,str);}
+
int main(int argc, char* argv[])
{
- void * pStub = get_EnumerationWS_stub ();
- Type1 *input = Axis_Create_Type1(0,0,0);
-
- Type1* result;
-
- input->enum_int = ENUMTYPEINT_0;
- input->enum_string = strdup("one");
- input->att_enum_kind = strdup("CHEQUE");
- input->att_enum_string = strdup("one");
- input->att_enum_int = ENUMTYPEINT_1;
-
- result = getInput(pStub,input);
-
- printf ("Result\n");
- if ( result == NULL )
- printf ("NULL\n");
- else {
- printf ("att_enum_int %d\n", result->att_enum_int);
- printf ("att_enum_string %s\n", result->att_enum_string);
- printf ("enum_int %d\n", result->enum_int);
- printf ("enum_string %s\n", result->enum_string);
- printf ("enum_kind %s\n", result->att_enum_kind);
- }
-
- Axis_Delete_Type1(input,0,0);
- Axis_Delete_Type1(result,0,0);
-
- return 0;
+ AXISCHANDLE ws;
+
+ char *endpoint = WSDL_DEFAULT_ENDPOINT;
+ int returnValue = 1; /* Assume Failure */
+
+ Type1* input = NULL;
+ Type1* result = NULL;
+
+ axiscAxisRegisterExceptionHandler(exceptionHandler);
+
+ if (argc>2 && strcmp(argv[1], "-e") == 0)
+ endpoint = argv[2];
+
+ ws = get_EnumerationWS_stub(endpoint);
+
+ input = (Type1*)Axis_Create_Type1();
+
+ NEWCOPY(input->enum_string,"one");
+ NEWCOPY(input->att_enum_string,"one");
+ input->enum_int=axiscAxisNew(XSDC_INT, 0);
+ *input->enum_int=ENUMTYPEINT_0;
+ input->att_enum_int=ENUMTYPEINT_1;
+ NEWCOPY(input->att_enum_kind,"CHEQUE");
+
+ result = getInput(ws, input);
+
+ printf("Result\n");
+ if (exceptionOccurred == C_TRUE ||
+ get_EnumerationWS_Status(ws) == AXISC_FAIL ||
+ result == NULL)
+ printf("FAILED\n");
+ else
+ {
+ printf("att_enum_int %s\n", result->att_enum_int);
+ printf("att_enum_string %s\n", result->att_enum_string);
+ printf("enum_int %s\n", *result->enum_int);
+ printf("enum_string %s\n", result->enum_string);
+ printf("enum_kind %s\n", result->att_enum_kind);
+ returnValue = 0; /* Success */
+ }
+
+ Axis_Delete_Type1(input,0,0);
+ Axis_Delete_Type1(result,0,0);
+
+ destroy_EnumerationWS_stub(ws);
+
+ printf( "---------------------- TEST COMPLETE -----------------------------\n");
+
+ return returnValue;
}
Modified: webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeArrayClient.c
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeArrayClient.c?rev=396387&r1=396386&r2=396387&view=diff
==============================================================================
--- webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeArrayClient.c (original)
+++ webservices/axis/trunk/c/tests/auto_build/testcases/client/c/SimpleTypeArrayClient.c Sun Apr 23 19:47:57 2006
@@ -48,7 +48,7 @@
array_input.m_Size = 100;
array_input.m_Type = XSDC_INT;
- input = Axis_Create_Type(0,0,0);
+ input = Axis_Create_Type();
input->item = &array_input;
ws = get_SimpleTypeArrayWS_stub(endpoint);