axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r643730 - in /webservices/axis2/trunk/c/src/core: deployment/ engine/
Date Wed, 02 Apr 2008 04:18:22 GMT
Author: damitha
Date: Tue Apr  1 21:18:21 2008
New Revision: 643730

URL: http://svn.apache.org/viewvc?rev=643730&view=rev
Log:
Corrected api comments for most of the comments in deployment engine. Also added some brief
description at the beginning of files. Added error log messages and updated existing ones
appropriately.

Modified:
    webservices/axis2/trunk/c/src/core/deployment/arch_file_data.c
    webservices/axis2/trunk/c/src/core/deployment/arch_reader.c
    webservices/axis2/trunk/c/src/core/deployment/axis2_arch_file_data.h
    webservices/axis2/trunk/c/src/core/deployment/axis2_arch_reader.h
    webservices/axis2/trunk/c/src/core/deployment/axis2_repos_listener.h
    webservices/axis2/trunk/c/src/core/deployment/axis2_ws_info.h
    webservices/axis2/trunk/c/src/core/deployment/axis2_ws_info_list.h
    webservices/axis2/trunk/c/src/core/deployment/repos_listener.c
    webservices/axis2/trunk/c/src/core/deployment/svc_grp_builder.c
    webservices/axis2/trunk/c/src/core/deployment/ws_info.c
    webservices/axis2/trunk/c/src/core/deployment/ws_info_list.c
    webservices/axis2/trunk/c/src/core/engine/engine.c

Modified: webservices/axis2/trunk/c/src/core/deployment/arch_file_data.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/arch_file_data.c?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/arch_file_data.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/arch_file_data.c Tue Apr  1 21:18:21 2008
@@ -29,9 +29,8 @@
     axis2_char_t *module_dll_name;
     axis2_char_t *name;
     /*
-     * To store services in a serviceGroup. If there are wsdl for those 
-     * servics ,so wsdl service will be created for each wsdl an those will be 
-     * temporarily store in this table
+     * To store services in a service group. Those services are temporarily 
+     * stored in this table
      */
     axutil_hash_t *svc_map;
     axutil_array_list_t *deployable_svcs;
@@ -43,9 +42,6 @@
     const axutil_env_t * env)
 {
     axis2_arch_file_data_t *arch_file_data = NULL;
-
-    AXIS2_ENV_CHECK(env, NULL);
-
     arch_file_data = (axis2_arch_file_data_t *) AXIS2_MALLOC(env->
                                                              allocator,
                                                              sizeof
@@ -80,6 +76,9 @@
         axis2_arch_file_data_create(env);
     if (!arch_file_data)
     {
+        axis2_char_t *file_name = axutil_file_get_name(file, env);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "Could not create arch_file_data for file %s", file_name);
         return NULL;
     }
 
@@ -99,6 +98,8 @@
         axis2_arch_file_data_create(env);
     if (!arch_file_data)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "Could not create arch_file_data for %s", name);
         return NULL;
     }
     arch_file_data->type = type;
@@ -111,8 +112,6 @@
     axis2_arch_file_data_t * arch_file_data,
     const axutil_env_t * env)
 {
-    AXIS2_ENV_CHECK(env, void);
-
     if (arch_file_data->file)
     {
         axutil_file_free(arch_file_data->file, env);
@@ -181,7 +180,6 @@
     const axutil_env_t * env,
     axis2_char_t * msg_recv)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_recv, AXIS2_FAILURE);
 
     if (arch_file_data->msg_recv)
@@ -208,8 +206,6 @@
 {
     axis2_char_t *svc_name = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
-
     if (arch_file_data->file)
     {
         svc_name = axutil_file_get_name(arch_file_data->file, env);
@@ -245,8 +241,6 @@
 {
     axis2_char_t *module_name = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
-
     if (arch_file_data->file)
     {
         module_name = axutil_file_get_name(arch_file_data->file, env);
@@ -264,7 +258,6 @@
     const axutil_env_t * env,
     axis2_char_t * module_name)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, module_name, AXIS2_FAILURE);
 
     if (arch_file_data->module_name)
@@ -290,7 +283,6 @@
     const axutil_env_t * env,
     axis2_char_t * module_dll_name)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, module_dll_name, AXIS2_FAILURE);
 
     if (arch_file_data->module_dll_name)
@@ -310,7 +302,6 @@
 {
     const axutil_qname_t *svc_qname = NULL;
     axis2_char_t *svc_name = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc_desc, AXIS2_FAILURE);
 
     svc_qname = axis2_svc_get_qname(svc_desc, env);
@@ -337,7 +328,6 @@
 {
     axis2_svc_t *svc = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc_name, NULL);
 
     if (arch_file_data->svc_map)
@@ -374,7 +364,6 @@
     const axutil_env_t * env,
     axutil_array_list_t * deployable_svcs)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, deployable_svcs, AXIS2_FAILURE);
     if (arch_file_data->deployable_svcs)
     {
@@ -384,3 +373,4 @@
     arch_file_data->deployable_svcs = deployable_svcs;
     return AXIS2_SUCCESS;
 }
+

Modified: webservices/axis2/trunk/c/src/core/deployment/arch_reader.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/arch_reader.c?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/arch_reader.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/arch_reader.c Tue Apr  1 21:18:21 2008
@@ -34,8 +34,6 @@
 {
     axis2_arch_reader_t *arch_reader = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
-
     arch_reader = (axis2_arch_reader_t *) AXIS2_MALLOC(env->
                                                        allocator,
                                                        sizeof
@@ -57,9 +55,7 @@
     axis2_arch_reader_t * arch_reader,
     const axutil_env_t * env)
 {
-    AXIS2_ENV_CHECK(env, void);
-
-    /* desc builder is owned by dep_engine, so do not free it here */
+    /* Description builder is owned by dep_engine, so do not free it here */
 
     if (arch_reader)
     {
@@ -88,22 +84,21 @@
     axis2_svc_grp_t * svc_grp)
 {
     axis2_status_t status = AXIS2_FAILURE;
-    axis2_char_t *svcs_xml = NULL;
+    axis2_char_t *svc_grp_xml = NULL;
     axis2_char_t *repos_path = NULL;
     axis2_bool_t file_flag = AXIS2_FALSE;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, file_name, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, dep_engine, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc_grp, AXIS2_FAILURE);
 
     file_flag = axis2_dep_engine_get_file_flag (dep_engine, env);
 
-    if (file_flag == AXIS2_FALSE)
+    if (!file_flag)
     { 
 
         repos_path = axis2_dep_engine_get_repos_path(dep_engine, env);
         
-        svcs_xml = axutil_strcat(env, repos_path, AXIS2_PATH_SEP_STR,
+        svc_grp_xml = axutil_strcat(env, repos_path, AXIS2_PATH_SEP_STR,
                                  AXIS2_SERVICE_FOLDER, AXIS2_PATH_SEP_STR,
                                  file_name, AXIS2_PATH_SEP_STR, AXIS2_SVC_XML,
                                  NULL);
@@ -111,23 +106,25 @@
     else
     {
         repos_path = axis2_dep_engine_get_svc_dir (dep_engine, env);
-        svcs_xml = axutil_strcat (env, repos_path, AXIS2_PATH_SEP_STR,
+        svc_grp_xml = axutil_strcat (env, repos_path, AXIS2_PATH_SEP_STR,
                                   file_name, AXIS2_PATH_SEP_STR, AXIS2_SVC_XML,
                                   NULL);
     }
 
-    if (!svcs_xml)
+    if (!svc_grp_xml)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "Service xml file not found for %s", file_name);
         return AXIS2_FAILURE;
     }
-    status = axutil_file_handler_access(svcs_xml, AXIS2_F_OK);
+    status = axutil_file_handler_access(svc_grp_xml, AXIS2_F_OK);
     if (AXIS2_SUCCESS == status)
     {
         struct axis2_arch_file_data *arch_file_data = NULL;
         axis2_char_t *svc_name = NULL;
 
-        status = axis2_arch_reader_build_svc_grp(arch_reader, env, svcs_xml,
+        status = axis2_arch_reader_build_svc_grp(arch_reader, env, svc_grp_xml,
                                                  dep_engine, svc_grp);
         if (AXIS2_SUCCESS != status)
         {
@@ -142,9 +139,11 @@
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SERVICE_XML_NOT_FOUND,
                         AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "Access to  service configuration file %s failed", file_name);
         status = AXIS2_FAILURE;
     }
-    AXIS2_FREE(env->allocator, svcs_xml);
+    AXIS2_FREE(env->allocator, svc_grp_xml);
     return status;
 }
 
@@ -157,11 +156,10 @@
     axis2_svc_grp_t * svc_grp)
 {
     axis2_char_t *root_element_name = NULL;
-    axiom_node_t *svcs = NULL;
-    axiom_element_t *svcs_element = NULL;
+    axiom_node_t *svc_grp_node = NULL;
+    axiom_element_t *svc_grp_element = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc_xml, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, dep_engine, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc_grp, AXIS2_FAILURE);
@@ -171,25 +169,29 @@
                                                            dep_engine);
     if (!arch_reader->desc_builder)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "Creating description builder for service file %s failed", svc_xml);
         return AXIS2_FAILURE;
     }
     axis2_dep_engine_add_desc_builder(dep_engine, env,
                                       arch_reader->desc_builder);
 
