You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2006/01/11 09:07:38 UTC
svn commit: r367965 - in /webservices/axis2/trunk/c/test/core: clientapi/
clientapi/Makefile.am clientapi/test_clientapi.c context/Makefile.am
context/test_context.c engine/Makefile.am
Author: damitha
Date: Wed Jan 11 00:07:28 2006
New Revision: 367965
URL: http://svn.apache.org/viewcvs?rev=367965&view=rev
Log:
testcase for clientapi
Added:
webservices/axis2/trunk/c/test/core/clientapi/
webservices/axis2/trunk/c/test/core/clientapi/Makefile.am
webservices/axis2/trunk/c/test/core/clientapi/test_clientapi.c
Modified:
webservices/axis2/trunk/c/test/core/context/Makefile.am
webservices/axis2/trunk/c/test/core/context/test_context.c
webservices/axis2/trunk/c/test/core/engine/Makefile.am
Added: webservices/axis2/trunk/c/test/core/clientapi/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/clientapi/Makefile.am?rev=367965&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/core/clientapi/Makefile.am (added)
+++ webservices/axis2/trunk/c/test/core/clientapi/Makefile.am Wed Jan 11 00:07:28 2006
@@ -0,0 +1,34 @@
+prgbindir=$(prefix)/bin/system_test
+prgbin_PROGRAMS = test_clientapi
+SUBDIRS =
+AM_CPPFLAGS = $(CPPFLAGS) -g -pthread
+test_clientapi_SOURCES = test_clientapi.c
+
+
+test_clientapi_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 \
+ -laxis2_receivers \
+ -laxis2_clientapi \
+ -laxis2_soap \
+ -L$(GUTHTHILA_LIB) $(GUTHTHILA_LIBNAME) \
+ -L$(LIBXML2_LIB) $(LIBXML2_LIBNAME)
+
+INCLUDES = -I${CUTEST_HOME}/include \
+ -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/clientapi \
+ -I$(top_builddir)/modules/core/transport \
+ -I$(top_builddir)/modules/xml/parser \
+ -I$(top_builddir)/modules/platforms
+
Added: webservices/axis2/trunk/c/test/core/clientapi/test_clientapi.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/clientapi/test_clientapi.c?rev=367965&view=auto
==============================================================================
--- webservices/axis2/trunk/c/test/core/clientapi/test_clientapi.c (added)
+++ webservices/axis2/trunk/c/test/core/clientapi/test_clientapi.c Wed Jan 11 00:07:28 2006
@@ -0,0 +1,51 @@
+#include <axis2.h>
+#include <axis2_env.h>
+#include <axis2_engine.h>
+#include <axis2_call.h>
+#include <axis2_allocator.h>
+#include <axis2_transport_listener.h>
+#include <axis2_transport_in_desc.h>
+#include <axis2_transport_out_desc.h>
+#include <listener_manager.h>
+#include <callback_recv.h>
+#include <axis2_soap_body.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_conf_ctx.h>
+
+void axis2_test_call_invoke_blocking()
+{
+ axis2_allocator_t *allocator = axis2_allocator_init (NULL);
+ axis2_env_t *env = axis2_env_create (allocator);
+ struct axis2_conf *conf = NULL;
+ conf = axis2_conf_create(&env);
+ struct axis2_conf_ctx *conf_ctx;
+ struct axis2_msg_ctx *msg_ctx;
+ struct axis2_op *op;
+ struct axis2_qname *qname;
+ struct axis2_svc *svc;
+ struct axis2_svc_ctx *svc_ctx;
+ struct axis2_svc_grp_ctx *svc_grp_ctx;
+ struct axis2_call *call;
+ struct axis2_svc_grp *svc_grp;
+
+ conf_ctx = axis2_conf_ctx_create(&env, conf);
+
+ op = axis2_op_create(&env);
+
+ qname = axis2_qname_create(&env, "name1", NULL, NULL);
+
+ svc_grp = axis2_svc_grp_create(&env);
+ svc = axis2_svc_create_with_qname(&env, qname);
+ svc_grp_ctx = axis2_svc_grp_ctx_create(&env, svc_grp, conf_ctx);
+
+ svc_ctx = axis2_svc_ctx_create(&env, svc, svc_grp_ctx);
+
+ call = axis2_call_create(&env, svc_ctx);
+ msg_ctx = axis2_call_invoke_blocking(call, &env, op, msg_ctx);
+}
+
+int main()
+{
+ axis2_test_call_invoke_blocking();
+ return 0;
+}
Modified: webservices/axis2/trunk/c/test/core/context/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/context/Makefile.am?rev=367965&r1=367964&r2=367965&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/context/Makefile.am (original)
+++ webservices/axis2/trunk/c/test/core/context/Makefile.am Wed Jan 11 00:07:28 2006
@@ -12,8 +12,8 @@
-laxis2_om \
-laxis2_engine \
-laxis2_deployment \
- -laxis2_wsdl \
-laxis2_parser \
+ -laxis2_wsdl \
-laxis2_phaseresolver \
-laxis2_addr \
-L$(GUTHTHILA_LIB) $(GUTHTHILA_LIBNAME) \
Modified: webservices/axis2/trunk/c/test/core/context/test_context.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/context/test_context.c?rev=367965&r1=367964&r2=367965&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/context/test_context.c (original)
+++ webservices/axis2/trunk/c/test/core/context/test_context.c Wed Jan 11 00:07:28 2006
@@ -1,37 +1,63 @@
-#include <stdio.h>
#include <axis2_conf_ctx.h>
#include <axis2_svc_grp.h>
#include <axis2.h>
#include <axis2_allocator.h>
#include <axis2_env.h>
-int axis2_test_conf_ctx_init()
+void axis2_test_conf_ctx_init()
{
- axis2_status_t status = AXIS2_FAILURE;
- axis2_allocator_t *allocator = axis2_allocator_init (NULL);
+ struct axis2_conf *conf = NULL;
+ struct axis2_svc_grp_ctx *svc_grp_ctx;
+ struct axis2_svc_grp *svc_grp;
+ struct axis2_conf_ctx *conf_ctx = NULL;
+ struct axis2_svc_ctx *svc_ctx;
+ struct axis2_svc *svc;
+ struct axis2_qname *qname;
+ struct axis2_op_ctx *op_ctx;
+ struct axis2_op *op;
+ struct axis2_hash_t *op_ctx_map;
+ axis2_status_t status = AXIS2_FAILURE;
+ axis2_allocator_t *allocator = axis2_allocator_init (NULL);
axis2_env_t *env = axis2_env_create (allocator);
- struct axis2_conf *conf = NULL;
conf = axis2_conf_create(&env);
- struct axis2_conf_ctx *conf_ctx = NULL;
+/* axis2_hash_t *svc_ctx_map;
+ axis2_hash_t *svc_grp_ctx_map;*/
+
+ op = axis2_op_create(&env);
conf_ctx = axis2_conf_ctx_create(&env, conf);
+ svc_grp = axis2_svc_grp_create(&env);
+ svc_grp_ctx = axis2_svc_grp_ctx_create(&env, svc_grp, conf_ctx);
+
+ qname = axis2_qname_create(&env, "name1", NULL, NULL);
+ svc = axis2_svc_create_with_qname(&env, qname);
+ svc_ctx = axis2_svc_ctx_create(&env, svc, svc_grp_ctx);
+
+ op = axis2_op_create(&env);
+ op_ctx = axis2_op_ctx_create(&env, op, svc_ctx);
+ op_ctx_map = AXIS2_CONF_CTX_GET_OP_CTX_MAP(conf_ctx, &env);
+ char *key = "key";
+
+ axis2_hash_set (op_ctx_map, key, ")
+ /*op_ctx_map = AXIS2_CONF_CTX_GET_OP_CTX_MAP(conf_ctx, &env);
+ svc_ctx_map = AXIS2_CONF_CTX_GET_SVC_CTX_MAP(conf_ctx, &env);
+ svc_grp_ctx_map = AXIS2_CONF_CTX_GET_SVC_GRP_CTX_MAP(conf_ctx, &env);*/
+
status = AXIS2_CONF_CTX_INIT(conf_ctx, &env, conf);
if (status != AXIS2_SUCCESS)
{
printf("ERROR %d\n", status);
- return -1;
}
else
printf("SUCCESS\n");
AXIS2_CONF_CTX_FREE(conf_ctx, &env);
AXIS2_CONF_FREE(conf, &env);
- axis2_env_free(env);
}
int main()
Modified: 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=367965&r1=367964&r2=367965&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/engine/Makefile.am (original)
+++ webservices/axis2/trunk/c/test/core/engine/Makefile.am Wed Jan 11 00:07:28 2006
@@ -1,7 +1,7 @@
prgbindir=$(prefix)/bin/system_test
prgbin_PROGRAMS = test_engine
SUBDIRS =
-AM_CPPFLAGS = $(CPPFLAGS) -g -O2 -pthread
+AM_CPPFLAGS = $(CPPFLAGS) -g -pthread
test_engine_SOURCES = test_engine.c