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 di...@apache.org on 2007/03/31 16:09:21 UTC
svn commit: r524432 - in /webservices/axis2/trunk/c: axiom/src/om/ include/
modules/core/clientapi/ modules/core/description/ modules/core/engine/
modules/core/phaseresolver/ samples/client/echo/ savan/
savan/samples/server/publisher/ savan/src/core/ s...
Author: dinesh
Date: Sat Mar 31 07:09:20 2007
New Revision: 524432
URL: http://svn.apache.org/viewvc?view=rev&rev=524432
Log:
fixed:axis2c-146 (disengaging a module), fixed savan build
Modified:
webservices/axis2/trunk/c/axiom/src/om/Makefile.am
webservices/axis2/trunk/c/include/axis2_phase.h
webservices/axis2/trunk/c/include/axis2_phase_holder.h
webservices/axis2/trunk/c/include/axis2_phase_resolver.h
webservices/axis2/trunk/c/include/axis2_svc.h
webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
webservices/axis2/trunk/c/modules/core/description/op.c
webservices/axis2/trunk/c/modules/core/description/svc.c
webservices/axis2/trunk/c/modules/core/engine/phase.c
webservices/axis2/trunk/c/modules/core/phaseresolver/phase_holder.c
webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c
webservices/axis2/trunk/c/samples/client/echo/echo.c
webservices/axis2/trunk/c/savan/build.sh
webservices/axis2/trunk/c/savan/samples/server/publisher/Makefile.am
webservices/axis2/trunk/c/savan/src/core/savan_sub_processor.c
webservices/axis2/trunk/c/savan/src/msgreceivers/savan_msg_recv.c
Modified: webservices/axis2/trunk/c/axiom/src/om/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/Makefile.am?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/Makefile.am (original)
+++ webservices/axis2/trunk/c/axiom/src/om/Makefile.am Sat Mar 31 07:09:20 2007
@@ -18,7 +18,7 @@
om_navigator.c
libaxis2_axiom_la_LIBADD = $(top_builddir)/src/soap/libaxis2_soap.la \
- $(top_builddir)/src/attachments/libaxis2_attachments.la \
+ $(top_builddir)/src/attachments/libaxis2_attachments.la \
$(top_builddir)/src/util/libaxis2_axiom_util.la \
../parser/${WRAPPER_DIR}/libaxis2_parser.la \
../../../util/src/libaxis2_util.la
Modified: webservices/axis2/trunk/c/include/axis2_phase.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_phase.h?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_phase.h (original)
+++ webservices/axis2/trunk/c/include/axis2_phase.h Sat Mar 31 07:09:20 2007
@@ -103,6 +103,20 @@
axis2_phase_add_handler(axis2_phase_t *phase,
const axutil_env_t *env,
axis2_handler_t *handler);
+
+
+ /**
+ * Remove the given handler from the handler list.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler pointer to handler, phase does not assume the
+ * ownership of the handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_remove_handler(axis2_phase_t *phase,
+ const axutil_env_t *env,
+ axis2_handler_t *handler);
/**
* Invokes the phase. This function will in turn call invoke method of
@@ -176,6 +190,22 @@
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_phase_add_handler_desc(axis2_phase_t *phase,
+ const axutil_env_t *env,
+ axis2_handler_desc_t *handler_desc);
+
+
+ /**
+ * Remove handler within the handler description from the list of handlers
+ * in the phase.
+ * @param phase pointer to phase
+ * @param env pointer to environment struct
+ * @param handler_desc pointer to handler description, phase does not
+ * assume the ownership of neither the handler description not the handler
+ * within the handler description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_remove_handler_desc(axis2_phase_t *phase,
const axutil_env_t *env,
axis2_handler_desc_t *handler_desc);
Modified: webservices/axis2/trunk/c/include/axis2_phase_holder.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_phase_holder.h?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_phase_holder.h (original)
+++ webservices/axis2/trunk/c/include/axis2_phase_holder.h Sat Mar 31 07:09:20 2007
@@ -90,6 +90,19 @@
const axutil_env_t *env,
struct axis2_handler_desc *handler);
+
+ /**
+ * Removes given handler from phase holder.
+ * @param phase_holder pointer to phase holder
+ * @param env pointer to environment struct
+ * @para handler pointer to handler
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_holder_remove_handler(axis2_phase_holder_t *phase_holder,
+ const axutil_env_t *env,
+ struct axis2_handler_desc *handler);
+
/**
* Gets the named phase from phase array list.
* @param phase_holder pointer to phase holder
Modified: webservices/axis2/trunk/c/include/axis2_phase_resolver.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_phase_resolver.h?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_phase_resolver.h (original)
+++ webservices/axis2/trunk/c/include/axis2_phase_resolver.h Sat Mar 31 07:09:20 2007
@@ -163,6 +163,23 @@
struct axis2_svc *svc,
struct axis2_module_desc *module_desc);
+
+ /**
+ * Disengages the given module from the given service. This means
+ * the given module would be disengaged from all operations of the given
+ * service.
+ * @param phase_resolver pointer to phase resolver
+ * @param env pointer to environment struct
+ * @param svc pointer to service
+ * @param module_desc pointer to module description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_resolver_disengage_module_from_svc(axis2_phase_resolver_t *phase_resolver,
+ const axutil_env_t *env,
+ struct axis2_svc *svc,
+ struct axis2_module_desc *module_desc);
+
/**
* Engages the given module to the given operation.
* @param phase_resolver pointer to phase resolver
@@ -173,6 +190,21 @@
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_phase_resolver_engage_module_to_op(axis2_phase_resolver_t *phase_resolver,
+ const axutil_env_t *env,
+ struct axis2_op *axis_op,
+ struct axis2_module_desc *module_desc);
+
+
+ /**
+ * Disengages the given module from the given operation.
+ * @param phase_resolver pointer to phase resolver
+ * @param env pointer to environment struct
+ * @param axis_op pointer to axis operation
+ * @param pointer to module description
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_phase_resolver_disengage_module_from_op(axis2_phase_resolver_t *phase_resolver,
const axutil_env_t *env,
struct axis2_op *axis_op,
struct axis2_module_desc *module_desc);
Modified: webservices/axis2/trunk/c/include/axis2_svc.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_svc.h?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc.h Sat Mar 31 07:09:20 2007
@@ -237,6 +237,23 @@
const axutil_env_t *env,
struct axis2_module_desc *module_desc,
struct axis2_conf *conf);
+
+ /**
+ * Disengages given module from service.
+ * @param svc pointer to service struct
+ * @param env pointer to environment struct
+ * @param module_desc pointer to module description to be engaged,
+ * service does not assume the ownership of module
+ * @param conf pointer to configuration, it is configuration that holds
+ * module information
+ * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+ */
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_svc_disengage_module(axis2_svc_t *svc,
+ const axutil_env_t *env,
+ struct axis2_module_desc *module_desc,
+ struct axis2_conf *conf);
+
/**
* Check whether a given module is engaged to the service.
Modified: webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/svc_client.c Sat Mar 31 07:09:20 2007
@@ -417,19 +417,23 @@
AXIS2_PARAM_CHECK(env->error, module_name, AXIS2_FAILURE);
mod_qname = axutil_qname_create(env, module_name, NULL, NULL);
+ if (mod_qname)
+ {
+ module = axis2_conf_get_module(svc_client->conf, env, mod_qname);
+ axutil_qname_free(mod_qname, env);
+ mod_qname = NULL;
+ }
+ else
+ {
+ return AXIS2_FAILURE;
+ }
- module = axis2_conf_get_module(svc_client->conf, env, mod_qname);
-
- /**TODO:uncomment once axis2_svc_disengage_module is implemented
if (module)
{
- return AXIS2_SVC_DISENGAGE_MODULE(svc_client->svc, env, module);
-
+ return axis2_svc_disengage_module(svc_client->svc, env, module,
+ svc_client->conf);
}
- */
-
return AXIS2_FAILURE;
-
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
Modified: webservices/axis2/trunk/c/modules/core/description/op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/op.c?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/op.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/op.c Sat Mar 31 07:09:20 2007
@@ -587,6 +587,42 @@
return axutil_array_list_add(op->engaged_module_list, env, module_desc);
}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_op_remove_from_engaged_module_list(axis2_op_t *op,
+ const axutil_env_t *env,
+ axis2_module_desc_t *module_desc)
+{
+ axis2_module_desc_t *module_desc_l = NULL;
+ int size = 0;
+ int index = 0;
+ const axutil_qname_t *module_qname = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, module_desc, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, op->engaged_module_list, AXIS2_FAILURE);
+
+ size = axutil_array_list_size(op->engaged_module_list, env);
+
+ module_qname = axis2_module_desc_get_qname(module_desc, env);
+ for (index = 0; index < size; index++)
+ {
+ const axutil_qname_t *module_qname_l = NULL;
+
+ module_desc_l =
+ (axis2_module_desc_t *) axutil_array_list_get(op->engaged_module_list, env, index);
+ module_qname_l = axis2_module_desc_get_qname(module_desc_l, env);
+
+ if (axutil_qname_equals(module_qname, env, module_qname_l))
+ {
+ axutil_array_list_remove(op->engaged_module_list, env, index);
+ return AXIS2_SUCCESS;
+ }
+
+ }
+ return AXIS2_SUCCESS;
+}
+
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
axis2_op_get_all_modules(const axis2_op_t *op,
const axutil_env_t *env)
Modified: webservices/axis2/trunk/c/modules/core/description/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/svc.c?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/svc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/svc.c Sat Mar 31 07:09:20 2007
@@ -648,6 +648,30 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_svc_disengage_module(axis2_svc_t *svc,
+ const axutil_env_t *env,
+ axis2_module_desc_t *module_desc,
+ axis2_conf_t *conf)
+{
+ axis2_phase_resolver_t *phase_resolver = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, module_desc, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, conf, AXIS2_FAILURE);
+
+ phase_resolver = axis2_phase_resolver_create_with_config(env, conf);
+ if (!phase_resolver)
+ {
+ return AXIS2_FAILURE;
+ }
+ status = axis2_phase_resolver_disengage_module_from_svc(phase_resolver, env, svc,
+ module_desc);
+
+ return status;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_svc_add_module_ops(axis2_svc_t *svc,
const axutil_env_t *env,
axis2_module_desc_t *module_desc,
Modified: webservices/axis2/trunk/c/modules/core/engine/phase.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/engine/phase.c?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/phase.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/phase.c Sat Mar 31 07:09:20 2007
@@ -28,6 +28,12 @@
axutil_array_list_t *list,
axis2_handler_t *handler);
+static axis2_status_t
+axis2_phase_remove_unique(
+ const axutil_env_t *env,
+ axutil_array_list_t *list,
+ axis2_handler_t *handler);
+
struct axis2_phase
{
/** phase name */
@@ -127,6 +133,21 @@
return axis2_phase_add_unique(env, phase->handlers, handler);
}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_phase_remove_handler(
+ axis2_phase_t *phase,
+ const axutil_env_t *env,
+ axis2_handler_t *handler)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_LOG_INFO(env->log, "Handler %s romoved from phase %s",
+ axutil_string_get_buffer(AXIS2_HANDLER_GET_NAME(handler, env), env),
+ phase->name);
+
+ return axis2_phase_remove_unique(env, phase->handlers, handler);
+}
+
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_phase_invoke(
axis2_phase_t *phase,
@@ -968,6 +989,23 @@
return;
}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_phase_remove_handler_desc(
+ axis2_phase_t *phase,
+ const axutil_env_t *env,
+ axis2_handler_desc_t *handler_desc)
+{
+ axis2_handler_t *handler;
+ handler = axis2_handler_desc_get_handler(handler_desc, env);
+ if (!handler)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ return axis2_phase_remove_unique(env, phase->handlers, handler);
+}
+
static axis2_status_t
axis2_phase_add_unique(
const axutil_env_t *env,
@@ -1004,4 +1042,39 @@
return AXIS2_SUCCESS;
}
+static axis2_status_t
+axis2_phase_remove_unique(
+ const axutil_env_t *env,
+ axutil_array_list_t *list,
+ axis2_handler_t *handler)
+{
+ int i = 0, size = 0;
+ axis2_bool_t remove_handler = AXIS2_FALSE;
+ const axutil_string_t *handler_name = NULL;
+
+ handler_name = AXIS2_HANDLER_GET_NAME(handler, env);
+ size = axutil_array_list_size(list, env);
+ for (i = 0; i < size; i++)
+ {
+ axis2_handler_t *obj = NULL;
+ const axutil_string_t *obj_name = NULL;
+
+ obj = (axis2_handler_t *) axutil_array_list_get(list, env, i);
+ obj_name = AXIS2_HANDLER_GET_NAME(obj, env);
+ if (obj == handler)
+ {
+ remove_handler = AXIS2_TRUE;
+ break;
+ }
+ else if (!axis2_strcmp(axutil_string_get_buffer(handler_name, env),
+ axutil_string_get_buffer(obj_name, env)))
+ {
+ remove_handler = AXIS2_TRUE;
+ break;
+ }
+ }
+ if (AXIS2_TRUE == remove_handler)
+ axutil_array_list_remove(list, env, i);
+ return AXIS2_SUCCESS;
+}
Modified: webservices/axis2/trunk/c/modules/core/phaseresolver/phase_holder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/phaseresolver/phase_holder.c?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/modules/core/phaseresolver/phase_holder.c (original)
+++ webservices/axis2/trunk/c/modules/core/phaseresolver/phase_holder.c Sat Mar 31 07:09:20 2007
@@ -140,6 +140,42 @@
return status;
}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_phase_holder_remove_handler(axis2_phase_holder_t *phase_holder,
+ const axutil_env_t *env,
+ axis2_handler_desc_t *handler)
+{
+ const axis2_char_t *phase_name = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "axis2_phase_holder_remove_handler start");
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, handler, AXIS2_FAILURE);
+
+ phase_name = axis2_phase_rule_get_name(
+ axis2_handler_desc_get_rules(handler, env), env);
+ if (AXIS2_TRUE == axis2_phase_holder_is_phase_exist(phase_holder, env,
+ phase_name))
+ {
+ axis2_phase_t *phase = NULL;
+
+ phase = axis2_phase_holder_get_phase(phase_holder, env, phase_name);
+ status = axis2_phase_remove_handler_desc(phase, env, handler);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Remove handler %s from phase %s",
+ axutil_string_get_buffer(axis2_handler_desc_get_name(handler, env), env),
+ phase_name);
+ }
+ else
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_PHASE, AXIS2_FAILURE);
+ status = AXIS2_FAILURE;
+ }
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "axis2_phase_holder_remove_handler end status = %s",
+ status ? "SUCCESS" : "FAILURE");
+ return status;
+}
+
AXIS2_EXTERN axis2_phase_t *AXIS2_CALL
axis2_phase_holder_get_phase(const axis2_phase_holder_t *phase_holder,
const axutil_env_t *env,
Modified: webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c (original)
+++ webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c Sat Mar 31 07:09:20 2007
@@ -1317,7 +1317,87 @@
}
}
- return status;
+ return status;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_phase_resolver_disengage_module_from_svc(
+ axis2_phase_resolver_t *phase_resolver,
+ const axutil_env_t *env,
+ axis2_svc_t *svc,
+ axis2_module_desc_t *module_desc)
+{
+ axutil_hash_t *ops = NULL;
+ axutil_hash_index_t *index_i = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+ const axutil_qname_t *module_d_qname = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ ops = axis2_svc_get_all_ops(svc, env);
+ if (!ops)
+ {
+ return AXIS2_FAILURE;
+ }
+/* status = axis2_svc_add_module_ops(svc, env, module_desc, */
+/* phase_resolver->axis2_config); */
+
+/* if (AXIS2_SUCCESS != status) */
+/* { */
+/* return status; */
+/* } */
+ module_d_qname = axis2_module_desc_get_qname(module_desc, env);
+ for (index_i = axutil_hash_first(ops, env); index_i; index_i =
+ axutil_hash_next(env, index_i))
+ {
+ axutil_array_list_t *modules = NULL;
+ axis2_op_t *op_desc = NULL;
+ int size = 0;
+ int j = 0;
+ void *v = NULL;
+ axis2_bool_t engaged = AXIS2_FALSE;
+
+ axutil_hash_this(index_i, NULL, NULL, &v);
+ op_desc = (axis2_op_t *) v;
+ modules = axis2_op_get_all_modules(op_desc, env);
+ if (modules)
+ {
+ size = axutil_array_list_size(modules, env);
+ }
+ for (j = 0; j < size; j++)
+ {
+ axis2_module_desc_t *module_desc_l = NULL;
+ const axutil_qname_t *module_d_qname_l = NULL;
+
+ module_desc_l = axutil_array_list_get(modules, env, j);
+ module_d_qname_l = axis2_module_desc_get_qname(module_desc_l, env);
+ if (AXIS2_TRUE == axutil_qname_equals(module_d_qname, env,
+ module_d_qname_l))
+ {
+ engaged = AXIS2_TRUE;
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "Module %s already engaged.",
+ axutil_qname_get_localpart(module_d_qname, env));
+ break;
+ }
+ }
+
+ if (AXIS2_TRUE == engaged)
+ {
+ status = axis2_phase_resolver_disengage_module_from_op(
+ phase_resolver, env, op_desc, module_desc);
+ if (AXIS2_SUCCESS != status)
+ {
+ return status;
+ }
+
+ status = axis2_op_remove_from_engaged_module_list(op_desc, env,
+ module_desc);
+ }
+
+ }
+ return status;
}
@@ -1447,6 +1527,153 @@
axis2_phase_holder_create_with_phases(env, phase_list);
status = axis2_phase_holder_add_handler(phase_holder, env, metadata);
+ axis2_phase_holder_free(phase_holder, env);
+ phase_holder = NULL;
+ if (AXIS2_SUCCESS != status)
+ {
+ return status;
+ }
+ }
+ }
+ }
+
+ if(phase_holder)
+ {
+ axis2_phase_holder_free(phase_holder, env);
+ phase_holder = NULL;
+ }
+ }
+
+ return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_phase_resolver_disengage_module_from_op(
+ axis2_phase_resolver_t *phase_resolver,
+ const axutil_env_t *env,
+ axis2_op_t *axis_op,
+ axis2_module_desc_t *module_desc)
+{
+ int type = 0;
+ axis2_phase_holder_t *phase_holder = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, axis_op, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, module_desc, AXIS2_FAILURE);
+
+ for (type = 1; type < 5; type++)
+ {
+ axis2_flow_t *flow = NULL;
+ axutil_array_list_t *phases = NULL;
+
+ switch (type)
+ {
+ case AXIS2_IN_FLOW:
+ {
+ phases = axis2_op_get_in_flow(axis_op, env);
+ break;
+ }
+ case AXIS2_OUT_FLOW:
+ {
+ phases = axis2_op_get_out_flow(axis_op, env);
+ break;
+ }
+ case AXIS2_FAULT_IN_FLOW:
+ {
+ phases = axis2_op_get_fault_in_flow(axis_op, env);
+ break;
+ }
+ case AXIS2_FAULT_OUT_FLOW:
+ {
+ phases = axis2_op_get_fault_out_flow(axis_op, env);
+ break;
+ }
+ }
+
+ if (phases)
+ {
+ phase_holder =
+ axis2_phase_holder_create_with_phases(env, phases);
+ }
+
+
+ switch (type)
+ {
+ case AXIS2_IN_FLOW:
+ {
+ flow = axis2_module_desc_get_in_flow(module_desc, env);
+ break;
+ }
+ case AXIS2_OUT_FLOW:
+ {
+ flow = axis2_module_desc_get_out_flow(module_desc, env);
+ break;
+ }
+ case AXIS2_FAULT_IN_FLOW:
+ {
+ flow = axis2_module_desc_get_fault_in_flow(module_desc, env);
+ break;
+ }
+ case AXIS2_FAULT_OUT_FLOW:
+ {
+ flow = axis2_module_desc_get_fault_out_flow(module_desc, env);
+ break;
+ }
+ }
+
+ if (flow && phase_holder)
+ {
+ int j = 0;
+ int handler_count = 0;
+
+ handler_count = axis2_flow_get_handler_count(flow, env);
+ for (j = 0; j < handler_count; j++)
+ {
+ axis2_handler_desc_t *metadata = NULL;
+ const axis2_char_t *phase_name = NULL;
+ axis2_phase_rule_t *phase_rule = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+
+ metadata = axis2_flow_get_handler(flow, env, j);
+ phase_rule = axis2_handler_desc_get_rules(metadata, env);
+ phase_name = axis2_phase_rule_get_name(phase_rule, env);
+ if ((0 != axis2_strcmp(AXIS2_PHASE_TRANSPORT_IN, phase_name)) &&
+ (0 != axis2_strcmp(AXIS2_PHASE_DISPATCH, phase_name)) &&
+ (0 != axis2_strcmp(AXIS2_PHASE_POST_DISPATCH, phase_name)) &&
+ (0 != axis2_strcmp(AXIS2_PHASE_PRE_DISPATCH, phase_name)))
+ {
+ status = axis2_phase_holder_remove_handler(phase_holder,
+ env, metadata);
+ if (AXIS2_SUCCESS != status)
+ {
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "Handler Removal failed for %s phase", phase_name);
+ axis2_phase_holder_free(phase_holder, env);
+ return status;
+ }
+
+ }
+ if ((0 == axis2_strcmp(AXIS2_PHASE_TRANSPORT_IN, phase_name)) ||
+ (0 == axis2_strcmp(AXIS2_PHASE_DISPATCH, phase_name)) ||
+ (0 == axis2_strcmp(AXIS2_PHASE_POST_DISPATCH, phase_name)) ||
+ (0 == axis2_strcmp(AXIS2_PHASE_PRE_DISPATCH, phase_name)))
+ {
+ axutil_array_list_t *phase_list = NULL;
+ axis2_phase_holder_t *phase_holder = NULL;
+
+ phase_list =
+ axis2_conf_get_in_phases_upto_and_including_post_dispatch(
+ phase_resolver->axis2_config, env);
+ if (phase_holder)
+ {
+ axis2_phase_holder_free(phase_holder, env);
+ phase_holder = NULL;
+ }
+ phase_holder =
+ axis2_phase_holder_create_with_phases(env, phase_list);
+
+ status = axis2_phase_holder_remove_handler(phase_holder, env, metadata);
axis2_phase_holder_free(phase_holder, env);
phase_holder = NULL;
if (AXIS2_SUCCESS != status)
Modified: webservices/axis2/trunk/c/samples/client/echo/echo.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/echo/echo.c?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/samples/client/echo/echo.c (original)
+++ webservices/axis2/trunk/c/samples/client/echo/echo.c Sat Mar 31 07:09:20 2007
@@ -89,7 +89,8 @@
axis2_svc_client_set_options(svc_client, env, options);
/* Engage addressing module */
- axis2_svc_client_engage_module(svc_client, env, AXIS2_MODULE_ADDRESSING);
+ axis2_svc_client_disengage_module(svc_client, env, AXIS2_MODULE_ADDRESSING);
+
/* Build the SOAP request message payload using OM API.*/
payload = build_om_payload_for_echo_svc(env);
Modified: webservices/axis2/trunk/c/savan/build.sh
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/savan/build.sh?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/savan/build.sh (original)
+++ webservices/axis2/trunk/c/savan/build.sh Sat Mar 31 07:09:20 2007
@@ -1,5 +1,5 @@
#!/bin/bash
./autogen.sh
-./configure --prefix=${AXIS2C_HOME}/savan --enable-static=no --with-axis2_util=${AXIS2C_HOME}/include --with-axiom=${AXIS2C_HOME}/include
+./configure --prefix=${AXIS2C_HOME} --enable-static=no --with-axis2_util=${AXIS2C_HOME}/include --with-axiom=${AXIS2C_HOME}/include
make
make install
Modified: webservices/axis2/trunk/c/savan/samples/server/publisher/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/savan/samples/server/publisher/Makefile.am?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/savan/samples/server/publisher/Makefile.am (original)
+++ webservices/axis2/trunk/c/savan/samples/server/publisher/Makefile.am Sat Mar 31 07:09:20 2007
@@ -7,8 +7,7 @@
libpublisher_la_SOURCES = publisher.c publisher_skeleton.c
-libpublisher_la_LIBADD = -L$(AXIS2C_HOME)/modules/savan \
- -lmod_savan
+libpublisher_la_LIBADD = $(top_builddir)/src/core/libmod_savan.la
INCLUDES = -I$(AXIS2C_HOME)/include \
-I$(top_builddir)/include \
Modified: webservices/axis2/trunk/c/savan/src/core/savan_sub_processor.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/savan/src/core/savan_sub_processor.c?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/savan/src/core/savan_sub_processor.c (original)
+++ webservices/axis2/trunk/c/savan/src/core/savan_sub_processor.c Sat Mar 31 07:09:20 2007
@@ -461,8 +461,7 @@
* Pass a copy because msg ctx free function frees all properties */
property = axutil_property_create(env);
axutil_property_set_value(property, env, (void*)axis2_strdup(env, id));
- axis2_msg_ctx_set_property(msg_ctx, env, SAVAN_KEY_SUB_ID, property,
- AXIS2_FALSE);
+ axis2_msg_ctx_set_property(msg_ctx, env, SAVAN_KEY_SUB_ID, property);
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/savan/src/msgreceivers/savan_msg_recv.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/savan/src/msgreceivers/savan_msg_recv.c?view=diff&rev=524432&r1=524431&r2=524432
==============================================================================
--- webservices/axis2/trunk/c/savan/src/msgreceivers/savan_msg_recv.c (original)
+++ webservices/axis2/trunk/c/savan/src/msgreceivers/savan_msg_recv.c Sat Mar 31 07:09:20 2007
@@ -220,7 +220,7 @@
axiom_element_set_text(addr_elem, env, submgr_addr, addr_node);
/* Get subscriber id from the msg ctx */
- property = axis2_msg_ctx_get_property(msg_ctx, env, SAVAN_KEY_SUB_ID, AXIS2_FALSE);
+ property = axis2_msg_ctx_get_property(msg_ctx, env, SAVAN_KEY_SUB_ID);
id = (axis2_char_t*)axutil_property_get_value(property, env);
/* Set sub id as a ref param */
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org