-    svcs = axis2_desc_builder_build_om(arch_reader->desc_builder, env);
+    svc_grp_node = axis2_desc_builder_build_om(arch_reader->desc_builder, env);
 
-    if (svcs)
+    if (svc_grp_node)
     {
-        svcs_element = axiom_node_get_data_element(svcs, env);
-        if (svcs_element)
+        svc_grp_element = axiom_node_get_data_element(svc_grp_node, env);
+        if (svc_grp_element)
         {
-            root_element_name = axiom_element_get_localname(svcs_element, env);
+            root_element_name = axiom_element_get_localname(svc_grp_element, env);
         }
     }
 
     if (root_element_name &&
         0 == axutil_strcmp(AXIS2_SVC_ELEMENT, root_element_name))
     {
+        /* If service group is actually a service. In this case service group 
+         * contain only single service */
         axis2_svc_t *svc = NULL;
         axis2_svc_builder_t *svc_builder = NULL;
         axis2_arch_file_data_t *file_data = NULL;
@@ -218,19 +220,20 @@
         svc_builder = axis2_svc_builder_create_with_dep_engine_and_svc(env,
                                                                        dep_engine,
                                                                        svc);
-        status = axis2_svc_builder_populate_svc(svc_builder, env, svcs);
+        status = axis2_svc_builder_populate_svc(svc_builder, env, svc_grp_node);
         axis2_dep_engine_add_svc_builder(dep_engine, env, svc_builder);
         if (AXIS2_SUCCESS != status)
         {
-            AXIS2_LOG_INFO(env->log, AXIS2_LOG_SI,
-                           "populating service is not successful");
-
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                "Populating service failed for %s", svc_name);
             return AXIS2_FAILURE;
         }
 
         dep_svcs = axis2_arch_file_data_get_deployable_svcs(file_data, env);
         if (!dep_svcs)
         {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "Deployable services list is NULL within arch file data");
             return AXIS2_FAILURE;
         }
         status = axutil_array_list_add(dep_svcs, env, svc);
@@ -245,7 +248,7 @@
     {
         axis2_svc_grp_builder_t *grp_builder = NULL;
         grp_builder = axis2_svc_grp_builder_create_with_svc_and_dep_engine(env,
-                                                                           svcs,
+                                                                  svc_grp_node,
                                                                            dep_engine);
         status =
             axis2_svc_grp_builder_populate_svc_grp(grp_builder, env, svc_grp);
@@ -266,14 +269,12 @@
     axis2_char_t *repos_path = NULL;
     axis2_bool_t file_flag;
 
-
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, file_name, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, dep_engine, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, module_desc, AXIS2_FAILURE);
 
     file_flag = axis2_dep_engine_get_file_flag (dep_engine, env);
-	if (file_flag == AXIS2_FALSE)
+	if (!file_flag)
 	{
     	repos_path = axis2_dep_engine_get_repos_path(dep_engine, env);
     	module_xml = axutil_strcat(env, repos_path, AXIS2_PATH_SEP_STR,
@@ -292,6 +293,7 @@
     if (!module_xml)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory");
         return AXIS2_FAILURE;
     }
     status = axutil_file_handler_access(module_xml, AXIS2_F_OK);
@@ -312,6 +314,9 @@
         AXIS2_ERROR_SET(env->error,
                         AXIS2_ERROR_MODULE_XML_NOT_FOUND_FOR_THE_MODULE,
                         AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "Module configuration file access failed for module file %s", 
+            module_xml);
         status = AXIS2_FAILURE;
     }
     AXIS2_FREE(env->allocator, module_xml);
@@ -325,8 +330,6 @@
 {
     axutil_file_t *file = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
-
     file = axutil_file_create(env);
     if (!file)
     {
@@ -335,3 +338,4 @@
     axutil_file_set_name(file, env, module_name);
     return file;
 }
+

Modified: webservices/axis2/trunk/c/src/core/deployment/axis2_arch_file_data.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/axis2_arch_file_data.h?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/axis2_arch_file_data.h (original)
+++ webservices/axis2/trunk/c/src/core/deployment/axis2_arch_file_data.h Tue Apr  1 21:18:21 2008
@@ -24,6 +24,11 @@
  * @{
  */
 
+/**
+ * @file axis2_arch_file_data.h
+ * @brief Axis2 Arch File Data interface. arch_file_data construct contain 
+ * deployment information retrieved from a module or service configuration file.
+ */
 #include <axis2_const.h>
 #include <axutil_error.h>
 #include <axis2_defines.h>
@@ -90,7 +95,7 @@
     /**
      * @param file_data pointer to arch_file_data
      * @param env pointer to environment struct
-     * @return the service name. if contained file is not null this is the
+     * @return the service name. If contained file is not null this is the
      * file name. else this is the name property
      */
     AXIS2_EXTERN axis2_char_t *AXIS2_CALL

Modified: webservices/axis2/trunk/c/src/core/deployment/axis2_arch_reader.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/axis2_arch_reader.h?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/axis2_arch_reader.h (original)
+++ webservices/axis2/trunk/c/src/core/deployment/axis2_arch_reader.h Tue Apr  1 21:18:21 2008
@@ -63,9 +63,8 @@
         const axutil_env_t * env);
 
     /**
-     * To create a ServiceDescrption <code>AxisService</code>   using given wsdl.
-     * If the service.wsdl is there in the arcive file AxisService will be creted 
-     * using that, else default AxisService will be created
+     * To create a service descrption <code>axis2_svc_t</code> using given 
+     * deployment info file.
      * @param env pointer to environment struct
      * @param file pointer to file
      */
@@ -75,12 +74,14 @@
                     struct axis2_arch_file_data *file);
 
     /**
-     * it take two arguments filename and refereance to DeployEngine
+     * Construct the path to the service group configuration file(services.xml)
+     * using the passed file name and populate the passed service group 
+     * description.
      * @param arch_reader pointer to arch reader
      * @param env pointer to environment struct
-     * @param file_name pointer to file name
+     * @param file_name pointer to service group configuration file.
      * @param dep_engine pointer to deployment engine
-     * @param svc_grp pointer to service group
+     * @param svc_grp pointer to service group to be populated.
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
@@ -92,9 +93,11 @@
         axis2_svc_grp_t * svc_grp);
 
     /**
+     * Populate the passed service group description using the service group 
+     * configuration file(services.xml).
      * @param arch_reader pointer to arch reader
      * @param env pointer to environment struct
-     * @param file_path pointer to file path
+     * @param file_path path to the service group configuration file(services.xml)
      * @param dep_engine pointer to deployment engine
      * @param svc_grp pointer to service group
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
@@ -108,6 +111,8 @@
         struct axis2_svc_grp *svc_grp);
 
     /**
+     * Construct the path to the module configuration file(module.xml)
+     * using the passed file name and populate the passed module description.
      * @param env pointer to environment struct
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
@@ -120,6 +125,7 @@
         axis2_module_desc_t * module);
 
     /**
+     * Create an axis2 file using the passed module name.
      * @param env pointer to environment struct
      * @param module_name pointer to module name
      */

