axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r375467 - in /webservices/axis2/trunk/c: include/ modules/core/deployment/
Date Tue, 07 Feb 2006 03:56:48 GMT
Author: damitha
Date: Mon Feb  6 19:56:37 2006
New Revision: 375467

URL: http://svn.apache.org/viewcvs?rev=375467&view=rev
Log:
module handler loading is changed. Now there is separate
method for module handler loading


Modified:
    webservices/axis2/trunk/c/include/axis2_arch_file_data.h
    webservices/axis2/trunk/c/include/axis2_handler.h
    webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c
    webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
    webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h
    webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
    webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/module_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c

Modified: webservices/axis2/trunk/c/include/axis2_arch_file_data.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_arch_file_data.h?rev=375467&r1=375466&r2=375467&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_arch_file_data.h (original)
+++ webservices/axis2/trunk/c/include/axis2_arch_file_data.h Mon Feb  6 19:56:37 2006
@@ -93,13 +93,23 @@
                                         axis2_env_t **env);
     
     axis2_char_t *(AXIS2_CALL *
+    get_module_name)(axis2_arch_file_data_t *file_data,
+                        axis2_env_t **env);
+    
+    axis2_status_t (AXIS2_CALL *
+    set_module_name)(axis2_arch_file_data_t *file_data,
+                        axis2_env_t **env,
+                        axis2_char_t *module_name);
+                        
+        axis2_char_t *(AXIS2_CALL *
     get_module_dll_name)(axis2_arch_file_data_t *file_data,
-                                                axis2_env_t **env);
+                        axis2_env_t **env);
     
     axis2_status_t (AXIS2_CALL *
     set_module_dll_name)(axis2_arch_file_data_t *file_data,
-                                        axis2_env_t **env,
-                                        axis2_char_t *module_dll_name);
+                        axis2_env_t **env,
+                        axis2_char_t *module_dll_name);
+                        
     axis2_status_t (AXIS2_CALL *
     add_svc)(axis2_arch_file_data_t *file_data,
                                     axis2_env_t **env,
@@ -186,12 +196,18 @@
 #define AXIS2_ARCH_FILE_DATA_GET_FILE(arch_file_data, env) \
 		((arch_file_data)->ops->get_file (arch_file_data, env)) 
 
+#define AXIS2_ARCH_FILE_DATA_GET_MODULE_NAME(arch_file_data, env) \
+		((arch_file_data)->ops->get_module_name (arch_file_data, env)) 
+        
+#define AXIS2_ARCH_FILE_DATA_SET_MODULE_NAME(arch_file_data, env, module_name) \
+		((arch_file_data)->ops->set_module_name (arch_file_data, env, module_name)) 
+
 #define AXIS2_ARCH_FILE_DATA_GET_MODULE_DLL_NAME(arch_file_data, env) \
 		((arch_file_data)->ops->get_module_dll_name (arch_file_data, env)) 
         
-#define AXIS2_ARCH_FILE_DATA_SET_MODULE_DLL_NAME(arch_file_data, env, module_dll_name) \
-		((arch_file_data)->ops->set_module_dll_name (arch_file_data, env, module_dll_name))

-
+#define AXIS2_ARCH_FILE_DATA_SET_MODULE_DLL_NAME(arch_file_data, env, module_name) \
+		((arch_file_data)->ops->set_module_dll_name (arch_file_data, env, module_dll_name))
+        
 #define AXIS2_ARCH_FILE_DATA_ADD_SVC(arch_file_data, env, svc_desc) \
 		((arch_file_data)->ops->add_svc (arch_file_data, env, svc_desc)) 
         

Modified: webservices/axis2/trunk/c/include/axis2_handler.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_handler.h?rev=375467&r1=375466&r2=375467&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_handler.h (original)
+++ webservices/axis2/trunk/c/include/axis2_handler.h Mon Feb  6 19:56:37 2006
@@ -36,6 +36,7 @@
     struct axis2_handler_desc;
     struct axis2_msg_ctx;
 
+
 /**
  * @defgroup axis2_handler Handlers
  * @ingroup axis2_core_handlers
@@ -128,7 +129,10 @@
         axis2_handler_ops_t *ops;
     } axis2_handler_t;
 
-
+    typedef axis2_handler_t *(* 
+    AXIS2_HANDLER_CREATE_FUNC) (axis2_env_t **env, 
+                                axis2_qname_t *qname);
+    
 /**
  * creates handler struct
  */

Modified: webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c?rev=375467&r1=375466&r2=375467&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c Mon Feb  6 19:56:37
2006
@@ -30,6 +30,7 @@
     axis2_file_t *file;
     int type;
     axis2_char_t *msg_recv;
+    axis2_char_t *module_name;
     axis2_char_t *module_dll_name;
     axis2_char_t *name;
     /*
@@ -77,6 +78,15 @@
                                     axis2_env_t **env);
 
 axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_module_name(axis2_arch_file_data_t *file_data,
+                                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_arch_file_data_set_module_name(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env,
+                                    axis2_char_t *module_name);
+                                    
+axis2_char_t *AXIS2_CALL
 axis2_arch_file_data_get_module_dll_name(axis2_arch_file_data_t *file_data,
                                             axis2_env_t **env);
 
@@ -84,10 +94,11 @@
 axis2_arch_file_data_set_module_dll_name(axis2_arch_file_data_t *file_data,
                                     axis2_env_t **env,
                                     axis2_char_t *module_dll_name);
+                                    
 axis2_status_t AXIS2_CALL
 axis2_arch_file_data_add_svc(axis2_arch_file_data_t *file_data,
                                 axis2_env_t **env,
-                                struct axis2_svc *svc_desc);
+                                axis2_svc_t *svc_desc);
 
 struct axis2_svc *AXIS2_CALL
 axis2_arch_file_data_get_svc(axis2_arch_file_data_t *file_data,
@@ -130,6 +141,7 @@
     arch_file_data_impl->file = NULL;
     arch_file_data_impl->type = 0;
     arch_file_data_impl->msg_recv = NULL;
+    arch_file_data_impl->module_name = NULL;
     arch_file_data_impl->module_dll_name = NULL;
     arch_file_data_impl->name = NULL;
     arch_file_data_impl->svc_map = NULL;
@@ -166,6 +178,10 @@
         axis2_arch_file_data_get_type;
     arch_file_data_impl->arch_file_data.ops->get_file = 
         axis2_arch_file_data_get_file;
+    arch_file_data_impl->arch_file_data.ops->get_module_name = 
+        axis2_arch_file_data_get_module_name;
+    arch_file_data_impl->arch_file_data.ops->set_module_name =
+        axis2_arch_file_data_set_module_name;
     arch_file_data_impl->arch_file_data.ops->get_module_dll_name = 
         axis2_arch_file_data_get_module_dll_name;
     arch_file_data_impl->arch_file_data.ops->set_module_dll_name =
@@ -240,10 +256,10 @@
         AXIS2_FREE((*env)->allocator, file_data_impl->msg_recv);
         file_data_impl->msg_recv = NULL;        
     }
-    if(file_data_impl->module_dll_name)
+    if(file_data_impl->module_name)
     {
-        AXIS2_FREE((*env)->allocator, file_data_impl->module_dll_name);
-        file_data_impl->module_dll_name = NULL;        
+        AXIS2_FREE((*env)->allocator, file_data_impl->module_name);
+        file_data_impl->module_name = NULL;        
     }
     if(file_data_impl->name)
     {
@@ -324,8 +340,10 @@
 {
     axis2_arch_file_data_impl_t *file_data_impl = NULL;
     axis2_char_t *svc_name = NULL;
-    AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
+    
+    AXIS2_ENV_CHECK(env, NULL);
     file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
+    
     if(NULL != file_data_impl->file)
     {
         svc_name = AXIS2_FILE_GET_NAME(file_data_impl->file, env);
@@ -355,11 +373,55 @@
 }
 
 axis2_char_t *AXIS2_CALL
+axis2_arch_file_data_get_module_name(axis2_arch_file_data_t *file_data,
+                                            axis2_env_t **env)
+{
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    axis2_char_t *module_name = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
+    
+    if(NULL != file_data_impl->file)
+    {
+        module_name = AXIS2_FILE_GET_NAME(file_data_impl->file, env);
+    }
+    else
+    {
+        module_name = file_data_impl->module_name;
+    }
+    return module_name;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_arch_file_data_set_module_name(axis2_arch_file_data_t *file_data,
+                                    axis2_env_t **env,
+                                    axis2_char_t *module_name) 
+{
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(file_data, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, module_name, AXIS2_FAILURE);
+    
+    file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
+    if(file_data_impl->module_name)
+    {
+        AXIS2_FREE((*env)->allocator, file_data_impl->module_name);
+        file_data_impl->module_name = NULL;
+    }
+    file_data_impl->module_name = module_name;
+    return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
 axis2_arch_file_data_get_module_dll_name(axis2_arch_file_data_t *file_data,
                                             axis2_env_t **env)
 {
-    AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
-    return AXIS2_INTF_TO_IMPL(file_data)->module_dll_name;
+    axis2_arch_file_data_impl_t *file_data_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
+    
+    return file_data_impl->module_dll_name;
 }
 
 axis2_status_t AXIS2_CALL

Modified: webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c?rev=375467&r1=375466&r2=375467&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c Mon Feb  6 19:56:37 2006
@@ -440,34 +440,52 @@
 axis2_status_t AXIS2_CALL
 axis2_arch_reader_read_module_arch(axis2_arch_reader_t *arch_reader,
                                     axis2_env_t **env,
-                                    axis2_char_t *file_path,
-                                    struct axis2_dep_engine *dep_engine,
+                                    axis2_char_t *file_name,
+                                    axis2_dep_engine_t *dep_engine,
                                     axis2_module_desc_t *module)
 {
-    axis2_char_t *file_name = NULL;
     axis2_status_t status = AXIS2_FAILURE;
+    axis2_char_t *module_xml = NULL;
+    axis2_char_t *repos_path = NULL;
+    axis2_char_t *temp_path = NULL;
+    axis2_char_t *temp_path2 = NULL;
+    axis2_char_t *temp_path3 = NULL;
+    axis2_char_t *module_container_path = NULL;
+    axis2_char_t *module_folder = NULL;
     
     AXIS2_FUNC_PARAM_CHECK(arch_reader, env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, file_path, 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, AXIS2_FAILURE);
     
-    file_name = AXIS2_STRACAT(file_path, AXIS2_MODULE_XML, env);
-    if(!file_name)
+    repos_path = AXIS2_DEP_ENGINE_GET_REPOS_PATH(dep_engine, env);
+    temp_path = AXIS2_STRACAT(repos_path, AXIS2_PATH_SEP_STR, env);
+    temp_path2 = AXIS2_STRACAT(temp_path, AXIS2_MODULE_FOLDER, env);
+    temp_path3 = AXIS2_STRACAT(temp_path2, AXIS2_PATH_SEP_STR, env);
+    module_container_path = AXIS2_STRACAT(temp_path3, file_name, env);
+    module_folder = AXIS2_STRACAT(module_container_path, AXIS2_PATH_SEP_STR, env);
+    module_xml = AXIS2_STRACAT(module_folder, AXIS2_MODULE_XML, env);
+    AXIS2_FREE((*env)->allocator, temp_path);
+    AXIS2_FREE((*env)->allocator, temp_path2);
+    AXIS2_FREE((*env)->allocator, temp_path3);
+    AXIS2_FREE((*env)->allocator, module_container_path);
+    AXIS2_FREE((*env)->allocator, module_folder);
+    if(!module_xml)
     {
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
-    status = axis2_file_handler_access(file_name, AXIS2_F_OK);
+    status = axis2_file_handler_access(module_xml, AXIS2_F_OK);
+    
     if(AXIS2_SUCCESS == status)
     {
         axis2_module_builder_t *module_builder = NULL;
         
         module_builder = 
             axis2_module_builder_create_with_file_and_dep_engine_module(env,
-                file_name, dep_engine, module);
+                module_xml, dep_engine, module);
         status = AXIS2_MODULE_BUILDER_POPULATE_MODULE(module_builder, env);
-        if(AXIS2_FAILURE == status)
+        if(AXIS2_SUCCESS != status)
         {
             return AXIS2_FAILURE;
         }

Modified: webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h?rev=375467&r1=375466&r2=375467&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h Mon Feb  6 19:56:37
2006
@@ -48,7 +48,7 @@
 #define AXIS2_SVC_XML "services.xml"
 #define AXIS2_SVC_WSDL_NAME "service.wsdl"
 #define AXIS2_SVC_WSDL_WITH_FOLDER "META-INF/service.wsdl"
-#define AXIS2_MODULE_XML "modules/module.xml"
+#define AXIS2_MODULE_XML "module.xml"
 #define AXIS2_PARAMETERST "parameter" /* paramater start tag */
 #define AXIS2_LISTENERST "listener" /* paramater start tag */
 #define AXIS2_HANDLERST "handler"

Modified: webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c?rev=375467&r1=375466&r2=375467&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c Mon Feb  6 19:56:37 2006
@@ -307,8 +307,7 @@
         axis2_om_node_t *module_ref_node = NULL;
         axis2_om_element_t *module_ref_element = NULL;
         axis2_qname_t *qref = NULL;
-        axis2_qname_t *qrefname = NULL;
-        axis2_char_t *ref_name = NULL;
+        
         axis2_om_attribute_t *module_ref_att = NULL;
         module_ref_node = (axis2_om_node_t *)
             AXIS2_OM_CHILDREN_QNAME_ITERATOR_NEXT(module_refs, env);
@@ -320,6 +319,9 @@
             AXIS2_QNAME_FREE(qref, env);
         if (module_ref_att)
         {
+            axis2_qname_t *qrefname = NULL;
+            axis2_char_t *ref_name = NULL;
+            
             ref_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(module_ref_att, env);
             qrefname = axis2_qname_create(env, ref_name, NULL, NULL);
             AXIS2_DEP_ENGINE_ADD_MODULE(conf_builder->desc_builder->engine, env,

Modified: webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c?rev=375467&r1=375466&r2=375467&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Mon Feb  6 19:56:37 2006
@@ -189,6 +189,12 @@
                                     axis2_module_desc_t *module_desc);
 
 static axis2_status_t
+axis2_dep_engine_add_module_flow_handlers(axis2_dep_engine_t *dep_engine,
+                                    axis2_env_t **env,
+                                    axis2_flow_t *flow,
+                                    axis2_hash_t *handler_create_func_map);
+
+static axis2_status_t
 axis2_dep_engine_add_flow_handlers(axis2_dep_engine_t *dep_engine,
                                     axis2_env_t **env,
                                     axis2_flow_t *flow);
@@ -1162,19 +1168,46 @@
     axis2_module_t *module = NULL;
     axis2_dll_desc_t *dll_desc = NULL;
     axis2_param_t *impl_info_param = NULL;
+    axis2_file_t *module_folder = NULL;
+    AXIS2_TIME_T timestamp = 0;
+    axis2_char_t *module_folder_path = NULL;
+    axis2_char_t *temp_path = NULL;
+    axis2_char_t *dll_path = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
     
-    AXIS2_FUNC_PARAM_CHECK(dep_engine, env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, module_desc, AXIS2_FAILURE);
     engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
     
     read_in_dll = AXIS2_ARCH_FILE_DATA_GET_MODULE_DLL_NAME(engine_impl->
         curr_file, env);
     dll_desc = axis2_dll_desc_create(env);
-    AXIS2_DLL_DESC_SET_NAME(dll_desc, env, read_in_dll);
+
+    module_folder = AXIS2_ARCH_FILE_DATA_GET_FILE(engine_impl->curr_file, env);
+    timestamp = AXIS2_FILE_GET_TIMESTAMP(module_folder, env);
+    AXIS2_DLL_DESC_SET_TIMESTAMP(dll_desc, env, timestamp);
+    module_folder_path = AXIS2_FILE_GET_PATH(module_folder, env);
+    temp_path = AXIS2_STRACAT(module_folder_path, AXIS2_PATH_SEP_STR, env);
+    dll_path = AXIS2_STRACAT(temp_path, read_in_dll, env);
+    AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "dll path is : %s", dll_path);
+ 
+    status = AXIS2_DLL_DESC_SET_NAME(dll_desc, env, dll_path);
+    if(AXIS2_SUCCESS != status)
+    {
+        AXIS2_DLL_DESC_FREE(dll_desc, env);
+        return AXIS2_FAILURE;
+    }
+    /* free all temp vars */
+    AXIS2_FREE((*env)->allocator, temp_path);
+    temp_path = NULL;
+    AXIS2_FREE((*env)->allocator, dll_path);
+    dll_path = NULL;
+    
     AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_MODULE_DLL);
     axis2_class_loader_init(env);
     impl_info_param = axis2_param_create(env, NULL, NULL);
     AXIS2_PARAM_SET_VALUE(impl_info_param, env, dll_desc);
