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 da...@apache.org on 2008/06/26 07:45:06 UTC

svn commit: r671784 [1/2] - in /webservices/axis2/trunk/c: include/ src/core/deployment/ src/core/description/ src/core/engine/ src/core/phaseresolver/

Author: damitha
Date: Wed Jun 25 22:45:04 2008
New Revision: 671784

URL: http://svn.apache.org/viewvc?rev=671784&view=rev
Log:
Giving solution to AXIS2C-1202

Modified:
    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/src/core/deployment/conf_builder.c
    webservices/axis2/trunk/c/src/core/deployment/dep_engine.c
    webservices/axis2/trunk/c/src/core/deployment/phases_info.c
    webservices/axis2/trunk/c/src/core/description/svc.c
    webservices/axis2/trunk/c/src/core/description/svc_grp.c
    webservices/axis2/trunk/c/src/core/engine/conf.c
    webservices/axis2/trunk/c/src/core/phaseresolver/phase_holder.c
    webservices/axis2/trunk/c/src/core/phaseresolver/phase_resolver.c

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?rev=671784&r1=671783&r2=671784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_phase_holder.h (original)
+++ webservices/axis2/trunk/c/include/axis2_phase_holder.h Wed Jun 25 22:45:04 2008
@@ -122,8 +122,10 @@
                     const axis2_char_t * phase_name);
 
     /**
-     * Builds the transport phase. This method loads the corresponding 
-     * handlers and added them into correct phase. 
+     * Builds the transport phase. This method loads the corresponding handlers and added them into 
+     * correct phase. This function is no longer used in Axis2/C and
+     * marked as deprecated.
+     * @deprecated
      * @param phase_holder pointer to phase holder
      * @param env pointer to environment struct
      * @param phase pointer to phase, phase holder does not assume the 
@@ -133,7 +135,6 @@
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
-
     axis2_phase_holder_build_transport_handler_chain(
         axis2_phase_holder_t * phase_holder,
         const axutil_env_t * env,

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?rev=671784&r1=671783&r2=671784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_phase_resolver.h (original)
+++ webservices/axis2/trunk/c/include/axis2_phase_resolver.h Wed Jun 25 22:45:04 2008
@@ -29,12 +29,24 @@
 /**
  * @defgroup axis2_phase_res phase resolver
  * @ingroup axis2_phase_resolver
- * Engaging module descriptions into axis2 configuration, services and 
- * operations are done here. This is accomplished mainly by following
- * operations respectively.
+ * Engaging modules into axis2 configuration, services and operations are done here. 
+ * This is accomplished mainly by following operations respectively.
  * axis2_phase_resolver_engage_module_globally().
  * axis2_phase_resolver_engage_module_to_svc().
  * axis2_phase_resolver_engage_module_to_op().
+ * The user normally engage a module programmatically or using configuration files. When an
+ * application client engage a module programmatically he can use axis2_op_client_engage_module()
+ * function, or axis2_svc_client_engage_module() function. Engaging using configuration files means
+ * adding a module_ref parameter into services.xml or axis2.xml.
+ * In whatever way engaging a module finally sums upto addding handlers into each operations flows.
+ * Here flows in operations are actually array lists of phases
+ * (See op.c).
+ * There are user defined phases and system defined phases(See axis2.xml). Handlers 
+ * These handlers are taken from modules or  for system defined and defined by user defined.
+ * Handlers for all user defined phases are taken from modules. when modules are built from module.xml
+ * these handlers are added into module flows(See moudule_desc.c).
+ *
+ *
  * @{
  */
 