Modified: webservices/axis2/trunk/c/src/core/deployment/axis2_repos_listener.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/axis2_repos_listener.h?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/axis2_repos_listener.h (original)
+++ webservices/axis2/trunk/c/src/core/deployment/axis2_repos_listener.h Tue Apr  1 21:18:21 2008
@@ -106,17 +106,6 @@
         const axutil_env_t * env);
 
     /**
-     * this is the actual method that is call from scheduler
-     * @param repos_listener pointer to repos listener
-     * @param env pointer to environment struct
-     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-     */
-    AXIS2_EXTERN axis2_status_t AXIS2_CALL
-    axis2_repos_listener_start_listen(
-        axis2_repos_listener_t * listener,
-        const axutil_env_t * env);
-
-    /**
      * @param env pointer to environment struct
      * @return pointer to newly created deployment engine
      */

Modified: webservices/axis2/trunk/c/src/core/deployment/axis2_ws_info.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/axis2_ws_info.h?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/axis2_ws_info.h (original)
+++ webservices/axis2/trunk/c/src/core/deployment/axis2_ws_info.h Tue Apr  1 21:18:21 2008
@@ -25,6 +25,11 @@
  * @{
  */
 
+/**
+ * @file axis2_ws_info.h
+ * @brief Axis2 Ws Info interface. ws_info construct contain file information 
+ * for module or service configuration file.
+ */
 #include <axis2_const.h>
 #include <axutil_error.h>
 #include <axis2_defines.h>
@@ -104,7 +109,7 @@
         const axutil_env_t * env);
 
     /**
-     * Creates description builder struct
+     * Creates ws_info struct
      * @param env pointer to environment struct
      * @param file_name pointer to file name
      * @param last_modified_date pointer to last modified date

Modified: webservices/axis2/trunk/c/src/core/deployment/axis2_ws_info_list.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/axis2_ws_info_list.h?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/axis2_ws_info_list.h (original)
+++ webservices/axis2/trunk/c/src/core/deployment/axis2_ws_info_list.h Tue Apr  1 21:18:21 2008
@@ -26,7 +26,8 @@
 
 /**
  * @file axis2_ws_info_list.h
- * @brief Axis2 Ws Info List interface
+ * @brief Axis2 Ws Info List interface. Ws Info List is the list of ws_info structs.
+ *  Each ws_info construct contain file information for module or service configuration file.
  */
 
 #include <axis2_const.h>
@@ -66,7 +67,7 @@
         const axutil_env_t * env);
 
     /**
-     * This method is used to initialize the vector
+     * This method is used to initialize the ws info list.
      * @param info_list pointer to ws info list
      * @param env pointer to environment struct
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
@@ -77,20 +78,20 @@
         const axutil_env_t * env);
 
     /**
-     * First it check whether the file is already available in the
-     * system call isFileExist , if it is not deployed yet then it will add
-     * that to jarlist and to the deployment engine as new service or module
-     * in adding new item to jarlist it first create optimice and requird object to
-     * keep those infor call WSInfo and that will be added to jarist and actual
-     * jar file will be added to DeploymentEngine
-     * <p/>
-     * If it is alredy exsit then it check whether it has been updated
-     * then change the last update date of the wsInfo and added two entries to 
-     * DeploymentEngine one for New Deployment and other for undeployment
+     * This will add the deployment info struct(ws_info) into the deployment info 
+     * list and deployment info file to the deployment engine as new 
+     * service or module deployment info struct/file.
+     * In doing this, it first create an deployment info struct called ws_info 
+     * to keep the file info that will be added to deployment info file 
+     * list and then create deployment info file called arch_file_data that will 
+     * be added to deployment engine for actual deployment of the service/module.
+     *
+     * This will add two entries to deployment engine one for new Deployment and 
+     * other for undeployment.
      * @param info_list pointer to ws info list
      * @param env pointer to environment struct
-     * @param file actual jar files for either Module or service
-     * @param type indicate either Service or Module
+     * @param file actual axis2 configuration file for module/service.
+     * @param type indicate either service or module
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
@@ -102,8 +103,9 @@
         int type);
 
     /**
-     * This method is used to check whether the file exist and if so
-     * it will return related wsinfo object to the file, else return null;
+     * This method is used to check whether the service/module configuration 
+     * file exist and if so it will return related ws_info object to the file, 
+     * else return NULL;
      * @param info_list pointer to ws info list
      * @param env pointer to environment struct
      * @param file_name pointer to file name
@@ -116,12 +118,12 @@
         axis2_char_t * file_name);
 
     /**
-     * compare the last update dates of both files and if those differ
-     * it will assumed as the file has been modified
+     * Compare the last update dates of both files and if those differ
+     * it will be assumed as the file has been modified.
      * @param info_list pointer to ws info list
      * @param env pointer to environment struct
-     * @param file pointer to file
-     * @param ws_info pointer to ws info
+     * @param file pointer to servie/module configuration file.
+     * @param ws_info pointer to ws info struct.
      */
     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
     axis2_ws_info_list_is_modified(
@@ -131,7 +133,7 @@
         struct axis2_ws_info *ws_info);
 
     /**
-     * to check whether the file is alredy in the list
+     * To check whether the deployment info file is alredy in the list.
      * @param info_list pointer to ws info list
      * @param env pointer to environment struct
      * @param file_name pointer to file name
@@ -143,13 +145,14 @@
         axis2_char_t * file_name);
 
     /**
-     * this is to check , undeploye WS
-     * What this relly does is it check older jars files and
-     * current jars. If name of the old jar file does not exit in the currentjar
-     * list then it is assumed that the jar file has been removed
-     * that is hot undeployment
+     * This is to check whether to undeploy ws info struct.
+     * What this realy does is, it check ws_info list and current deployment 
+     * info name list. If ws_info exists in the ws_info_list but it's 
+     * corresponding file name does not exist in the current deploymet file 
+     * name list then, struct is deemed non existant. ie. that is hot 
+     * undeployment.
+     * @param info_list pointer to ws info list
      * @param env pointer to environment struct
-     * @param file_name pointer to file name
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
@@ -159,8 +162,8 @@
         const axutil_env_t * env);
 
     /**
+     * @param info_list pointer to ws info list
      * @param env pointer to environment struct
-     * @param file_name pointer to file name
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
@@ -180,7 +183,6 @@
         const axutil_env_t * env,
         struct axis2_dep_engine *dep_engine);
 
-    /*************************** End of function macros ***************************/
 
     /** @} */
 