+    impl_info_param->ops->value_free = axis2_dll_desc_free_void_arg;
     module = (axis2_module_t *) axis2_class_loader_create_dll(env, 
         impl_info_param);
     
@@ -1183,6 +1216,40 @@
 
 
 static axis2_status_t
+axis2_dep_engine_add_module_flow_handlers(axis2_dep_engine_t *dep_engine,
+                                    axis2_env_t **env,
+                                    axis2_flow_t *flow,
+                                    axis2_hash_t *handler_create_func_map)
+{
+    int count = 0;
+    int j = 0;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, flow, AXIS2_FAILURE);
+    
+    count = AXIS2_FLOW_GET_HANDLER_COUNT(flow, env);
+    
+    for (j = 0; j < count; j++) 
+    {
+        axis2_handler_desc_t *handlermd = NULL;
+        axis2_handler_t *handler = NULL;
+        axis2_qname_t *handler_qname = NULL;
+        axis2_char_t *handler_name = NULL;
+        AXIS2_HANDLER_CREATE_FUNC handler_create_func = NULL;
+        
+        handlermd = AXIS2_FLOW_GET_HANDLER(flow, env, j);
+        handler_qname = AXIS2_HANDLER_DESC_GET_QNAME(handlermd, env);
+        handler_name = AXIS2_QNAME_GET_LOCALPART(handler_qname, env);
+        handler_create_func = axis2_hash_get(handler_create_func_map,
+            handler_name, AXIS2_HASH_KEY_STRING);
+        handler = handler_create_func(env, handler_qname);
+        AXIS2_HANDLER_INIT(handler, env, handlermd);
+        AXIS2_HANDLER_DESC_SET_HANDLER(handlermd, env, handler);
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
 axis2_dep_engine_add_flow_handlers(axis2_dep_engine_t *dep_engine,
                                     axis2_env_t **env,
                                     axis2_flow_t *flow)
@@ -1206,6 +1273,8 @@
         handlermd = AXIS2_FLOW_GET_HANDLER(flow, env, j);
         handler_dll_name = AXIS2_HANDLER_DESC_GET_CLASS_NAME(handlermd, env);
         dll_desc = axis2_dll_desc_create(env);
+        /* TODO 
+         * set full dll path here instead of dll lib name only */
         AXIS2_DLL_DESC_SET_NAME(dll_desc, env, handler_dll_name);
         AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_HANDLER_DLL);
         axis2_class_loader_init(env);