@@ -89,76 +101,81 @@
         const axutil_env_t * env);
 
     /**
-     * Builds the execution chains. Execution chains are collection of 
-     * phases that are invoked in the execution path.
+     * Engages the given module globally. Engaging a module globally means 
+     * that the given module would be engaged to all operations in all 
+     * services.
      * @param phase_resolver pointer to phase resolver
      * @param env pointer to environment struct
+     * @param module pointer to module
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
-    axis2_phase_resolver_build_chains(
+
+    axis2_phase_resolver_engage_module_globally(
         axis2_phase_resolver_t * phase_resolver,
-        const axutil_env_t * env);
+        const axutil_env_t * env,
+        struct axis2_module_desc *module);
 
     /**
-     * Builds execution chains for given operation.
+     * Engages the given module to the given service. This means 
+     * the given module would be engaged to all operations of the given 
+     * service. 
      * @param phase_resolver pointer to phase resolver
      * @param env pointer to environment struct
-     * @param op pointer to operation
+     * @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_build_module_op(
+    axis2_phase_resolver_engage_module_to_svc(
         axis2_phase_resolver_t * phase_resolver,
         const axutil_env_t * env,
-        struct axis2_op *op);
+        struct axis2_svc *svc,
+        struct axis2_module_desc *module_desc);
 
     /**
-     * Builds transport chains.
+     * Engages the given module to 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_build_transport_chains(
+    axis2_phase_resolver_engage_module_to_op(
         axis2_phase_resolver_t * phase_resolver,
-        const axutil_env_t * env);
+        const axutil_env_t * env,
+        struct axis2_op *axis_op,
+        struct axis2_module_desc *module_desc);
 
     /**
-     * Engages the given module globally. Engaging a module globally means 
-     * that the given module would be engaged to all operations in all 
-     * services.
+     * Builds the execution chains. Execution chains are collection of phases that are invoked in
+     * the execution path. This will be moved into the implementation c file in the next release. 
+     * Therefore this is marked as deprecated.
+     * @deprecated
      * @param phase_resolver pointer to phase resolver
      * @param env pointer to environment struct
-     * @param module pointer to module
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
-
-    axis2_phase_resolver_engage_module_globally(
+    axis2_phase_resolver_build_execution_chains_for_svc(
         axis2_phase_resolver_t * phase_resolver,
-        const axutil_env_t * env,
-        struct axis2_module_desc *module);
+        const axutil_env_t * env);
 
     /**
-     * Engages the given module to the given service. This means 
-     * the given module would be engaged to all operations of the given 
-     * service. 
+     * Builds execution chains for given operation.
      * @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
+     * @param op pointer to operation
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
 
-    axis2_phase_resolver_engage_module_to_svc(
+    axis2_phase_resolver_build_execution_chains_for_module_op(
         axis2_phase_resolver_t * phase_resolver,
         const axutil_env_t * env,
-        struct axis2_svc *svc,
-        struct axis2_module_desc *module_desc);
+        struct axis2_op *op);
 
     /**
      * Disengages the given module from the given service. This means 
@@ -171,7 +188,6 @@
      * @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,
@@ -179,7 +195,7 @@
         struct axis2_module_desc *module_desc);
 
     /**
-     * Engages the given module to the given operation.
+     * 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
@@ -187,28 +203,24 @@
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
-
-    axis2_phase_resolver_engage_module_to_op(
+    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);
 
     /**
-     * Disengages the given module from the given operation.
+     * Builds transport chains. This function is no longer used in Axis2/C and hence
+     * marked as deprecated.
+     * @deprecated
      * @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_build_transport_chains(
         axis2_phase_resolver_t * phase_resolver,
-        const axutil_env_t * env,
-        struct axis2_op *axis_op,
-        struct axis2_module_desc *module_desc);
+        const axutil_env_t * env);
 
     /**
      * Creates phase resolver struct.

Modified: webservices/axis2/trunk/c/include/axis2_svc.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_svc.h?rev=671784&r1=671783&r2=671784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc.h Wed Jun 25 22:45:04 2008
@@ -300,6 +300,17 @@
         axutil_qname_t * module_qname);
 
     /**
+     * Return the engaged module list.
+     * @param svc pointer to service struct
+     * @param env pointer to environment struct
+     * @return engaged module list 
+     */
+    AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+    axis2_svc_get_engaged_module_list(
+        const axis2_svc_t * svc,
+        const axutil_env_t * env);
+
+    /**
      * Adds operations defined in a module to this service. It is possible 
      * to define operations that are associated to a module in a module.xml 
      * file. These operations in turn could be invoked in relation to a 

Modified: webservices/axis2/trunk/c/src/core/deployment/conf_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/conf_builder.c?rev=671784&r1=671783&r2=671784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/conf_builder.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/conf_builder.c Wed Jun 25 22:45:04 2008
@@ -456,20 +456,20 @@
         }
         class_name = axiom_attribute_get_value(disp_att, env);
         dll_desc = axutil_dll_desc_create(env);
-        dll_name =
-            axutil_dll_desc_create_platform_specific_dll_name(dll_desc, env,
-                                                              class_name);
+        dll_name = axutil_dll_desc_create_platform_specific_dll_name(dll_desc, env, class_name);
         axutil_dll_desc_set_name(dll_desc, env, dll_name);
         axutil_dll_desc_set_type(dll_desc, env, AXIS2_HANDLER_DLL);
         impl_info_param = axutil_param_create(env, class_name, NULL);
         if (!impl_info_param)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Parameter creation failed for %s. Unable to continue", 
-                    class_name);
+                    "Parameter creation failed for %s. Unable to continue", class_name);
+
             axis2_phase_free(disp_phase, env);
+
             return AXIS2_FAILURE;
         }
+
         axutil_param_set_value(impl_info_param, env, dll_desc);
         axutil_param_set_value_free(impl_info_param, env,
                                     axutil_dll_desc_free_void_arg);
@@ -490,10 +490,9 @@
     if (!found_disp)
     {
         axis2_phase_free(disp_phase, env);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_DISPATCHER_FOUND,
-                        AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No dispatcher found."\
-            " Unable to continue");
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_DISPATCHER_FOUND, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No dispatcher found. Unable to continue");
+
         return AXIS2_FAILURE;
     }
     else
@@ -503,13 +502,15 @@
         if (!status)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Setting dispatch phase failed. Unable to continue");
+                    "Setting dispatch phase failed. Unable to continue");
+
             axis2_phase_free(disp_phase, env);
+
             return status;
         }
     }
-    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, 
-        "Exit:axis2_conf_builder_process_disp_order");
+
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:axis2_conf_builder_process_disp_order");
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/src/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/dep_engine.c?rev=671784&r1=671783&r2=671784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/dep_engine.c Wed Jun 25 22:45:04 2008
@@ -1221,8 +1221,7 @@
         }
 
         ops = axis2_svc_get_all_ops(svc, env);
-        for (index_i = axutil_hash_first(ops, env);
-             index_i; index_i = axutil_hash_next(env, index_i))
+        for (index_i = axutil_hash_first(ops, env); index_i; index_i = axutil_hash_next(env, index_i))
         {
             void *v = NULL;
             axis2_op_t *op_desc = NULL;
@@ -1245,28 +1244,27 @@
 
                 module_qname = (axutil_qname_t *) axutil_array_list_get(modules,
                                                                         env, k);
-                module = axis2_conf_get_module(dep_engine->conf, env,
-                                               module_qname);
+                module = axis2_conf_get_module(dep_engine->conf, env, module_qname);
 
                 if (module)
                 {
-                    axis2_op_engage_module(op_desc, env, module,
-                                           dep_engine->conf);
+                    axis2_op_engage_module(op_desc, env, module, dep_engine->conf);
                 }
                 else
                 {
-                    AXIS2_ERROR_SET(env->error,
-                                    AXIS2_ERROR_INVALID_MODUELE_REF_BY_OP,
-                                    AXIS2_FAILURE);
+                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODUELE_REF_BY_OP, AXIS2_FAILURE);
 		            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                        "Module %s is not added to the Axis2 Configuration", 
-                        axutil_qname_get_localpart(module_qname, env));
+                            "Module %s is not added to the Axis2 Configuration", 
+                            axutil_qname_get_localpart(module_qname, env));
+
                     return AXIS2_FAILURE;
                 }
             }
         }
+
         axis2_svc_grp_add_svc(svc_metadata, env, svc);
     }
+
     return axis2_conf_add_svc_grp(dep_engine->conf, env, svc_metadata);
 }
 

Modified: webservices/axis2/trunk/c/src/core/deployment/phases_info.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/phases_info.c?rev=671784&r1=671783&r2=671784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/phases_info.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/phases_info.c Wed Jun 25 22:45:04 2008
@@ -36,7 +36,6 @@
     const axutil_env_t * env)
 {
     axis2_phases_info_t *phases_info = NULL;
-    AXIS2_ENV_CHECK(env, NULL);
 
     phases_info = (axis2_phases_info_t *) AXIS2_MALLOC(env->allocator,
                                                        sizeof
@@ -62,8 +61,6 @@
     axis2_phases_info_t * phases_info,
     const axutil_env_t * env)
 {
-    AXIS2_ENV_CHECK(env, void);
-
     if (phases_info->in_phases)
     {
         axutil_array_list_free(phases_info->in_phases, env);
@@ -83,76 +80,24 @@
     {
         axutil_array_list_free(phases_info->out_faultphases, env);
     }
+
     if (phases_info->op_in_phases)
     {
-        /*axutil_hash_index_t *i = NULL;
-           for (i = axutil_hash_first (phases_info->op_in_phases, env); i; i =
-           axutil_hash_next (env, i))
-           {
-           void *v = NULL;
-           axis2_phase_t *phase = NULL;
-
-           axutil_hash_this (i, NULL, NULL, &v);
-           phase = (axis2_phase_t *) v;
-           if(phase)
-           {
-           axis2_phase_free(phase, env);
-           }
-           } */
         axutil_hash_free(phases_info->op_in_phases, env);
     }