Modified: webservices/axis2/trunk/c/src/core/deployment/repos_listener.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/repos_listener.c?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/repos_listener.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/repos_listener.c Tue Apr  1 21:18:21 2008
@@ -23,13 +23,13 @@
 {
 
     /**
-     * Referance to a WSInfoList
+     * Referance to a ws info list
      */
     axis2_ws_info_list_t *info_list;
 
     /**
      * The parent directory of the modules and services directories
-     * that the listentner should listent
+     * that the listener should listen
      */
     axis2_char_t *folder_name;
     axis2_conf_t *conf;
@@ -48,8 +48,6 @@
 {
     axis2_repos_listener_t *repos_listener = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
-
     repos_listener = (axis2_repos_listener_t *)
         AXIS2_MALLOC(env->allocator,
                      sizeof (axis2_repos_listener_t));
@@ -67,10 +65,10 @@
 }
 
 /**
- * This constructor take two argumnets folder name and referance to
- * Deployment Engine Fisrt it initilize the syetm , by loading all the
- * modules in the /modules directory and also create a WSInfoList to
- * keep infor about available modules and services
+ * This constructor take two argumnets, folder name and referance to
+ * deployment engine. Fisrt it initilize the sysetm , by loading all the
+ * modules in the /modules directory and also create a ws info list to
+ * keep info about available modules and services.
  * @param folderName path to parent directory that the repos_listener
  * should listens
  * @param deploy_engine refearnce to engine registry  inorder to
@@ -89,7 +87,6 @@
     axis2_conf_t *conf;
     axis2_bool_t file_flag;
 
-    AXIS2_ENV_CHECK(env, NULL);
     repos_listener =
         (axis2_repos_listener_t *) axis2_repos_listener_create(env);
 
@@ -100,7 +97,7 @@
 
     file_flag = axis2_dep_engine_get_file_flag (dep_engine, env);
 
-    if (file_flag == AXIS2_FALSE)
+    if (!file_flag)
     {
         repos_listener->folder_name = axutil_strdup(env, folder_name);
         if (!repos_listener->folder_name)
@@ -114,38 +111,32 @@
         axis2_ws_info_list_create_with_dep_engine(env, dep_engine);
     if (!repos_listener->info_list)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating ws info list failed");
         return NULL;
     }
     
-    /* dep_engine's conf will set to repo_listner then we could get
-     * details fo the axis2.xml through axis2 conf. 
+    /* Here dep_engine's conf will set to repo_listner. Then we could get
+     * details of the axis2.xml through axis2 configuration. 
      */
 
     conf = axis2_dep_engine_get_axis_conf (dep_engine, env);
     if (!conf)
     {
         AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                         "Deployment engines axis2 configuration not available");
-        return NULL;
-    }
-   
-    status = axis2_repos_listener_set_conf (repos_listener, env, conf);
-
-    if (status != AXIS2_SUCCESS)
-    {
-        AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "setting conf to repos listener failed.");
+                    "Deployment engines axis2 configuration not available");
         return NULL;
     }
-
+    axis2_repos_listener_set_conf (repos_listener, env, conf);
 
     status = axis2_repos_listener_init(repos_listener, env);
     if (AXIS2_SUCCESS != status)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPOS_LISTENER_INIT_FAILED,
                         AXIS2_FAILURE);
+        AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
+            "Repository listener initialization failed");
         return NULL;
     }
-
     return repos_listener;
 }
 
@@ -155,7 +146,6 @@
     axis2_repos_listener_t * repos_listener,
     const axutil_env_t * env)
 {
-    AXIS2_ENV_CHECK(env, void);
     if (!repos_listener)
         return;
 
@@ -188,14 +178,12 @@
     axutil_param_t *module_param;
     axis2_char_t *module_dir;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK (env->error, repos_listener, AXIS2_FAILURE);
 
     conf = axis2_repos_listener_get_conf (repos_listener, env);
 
     /* conf is needed only to decide we are using axis2.xml. Other
-     * case we don't need. Hence else part of following if-else
-     * condition not used.
+     * case we don't need. Hence even if conf is NULL we can continue.
      */
 
     if (conf)
@@ -203,7 +191,7 @@
         axis2_flag = axis2_conf_get_axis2_flag (conf, env);
     }
 
-    if (axis2_flag == AXIS2_FALSE)
+    if (!axis2_flag)
     {
 
         temp_path =
@@ -213,7 +201,7 @@
     }
     else
     {
-        module_param = axis2_conf_get_param (conf, env, "moduleDir");
+        module_param = axis2_conf_get_param (conf, env, AXIS2_MODULE_DIR);
         if (module_param)
         {
             module_dir = (axis2_char_t *)axutil_param_get_value (module_param, env);
@@ -222,8 +210,8 @@
         else
         {
             AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                             "creating axis2 conf using axis2.xml, modulesDir \
-parameter not available."); 
+                "While creating axis2 configuration using axis2.xml, modulesDir"\
+                " parameter not available.");
         }
 
     }
@@ -249,7 +237,6 @@
     axutil_param_t *svc_param;
     axis2_char_t *svc_dir;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK (env->error, repos_listener, AXIS2_FAILURE);
 
     conf = axis2_repos_listener_get_conf (repos_listener, env);
@@ -257,7 +244,7 @@
     if (conf)
         axis2_flag = axis2_conf_get_axis2_flag (conf, env);
 
-    if (axis2_flag == AXIS2_FALSE)
+    if (!axis2_flag)
     {
         temp_path =
             axutil_stracat(env, repos_listener->folder_name, 
@@ -267,7 +254,7 @@
     }
     else
     {
-        svc_param = axis2_conf_get_param (conf, env, "servicesDir");
+        svc_param = axis2_conf_get_param (conf, env, AXIS2_SERVICE_DIR);
         if (svc_param)
         {
             svc_dir = axutil_param_get_value (svc_param, env);
@@ -275,9 +262,9 @@
         }
         else
         {
-            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI,
-                             "repos listener create using axis2.xml, \
-\"serviceDir\" param not available");
+            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
+                "While creating axis2 configuration using axis2.xml, servicesDir"\
+                " parameter not available.");
         }
     }
 
@@ -304,7 +291,6 @@
 {
     axis2_status_t status = AXIS2_FAILURE;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK (env->error, repos_listener, AXIS2_FAILURE);
 
     status = axis2_ws_info_list_init(repos_listener->info_list, env);
@@ -324,21 +310,11 @@
     return axis2_repos_listener_update(repos_listener, env);
 }
 
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_repos_listener_start_listen(
-    axis2_repos_listener_t * repos_listener,
-    const axutil_env_t * env)
-{
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK (env->error, repos_listener, AXIS2_FAILURE);
-
-    axis2_ws_info_list_init(repos_listener->info_list, env);
-    /* axis2_repos_listener_check_modules(repos_listener, env); */
-    axis2_repos_listener_check_svcs(repos_listener, env);
-    axis2_repos_listener_update(repos_listener, env);
-    return AXIS2_SUCCESS;
-}
-
+/**
+ * Folder name could be a repository modules or services folder. If it is modules
+ * folder then current_info_list contain the list of axis2 files corresponding to
+ * the modules within it. For services folder it should be understood similarly.
+ */
 static axis2_status_t
 axis2_repos_listener_search(
     axis2_repos_listener_t * repos_listener,
@@ -351,13 +327,10 @@
     axutil_array_list_t *current_info_list = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK (env->error, repos_listener, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, folder_name, AXIS2_FAILURE);
     current_info_list = axutil_dir_handler_list_service_or_module_dirs(env,
                                                                        folder_name);
-
-
     if (!current_info_list)
     {
         axis2_status_t status_code = AXIS2_FAILURE;
@@ -374,7 +347,7 @@
 
     size = axutil_array_list_size(current_info_list, env);
 
-    for (i = 0; i < size; i++)  /* loop until empty */
+    for (i = 0; i < size; i++)  /* Loop until empty */
     {
         axutil_file_t *file = NULL;
         file = axutil_array_list_get(current_info_list, env, i);
@@ -385,6 +358,7 @@
         {
             int size_j = 0;
             int j = 0;
+            axis2_char_t* file_name = axutil_file_get_name(file ,env);
 
             size_j = axutil_array_list_size(current_info_list, env);
             for (j = 0; j < size_j; j++)
@@ -396,6 +370,8 @@
             }
             axutil_array_list_free(current_info_list, env);
             current_info_list = NULL;
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "Adding file %s to ws info list failed", file_name);
             return status;
         }
     }
