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 sa...@apache.org on 2006/07/08 20:11:34 UTC
svn commit: r420175 - in /webservices/axis2/trunk/c: include/axis2_msg_ctx.h
modules/core/context/msg_ctx.c
Author: sahan
Date: Sat Jul 8 11:11:33 2006
New Revision: 420175
URL: http://svn.apache.org/viewvc?rev=420175&view=rev
Log:
Added flow information to msg_ctx to track the flow
Modified:
webservices/axis2/trunk/c/include/axis2_msg_ctx.h
webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
Modified: webservices/axis2/trunk/c/include/axis2_msg_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_msg_ctx.h?rev=420175&r1=420174&r2=420175&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_ctx.h Sat Jul 8 11:11:33 2006
@@ -62,6 +62,11 @@
#define AXIS2_HTTP_CLIENT "AXIS2_HTTP_CLIENT"
#define AXIS2_TRANSPORT_URL "TransportURL"
+/* Message flows */
+#define AXIS2_IN_FLOW 1
+#define AXIS2_IN_FAULT_FLOW 2
+#define AXIS2_OUT_FLOW 3
+#define AXIS2_OUT_FAULT_FLOW 4
typedef struct axis2_msg_ctx_ops axis2_msg_ctx_ops_t;
typedef struct axis2_msg_ctx axis2_msg_ctx_t;
@@ -687,6 +692,17 @@
axis2_msg_ctx_t *msg_ctx,
const axis2_env_t *env,
struct axis2_options *options);
+
+ axis2_status_t (AXIS2_CALL *
+ set_flow )(
+ axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ int flow);
+
+ int (AXIS2_CALL *
+ get_flow )(
+ axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env);
axis2_status_t (AXIS2_CALL *
set_execution_chain)(axis2_msg_ctx_t *msg_ctx,
@@ -983,6 +999,12 @@
#define AXIS2_MSG_CTX_SET_OPTIONS(msg_ctx, env, options) \
((msg_ctx)->ops->set_options(msg_ctx, env, options))
+
+#define AXIS2_MSG_CTX_SET_FLOW(msg_ctx, env, flow) \
+ ((msg_ctx)->ops->set_flow(msg_ctx, env, flow))
+
+#define AXIS2_MSG_CTX_GET_FLOW(msg_ctx, env) \
+ ((msg_ctx)->ops->get_flow(msg_ctx, env))
#define AXIS2_MSG_CTX_SET_EXECUTION_CHAIN(msg_ctx, env, chain) \
((msg_ctx)->ops->set_execution_chain(msg_ctx, env, chain))
Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/msg_ctx.c?rev=420175&r1=420174&r2=420175&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Sat Jul 8 11:11:33 2006
@@ -111,6 +111,8 @@
axis2_qname_t *svc_qname;
/** op qname */
axis2_qname_t *op_qname;
+ /* To keep track of the direction */
+ int flow;
/** The chain of Handlers/Phases for processing this message */
axis2_array_list_t *execution_chain;
/** Index into the execution chain of the currently executing handler */
@@ -425,6 +427,14 @@
axis2_options_t *options);
axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_flow (axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ int flow);
+
+int AXIS2_CALL
+axis2_msg_ctx_get_flow (axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env);
+axis2_status_t AXIS2_CALL
axis2_msg_ctx_set_execution_chain(axis2_msg_ctx_t *msg_ctx,
const axis2_env_t *env,
axis2_array_list_t *execution_chain);
@@ -450,8 +460,6 @@
int AXIS2_CALL
axis2_msg_ctx_get_current_phase_index(const axis2_msg_ctx_t *msg_ctx,
const axis2_env_t *env);
-
-
/************************* End of function headers ****************************/
AXIS2_EXTERN axis2_msg_ctx_t * AXIS2_CALL
@@ -507,6 +515,7 @@
msg_ctx_impl->svc_grp_id = NULL;
msg_ctx_impl->svc_qname = NULL;
msg_ctx_impl->op_qname = NULL;
+ msg_ctx_impl->flow = AXIS2_IN_FLOW;
msg_ctx_impl->execution_chain = NULL;
msg_ctx_impl->current_handler_index = 0;
msg_ctx_impl->current_phase_index = 0;
@@ -630,6 +639,8 @@
msg_ctx_impl->msg_ctx.ops->find_svc = axis2_msg_ctx_find_svc;
msg_ctx_impl->msg_ctx.ops->find_op = axis2_msg_ctx_find_op;
msg_ctx_impl->msg_ctx.ops->set_options = axis2_msg_ctx_set_options;
+ msg_ctx_impl->msg_ctx.ops->set_flow = axis2_msg_ctx_set_flow;
+ msg_ctx_impl->msg_ctx.ops->get_flow = axis2_msg_ctx_get_flow;
msg_ctx_impl->msg_ctx.ops->get_execution_chain =
axis2_msg_ctx_get_execution_chain;
msg_ctx_impl->msg_ctx.ops->set_execution_chain =
@@ -2034,6 +2045,24 @@
}
return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_flow (axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ int flow)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_INTF_TO_IMPL(msg_ctx)->flow = flow;
+ return AXIS2_SUCCESS;
+}
+
+int AXIS2_CALL
+axis2_msg_ctx_get_flow (axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env)
+{
+ AXIS2_ENV_CHECK(env, -1);
+ return AXIS2_INTF_TO_IMPL(msg_ctx)->flow;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org