+
     if (phases_info->op_out_phases)
     {
-        /*axutil_hash_index_t *i = NULL;
-           for (i = axutil_hash_first (phases_info->op_out_phases, env); i; i =
-           axutil_hash_next (env, i))
-           {
-           void *v = NULL;
-           axis2_phase_t *phase = NULL;
-
-           axutil_hash_this (i, NULL, NULL, &v);
-           phase = (axis2_phase_t *) v;
-           if(phase)
-           {
-           axis2_phase_free(phase, env);
-           }
-           } */
         axutil_hash_free(phases_info->op_out_phases, env);
     }
+
     if (phases_info->op_in_faultphases)
     {
-        /*axutil_hash_index_t *i = NULL;
-           for (i = axutil_hash_first (phases_info->op_in_faultphases, env); 
-           i; i = axutil_hash_next (env, i))
-           {
-           void *v = NULL;
-           axis2_phase_t *phase = NULL;
-
-           axutil_hash_this (i, NULL, NULL, &v);
-           phase = (axis2_phase_t *) v;
-           if(phase)
-           {
-           axis2_phase_free(phase, env);
-           }
-           } */
         axutil_hash_free(phases_info->op_in_faultphases, env);
     }
+
     if (phases_info->op_out_faultphases)
     {
-        /*axutil_hash_index_t *i = NULL;
-           for (i = axutil_hash_first (phases_info->op_out_faultphases, env); 
-           i; i = axutil_hash_next (env, i))
-           {
-           void *v = NULL;
-           axis2_phase_t *phase = NULL;
-
-           axutil_hash_this (i, NULL, NULL, &v);
-           phase = (axis2_phase_t *) v;
-           if(phase)
-           {
-           axis2_phase_free(phase, env);
-           }
-           } */
         axutil_hash_free(phases_info->op_out_faultphases, env);
     }
 