@@ -1219,7 +1288,6 @@
     return AXIS2_SUCCESS;
 }
 
-
 void * AXIS2_CALL
 axis2_dep_engine_get_handler_dll(axis2_dep_engine_t *dep_engine,
                                 axis2_env_t **env,
@@ -1254,37 +1322,45 @@
     axis2_flow_t *out_flow = NULL;
     axis2_flow_t *in_fault_flow = NULL;
     axis2_flow_t *out_fault_flow = NULL;
+    axis2_module_t *module = NULL;
     /* currentArchiveFile.setClassLoader(); */
     
+    axis2_dep_engine_load_module_dll(dep_engine, env, module_metadata);
+    module = AXIS2_MODULE_DESC_GET_MODULE(module_metadata, env);
+    AXIS2_MODULE_FILL_HANDLER_CREATE_FUNC_MAP(module, env);
+    /* module_metadata.setModuleClassLoader(currentArchiveFile.getClassLoader()); */
+    AXIS2_CONF_ADD_MODULE(AXIS2_INTF_TO_IMPL(dep_engine)->conf, env, 
+        module_metadata);
+    /* log.info(Messages.getMessage(DeploymentErrorMsgs.ADDING_NEW_MODULE)); */
+
     in_flow = AXIS2_MODULE_DESC_GET_INFLOW(module_metadata, env);
     if(NULL != in_flow)
     {
-        axis2_dep_engine_add_flow_handlers(dep_engine, env, in_flow);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, in_flow, 
+            module->handler_create_func_map);
     }
     
     out_flow = AXIS2_MODULE_DESC_GET_OUTFLOW(module_metadata, env);
     if(NULL != out_flow)
     {
-        axis2_dep_engine_add_flow_handlers(dep_engine, env, out_flow);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, out_flow, 
+            module->handler_create_func_map);
     }
     
     in_fault_flow = AXIS2_MODULE_DESC_GET_FAULT_INFLOW(module_metadata, env);
     if(NULL != in_fault_flow)
     {
-        axis2_dep_engine_add_flow_handlers(dep_engine, env, in_fault_flow);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, in_fault_flow, 
+            module->handler_create_func_map);
     }
     
     out_fault_flow = AXIS2_MODULE_DESC_GET_FAULT_OUTFLOW(module_metadata, env);
     if(NULL != out_fault_flow)
     {
-        axis2_dep_engine_add_flow_handlers(dep_engine, env, out_fault_flow);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, out_fault_flow, 
+            module->handler_create_func_map);
     }
     