@@ -434,3 +410,4 @@
     AXIS2_PARAM_CHECK (env->error, repo_listener, NULL);
     return repo_listener->conf;
 }
+

Modified: webservices/axis2/trunk/c/src/core/deployment/svc_grp_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/svc_grp_builder.c?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/svc_grp_builder.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/svc_grp_builder.c Tue Apr  1 21:18:21 2008
@@ -33,8 +33,8 @@
     AXIS2_ENV_CHECK(env, NULL);
 
     svc_grp_builder = (axis2_svc_grp_builder_t *) AXIS2_MALLOC(env->allocator,
-                                                               sizeof
-                                                               (axis2_svc_grp_builder_t));
+                                                    sizeof
+                                                    (axis2_svc_grp_builder_t));
 
     if (!svc_grp_builder)
     {
@@ -80,8 +80,6 @@
     axis2_svc_grp_builder_t * svc_grp_builder,
     const axutil_env_t * env)
 {
-    AXIS2_ENV_CHECK(env, void);
-
     if (svc_grp_builder->desc_builder)
     {
         axis2_desc_builder_free(svc_grp_builder->desc_builder, env);
@@ -159,7 +157,7 @@
         qsvc_element = NULL;
     }
 
-    while (AXIS2_TRUE == axiom_children_qname_iterator_has_next(svc_itr, env))
+    while (axiom_children_qname_iterator_has_next(svc_itr, env))
     {
         axiom_node_t *svc_node = NULL;
         axiom_element_t *svc_element = NULL;
@@ -184,6 +182,8 @@
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_NAME_ERROR,
                             AXIS2_FAILURE);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "Service name attribute has no value");
             return AXIS2_FAILURE;
         }
         else
@@ -208,18 +208,17 @@
                 axis2_arch_file_data_add_svc(file_data, env, axis_svc);
 
             }
-            /* the service that has to be deployed */
-
+            /* Adding service to the deployable services list */
             deployable_svcs =
                 axis2_arch_file_data_get_deployable_svcs(file_data, env);
             axutil_array_list_add(deployable_svcs, env, axis_svc);
             axis2_svc_set_parent(axis_svc, env, svc_grp);
             svc_builder = axis2_svc_builder_create_with_dep_engine_and_svc(env,
-                                                                           axis2_desc_builder_get_dep_engine
-                                                                           (svc_grp_builder->
-                                                                            desc_builder,
-                                                                            env),
-                                                                           axis_svc);
+                                               axis2_desc_builder_get_dep_engine
+                                               (svc_grp_builder->
+                                                desc_builder,
+                                                env),
+                                               axis_svc);
             status = axis2_svc_builder_populate_svc(svc_builder, env, svc_node);
             axis2_svc_builder_free(svc_builder, env);
 
@@ -235,12 +234,10 @@
     axiom_children_qname_iterator_t * module_refs,
     axis2_svc_grp_t * svc_grp)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, module_refs, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc_grp, AXIS2_FAILURE);
 
-    while (AXIS2_TRUE ==
-           axiom_children_qname_iterator_has_next(module_refs, env))
+    while (axiom_children_qname_iterator_has_next(module_refs, env))
     {
         axiom_node_t *module_ref_node = NULL;
         axiom_element_t *module_ref_element = NULL;
@@ -269,6 +266,8 @@
             {
                 AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_NOT_FOUND,
                                 AXIS2_FAILURE);
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                    "Module %s not found in deployment engine.", ref_name);
                 return AXIS2_FAILURE;
             }
             else
@@ -290,3 +289,4 @@
 {
     return svc_grp_builder->desc_builder;
 }
+

Modified: webservices/axis2/trunk/c/src/core/deployment/ws_info.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/ws_info.c?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/ws_info.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/ws_info.c Tue Apr  1 21:18:21 2008
@@ -38,7 +38,6 @@
 {
     axis2_ws_info_t *ws_info = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, file_name, NULL);
 
     ws_info = (axis2_ws_info_t *) AXIS2_MALLOC(env->allocator,
@@ -76,7 +75,6 @@
 {
     axis2_ws_info_t *ws_info = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, file_name, NULL);
 
     ws_info = (axis2_ws_info_t *)
@@ -98,8 +96,6 @@
     axis2_ws_info_t * ws_info,
     const axutil_env_t * env)
 {
-    AXIS2_ENV_CHECK(env, void);
-
     if (ws_info->file_name)
     {
         AXIS2_FREE(env->allocator, ws_info->file_name);
@@ -127,7 +123,6 @@
     const axutil_env_t * env,
     axis2_char_t * file_name)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, file_name, AXIS2_FAILURE);
 
     if (ws_info->file_name)
@@ -144,8 +139,6 @@
     const axis2_ws_info_t * ws_info,
     const axutil_env_t * env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
     return ws_info->last_modified_date;
 }
 
@@ -155,7 +148,6 @@
     const axutil_env_t * env,
     long last_modified_date)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     ws_info->last_modified_date = last_modified_date;
     return AXIS2_SUCCESS;
 }
@@ -167,3 +159,4 @@
 {
     return ws_info->type;
 }
+

Modified: webservices/axis2/trunk/c/src/core/deployment/ws_info_list.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/ws_info_list.c?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/ws_info_list.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/ws_info_list.c Tue Apr  1 21:18:21 2008
@@ -22,21 +22,21 @@
 
 struct axis2_ws_info_list
 {
-
     /**
-     * This is to store all the jar files in a specified folder (WEB_INF)
+     * This is to store all the deployment info about the deployment files 
+     * for services or modules in a specified folder.
      */
     axutil_array_list_t *ws_info_list;
 
     /**
-     * All the curently updated jars
+     * All the curently updated deployment info list.
      */
-    axutil_array_list_t *current_info_lists;
+    axutil_array_list_t *current_info_list;
 
     /**
-     * Referance to DeploymentEngine to make update
+     * Referance to deployment engine to make update.
      */
-    struct axis2_dep_engine *deployer;
+    struct axis2_dep_engine *dep_engine;
 
 };
 
@@ -47,8 +47,6 @@
 {
     axis2_ws_info_list_t *ws_info_list = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
-
     ws_info_list = (axis2_ws_info_list_t *) AXIS2_MALLOC(env->allocator,
                                                          sizeof
                                                          (axis2_ws_info_list_t));
@@ -61,7 +59,7 @@
 
     memset ((void *)ws_info_list, 0, sizeof (axis2_ws_info_list_t));
 
-    ws_info_list->deployer = dep_engine;
+    ws_info_list->dep_engine = dep_engine;
 
     ws_info_list->ws_info_list = axutil_array_list_create(env, 0);
     if (!(ws_info_list->ws_info_list))
@@ -71,8 +69,8 @@
         return NULL;
     }
 