@@ -170,7 +115,6 @@
     const axutil_env_t * env,
     axutil_array_list_t * in_phases)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, in_phases, AXIS2_FAILURE);
 	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 	
@@ -189,7 +133,6 @@
     const axutil_env_t * env,
     axutil_array_list_t * out_phases)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, out_phases, AXIS2_FAILURE);
 	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
@@ -208,7 +151,6 @@
     const axutil_env_t * env,
     axutil_array_list_t * in_faultphases)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, in_faultphases, AXIS2_FAILURE);
 	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
@@ -227,7 +169,6 @@
     const axutil_env_t * env,
     axutil_array_list_t * out_faultphases)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, out_faultphases, AXIS2_FAILURE);
 	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
@@ -288,7 +229,6 @@
     axutil_array_list_t *op_in_phases = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
-    AXIS2_ENV_CHECK(env, NULL);
 	AXIS2_PARAM_CHECK(env->error, phases_info, NULL);
 
     op_in_phases = axutil_array_list_create(env, 0);
@@ -307,10 +247,10 @@
     {
         phase_name = (axis2_char_t *)
             axutil_array_list_get(phases_info->in_phases, env, i);
-        if (0 == axutil_strcmp(AXIS2_PHASE_TRANSPORT_IN, phase_name) ||
-            0 == axutil_strcmp(AXIS2_PHASE_PRE_DISPATCH, phase_name) ||
-            0 == axutil_strcmp(AXIS2_PHASE_DISPATCH, phase_name) ||
-            0 == axutil_strcmp(AXIS2_PHASE_POST_DISPATCH, phase_name))
+        if (!axutil_strcmp(AXIS2_PHASE_TRANSPORT_IN, phase_name) ||
+            !axutil_strcmp(AXIS2_PHASE_PRE_DISPATCH, phase_name) ||
+            !axutil_strcmp(AXIS2_PHASE_DISPATCH, phase_name) ||
+            !axutil_strcmp(AXIS2_PHASE_POST_DISPATCH, phase_name))
         {
             /* Do nothing */
         }
@@ -349,6 +289,7 @@
             }
         }
     }
+
     return op_in_phases;
 }
 
@@ -364,7 +305,6 @@
     axutil_array_list_t *op_out_phases = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
-    AXIS2_ENV_CHECK(env, NULL);
 	AXIS2_PARAM_CHECK(env->error, phases_info, NULL);
 
     if (phases_info->out_phases)
@@ -425,7 +365,6 @@
     axutil_array_list_t *op_in_faultphases = NULL;
     struct axis2_phase *phase = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
 	AXIS2_PARAM_CHECK(env->error, phases_info, NULL);
 
     if (!phases_info->in_faultphases)
@@ -492,7 +431,6 @@
     axutil_array_list_t *op_out_faultphases = NULL;
     struct axis2_phase *phase = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
 	AXIS2_PARAM_CHECK(env->error, phases_info, NULL);
 
     if (!phases_info->out_faultphases)
@@ -560,7 +498,6 @@
     axutil_array_list_t *op_in_faultphases = NULL;
     axutil_array_list_t *op_out_faultphases = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, op_desc, AXIS2_FAILURE);
 	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
@@ -630,3 +567,4 @@
     }
     return new_flow;
 }
+

Modified: webservices/axis2/trunk/c/src/core/description/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/svc.c?rev=671784&r1=671783&r2=671784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/svc.c (original)
+++ webservices/axis2/trunk/c/src/core/description/svc.c Wed Jun 25 22:45:04 2008
@@ -107,7 +107,7 @@
     void *impl_class;
     axutil_qname_t *qname;
     axis2_char_t *style;