-    axis2_dep_engine_load_module_dll(dep_engine, env, module_metadata);
-    /* module_metadata.setModuleClassLoader(currentArchiveFile.getClassLoader()); */
-    AXIS2_CONF_ADD_MODULE(AXIS2_INTF_TO_IMPL(dep_engine)->conf, env, 
-        module_metadata);
-    /* log.info(Messages.getMessage(DeploymentErrorMsgs.ADDING_NEW_MODULE)); */
     return AXIS2_SUCCESS;
 }
 
@@ -1521,7 +1597,8 @@
                                 axis2_conf_t *conf)
 {
     axis2_dep_engine_impl_t *engine_impl = NULL;
-    axis2_module_desc_t *module = NULL;
+    axis2_module_desc_t *module_desc = NULL;
+    axis2_module_t *module = NULL;
     axis2_phases_info_t *phases_info = NULL;
     axis2_arch_reader_t *arch_reader = NULL;
     axis2_flow_t *in_flow = NULL;
@@ -1539,41 +1616,48 @@
     axis2_dep_engine_set_phases_info(dep_engine, env, phases_info);
     engine_impl->curr_file = axis2_arch_file_data_create_with_type_and_file(
         env, AXIS2_MODULE, module_archive);
-    module = axis2_module_desc_create(env);
+    module_desc = axis2_module_desc_create(env);
     arch_reader = axis2_arch_reader_create(env);
     file_name = AXIS2_FILE_GET_NAME(module_archive, env);
     AXIS2_ARCH_READER_READ_MODULE_ARCH(arch_reader, env, file_name, dep_engine, 
-        module);    
+        module_desc);    
 
