axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r367478 - in /webservices/axis2/trunk/c/test/core: Makefile.am engine/ engine/Makefile.am engine/test_engine.c
Date Tue, 10 Jan 2006 04:18:50 GMT
Author: damitha
Date: Mon Jan  9 20:18:43 2006
New Revision: 367478

URL: http://svn.apache.org/viewcvs?rev=367478&view=rev
Log:
Added engine tests

Added:
    webservices/axis2/trunk/c/test/core/engine/
    webservices/axis2/trunk/c/test/core/engine/Makefile.am
    webservices/axis2/trunk/c/test/core/engine/test_engine.c
Modified:
    webservices/axis2/trunk/c/test/core/Makefile.am

Modified: webservices/axis2/trunk/c/test/core/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/Makefile.am?rev=367478&r1=367477&r2=367478&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/Makefile.am (original)
+++ webservices/axis2/trunk/c/test/core/Makefile.am Mon Jan  9 20:18:43 2006
@@ -1 +1 @@
-SUBDIRS = handlers description context
+SUBDIRS = handlers description context engine

Added: webservices/axis2/trunk/c/test/core/engine/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/engine/Makefile.am?rev=367478&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/core/engine/Makefile.am (added)
+++ webservices/axis2/trunk/c/test/core/engine/Makefile.am Mon Jan  9 20:18:43 2006
@@ -0,0 +1,30 @@
+prgbindir=$(prefix)/bin/system_test
+prgbin_PROGRAMS = test_engine
+SUBDIRS =
+AM_CPPFLAGS = $(CPPFLAGS) -g -O2 -pthread
+test_engine_SOURCES = test_engine.c
+
+
+test_engine_LDADD   =  -L$(top_builddir)/install/lib \
+                    -laxis2_description \
+	                -laxis2_context \
+	                -laxis2_util \
+	                -laxis2_deployment \
+	                -laxis2_om \
+	                -laxis2_engine \
+	                -laxis2_wsdl \
+	                -laxis2_parser \
+	                -laxis2_phaseresolver \
+	                -laxis2_addr \
+	                -L$(GUTHTHILA_LIB) $(GUTHTHILA_LIBNAME) \
+	                -L$(LIBXML2_LIB) $(LIBXML2_LIBNAME)
+
+INCLUDES = -I${CUTEST_HOME}/include \
+            -I$(top_builddir)/modules/xml/guththila \
+            -I$(top_builddir)/include \
+            -I$(top_builddir)/modules/util \
+            -I$(top_builddir)/modules/wsdl \
+            -I$(top_builddir)/modules/core/description \
+            -I$(top_builddir)/modules/core/transport \
+            -I$(top_builddir)/modules/platforms
+

Added: webservices/axis2/trunk/c/test/core/engine/test_engine.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/engine/test_engine.c?rev=367478&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/core/engine/test_engine.c (added)
+++ webservices/axis2/trunk/c/test/core/engine/test_engine.c Mon Jan  9 20:18:43 2006
@@ -0,0 +1,63 @@
+#include <stdio.h>
+#include <axis2_env.h>
+#include <axis2_engine.h>
+
+int	axis2_test_engine_send()
+{
+	axis2_status_t *status = NULL;
+	axis2_allocator_t *allocator = axis2_allocator_init (NULL);
+	axis2_env_t *env = axis2_env_create (allocator);
+	struct axis2_msg *msg = NULL;
+    struct axis2_conf *conf = NULL;
+	conf = axis2_conf_create(&env);
+
+    struct axis2_conf_ctx *conf_ctx;
+	struct axis2_msg_ctx *msg_ctx;
+    conf_ctx = axis2_conf_ctx_create(&env, conf);
+	axis2_transport_in_desc_t *in_desc = NULL;
+	axis2_transport_out_desc_t *out_desc = NULL;
+
+	msg_ctx = axis2_msg_ctx_create(&env, conf_ctx, NULL, NULL);	
+
+	axis2_engine_t *engine = axis2_engine_create(&env, conf_ctx);
+
+    axis2_engine_send(engine, &env, msg_ctx);
+	if(status != AXIS2_SUCCESS )
+	{
+	    printf("ERROR\n");
+	    return -1;
+	}
+}
+
+int	axis2_test_engine_receive()
+{
+	axis2_status_t *status = NULL;
+	axis2_allocator_t *allocator = axis2_allocator_init (NULL);
+	axis2_env_t *env = axis2_env_create (allocator);
+	struct axis2_msg *msg = NULL;
+    struct axis2_conf *conf = NULL;
+	conf = axis2_conf_create(&env);
+
+    struct axis2_conf_ctx *conf_ctx;
+	struct axis2_msg_ctx *msg_ctx;
+    conf_ctx = axis2_conf_ctx_create(&env, conf);
+	axis2_transport_in_desc_t *in_desc = NULL;
+	axis2_transport_out_desc_t *out_desc = NULL;
+
+	msg_ctx = axis2_msg_ctx_create(&env, conf_ctx, NULL, NULL);	
+
+	axis2_engine_t *engine = axis2_engine_create(&env, conf_ctx);
+
+    axis2_engine_receive(engine, &env, msg_ctx);
+	if(status != AXIS2_SUCCESS )
+	{
+	    printf("ERROR\n");
+	    return -1;
+	}
+}
+int main()
+{
+	axis2_test_engine_send();
+	axis2_test_engine_receive();
+	return 0;
+}



Mime
View raw message