-    axutil_array_list_t *engaged_modules;
+    axutil_array_list_t *engaged_module_list;
 
     /** Parameter container to hold service related parameters */
     struct axutil_param_container *param_container;
@@ -234,9 +234,9 @@
         return NULL;
     }
 
-    svc->engaged_modules = axutil_array_list_create(env,
+    svc->engaged_module_list = axutil_array_list_create(env,
                                                     AXIS2_ARRAY_LIST_DEFAULT_CAPACITY);
-    if (!svc->engaged_modules)
+    if (!svc->engaged_module_list)
     {
         axis2_svc_free(svc, env);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
@@ -367,9 +367,9 @@
         axutil_array_list_free(svc->schema_list, env);
     }
 
-    if (svc->engaged_modules)
+    if (svc->engaged_module_list)
     {
-        axutil_array_list_free(svc->engaged_modules, env);
+        axutil_array_list_free(svc->engaged_module_list, env);
     }
 
     if (svc->axis_svc_name)
@@ -984,7 +984,7 @@
     if (status)
     {
         const axutil_qname_t *qname = NULL;
-        status = axutil_array_list_add(svc->engaged_modules, env, module_desc);
+        status = axutil_array_list_add(svc->engaged_module_list, env, module_desc);
         qname = axis2_module_desc_get_qname(module_desc, env);
         axis2_svc_add_module_qname(svc, env, qname);
     }
@@ -1006,14 +1006,14 @@
     int i = 0,
         size = 0;
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Entry:axis2_svc_is_module_engaged");
-    size = axutil_array_list_size(svc->engaged_modules, env);
+    size = axutil_array_list_size(svc->engaged_module_list, env);
     for (i = 0; i < size; i++)
     {
         const axutil_qname_t *module_qname_l = NULL;
         axis2_module_desc_t *module_desc_l = NULL;
 
         module_desc_l =
-            (axis2_module_desc_t *) axutil_array_list_get(svc->engaged_modules,
+            (axis2_module_desc_t *) axutil_array_list_get(svc->engaged_module_list,
                                                           env, i);
         module_qname_l = axis2_module_desc_get_qname(module_desc_l, env);
 
@@ -1026,6 +1026,14 @@
     return AXIS2_FALSE;
 }
 
+AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
+axis2_svc_get_engaged_module_list(
+    const axis2_svc_t * svc,
+    const axutil_env_t * env)
+{
+    return svc->engaged_module_list;
+}
+
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_svc_disengage_module(
     axis2_svc_t * svc,
@@ -1059,7 +1067,7 @@
 
 /**
  * Here we extract all operations defined in module.xml and built execution 
- * chains for them by calling axis2_phase_resolver_build_module_op()
+ * chains for them by calling axis2_phase_resolver_build_execution_chains_for_module_op()
  * function. Within that function handlers of the modules defined for that 
  * operation are added to module operation chains appropriately.
  */
@@ -1103,7 +1111,7 @@
         opname = axutil_qname_get_localpart(axis2_op_get_qname(op_desc, env), 
             env);
         status =
-            axis2_phase_resolver_build_module_op(phase_resolver, env, op_desc);
+            axis2_phase_resolver_build_execution_chains_for_module_op(phase_resolver, env, op_desc);
 
         if (AXIS2_SUCCESS != status)
         {

Modified: webservices/axis2/trunk/c/src/core/description/svc_grp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/svc_grp.c?rev=671784&r1=671783&r2=671784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/svc_grp.c (original)
+++ webservices/axis2/trunk/c/src/core/description/svc_grp.c Wed Jun 25 22:45:04 2008
@@ -29,7 +29,7 @@
     axutil_hash_t *svcs;
 
     /** to store service group modules QNames */
-    axutil_array_list_t *module_qnames;
+    axutil_array_list_t *module_qname_list;
 
     /** to store module ref at deploy time parsing */
     axis2_conf_t *parent;
@@ -60,7 +60,7 @@
     }
 
     svc_grp->param_container = NULL;
-    svc_grp->module_qnames = NULL;
+    svc_grp->module_qname_list = NULL;
     svc_grp->svcs = NULL;
     svc_grp->parent = NULL;
     svc_grp->svc_grp_name = NULL;
@@ -77,8 +77,8 @@
         return NULL;
     }
 
-    svc_grp->module_qnames = axutil_array_list_create(env, 20);
-    if (!svc_grp->module_qnames)
+    svc_grp->module_qname_list = axutil_array_list_create(env, 20);
+    if (!svc_grp->module_qname_list)
     {
         axis2_svc_grp_free(svc_grp, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -158,9 +158,9 @@
         axutil_hash_free(svc_grp->svcs, env);
     }
 
-    if (svc_grp->module_qnames)
+    if (svc_grp->module_qname_list)
     {
-        axutil_array_list_free(svc_grp->module_qnames, env);
+        axutil_array_list_free(svc_grp->module_qname_list, env);
     }
 
     if (svc_grp->module_list)
@@ -248,7 +248,7 @@
         return AXIS2_FAILURE;
     }
 
-    status = axis2_phase_resolver_build_chains(handler_resolver, env);
+    status = axis2_phase_resolver_build_execution_chains_for_svc(handler_resolver, env);
     if (AXIS2_SUCCESS != status)
     {
         /* remove the previously added service */
@@ -418,7 +418,7 @@
     const axutil_env_t * env,
     const axutil_qname_t * module_qname)
 {
-    return axutil_array_list_add(svc_grp->module_qnames, env, module_qname);
+    return axutil_array_list_add(svc_grp->module_qname_list, env, module_qname);
 }
 
 AXIS2_EXTERN axis2_conf_t *AXIS2_CALL
@@ -468,20 +468,19 @@
 
     AXIS2_PARAM_CHECK(env->error, module_name, AXIS2_FAILURE);
 
-    size = axutil_array_list_size(svc_grp->module_qnames, env);
+    size = axutil_array_list_size(svc_grp->module_qname_list, env);
     for (i = 0; size; i++)
     {
-        modu = axutil_array_list_get(svc_grp->module_qnames, env, i);
+        modu = axutil_array_list_get(svc_grp->module_qname_list, env, i);
         modu_local = axutil_qname_get_localpart(modu, env);
         module_name_local = axutil_qname_get_localpart(module_name, env);
         if (!axutil_strcmp(modu_local, module_name_local))
         {
-            AXIS2_ERROR_SET(env->error,
-                            AXIS2_ERROR_MODULE_ALREADY_ENGAGED_TO_SVC_GRP,
-                            AXIS2_FAILURE);
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_ALREADY_ENGAGED_TO_SVC_GRP, AXIS2_FAILURE);
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Module %s is already engaged to service group %s", 
-                module_name_local, svc_grp_name);
+                    "Module %s is already engaged to service group %s", module_name_local, 
+                    svc_grp_name);
+
             return AXIS2_FAILURE;
         }
     }