-    ws_info_list->current_info_lists = axutil_array_list_create(env, 0);
-    if (!(ws_info_list->current_info_lists))
+    ws_info_list->current_info_list = axutil_array_list_create(env, 0);
+    if (!(ws_info_list->current_info_list))
     {
         axis2_ws_info_list_free(ws_info_list, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -87,24 +85,22 @@
     axis2_ws_info_list_t * ws_info_list,
     const axutil_env_t * env)
 {
-    AXIS2_ENV_CHECK(env, void);
-
-    if (ws_info_list->current_info_lists)
+    if (ws_info_list->current_info_list)
     {
         int list_size = 0;
         int i = 0;
 
         list_size =
-            axutil_array_list_size(ws_info_list->current_info_lists, env);
+            axutil_array_list_size(ws_info_list->current_info_list, env);
         for (i = 0; i < list_size; i++)
         {
             axis2_char_t *file_name = NULL;
 
             file_name = (axis2_char_t *)
-                axutil_array_list_get(ws_info_list->current_info_lists, env, i);
+                axutil_array_list_get(ws_info_list->current_info_list, env, i);
             AXIS2_FREE(env->allocator, file_name);
         }
-        axutil_array_list_free(ws_info_list->current_info_lists, env);
+        axutil_array_list_free(ws_info_list->current_info_list, env);
     }
 
     if (ws_info_list->ws_info_list)
@@ -141,15 +137,7 @@
     int size = 0;
     int i = 0;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
     size = axutil_array_list_size(ws_info_list->ws_info_list, env);
-
-    if (AXIS2_SUCCESS != AXIS2_ERROR_GET_STATUS_CODE(env->error))
-    {
-        return AXIS2_ERROR_GET_STATUS_CODE(env->error);
-    }
-
     for (i = 0; i < size; i++)
     {
         axis2_ws_info_t *ws_info = NULL;
@@ -169,15 +157,14 @@
     int type)
 {
     axis2_status_t status = AXIS2_FAILURE;
-    axis2_char_t *info_list_name = NULL;
+    axis2_char_t *file_name = NULL;
     axis2_char_t *temp_name = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, file, AXIS2_FAILURE);
 
     temp_name = axutil_file_get_name(file, env);
-    info_list_name = axutil_strdup(env, temp_name);
-    if (!info_list_name)
+    file_name = axutil_strdup(env, temp_name);
+    if (!file_name)
     {
         return AXIS2_FAILURE;
     }
@@ -186,10 +173,6 @@
     {
     case AXIS2_SVC:
         {
-            /* check whether the file is already deployed */
-            /*status = axutil_file_handler_access(file->name, AXIS2_F_OK);
-               if(AXIS2_SUCCESS != status)
-               { */
             axis2_ws_info_t *ws_info = NULL;
             long last_modified_date = 0;
             axis2_arch_file_data_t *file_data = NULL;
@@ -198,7 +181,7 @@
             /* We are sure that the difference lies within the long range */
             ws_info =
                 axis2_ws_info_create_with_file_name_and_last_modified_date_and_type
-                (env, info_list_name, last_modified_date, AXIS2_SVC);
+                (env, file_name, last_modified_date, AXIS2_SVC);
             status =
                 axutil_array_list_add(ws_info_list->ws_info_list, env, ws_info);
 
@@ -209,24 +192,17 @@
             file_data = axis2_arch_file_data_create_with_type_and_file(env,
                                                                        AXIS2_SVC,
                                                                        file);
-            /* to inform that new web service is deployed */
-            status = axis2_dep_engine_add_ws_to_deploy(ws_info_list->deployer,
+            /* To inform that new web service is to be deployed */
+            status = axis2_dep_engine_add_ws_to_deploy(ws_info_list->dep_engine,
                                                        env, file_data);
             if (AXIS2_SUCCESS != status)
             {
                 return status;
             }
-
-            /*} */
-
             break;
         }
     case AXIS2_MODULE:
         {
-            /* check whether the file is already deployed */
-            /*status = axutil_file_handler_access(file->name, AXIS2_F_OK);
-               if(AXIS2_SUCCESS != status)
-               { */
             axis2_ws_info_t *ws_info = NULL;
             long last_modified_date = 0;
             axis2_arch_file_data_t *file_data = NULL;
@@ -235,7 +211,7 @@
             /* We are sure that the difference lies within the long range */
             ws_info =
                 axis2_ws_info_create_with_file_name_and_last_modified_date_and_type
-                (env, info_list_name, last_modified_date, AXIS2_MODULE);
+                (env, file_name, last_modified_date, AXIS2_MODULE);
             status =
                 axutil_array_list_add(ws_info_list->ws_info_list, env, ws_info);
 
@@ -246,21 +222,19 @@
             file_data = axis2_arch_file_data_create_with_type_and_file(env,
                                                                        AXIS2_MODULE,
                                                                        file);
-            /* to inform that new web service is deployed */
-            status = axis2_dep_engine_add_ws_to_deploy(ws_info_list->deployer,
+            /* To inform that new module is to be deployed */
+            status = axis2_dep_engine_add_ws_to_deploy(ws_info_list->dep_engine,
                                                        env, file_data);
             if (AXIS2_SUCCESS != status)
             {
                 return status;
             }
-            /*} */
 
             break;
         }
     }
-
-    return axutil_array_list_add(ws_info_list->current_info_lists, env,
-                                 info_list_name);
+    return axutil_array_list_add(ws_info_list->current_info_list, env,
+                                 file_name);
 }
 
 AXIS2_EXTERN axis2_ws_info_t *AXIS2_CALL
@@ -271,7 +245,6 @@
 {
     int i = 0;
     int size = 0;
-    AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, file_name, NULL);
 
     size = axutil_array_list_size(ws_info_list->ws_info_list, env);
@@ -285,7 +258,7 @@
                                                             i);
 
         file_name_l = axis2_ws_info_get_file_name(ws_info, env);
-        if (0 == axutil_strcmp(file_name_l, file_name))
+        if (!axutil_strcmp(file_name_l, file_name))
         {
             return ws_info;
         }
@@ -302,7 +275,6 @@
 {
     long last_modified_date = 0;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, file, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, ws_info, AXIS2_FAILURE);
 
@@ -318,7 +290,6 @@
 {
     axis2_ws_info_t *ws_info = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, file_name, AXIS2_FAILURE);
     ws_info = axis2_ws_info_list_get_file_item(ws_info_list, env, file_name);
     return !(ws_info == NULL);
@@ -333,9 +304,7 @@
     axutil_array_list_t *temp_list = NULL;
     int i = 0;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
-    /* create temp list */
+    /* Create temp list */
     temp_list = axutil_array_list_create(env, 0);
     if (!temp_list)
     {
@@ -345,6 +314,10 @@
 
     for (i = 0; i < list_size; i++)
     {
+        /* For each ws_info item in the ws_info_list check whether it is also
+         * in the current_info_list. If not mark it to be undeployed by adding
+         * it to a temporarily list. Also add that item to the undeploy list of
+         * deployment engine.*/
         int current_lists_size = 0;
         axis2_ws_info_t *file_item = NULL;
         axis2_char_t *file_item_name = NULL;
@@ -357,14 +330,14 @@
 
         file_item_name = axis2_ws_info_get_file_name(file_item, env);
         current_lists_size =
-            axutil_array_list_size(ws_info_list->current_info_lists, env);
+            axutil_array_list_size(ws_info_list->current_info_list, env);
         for (j = 0; j < current_lists_size; j++)
         {
             axis2_char_t *file_name = NULL;
             file_name = (axis2_char_t *) axutil_array_list_get(ws_info_list->
-                                                               current_info_lists,
+                                                               current_info_list,
                                                                env, j);
-            if (0 == axutil_strcmp(file_name, file_item_name))
+            if (!axutil_strcmp(file_name, file_item_name))
             {
                 exist = AXIS2_TRUE;
                 break;
@@ -383,8 +356,8 @@
                 axis2_ws_info_create_with_file_name_and_last_modified_date(env,
                                                                            file_item_name,
                                                                            last_modified_date);
-            /* this is to be undeployed */
-            axis2_dep_engine_add_ws_to_undeploy(ws_info_list->deployer, env,
+            /* This ws_info is to be undeployed */
+            axis2_dep_engine_add_ws_to_undeploy(ws_info_list->dep_engine, env,
                                                 ws_info);
         }
 
@@ -393,6 +366,8 @@
     list_size = axutil_array_list_size(temp_list, env);
     for (i = 0; i < list_size; i++)
     {
+        /* Get each ws_info item from the temp list created and remove that
+         * item from the ws_info_list */
         axis2_ws_info_t *file_item = NULL;
         int index = 0;
 
@@ -414,13 +389,12 @@
 {
     axis2_status_t status = AXIS2_FAILURE;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
     status = axis2_ws_info_list_check_for_undeploy(ws_info_list, env);
-    if (AXIS2_TRUE != status)
+    if (AXIS2_SUCCESS != status)
     {
         return AXIS2_FAILURE;
     }
 
-    return axis2_dep_engine_do_deploy(ws_info_list->deployer, env);
+    return axis2_dep_engine_do_deploy(ws_info_list->dep_engine, env);
 }
+

Modified: webservices/axis2/trunk/c/src/core/engine/engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/engine.c?rev=643730&r1=643729&r2=643730&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/engine.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/engine.c Tue Apr  1 21:18:21 2008
@@ -32,7 +32,7 @@
 struct axis2_engine
 {
 
-    /** configuration context */
+    /** Configuration context */
     axis2_conf_ctx_t *conf_ctx;
 };
 
@@ -53,6 +53,7 @@
     if (!engine)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "No memory");
         return NULL;
     }
 
@@ -71,7 +72,6 @@
     axis2_engine_t * engine,
     const axutil_env_t * env)
 {
-    AXIS2_ENV_CHECK(env, void);
     AXIS2_FREE(env->allocator, engine);
     return;
 }
@@ -90,10 +90,9 @@
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "axis2_engine_send start");
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
 
-    /* find and invoke the phases */
+    /* Find and invoke the phases */
     op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
     if (op_ctx)
     {
@@ -106,7 +105,7 @@
 
     if (axis2_msg_ctx_is_paused(msg_ctx, env))
     {
-        /* message has paused, so rerun it from the position it stopped.
+        /* Message has paused, so rerun it from the position it stopped.
            The handler which paused the message will be the first one to resume 
            invocation
          */
@@ -114,6 +113,8 @@
             axis2_engine_resume_invocation_phases(engine, env, phases, msg_ctx);
         if (status != AXIS2_SUCCESS)
         {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "Resuming invocation of phases failed");
             return status;
         }
 
@@ -160,7 +161,7 @@
 
     if (!(axis2_msg_ctx_is_paused(msg_ctx, env)))
     {
-        /* write the message to wire */
+        /* Write the message to wire */
         axis2_transport_sender_t *transport_sender = NULL;
         axis2_transport_out_desc_t *transport_out =
             axis2_msg_ctx_get_transport_out_desc(msg_ctx, env);
@@ -175,6 +176,8 @@
             status = AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, msg_ctx);
             if (status != AXIS2_SUCCESS)
             {
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                    "Transport sender invoke failed");
                 return status;
             }
         }
@@ -206,7 +209,6 @@
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Start:axis2_engine_receive");
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
 
     conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
@@ -218,7 +220,7 @@
 
     if (axis2_msg_ctx_is_paused(msg_ctx, env))
     {
-        /* the message has paused, so re-run them from the position they stopped. */
+        /* The message has paused, so re-run them from the position they stopped. */
         axis2_engine_resume_invocation_phases(engine, env,
                                               pre_calculated_phases, msg_ctx);
         if (axis2_msg_ctx_is_paused(msg_ctx, env))
@@ -226,7 +228,7 @@
             return AXIS2_SUCCESS;
         }
 
-        /* resume op specific phases */
+        /* Resume op specific phases */
         op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
         if (op_ctx)
         {
@@ -247,10 +249,14 @@
         if (status != AXIS2_SUCCESS)
         {
             if (axis2_msg_ctx_get_server_side(msg_ctx, env))
+            {
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                    "Invoking pre-calculated phases failed");
                 return status;
+            }
         }
 
-        if (AXIS2_TRUE == axis2_msg_ctx_is_paused(msg_ctx, env))
+        if (axis2_msg_ctx_is_paused(msg_ctx, env))
         {
             return AXIS2_SUCCESS;
         }
@@ -264,10 +270,16 @@
                                                 op_specific_phases, msg_ctx);
             if (status != AXIS2_SUCCESS)
             {
+                axis2_char_t *op_name = NULL;
+                op_name = axutil_qname_get_localpart(axis2_op_get_qname(op, env), 
+                    env);
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                    "Invoking operation specific phases failed for "\
+                    "operation %s", op_name);
                 return status;
             }
 