-    in_flow = AXIS2_MODULE_DESC_GET_INFLOW(module, env);
+    axis2_dep_engine_load_module_dll(dep_engine, env, module_desc);
+    module = AXIS2_MODULE_DESC_GET_MODULE(module_desc, env);
+    AXIS2_MODULE_FILL_HANDLER_CREATE_FUNC_MAP(module, env);
+
+    in_flow = AXIS2_MODULE_DESC_GET_INFLOW(module_desc, env);
     if(NULL != in_flow)
     {
-        axis2_dep_engine_add_flow_handlers(dep_engine, env, in_flow);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, in_flow, 
+            module->handler_create_func_map);
     }
     
-    out_flow = AXIS2_MODULE_DESC_GET_OUTFLOW(module, env);
+    out_flow = AXIS2_MODULE_DESC_GET_OUTFLOW(module_desc, env);
     if(NULL != out_flow)
     {
-        axis2_dep_engine_add_flow_handlers(dep_engine, env, out_flow);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, out_flow, 
+            module->handler_create_func_map);
     }
     
-    in_fault_flow = AXIS2_MODULE_DESC_GET_FAULT_INFLOW(module, env);
+    in_fault_flow = AXIS2_MODULE_DESC_GET_FAULT_INFLOW(module_desc, env);
     if(NULL != in_fault_flow)
     {
-        axis2_dep_engine_add_flow_handlers(dep_engine, env, in_fault_flow);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, in_fault_flow,
+            module->handler_create_func_map);
     }
     
-    out_fault_flow = AXIS2_MODULE_DESC_GET_FAULT_OUTFLOW(module, env);
+    out_fault_flow = AXIS2_MODULE_DESC_GET_FAULT_OUTFLOW(module_desc, env);
     if(NULL != out_fault_flow)
     {
-        axis2_dep_engine_add_flow_handlers(dep_engine, env, out_fault_flow);
+        axis2_dep_engine_add_module_flow_handlers(dep_engine, env, out_fault_flow,
+            module->handler_create_func_map);
     }
     
-    axis2_dep_engine_load_module_dll(dep_engine, env, module);
     engine_impl->curr_file = NULL;
    
     /*axismodule.setModuleClassLoader(currentArchiveFile.getClassLoader()); */
-    return module;
+    return module_desc;
 }
 
 axis2_char_t *AXIS2_CALL

Modified: webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c?rev=375467&r1=375466&r2=375467&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Mon Feb  6 19:56:37 2006
@@ -308,9 +308,9 @@
 {
     axis2_flow_t *flow = NULL;
     axis2_om_children_qname_iterator_t *handlers = NULL;
-    axis2_qname_t *child = NULL;
+    axis2_qname_t *qchild = NULL;
         
-    AXIS2_FUNC_PARAM_CHECK(desc_builder, env, NULL);
+    AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, parent, NULL);
     AXIS2_PARAM_CHECK((*env)->error, flow_node, NULL);
         
@@ -326,9 +326,12 @@
         return flow;
     }
     
-    child = axis2_qname_create(env, AXIS2_HANDLERST, NULL, NULL); 
+    qchild = axis2_qname_create(env, AXIS2_HANDLERST, NULL, NULL); 
     handlers = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(flow_element, env, 
-        child, flow_node);
+        qchild, flow_node);
+    if(qchild)
+        AXIS2_QNAME_FREE(qchild, env);
+
     while(AXIS2_TRUE == AXIS2_OM_CHILDREN_QNAME_ITERATOR_HAS_NEXT(handlers ,env))
     {
         axis2_om_node_t *handler_node = NULL;
@@ -341,7 +344,7 @@
         handler = axis2_desc_builder_process_handler(desc_builder, env, 
             handler_node, parent);
         status = AXIS2_FLOW_ADD_HANDLER(flow, env, handler);
-        if(AXIS2_FAILURE == status)
+        if(AXIS2_SUCCESS != status)
         {
             AXIS2_FLOW_FREE(flow, env);
             return NULL;
@@ -369,7 +372,7 @@
     axis2_om_element_t *order_element = NULL;
     axis2_qname_t *order_qname = NULL;
     
-    AXIS2_FUNC_PARAM_CHECK(desc_builder, env, NULL);
+    AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, handler_element, NULL);
     AXIS2_PARAM_CHECK((*env)->error, parent, NULL);
     
@@ -380,18 +383,15 @@
     }
     /* Setting Handler name */
     attr_qname = axis2_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
-    if(!attr_qname)
-    {
-        AXIS2_HANDLER_DESC_FREE(handler, env);
-        return NULL;
-    }
     handler_element = AXIS2_OM_NODE_GET_DATA_ELEMENT(handler_node, env);
     name_attrib = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(handler_element, env, 
         attr_qname);
+    if(attr_qname)
+        AXIS2_QNAME_FREE(attr_qname, env);
+
     if(NULL == name_attrib)
     {
         AXIS2_HANDLER_DESC_FREE(handler, env);
-        AXIS2_QNAME_FREE(attr_qname, env);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_HANDLER_STATE,
             AXIS2_FAILURE);
         return NULL;
@@ -403,21 +403,15 @@
         
         value = AXIS2_OM_ATTRIBUTE_GET_VALUE(name_attrib, env);
         handler_qname = axis2_qname_create(env, value, NULL, NULL); 
-        if(!handler_qname)
-        {
-            AXIS2_HANDLER_DESC_FREE(handler, env);
-            AXIS2_QNAME_FREE(attr_qname, env);
-            return NULL;
-        }
         status = AXIS2_HANDLER_DESC_SET_QNAME(handler, env, handler_qname);
-        if(AXIS2_FAILURE == status)
+        if(handler_qname)
+            AXIS2_QNAME_FREE(handler_qname, env);
+
+        if(AXIS2_SUCCESS != status)
         {
             AXIS2_HANDLER_DESC_FREE(handler, env);
-            AXIS2_QNAME_FREE(attr_qname, env);
-            AXIS2_QNAME_FREE(handler_qname, env);
             return NULL;
         }  
-        AXIS2_QNAME_FREE(handler_qname, env);        
     }
 
     /*Setting Handler Class name */