@@ -489,18 +488,19 @@
     svc_map = axis2_svc_grp_get_all_svcs(svc_grp, env);
     if (!svc_map)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Service map not found for service group %s", svc_grp_name);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Service map not found for service group %s", 
+                svc_grp_name);
+
         return AXIS2_FAILURE;
     }
 
-    phase_resolver = axis2_phase_resolver_create_with_config(env, svc_grp->
-                                                             parent);
+    phase_resolver = axis2_phase_resolver_create_with_config(env, svc_grp->parent);
 
     if (!phase_resolver)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
             "Creating phase resolver failed for service group %s", svc_grp_name);
+
         return AXIS2_FAILURE;
     }
 
@@ -519,23 +519,25 @@
             axutil_hash_this(index, NULL, NULL, &v);
             axis_svc = (axis2_svc_t *) v;
             svc_name = axis2_svc_get_name(axis_svc, env);
-            status = axis2_phase_resolver_engage_module_to_svc(phase_resolver,
-                                                               env, axis_svc,
-                                                               module);
+            status = axis2_phase_resolver_engage_module_to_svc(phase_resolver, env, axis_svc, module);
+
             if (!status)
             {
                 if (phase_resolver)
                 {
                     axis2_phase_resolver_free(phase_resolver, env);
                 }
-                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                    "Engaging module %s to service %s failed", 
+
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Engaging module %s to service %s failed", 
                     module_name_local, svc_name);
+
                 return status;
             }
+
             index = axutil_hash_next(env, index);
         }
     }
+
     if (phase_resolver)
     {
         axis2_phase_resolver_free(phase_resolver, env);
@@ -549,7 +551,7 @@
     const axis2_svc_grp_t * svc_grp,
     const axutil_env_t * env)
 {
-    return svc_grp->module_qnames;
+    return svc_grp->module_qname_list;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
@@ -559,6 +561,7 @@
     const axutil_qname_t * moduleref)
 {
     const axis2_char_t *svc_grp_name = NULL;
+
     AXIS2_PARAM_CHECK(env->error, moduleref, AXIS2_FAILURE);
     svc_grp_name = axis2_svc_grp_get_name(svc_grp, env);
 
@@ -567,12 +570,12 @@
         svc_grp->module_list = axutil_array_list_create(env, 0);
         if (!svc_grp->module_list)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Creating module list failed for service group %s", 
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating module list failed for service group %s", 
                 svc_grp_name);
             return AXIS2_FAILURE;
         }
     }