-            if (AXIS2_TRUE == axis2_msg_ctx_is_paused(msg_ctx, env))
+            if (axis2_msg_ctx_is_paused(msg_ctx, env))
             {
                 return AXIS2_SUCCESS;
             }
@@ -281,15 +293,22 @@
 
         status = axis2_engine_check_must_understand_headers(env, msg_ctx);
         if (status != AXIS2_SUCCESS)
+        {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "Check for must understand headers failed");
             return status;
+        }
 
-        /* invoke the message receivers */
+        /* Invoke the message receivers */
         if (!op)
+        {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Operation not found");
             return AXIS2_FAILURE;
+        }
         receiver = axis2_op_get_msg_recv(op, env);
         if (!receiver)
         {
-            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
                             "Message receiver not set in operation description");
             return AXIS2_FAILURE;
         }
@@ -298,7 +317,6 @@
                                                                    env));
     }
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Axis2 engine receive completed!");
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:axis2_engine_receive");
 
     return status;
@@ -316,7 +334,6 @@
     axis2_conf_ctx_t *conf_ctx = NULL;
     axis2_conf_t *conf = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
 
     op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
@@ -331,7 +348,7 @@
 
     if (axis2_msg_ctx_is_paused(msg_ctx, env))
     {
-        /* message has paused, so rerun it from the position it stopped.
+        /* Message has paused, so rerun it from the position it stopped.
            The handler which paused the message will be the first one to resume 
            invocation
          */
@@ -339,6 +356,8 @@
             axis2_engine_resume_invocation_phases(engine, env, phases, msg_ctx);
         if (status != AXIS2_SUCCESS)
         {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "Resuming invoking the phases failed");
             return status;
         }
 
@@ -381,7 +400,7 @@
 
     if (!(axis2_msg_ctx_is_paused(msg_ctx, env)))
     {
-        /* write the message to wire */
+        /* Write the message to wire */
         axis2_transport_sender_t *transport_sender = NULL;
         axis2_transport_out_desc_t *transport_out =
             axis2_msg_ctx_get_transport_out_desc(msg_ctx, env);
@@ -396,7 +415,11 @@
                 AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, msg_ctx);
             }
             else
+            {
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                    "Transport sender not found");
                 return AXIS2_FAILURE;
+            }
         }
         else
         {
@@ -418,14 +441,13 @@
     axis2_op_ctx_t *op_ctx = NULL;
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Start:axis2_engine_receive_fault");
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
 
     op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
 
     if (!op_ctx)
     {
-        /* if we do not have an op context that means this may be an incoming
+        /* If we do not have an op context that means this may be an incoming
            dual channel response. So try to dispatch the service */
         axis2_conf_ctx_t *conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
         if (conf_ctx)
@@ -455,7 +477,7 @@
     }
 
     op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
-    /* find and execute the fault in flow handlers */
+    /* Find and execute the fault in flow handlers */
     if (op_ctx)
     {
         axis2_op_t *op = axis2_op_ctx_get_op(op_ctx, env);
@@ -493,7 +515,6 @@
     axis2_msg_info_headers_t *msg_info_headers = NULL;
     axis2_bool_t doing_rest = AXIS2_FALSE;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, processing_context, NULL);
 
     if (axis2_msg_ctx_get_process_fault(processing_context, env))
@@ -501,6 +522,8 @@
         AXIS2_ERROR_SET(env->error,
                         AXIS2_ERROR_INVALID_STATE_PROCESSING_FAULT_ALREADY,
                         AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "Creating fault message contex failed");
         return NULL;
     }
 