@@ -425,13 +419,12 @@
     class_qname = axis2_qname_create(env, AXIS2_CLASSNAME, NULL, NULL);
     class_attrib = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(handler_element, env,
         class_qname);
-        
-    AXIS2_QNAME_FREE(class_qname, env);
+    if(class_qname)    
+        AXIS2_QNAME_FREE(class_qname, env);
     
     if(NULL == class_attrib)
     {
         AXIS2_HANDLER_DESC_FREE(handler, env);
-        AXIS2_QNAME_FREE(attr_qname, env);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_HANDLER_STATE,
             AXIS2_FAILURE);
         return NULL;   
@@ -443,7 +436,6 @@
         if(AXIS2_FAILURE == status)
         {
             AXIS2_HANDLER_DESC_FREE(handler, env);
-            AXIS2_QNAME_FREE(attr_qname, env);
             return NULL;
         }
     }
@@ -454,10 +446,12 @@
     order_qname = axis2_qname_create(env, AXIS2_ORDER, NULL, NULL);
     order_element = AXIS2_OM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(handler_element,
         env, order_qname, handler_node, &order_node);
+    if(order_qname)
+        AXIS2_QNAME_FREE(order_qname, env);
+
     if(NULL == (&order_element) || NULL == order_node)
     {
         AXIS2_HANDLER_DESC_FREE(handler, env);
-        AXIS2_QNAME_FREE(attr_qname, env);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_HANDLER_STATE, 
             AXIS2_FAILURE);
         return NULL;
@@ -473,7 +467,6 @@
         if(!order_itr)
         {
             AXIS2_HANDLER_DESC_FREE(handler, env);
-            AXIS2_QNAME_FREE(attr_qname, env);
             return NULL;
         }
         
@@ -491,6 +484,9 @@
             order_attrib = (axis2_om_attribute_t *) v;
             qname = AXIS2_OM_ATTRIBUTE_GET_QNAME(order_attrib, env);
             name = AXIS2_QNAME_GET_LOCALPART(qname, env);
+            if(qname)
+                AXIS2_QNAME_FREE(qname, env);
+
             value = AXIS2_OM_ATTRIBUTE_GET_VALUE(order_attrib, env);
             if(0 == AXIS2_STRCMP(AXIS2_AFTER, name))
             {
@@ -500,7 +496,6 @@
                 if(AXIS2_FAILURE == status)
                 {
                     AXIS2_HANDLER_DESC_FREE(handler, env);
-                    AXIS2_QNAME_FREE(attr_qname, env);
                     return NULL;
                 }
             }
@@ -512,7 +507,6 @@
                 if(AXIS2_FAILURE == status)
                 {
                     AXIS2_HANDLER_DESC_FREE(handler, env);
-                    AXIS2_QNAME_FREE(attr_qname, env);
                     return NULL;
                 }
             }
@@ -524,7 +518,6 @@
                 if(AXIS2_FAILURE == status)
                 {
                     AXIS2_HANDLER_DESC_FREE(handler, env);
-                    AXIS2_QNAME_FREE(attr_qname, env);
                     return NULL;
                 }
             }
@@ -542,7 +535,6 @@
                     if(AXIS2_FAILURE == status)
                     {
                         AXIS2_HANDLER_DESC_FREE(handler, env);
-                        AXIS2_QNAME_FREE(attr_qname, env);
                         AXIS2_FREE((*env)->allocator, bool_val);
                         return NULL;
                     }
@@ -556,7 +548,6 @@
                     if(AXIS2_FAILURE == status)
                     {
                         AXIS2_HANDLER_DESC_FREE(handler, env);
-                        AXIS2_QNAME_FREE(attr_qname, env);
                         AXIS2_FREE((*env)->allocator, bool_val);
                         return NULL;
                     }
@@ -574,8 +565,6 @@
         if(AXIS2_FAILURE == status)
         {
             AXIS2_HANDLER_DESC_FREE(handler, env);
-            AXIS2_QNAME_FREE(attr_qname, env);
-            AXIS2_QNAME_FREE(param_qname, env);
             return NULL;   
         }      
     }
@@ -584,7 +573,6 @@
     if(AXIS2_FAILURE == status)
     {
         AXIS2_HANDLER_DESC_FREE(handler, env);
-        AXIS2_QNAME_FREE(attr_qname, env);
         return NULL; 
     }
     

Modified: webservices/axis2/trunk/c/modules/core/deployment/module_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/module_builder.c?rev=375467&r1=375466&r2=375467&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/module_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/module_builder.c Mon Feb  6 19:56:37
2006
@@ -108,7 +108,7 @@
         axis2_module_builder_free(&(builder_impl->module_builder), env);
         return NULL;
     }
-    builder_impl->module= module;
+    builder_impl->module = module;
     return &(builder_impl->module_builder);   
 }
 
@@ -171,15 +171,21 @@
     int size = 0;
     int i = 0;
     