+
     return axutil_array_list_add(svc_grp->module_list, env, moduleref);
 }
 
@@ -596,15 +599,14 @@
     AXIS2_PARAM_CHECK(env->error, parent, NULL);
     svc_grp_name = axis2_svc_grp_get_name(svc_grp, env);
 
-    svc_grp_ctx =
-        axis2_svc_grp_ctx_create(env, (axis2_svc_grp_t *) svc_grp, parent);
+    svc_grp_ctx = axis2_svc_grp_ctx_create(env, (axis2_svc_grp_t *) svc_grp, parent);
     if (!svc_grp_ctx)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Creating service group context failed for service group %s",
-            svc_grp_name);
+                "Creating service group context failed for service group %s", svc_grp_name);
         return NULL;
     }
+
     return svc_grp_ctx;
 }
 

Modified: webservices/axis2/trunk/c/src/core/engine/conf.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/conf.c?rev=671784&r1=671783&r2=671784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/conf.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/conf.c Wed Jun 25 22:45:04 2008
@@ -34,7 +34,7 @@
     /**
      * Field modules
      */
-    axutil_array_list_t *engaged_modules;
+    axutil_array_list_t *engaged_module_list;
     /*To store all the available modules (including version) */
     axutil_hash_t *all_modules;
     /*To store mapping between default version to module name */
@@ -127,8 +127,8 @@
         conf->transports_out[i] = NULL;
     }
 
-    conf->engaged_modules = axutil_array_list_create(env, 0);
-    if (!conf->engaged_modules)
+    conf->engaged_module_list = axutil_array_list_create(env, 0);
+    if (!conf->engaged_module_list)
     {
         axis2_conf_free(conf, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -147,14 +147,15 @@
         return NULL;
     }
 
-    conf->in_phases_upto_and_including_post_dispatch =
-        axutil_array_list_create(env, 0);
+    conf->in_phases_upto_and_including_post_dispatch = axutil_array_list_create(env, 0);
     if (!conf->in_phases_upto_and_including_post_dispatch)
     {
         axis2_conf_free(conf, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
             "Creating in phases list upto and including post dispatch failed");
+
         return NULL;
     }
     else
@@ -170,6 +171,7 @@
                 AXIS2_PHASE_TRANSPORT_IN);
             return NULL;
         }
+
         /* Incase of using security we need to find the service/operation
          * parameters before the dispatch phase.
          * This is required to give parameters to the security inflow.*/
@@ -399,18 +401,18 @@
         axutil_hash_free(conf->name_to_version_map, env);
     }
 
-    if (conf->engaged_modules)
+    if (conf->engaged_module_list)
     {
         int i = 0;
-        for (i = 0; i < axutil_array_list_size(conf->engaged_modules, env); i++)
+        for (i = 0; i < axutil_array_list_size(conf->engaged_module_list, env); i++)
         {
             axutil_qname_t *module_desc_qname = NULL;
             module_desc_qname = (axutil_qname_t *)
-                axutil_array_list_get(conf->engaged_modules, env, i);
+                axutil_array_list_get(conf->engaged_module_list, env, i);
             if (module_desc_qname)
                 axutil_qname_free(module_desc_qname, env);
         }
-        axutil_array_list_free(conf->engaged_modules, env);
+        axutil_array_list_free(conf->engaged_module_list, env);
     }
 
     if (conf->out_phases)
@@ -934,7 +936,7 @@
     const axis2_conf_t * conf,
     const axutil_env_t * env)
 {
-    return conf->engaged_modules;
+    return conf->engaged_module_list;
 }
 
 AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
@@ -1100,14 +1102,14 @@
     {
         def_mod_qname = axis2_module_desc_get_qname(def_mod, env);
     }
-    size = axutil_array_list_size(conf->engaged_modules, env);
+    size = axutil_array_list_size(conf->engaged_module_list, env);
 
     for (i = 0; i < size; i++)
     {
         axutil_qname_t *qname = NULL;
 
         qname = (axutil_qname_t *) axutil_array_list_get(conf->
-                                                         engaged_modules, env,
+                                                         engaged_module_list, env,
                                                          i);
 
         if (axutil_qname_equals(module_name, env, qname) ||
@@ -1475,9 +1477,7 @@
         axis2_char_t *axis2_xml = NULL;
 
         file_name = axutil_qname_get_localpart(module_ref, env);
-        file =
-            (axutil_file_t *) axis2_arch_reader_create_module_arch(env,
-                                                                   file_name);
+        file = (axutil_file_t *) axis2_arch_reader_create_module_arch(env, file_name);
         /* This flag is to check whether conf is built using axis2
          * xml configuration file instead of a repository. */
 		flag = axis2_conf_get_axis2_flag (conf, env);
@@ -1503,34 +1503,29 @@
 
             if (module_dir_param)
             {
-                module_dir = (axis2_char_t *) 
-					axutil_param_get_value (module_dir_param, env);
+                module_dir = (axis2_char_t *) axutil_param_get_value (module_dir_param, env);
             }
             else
             {
                 AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                    "moduleDir parameter not available in axis2.xml.");
+                        "moduleDir parameter not available in axis2.xml.");
+
                 return AXIS2_FAILURE;
             }