@@ -552,10 +575,12 @@
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NOWHERE_TO_SEND_FAULT,
                         AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "Soap fault target destination not found");
         return NULL;
     }
 
-    /* set WSA action */
+    /* Set WSA action */
     msg_info_headers =
         axis2_msg_ctx_get_msg_info_headers(processing_context, env);
     if (msg_info_headers)
@@ -571,13 +596,13 @@
         }
     }
 
-    /* set relates to */
+    /* Set relates to */
     msg_id = axis2_msg_ctx_get_msg_id(processing_context, env);
     relates_to = axis2_relates_to_create(env, msg_id,
                                          AXIS2_WSA_RELATES_TO_RELATIONSHIP_TYPE_DEFAULT_VALUE);
     axis2_msg_ctx_set_relates_to(fault_ctx, env, relates_to);
 
-    /* set msg id */
+    /* Set msg id */
     msg_uuid = axutil_uuid_gen(env);
     axis2_msg_ctx_set_message_id(fault_ctx, env, msg_uuid);
     if (msg_uuid)
@@ -619,6 +644,8 @@
 
         if (!envelope)
         {
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
+                "Creating default soap envelope failed");
             return NULL;
         }
     }
@@ -644,8 +671,7 @@
     int count = 0;
     axis2_status_t status = AXIS2_SUCCESS;
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Start:axis2_engine_invoke_phases");
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Start:axis2_engine_invoke_phases");
     AXIS2_PARAM_CHECK(env->error, phases, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
 
@@ -656,17 +682,17 @@
         axis2_phase_t *phase = (axis2_phase_t *)
             axutil_array_list_get(phases, env, i);
 
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-                        "Invoking phase %s", axis2_phase_get_name(phase, env));
-
         status = axis2_phase_invoke(phase, env, msg_ctx);
 
         if (status != AXIS2_SUCCESS)
         {
+            const axis2_char_t *phase_name = axis2_phase_get_name(phase, env);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Invoking phase %s failed", 
+                phase_name);
             return status;
         }
     }
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "End:axis2_engine_invoke_phases");
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "End:axis2_engine_invoke_phases");
     return AXIS2_SUCCESS;
 }
 
@@ -681,9 +707,8 @@
     int count = 0;
     axis2_bool_t found_match = AXIS2_FALSE;
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
                     "Start:axis2_engine_resume_invocation_phases");
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, phases, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
 
@@ -698,7 +723,7 @@
         const axis2_char_t *phase_name = axis2_phase_get_name(phase, env);
         const axis2_char_t *paused_phase_name =
             axis2_msg_ctx_get_paused_phase_name(msg_ctx, env);
-        /* skip invoking handlers until we find the paused phase */
+        /* Skip invoking handlers until we find the paused phase */
         if (phase_name && paused_phase_name && 0 ==
             axutil_strcmp(phase_name, paused_phase_name))
         {
@@ -707,14 +732,14 @@
 
             paused_handler_i = axis2_msg_ctx_get_current_handler_index(msg_ctx,
                                                                        env);
-            /* invoke the paused handler and rest of the handlers of the paused
+            /* Invoke the paused handler and rest of the handlers of the paused
              * phase */
             axis2_phase_invoke_start_from_handler(phase, env, paused_handler_i,
                                                   msg_ctx);
         }
         else
         {
-            /* now we have found the paused phase and invoked the rest of the
+            /* Now we have found the paused phase and invoked the rest of the
              * handlers of that phase, invoke all the phases after that */
             if (found_match)
             {
@@ -723,7 +748,7 @@
         }
     }
 
-    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
                     "End:axis2_engine_resume_invocation_phases");
     return AXIS2_SUCCESS;
 }
@@ -749,12 +774,15 @@
     axutil_hash_t *header_block_ht = NULL;
     axutil_hash_index_t *hash_index = NULL;
 
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
 
     soap_envelope = axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
     if (!soap_envelope)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+            "Soap envelope not found in message context");
         return AXIS2_FAILURE;
+    }
 
     soap_header = axiom_soap_envelope_get_header(soap_envelope, env);
     if (!soap_header)
@@ -782,7 +810,7 @@
                 continue;
             }
 
-            /* if this header block is not targeted to me then its not my
+            /* If this header block is not targeted to me then its not my
                problem. Currently this code only supports the "next" role; we
                need to fix this to allow the engine/service to be in one or more
                additional roles and then to check that any headers targeted for
@@ -805,6 +833,8 @@
                                                           temp_env);
                     axis2_msg_ctx_set_wsa_action(msg_ctx, env,
                                                  "http://www.w3.org/2005/08/addressing/fault");
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                        "Must understand soap fault occured");
                     return AXIS2_FAILURE;
                 }
             }
@@ -824,6 +854,8 @@
                                                           temp_env);
                     axis2_msg_ctx_set_wsa_action(msg_ctx, env,
                                                  "http://www.w3.org/2005/08/addressing/fault");
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                        "Must understand soap fault occured");
                     return AXIS2_FAILURE;
                 }
 
@@ -848,24 +880,28 @@
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
                     "Start:axis2_engine_resume_receive");
-    /* find and invoke the phases */
+    /* Find and invoke the phases */
     conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
     conf = axis2_conf_ctx_get_conf(conf_ctx, env);
     phases =
         axis2_conf_get_in_phases_upto_and_including_post_dispatch(conf, env);
 
     axis2_engine_resume_invocation_phases(engine, env, phases, msg_ctx);
-    /* invoking the message receiver */
+    /* Invoking the message receiver */
     if (axis2_msg_ctx_get_server_side(msg_ctx, env) &&
         !axis2_msg_ctx_is_paused(msg_ctx, env))
     {
-        /* invoke the message receivers */
+        /* Invoke the message receivers */
         axis2_op_ctx_t *op_ctx = NULL;
 
         status = axis2_engine_check_must_understand_headers(env, msg_ctx);
 
         if (status != AXIS2_SUCCESS)
+        {
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                "Checking for must understand headers failed");
             return status;
+        }
 
         op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
         if (op_ctx)
@@ -877,8 +913,8 @@
                 receiver = axis2_op_get_msg_recv(op, env);
                 if (!receiver)
                 {
-                    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
-                                    "Message receiver not set in operation description");
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                        "Message receiver not set in operation description");
                     return AXIS2_FAILURE;
                 }
                 status = axis2_msg_recv_receive(receiver, env, msg_ctx,
@@ -902,7 +938,7 @@
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Start:axis2_engine_resume_send");
-    /* invoke the phases */
+    /* Invoke the phases */
     op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
     if (op_ctx)
     {
@@ -914,10 +950,10 @@
     }
     axis2_engine_resume_invocation_phases(engine, env, phases, msg_ctx);
 
-    /* invoking transport sender */
+    /* Invoking transport sender */
     if (!axis2_msg_ctx_is_paused(msg_ctx, env))
     {
-        /* write the message to the wire */
+        /* Write the message to the wire */
         axis2_transport_out_desc_t *transport_out = NULL;
         axis2_transport_sender_t *sender = NULL;
         transport_out = axis2_msg_ctx_get_transport_out_desc(msg_ctx, env);
@@ -933,3 +969,4 @@
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:axis2_engine_resume_send");
     return status;
 }
+



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message