-    AXIS2_FUNC_PARAM_CHECK(module_builder, env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     builder_impl = AXIS2_INTF_TO_IMPL(module_builder);
     
     module_node = AXIS2_DESC_BUILDER_BUILD_OM(module_builder->desc_builder, env);
-
+    module_element = AXIS2_OM_NODE_GET_DATA_ELEMENT(module_node, env);
+    if(!module_element)
+    {
+        return AXIS2_FAILURE;
+    }
     /* Setting Module Name */
     qattname = axis2_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
     module_name_att = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(module_element, env, 
         qattname);
+    if(qattname)
+        AXIS2_QNAME_FREE(qattname, env);
     if(NULL != module_name_att)
     {
         axis2_char_t *module_name = NULL;
@@ -188,55 +194,58 @@
         if(NULL != module_name && (0 != AXIS2_STRCMP("", module_name)))
         {
             axis2_qname_t *qmodule_name = NULL;
+            
             qmodule_name = axis2_qname_create(env, module_name, NULL, NULL);
             AXIS2_MODULE_DESC_SET_NAME(builder_impl->module, env, qmodule_name);
-            AXIS2_QNAME_FREE(qmodule_name, env);
+            if(qmodule_name)
+                AXIS2_QNAME_FREE(qmodule_name, env);
         }
         else
         {
             axis2_arch_file_data_t *file_data = NULL;
-            axis2_qname_t *qshortfilename = NULL;
-            axis2_char_t *svc_name = NULL;
-            axis2_char_t *short_file_name = NULL;
+            axis2_char_t *module_name = NULL;
+            axis2_qname_t *module_qname = NULL;
             
             file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(module_builder->
                 desc_builder->engine, env);
-            svc_name = AXIS2_ARCH_FILE_DATA_GET_SVC_NAME(file_data, env);
-            short_file_name = AXIS2_DESC_BUILDER_GET_SHORT_FILE_NAME(
-                module_builder->desc_builder, env, svc_name);
-            qshortfilename = axis2_qname_create(env, short_file_name, NULL, NULL);
-            AXIS2_MODULE_DESC_SET_NAME(builder_impl->module, env, qshortfilename);
-            AXIS2_QNAME_FREE(qshortfilename, env);
+            module_name = AXIS2_ARCH_FILE_DATA_GET_MODULE_NAME(file_data, env);
+     
+            module_qname = axis2_qname_create(env, module_name, NULL, NULL);
+            AXIS2_MODULE_DESC_SET_NAME(builder_impl->module, env, module_qname);
+            if(module_qname)
+                AXIS2_QNAME_FREE(module_qname, env);
         }
     }
     else
     {
         axis2_arch_file_data_t *file_data = NULL;
-        axis2_qname_t *qshortfilename = NULL;
-        axis2_char_t *svc_name = NULL;
-        axis2_char_t *short_file_name = NULL;
+        axis2_char_t *module_name = NULL;
+        axis2_qname_t *module_qname = NULL;
         
         file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(module_builder->
             desc_builder->engine, env);
-        svc_name = AXIS2_ARCH_FILE_DATA_GET_SVC_NAME(file_data, env);
-        short_file_name = AXIS2_DESC_BUILDER_GET_SHORT_FILE_NAME(
-            module_builder->desc_builder, env, svc_name);
-        qshortfilename = axis2_qname_create(env, short_file_name, NULL, NULL);
-        AXIS2_MODULE_DESC_SET_NAME(builder_impl->module, env, qshortfilename);
-        AXIS2_QNAME_FREE(qshortfilename, env);
+        module_name = AXIS2_ARCH_FILE_DATA_GET_SVC_NAME(file_data, env);
+        
+        module_qname = axis2_qname_create(env, module_name, NULL, NULL);
+        AXIS2_MODULE_DESC_SET_NAME(builder_impl->module, env, module_qname);
+        if(module_qname)
+            AXIS2_QNAME_FREE(module_qname, env);
     }
 
     /* Setting Module Dll Name , if it is there */
     
     qdllname = axis2_qname_create(env, AXIS2_CLASSNAME, NULL, NULL);
     module_dll_att = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(module_element, env, qdllname);
+    if(qdllname)
+        AXIS2_QNAME_FREE(qdllname, env);
+    
     if(NULL != module_dll_att)
     {
-        axis2_char_t *module_dll = NULL;
+        axis2_char_t *module_dll_name = NULL;
         
         
-        module_dll = AXIS2_OM_ATTRIBUTE_GET_VALUE(module_dll_att, env);
-        if(NULL != module_dll && (0 != AXIS2_STRCMP("", module_dll)))
+        module_dll_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(module_dll_att, env);
+        if(NULL != module_dll_name && (0 != AXIS2_STRCMP("", module_dll_name)))
         {
             if(NULL != module_builder->desc_builder->engine)
             {
@@ -245,7 +254,7 @@
                 file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(
                     module_builder->desc_builder->engine, env);
                 AXIS2_ARCH_FILE_DATA_SET_MODULE_DLL_NAME(file_data, env, 
-                    module_dll);
+                    module_dll_name);
                 
             }
         }
@@ -257,6 +266,9 @@
     qparamst = axis2_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
     itr = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(module_element, env,
         qparamst, module_node);
+    if(qparamst)
+        AXIS2_QNAME_FREE(qparamst, env);
+
     parent = AXIS2_MODULE_DESC_GET_PARENT(builder_impl->module, env);
     AXIS2_DESC_BUILDER_PROCESS_PARAMS(module_builder->desc_builder, env,
         itr, builder_impl->module->params, parent->param_container);
@@ -265,6 +277,9 @@
     qinflowst = axis2_qname_create(env, AXIS2_INFLOWST, NULL, NULL);
     in_flow_element = AXIS2_OM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(module_element,
         env, qinflowst, module_node, &in_flow_node);
+    if(qinflowst)
+        AXIS2_QNAME_FREE(qinflowst, env);
+
     if(NULL != in_flow_element && NULL != in_flow_node)
     {
         axis2_flow_t *flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(module_builder->
@@ -276,6 +291,9 @@
     qoutflowst = axis2_qname_create(env, AXIS2_OUTFLOWST, NULL, NULL);
     out_flow_element = AXIS2_OM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(module_element,
         env, qoutflowst, module_node, &out_flow_node);
+    if(qoutflowst)
+        AXIS2_QNAME_FREE(qoutflowst, env);
+
     if(NULL != out_flow_element && NULL != out_flow_node)
     {
         axis2_flow_t *flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(module_builder->
@@ -287,6 +305,9 @@
     qinfaultflow = axis2_qname_create(env, AXIS2_IN_FAILTFLOW, NULL, NULL);
     in_fault_flow_element = AXIS2_OM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(module_element,
         env, qinfaultflow, module_node, &in_fault_flow_node);
+    if(qinfaultflow)
+        AXIS2_QNAME_FREE(qinfaultflow, env);
+
     if(NULL != in_fault_flow_element && NULL != in_fault_flow_node)
     {
         axis2_flow_t *flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(module_builder->
@@ -298,6 +319,9 @@
     qoutfaultflow = axis2_qname_create(env, AXIS2_OUT_FAILTFLOW, NULL, NULL);
     out_fault_flow_element = AXIS2_OM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(module_element,
         env, qoutfaultflow, module_node, &out_fault_flow_node);
+    if(qoutfaultflow)
+        AXIS2_QNAME_FREE(qoutfaultflow, env);
+
     if(NULL != out_fault_flow_element && NULL != out_fault_flow_node)
     {
         axis2_flow_t *flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(module_builder->
@@ -310,7 +334,8 @@
     qopst = axis2_qname_create(env, AXIS2_OPERATIONST, NULL, NULL);
     op_itr = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(module_element, env,
         qopst, module_node);
-    
+    if(qopst)
+        AXIS2_QNAME_FREE(qopst, env);
     ops = axis2_module_builder_process_ops(module_builder, env, op_itr);
     size = AXIS2_ARRAY_LIST_SIZE(ops, env);
     for(i = 0; i < size; i++)
@@ -332,11 +357,11 @@
     axis2_module_builder_impl_t *builder_impl = NULL;
     axis2_array_list_t *ops = NULL;
     
-    AXIS2_FUNC_PARAM_CHECK(module_builder, env, NULL);
+    AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, op_itr, NULL);
     builder_impl = AXIS2_INTF_TO_IMPL(module_builder);
     
-    ops = axis2_array_list_create(env, 10);
+    ops = axis2_array_list_create(env, 0);
     while(AXIS2_TRUE == AXIS2_OM_CHILDREN_QNAME_ITERATOR_HAS_NEXT(op_itr, env))
     {
         axis2_om_element_t *op_element = NULL;
@@ -364,6 +389,9 @@
         /* getting operation name */
         qattname = axis2_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
         op_name_att = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(op_element, env, qattname);
+        if(qattname)
+            AXIS2_QNAME_FREE(qattname, env);
+
         if(NULL == op_name_att)
         {
             AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_OP_NAME_MISSING,
@@ -372,6 +400,9 @@
         }
         qmep = axis2_qname_create(env, AXIS2_MEP, NULL, NULL);
         op_mep_att = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(op_element, env, qmep);
+        if(qmep)
+            AXIS2_QNAME_FREE(qmep, env);
+        
         if(NULL != op_mep_att)
         {
             mep_url = AXIS2_OM_ATTRIBUTE_GET_VALUE(op_mep_att, env);
@@ -392,10 +423,16 @@
         op_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(op_name_att, env);
         qopname = axis2_qname_create(env, op_name, NULL, NULL);
         AXIS2_OP_SET_QNAME(op_desc, env, qopname);
+        if(qopname)
+            AXIS2_QNAME_FREE(qopname, env);
+
         /* Operation parameters */
         qparamst = axis2_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
         params = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(op_element, env, 
             qparamst, op_node);
+        if(qparamst)
+            AXIS2_QNAME_FREE(qparamst, env);
+
         AXIS2_DESC_BUILDER_PROCESS_PARAMS(module_builder->desc_builder, env,
             params, op_desc->param_container, builder_impl->module->params);
         /* setting the mep of the operation */
@@ -404,6 +441,8 @@
         qmsgrecv = axis2_qname_create(env, AXIS2_MESSAGERECEIVER, NULL, NULL);
         recv_element = AXIS2_OM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(op_element, 
             env, qmsgrecv, op_node, &recv_node);
+        if(qmsgrecv)
+            AXIS2_QNAME_FREE(qmsgrecv, env);
         if(NULL != recv_element && NULL != recv_node)
         {
             axis2_msg_recv_t *msg_recv = NULL;
@@ -425,6 +464,8 @@
         qmodulest = axis2_qname_create(env, AXIS2_MODULEST, NULL, NULL);
         modules = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(op_element, env, 
             qmodulest, op_node);
+        if(qmodulest)
+            AXIS2_QNAME_FREE(qmodulest, env);
         AXIS2_DESC_BUILDER_PROCESS_OP_MODULE_REFS(module_builder->desc_builder,
             env, modules, op_desc);
         /* setting Operation phase */
@@ -433,9 +474,7 @@
         AXIS2_PHASES_INFO_SET_OP_PHASES(info, env, op_desc);
         
         /* adding operation */
-        AXIS2_ARRAY_LIST_ADD(ops, env, op_desc);
-        
-        
+        AXIS2_ARRAY_LIST_ADD(ops, env, op_desc); 
     }
     return ops;
 }

Modified: webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c?rev=375467&r1=375466&r2=375467&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c Mon Feb  6 19:56:37 2006
@@ -250,7 +250,7 @@
     int size = 0;
     AXIS2_TIME_T timestamp = 0;
     
-    AXIS2_FUNC_PARAM_CHECK(svc_builder, env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, svc_node, AXIS2_FAILURE);
     builder_impl = AXIS2_INTF_TO_IMPL(svc_builder);
 
@@ -706,8 +706,9 @@
 
 axis2_status_t AXIS2_CALL
 axis2_svc_builder_process_module_refs(axis2_svc_builder_t *svc_builder,
-                                    axis2_env_t **env,
-                                    axis2_om_children_qname_iterator_t *module_refs)
+                                        axis2_env_t **env,
+                                        axis2_om_children_qname_iterator_t *
+                                            module_refs)
 {
     axis2_svc_builder_impl_t *builder_impl = NULL;
     
@@ -729,7 +730,6 @@
         module_ref_att = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(module_ref_element,
             env, qref);
         AXIS2_QNAME_FREE(qref, env);
-        qref = NULL;
         if(NULL != module_ref_att)
         {
             axis2_char_t *ref_name = NULL;
@@ -749,7 +749,6 @@
                 AXIS2_SVC_ADD_MODULE_REF(builder_impl->svc, env, qrefname);
             }
             AXIS2_QNAME_FREE(qrefname, env);
-            qrefname = NULL;
         }
     }
     return AXIS2_SUCCESS;



Mime
View raw message