-			temp_path1 = axutil_strcat (env, 
-                                        module_dir, 
-                                        AXIS2_PATH_SEP_STR, NULL);
+
+			temp_path1 = axutil_strcat (env, module_dir, AXIS2_PATH_SEP_STR, NULL);
 			path = axutil_strcat (env, temp_path1, file_name, NULL);
 		}
 		
         axutil_file_set_path(file, env, path);
-        file_data = axis2_arch_file_data_create_with_type_and_file(env,
-                                                                   AXIS2_MODULE,
-                                                                   file);
+        file_data = axis2_arch_file_data_create_with_type_and_file(env, AXIS2_MODULE, file);
 		if (!flag)
         {
-        	dep_engine = 
-                axis2_dep_engine_create_with_repos_name(env, repos_path);
+        	dep_engine = axis2_dep_engine_create_with_repos_name(env, repos_path);
         }
 		else
         {
-			dep_engine = 
-                axis2_dep_engine_create_with_axis2_xml (env, axis2_xml);
+			dep_engine = axis2_dep_engine_create_with_axis2_xml (env, axis2_xml);
         }
 		
         axis2_dep_engine_set_current_file_item(dep_engine, env, file_data);
@@ -1552,8 +1547,7 @@
             axis2_arch_file_data_free(file_data, env);
         }
 
-        module_desc =
-            axis2_dep_engine_build_module(dep_engine, env, file, conf);
+        module_desc = axis2_dep_engine_build_module(dep_engine, env, file, conf);
         axutil_file_free (file, env);
         is_new_module = AXIS2_TRUE;
     }
@@ -1564,15 +1558,13 @@
         int i = 0;
         const axutil_qname_t *module_qname = NULL;
 
-        size = axutil_array_list_size(conf->engaged_modules, env);
+        size = axutil_array_list_size(conf->engaged_module_list, env);
         module_qname = axis2_module_desc_get_qname(module_desc, env);
         for (i = 0; i < size; i++)
         {
             axutil_qname_t *qname = NULL;
 
-            qname = (axutil_qname_t *) axutil_array_list_get(conf->
-                                                             engaged_modules,
-                                                             env, i);
+            qname = (axutil_qname_t *) axutil_array_list_get(conf->engaged_module_list, env, i);
             if (axutil_qname_equals(module_qname, env, qname))
             {
                 to_be_engaged = AXIS2_FALSE;
@@ -1582,9 +1574,9 @@
     else
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODULE, AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-            "Either module description not set or building module description"\
-            " failed for module %s", file_name);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Either module description not set or building"\
+                "module description failed for module %s", file_name);
+
         return AXIS2_FAILURE;
     }
 
@@ -1603,25 +1595,22 @@
             return AXIS2_FAILURE;
         }
 
-        status =
-            axis2_phase_resolver_engage_module_globally(phase_resolver, env,
-                                                        module_desc);
+        status = axis2_phase_resolver_engage_module_globally(phase_resolver, env, module_desc);
         axis2_phase_resolver_free(phase_resolver, env);
         if (!status)
         {
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                "Engaging module %s globally failed", module_name);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Engaging module %s globally failed", module_name);
             return status;
         }
-        module_qref_l =
-            axutil_qname_clone((axutil_qname_t *) module_qname, env);
-        status =
-            axutil_array_list_add(conf->engaged_modules, env, module_qref_l);
+        module_qref_l = axutil_qname_clone((axutil_qname_t *) module_qname, env);
+        status = axutil_array_list_add(conf->engaged_module_list, env, module_qref_l);
     }
+
     if (is_new_module)
     {
         status = axis2_conf_add_module(conf, env, module_desc);
     }
+
     return status;
 }
 

Modified: webservices/axis2/trunk/c/src/core/phaseresolver/phase_holder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/phaseresolver/phase_holder.c?rev=671784&r1=671783&r2=671784&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/phaseresolver/phase_holder.c (original)
+++ webservices/axis2/trunk/c/src/core/phaseresolver/phase_holder.c Wed Jun 25 22:45:04 2008
@@ -222,6 +222,7 @@
     return NULL;
 }
 
+/* This function is deprecated */
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_phase_holder_build_transport_handler_chain(
     axis2_phase_holder_t * phase_holder,