You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2006/03/02 04:59:41 UTC

svn commit: r382287 - in /webservices/axis2/trunk/c: include/ modules/core/clientapi/ modules/core/context/ modules/core/deployment/ modules/core/description/ modules/platforms/unix/ modules/util/ modules/wsdl/ modules/xml/om/ samples/client/addr_echo/...

Author: damitha
Date: Wed Mar  1 19:59:39 2006
New Revision: 382287

URL: http://svn.apache.org/viewcvs?rev=382287&view=rev
Log:
Fixed segfaulting in addr_client. Fixed more memory leaks

Modified:
    webservices/axis2/trunk/c/include/axis2_module_desc.h
    webservices/axis2/trunk/c/include/axis2_svc_ctx.h
    webservices/axis2/trunk/c/modules/core/clientapi/call.c
    webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
    webservices/axis2/trunk/c/modules/core/clientapi/stub.c
    webservices/axis2/trunk/c/modules/core/context/svc_ctx.c
    webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/phases_info.c
    webservices/axis2/trunk/c/modules/core/description/module_desc.c
    webservices/axis2/trunk/c/modules/core/description/op.c
    webservices/axis2/trunk/c/modules/core/description/param_container.c
    webservices/axis2/trunk/c/modules/core/description/svc.c
    webservices/axis2/trunk/c/modules/core/description/svc_grp.c
    webservices/axis2/trunk/c/modules/platforms/unix/axis2_unix.h
    webservices/axis2/trunk/c/modules/util/array_list.c
    webservices/axis2/trunk/c/modules/util/axis2_array_list.h
    webservices/axis2/trunk/c/modules/util/class_loader.c
    webservices/axis2/trunk/c/modules/util/property.c
    webservices/axis2/trunk/c/modules/wsdl/wsdl_interface.c
    webservices/axis2/trunk/c/modules/wsdl/wsdl_op.c
    webservices/axis2/trunk/c/modules/wsdl/wsdl_svc.c
    webservices/axis2/trunk/c/modules/xml/om/om_element.c
    webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c
    webservices/axis2/trunk/c/test/unit/wsdl/test_wsdl_component.c

Modified: webservices/axis2/trunk/c/include/axis2_module_desc.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_module_desc.h?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_module_desc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_module_desc.h Wed Mar  1 19:59:39 2006
@@ -265,12 +265,6 @@
 axis2_module_desc_free_void_arg (void *module_desc,
                                         axis2_env_t **env);
 
-/**
- * Free module_desc array passed as void pointer.
- */
-AXIS2_DECLARE(axis2_status_t) 
-axis2_module_desc_array_list_free (void *module_desc_list,
-                                axis2_env_t **env);
                                 
 /************************* Start of function macros	***************************/
 	

Modified: webservices/axis2/trunk/c/include/axis2_svc_ctx.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_svc_ctx.h?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc_ctx.h Wed Mar  1 19:59:39 2006
@@ -66,6 +66,12 @@
                                                 axis2_env_t **env);
     struct axis2_svc* (AXIS2_CALL *get_svc)(struct axis2_svc_ctx *svc_ctx, 
                                                 axis2_env_t **env);
+
+    axis2_status_t (AXIS2_CALL *
+    set_svc) (axis2_svc_ctx_t *svc_ctx,
+                        axis2_env_t **env,
+                        struct axis2_svc *svc);
+
     struct axis2_conf_ctx* (AXIS2_CALL *get_conf_ctx)(struct axis2_svc_ctx *svc_ctx, 
                                                 axis2_env_t **env);
     struct axis2_op_ctx* (AXIS2_CALL *create_op_ctx)(struct axis2_svc_ctx *svc_ctx, 
@@ -93,6 +99,8 @@
 #define AXIS2_SVC_CTX_INIT(svc_ctx, env, conf) ((svc_ctx)->ops->init(svc_ctx, env, conf))
 #define AXIS2_SVC_CTX_GET_SVC_ID(svc_ctx, env) ((svc_ctx)->ops->get_svc_id(svc_ctx, env))
 #define AXIS2_SVC_CTX_GET_SVC(svc_ctx, env) ((svc_ctx)->ops->get_svc(svc_ctx, env))
+#define AXIS2_SVC_CTX_SET_SVC(svc_ctx, env, svc) \
+        ((svc_ctx)->ops->set_svc(svc_ctx, env, svc))
 #define AXIS2_SVC_CTX_GET_CONF_CTX(svc_ctx, env) ((svc_ctx)->ops->get_conf_ctx(svc_ctx, env))
 #define AXIS2_SVC_CTX_CREATE_OP_CTX(svc_ctx, env, qname) ((svc_ctx)->ops->create_op_ctx(svc_ctx, env, qname))
     

Modified: webservices/axis2/trunk/c/modules/core/clientapi/call.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/call.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/call.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/call.c Wed Mar  1 19:59:39 2006
@@ -836,7 +836,7 @@
  * @param toSend - This should be OM Element (payload)
  * @return
  */
-axis2_om_node_t* AXIS2_CALL axis2_call_invoke_blocking_with_om(struct axis2_call *call, 
+axis2_om_node_t* AXIS2_CALL axis2_call_invoke_blocking_with_om(axis2_call_t *call, 
     axis2_env_t **env,
     axis2_char_t *op_name, axis2_om_node_t *om_node_to_send)
 {
@@ -1253,8 +1253,6 @@
         
         /* we will assume a Service and operations */
         axis_svc = axis2_svc_create_with_qname(env, assumed_svc_qname);
-        /*axisOperationTemplate = new AxisOperation(new QName(
-            "TemplateOperation")); */
         qtemp_op = axis2_qname_create(env, "TemplateOperation", NULL, NULL);
         call_impl->op_template = axis2_op_create_with_qname(env, qtemp_op);
         AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(call_impl->op_template, env, AXIS2_MEP_URI_OUT_IN);

Modified: webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c Wed Mar  1 19:59:39 2006
@@ -158,17 +158,24 @@
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_MEP_CANNOT_BE_NULL_IN_MEP_CLIENT, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
-
-    /* if operation not alrady added, add it */
-    svc = AXIS2_SVC_CTX_GET_SVC(mep_client_impl->svc_ctx, env);
-    if (svc)
+    /* If operation has a parent service get it */
+    svc = AXIS2_OP_GET_PARENT(op, env);
+    if(svc)
     {
-        axis2_op_t *temp_op = NULL;
-        axis2_qname_t *op_qname = AXIS2_OP_GET_QNAME(op, env);
-        temp_op = AXIS2_SVC_GET_OP_WITH_QNAME(svc, env, op_qname);
-        if (!temp_op)
+        AXIS2_SVC_CTX_SET_SVC(mep_client_impl->svc_ctx, env, svc);
+    }
+    else
+    {
+        svc = AXIS2_SVC_CTX_GET_SVC(mep_client_impl->svc_ctx, env);
+        if (svc)
         {
-            AXIS2_SVC_ADD_OP(svc, env, op);
+            axis2_op_t *temp_op = NULL;
+            axis2_qname_t *op_qname = AXIS2_OP_GET_QNAME(op, env);
+            temp_op = AXIS2_SVC_GET_OP_WITH_QNAME(svc, env, op_qname);
+            if (!temp_op)
+            {
+                AXIS2_SVC_ADD_OP(svc, env, op);
+            }
         }
     }
     

Modified: webservices/axis2/trunk/c/modules/core/clientapi/stub.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/clientapi/stub.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/stub.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/stub.c Wed Mar  1 19:59:39 2006
@@ -331,19 +331,19 @@
     
     stub_impl = AXIS2_INTF_TO_IMPL(stub);
     
-	if(NULL != stub->ops)
+	if(stub->ops)
     {
         AXIS2_FREE((*env)->allocator, stub->ops);
         stub->ops = NULL;
     }
 
-    if(NULL != stub_impl->call)
+    if(stub_impl->call)
     {
         AXIS2_CALL_FREE(stub_impl->call, env);
         stub_impl->call = NULL;
     }
     
-    if(NULL != stub_impl->property_map)
+    if(stub_impl->property_map)
     {
         axis2_hash_free(stub_impl->property_map, env);
         stub_impl->property_map = NULL;

Modified: webservices/axis2/trunk/c/modules/core/context/svc_ctx.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/context/svc_ctx.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/svc_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/svc_ctx.c Wed Mar  1 19:59:39 2006
@@ -51,6 +51,10 @@
                                             axis2_env_t **env);
 axis2_svc_t* AXIS2_CALL axis2_svc_ctx_get_svc(struct axis2_svc_ctx *svc_ctx, 
                                             axis2_env_t **env);
+axis2_status_t AXIS2_CALL
+axis2_svc_ctx_set_svc(axis2_svc_ctx_t *svc_ctx,
+                        axis2_env_t **env,
+                        axis2_svc_t *svc);
 struct axis2_conf_ctx* AXIS2_CALL axis2_svc_ctx_get_conf_ctx(struct axis2_svc_ctx *svc_ctx, 
                                             axis2_env_t **env);
 axis2_op_ctx_t* AXIS2_CALL axis2_svc_ctx_create_op_ctx(struct axis2_svc_ctx *svc_ctx, 
@@ -117,6 +121,7 @@
     svc_ctx_impl->svc_ctx.ops->init = axis2_svc_ctx_init;
     svc_ctx_impl->svc_ctx.ops->get_svc_id = axis2_svc_ctx_get_svc_id;
     svc_ctx_impl->svc_ctx.ops->get_svc = axis2_svc_ctx_get_svc;
+    svc_ctx_impl->svc_ctx.ops->set_svc = axis2_svc_ctx_set_svc;
     svc_ctx_impl->svc_ctx.ops->get_conf_ctx = axis2_svc_ctx_get_conf_ctx;
     svc_ctx_impl->svc_ctx.ops->create_op_ctx = axis2_svc_ctx_create_op_ctx;
     
@@ -205,6 +210,27 @@
 {
     AXIS2_ENV_CHECK(env, NULL);
     return AXIS2_INTF_TO_IMPL(svc_ctx)->svc;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_svc_ctx_set_svc(axis2_svc_ctx_t *svc_ctx,
+                        axis2_env_t **env,
+                        axis2_svc_t *svc)
+{
+    axis2_svc_ctx_impl_t *svc_ctx_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, svc, AXIS2_FAILURE);
+    svc_ctx_impl = AXIS2_INTF_TO_IMPL(svc_ctx);
+     
+    svc_ctx_impl->svc = svc;
+    svc_ctx_impl->svc_qname = AXIS2_SVC_GET_QNAME(svc, env);
+    if (svc_ctx_impl->svc_qname)
+    {
+        svc_ctx_impl->svc_id = AXIS2_QNAME_GET_LOCALPART(svc_ctx_impl->
+            svc_qname, env);
+    }
+    return AXIS2_SUCCESS;
 }
 
 struct axis2_conf_ctx* AXIS2_CALL axis2_svc_ctx_get_conf_ctx(struct axis2_svc_ctx *svc_ctx, 

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=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c Wed Mar  1 19:59:39 2006
@@ -691,6 +691,11 @@
             axis2_dll_desc_t *dll_desc = NULL;
             axis2_param_t *impl_info_param = NULL;
             void *transport_sender = NULL;
+            axis2_char_t *path_qualified_dll_name = NULL;
+            axis2_char_t *repos_name = NULL;
+            axis2_char_t *temp_path = NULL;
+            axis2_char_t *temp_path2 = NULL;
+            axis2_char_t *temp_path3 = NULL;
             
             name = AXIS2_OM_ATTRIBUTE_GET_VALUE(trs_name, env);
             qname = axis2_qname_create(env, name, NULL, NULL);
@@ -713,20 +718,28 @@
                 return AXIS2_FAILURE;
             }
             class_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(trs_dll_att, env);
-            dll_desc = axis2_dll_desc_create(env);
-            dll_name = 
-                AXIS2_DLL_DESC_CREATE_PLATFORM_SPECIFIC_DLL_NAME(dll_desc, env, 
-                    class_name);
-            /* TODO
-             * make the dll_name path qualified
-             */
-            AXIS2_DLL_DESC_SET_NAME(dll_desc, env, dll_name);
-            AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_TRANSPORT_SENDER_DLL);
             impl_info_param = axis2_param_create(env, class_name, NULL); 
             if(!impl_info_param)
             {
                 return AXIS2_FAILURE;
             }
+            dll_desc = axis2_dll_desc_create(env);
+            dll_name = 
+                AXIS2_DLL_DESC_CREATE_PLATFORM_SPECIFIC_DLL_NAME(dll_desc, env, 
+                    class_name);
+        
+            repos_name = AXIS2_DEP_ENGINE_GET_REPOS_PATH(conf_builder->
+                desc_builder->engine, env);
+            temp_path = AXIS2_STRACAT(repos_name, AXIS2_PATH_SEP_STR, env);
+            temp_path2 = AXIS2_STRACAT(temp_path, AXIS2_LIB_FOLDER, env);
+            temp_path3 = AXIS2_STRACAT(temp_path2, AXIS2_PATH_SEP_STR, env);
+            path_qualified_dll_name = AXIS2_STRACAT(temp_path3, dll_name, env);
+            AXIS2_FREE((*env)->allocator, temp_path);
+            AXIS2_FREE((*env)->allocator, temp_path2);
+            AXIS2_FREE((*env)->allocator, temp_path3);
+            AXIS2_DLL_DESC_SET_NAME(dll_desc, env, path_qualified_dll_name);
+            AXIS2_FREE((*env)->allocator, path_qualified_dll_name);
+            AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_TRANSPORT_SENDER_DLL);
             AXIS2_PARAM_SET_VALUE(impl_info_param, env, dll_desc); 
             impl_info_param->ops->value_free = axis2_dll_desc_free_void_arg;
             axis2_class_loader_init(env);
@@ -904,17 +917,32 @@
                 axis2_param_t *impl_info_param = NULL;
                 axis2_transport_receiver_t *recv = NULL;
                 axis2_status_t stat = AXIS2_FAILURE;
+                axis2_char_t *path_qualified_dll_name = NULL;
+                axis2_char_t *repos_name = NULL;
+                axis2_char_t *temp_path = NULL;
+                axis2_char_t *temp_path2 = NULL;
+                axis2_char_t *temp_path3 = NULL;
                 
                 class_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(trs_class_name, env);
+                impl_info_param = axis2_param_create(env, class_name, NULL);
                 dll_desc = axis2_dll_desc_create(env);
                 dll_name = 
                     AXIS2_DLL_DESC_CREATE_PLATFORM_SPECIFIC_DLL_NAME(dll_desc, 
                         env, class_name);
-                /* TODO 
-                 * set full dll path here instead of dll lib name only */
-                AXIS2_DLL_DESC_SET_NAME(dll_desc, env, dll_name);
+                
+                repos_name = AXIS2_DEP_ENGINE_GET_REPOS_PATH(conf_builder->
+                    desc_builder->engine, env);
+                temp_path = AXIS2_STRACAT(repos_name, AXIS2_PATH_SEP_STR, env);
+                temp_path2 = AXIS2_STRACAT(temp_path, AXIS2_LIB_FOLDER, env);
+                temp_path3 = AXIS2_STRACAT(temp_path2, AXIS2_PATH_SEP_STR, env);
+                path_qualified_dll_name = AXIS2_STRACAT(temp_path3, dll_name, env);
+                AXIS2_FREE((*env)->allocator, temp_path);
+                AXIS2_FREE((*env)->allocator, temp_path2);
+                AXIS2_FREE((*env)->allocator, temp_path3);
+                
+                AXIS2_DLL_DESC_SET_NAME(dll_desc, env, path_qualified_dll_name);
+                AXIS2_FREE((*env)->allocator, path_qualified_dll_name);
                 AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_TRANSPORT_RECV_DLL);
-                impl_info_param = axis2_param_create(env, class_name, NULL);
             
                 AXIS2_PARAM_SET_VALUE(impl_info_param, env, dll_desc); 
                 impl_info_param->ops->value_free = axis2_dll_desc_free_void_arg;

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=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Wed Mar  1 19:59:39 2006
@@ -815,7 +815,7 @@
     axis2_msg_recv_t *msg_recv = NULL;
     axis2_qname_t *class_qname = NULL;
     axis2_param_t *impl_info_param = NULL;
-    struct axis2_dll_desc *dll_desc = NULL;
+    axis2_dll_desc_t *dll_desc = NULL;
     axis2_char_t *repos_name = NULL;
     axis2_char_t *dll_name = NULL;
     axis2_char_t *temp_path = NULL;

Modified: webservices/axis2/trunk/c/modules/core/deployment/phases_info.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/phases_info.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/phases_info.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/phases_info.c Wed Mar  1 19:59:39 2006
@@ -78,7 +78,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_phases_info_set_op_phases(axis2_phases_info_t *phases_info,
                                         axis2_env_t **env,
-                                        struct axis2_op *axis2_opt);
+                                        struct axis2_op *op_desc);
                                     
 /***************************** End of function headers ************************/
 
@@ -348,7 +348,7 @@
     phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
     
     status = AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
-    if(AXIS2_FAILURE == status)
+    if(AXIS2_SUCCESS != status)
     {
         AXIS2_PHASE_FREE(phase, env);
         phase = NULL;
@@ -373,11 +373,24 @@
         } else 
         {
             phase = axis2_phase_create(env, phase_name);
-            status = AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
-            if(AXIS2_FAILURE == status)
+            if(phase)
             {
+                status = AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
+            }
+            if(AXIS2_SUCCESS != status)
+            {
+                int i = 0;
+                int size = 0;
+
                 AXIS2_PHASE_FREE(phase, env);
                 phase = NULL;
+                size = AXIS2_ARRAY_LIST_SIZE(op_in_phases, env);
+                for(i = 0; i < size; i++)
+                {
+                    phase = AXIS2_ARRAY_LIST_GET(op_in_phases, env, i);
+                    AXIS2_PHASE_FREE(phase, env);
+                    phase = NULL;
+                }
                 AXIS2_ARRAY_LIST_FREE(op_in_phases, env);
                 op_in_phases = NULL;
                 return NULL;
@@ -402,29 +415,42 @@
     AXIS2_ENV_CHECK(env, NULL);
     
     phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
+
+    if(phases_info_impl->out_phases)
+        size = AXIS2_ARRAY_LIST_SIZE(phases_info_impl->out_phases, env);
     op_out_phases = axis2_array_list_create(env, 0);
     if(!op_out_phases)
     {
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
-    if(phases_info_impl->out_phases)
-        size = AXIS2_ARRAY_LIST_SIZE(phases_info_impl->out_phases, env);
     for (i = 0; i < size; i++) 
     {
-        phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(phases_info_impl->out_phases, env, i);
+        phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(phases_info_impl->
+            out_phases, env, i);
         if (0 == AXIS2_STRCMP(AXIS2_PHASE_TRANSPORT_OUT, phase_name)) 
         {
             /* Do Nothing */
-        } else 
+        } 
+        else 
         {
             phase = axis2_phase_create(env, phase_name);
-            status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
-            if(AXIS2_FAILURE == status)
+            if(phase)
+                status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
+            if(AXIS2_SUCCESS != status)
             {
+                int i = 0;
+                int size = 0;
+
                 AXIS2_PHASE_FREE(phase, env);
                 phase = NULL;
+                size = AXIS2_ARRAY_LIST_SIZE(op_out_phases, env);
+                for(i = 0; i < size; i++)
+                {
+                    phase = AXIS2_ARRAY_LIST_GET(op_out_phases, env, i);
+                    AXIS2_PHASE_FREE(phase, env);
+                    phase = NULL;
+                }
                 AXIS2_ARRAY_LIST_FREE(op_out_phases, env);
                 op_out_phases = NULL;
                 return NULL;
@@ -432,21 +458,43 @@
         }
     }
     phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
-    status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
-    if(AXIS2_FAILURE == status)
+    if(phase)
+        status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
+    if(AXIS2_SUCCESS != status)
     {
+        int i = 0;
+        int size = 0;
+
         AXIS2_PHASE_FREE(phase, env);
         phase = NULL;
+        size = AXIS2_ARRAY_LIST_SIZE(op_out_phases, env);
+        for(i = 0; i < size; i++)
+        {
+            phase = AXIS2_ARRAY_LIST_GET(op_out_phases, env, i);
+            AXIS2_PHASE_FREE(phase, env);
+            phase = NULL;
+        }
         AXIS2_ARRAY_LIST_FREE(op_out_phases, env);
         op_out_phases = NULL;
         return NULL;
     }
     phase = axis2_phase_create(env, AXIS2_PHASE_MESSAGE_OUT);
-    status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
-    if(AXIS2_FAILURE == status)
+    if(phase)
+        status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
+    if(AXIS2_SUCCESS != status)
     {
+        int i = 0;
+        int size = 0;
+
         AXIS2_PHASE_FREE(phase, env);
         phase = NULL;
+        size = AXIS2_ARRAY_LIST_SIZE(op_out_phases, env);
+        for(i = 0; i < size; i++)
+        {
+            phase = AXIS2_ARRAY_LIST_GET(op_out_phases, env, i);
+            AXIS2_PHASE_FREE(phase, env);
+            phase = NULL;
+        }
         AXIS2_ARRAY_LIST_FREE(op_out_phases, env);
         op_out_phases = NULL;
         return NULL;
@@ -467,15 +515,8 @@
     axis2_array_list_t * op_in_faultphases = NULL;
     struct axis2_phase *phase = NULL;
     
-    AXIS2_ENV_CHECK(env, NULL);
-    
+    AXIS2_ENV_CHECK(env, NULL); 
     phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
-    op_in_faultphases = axis2_array_list_create(env, 0);
-    if(!op_in_faultphases)
-    {
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
 
     if(!phases_info_impl->in_faultphases)
     {
@@ -486,15 +527,33 @@
     {
         return NULL;
     }
+    op_in_faultphases = axis2_array_list_create(env, 0);
+    if(!op_in_faultphases)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
     for (i = 0; i < size; i++) 
     {
-        phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(phases_info_impl->in_faultphases, env, i);
+        phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(phases_info_impl->
+            in_faultphases, env, i);
         phase = axis2_phase_create(env, phase_name);
-        status = AXIS2_ARRAY_LIST_ADD(op_in_faultphases, env, phase);
-        if(AXIS2_FAILURE == status)
+        if(phase)
+            status = AXIS2_ARRAY_LIST_ADD(op_in_faultphases, env, phase);
+        if(AXIS2_SUCCESS != status)
         {
+            int i = 0;
+            int size = 0;
+
             AXIS2_PHASE_FREE(phase, env);
             phase = NULL;
+            size = AXIS2_ARRAY_LIST_SIZE(op_in_faultphases, env);
+            for(i = 0; i < size; i++)
+            {
+                phase = AXIS2_ARRAY_LIST_GET(op_in_faultphases, env, i);
+                AXIS2_PHASE_FREE(phase, env);
+                phase = NULL;
+            }
             AXIS2_ARRAY_LIST_FREE(op_in_faultphases, env);
             op_in_faultphases = NULL;
             return NULL;
@@ -519,12 +578,6 @@
     AXIS2_ENV_CHECK(env, NULL);
     
     phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
-    op_out_faultphases = axis2_array_list_create(env, 0);
-    if(!op_out_faultphases)
-    {
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
 
     if(!phases_info_impl->out_faultphases)
     {
@@ -533,15 +586,33 @@
     size = AXIS2_ARRAY_LIST_SIZE(phases_info_impl->out_faultphases, env);
     if(0 == size)
         return NULL;
+    op_out_faultphases = axis2_array_list_create(env, 0);
+    if(!op_out_faultphases)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
     for (i = 0; i < size; i++) 
     {
-        phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(phases_info_impl->out_faultphases, env, i);
+        phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(phases_info_impl->
+            out_faultphases, env, i);
         phase = axis2_phase_create(env, phase_name);
-        status = AXIS2_ARRAY_LIST_ADD(op_out_faultphases, env, phase);
-        if(AXIS2_FAILURE == status)
+        if(phase)
+            status = AXIS2_ARRAY_LIST_ADD(op_out_faultphases, env, phase);
+        if(AXIS2_SUCCESS != status)
         {
+            int i = 0;
+            int size = 0;
+
             AXIS2_PHASE_FREE(phase, env);
             phase = NULL;
+            size = AXIS2_ARRAY_LIST_SIZE(op_out_faultphases, env);
+            for(i = 0; i < size; i++)
+            {
+                phase = AXIS2_ARRAY_LIST_GET(op_out_faultphases, env, i);
+                AXIS2_PHASE_FREE(phase, env);
+                phase = NULL;
+            }
             AXIS2_ARRAY_LIST_FREE(op_out_faultphases, env);
             op_out_faultphases = NULL;
             return NULL;
@@ -554,7 +625,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_phases_info_set_op_phases(axis2_phases_info_t *phases_info,
                                         axis2_env_t **env,
-                                        struct axis2_op *axis2_opt) 
+                                        axis2_op_t *op_desc) 
 {
     axis2_status_t status = AXIS2_FAILURE;
     axis2_array_list_t *op_in_phases = NULL;
@@ -565,7 +636,7 @@
     axis2_phases_info_impl_t *phases_info_impl = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, axis2_opt, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, op_desc, AXIS2_FAILURE);
     
     phases_info_impl = AXIS2_INTF_TO_IMPL(phases_info);
     
@@ -573,6 +644,7 @@
     if(NULL == op_in_phases)
     {
         status = AXIS2_ERROR_GET_STATUS_CODE((*env)->error);
+        /* op_in_phases cannot be NULL */
         return status;
     }
     
@@ -580,33 +652,40 @@
     if(NULL == op_out_phases)
     {
         status = AXIS2_ERROR_GET_STATUS_CODE((*env)->error);
+        /* op_out_phases cannot be NULL */
         return status;
     }
     
-    op_in_faultphases = axis2_phases_info_get_op_in_faultphases(phases_info, env);
-    if(NULL == op_in_faultphases)
+    op_in_faultphases = axis2_phases_info_get_op_in_faultphases(phases_info, env);    
+    op_out_faultphases = axis2_phases_info_get_op_out_faultphases(phases_info, env);
+    
+    status = AXIS2_OP_SET_REMAINING_PHASES_INFLOW(op_desc, env, op_in_phases);
+    status = AXIS2_OP_SET_PHASES_OUTFLOW(op_desc, env, op_out_phases);
+    if(op_in_faultphases)
+    {
+        status = AXIS2_OP_SET_PHASES_IN_FAULT_FLOW(op_desc, env, op_in_faultphases);
+    }
+    else
     {
         status = AXIS2_ERROR_GET_STATUS_CODE((*env)->error);
-        return status;
+        if(AXIS2_SUCCESS != status)
+        {
+            return status;
+        }
     }
-    
-    op_out_faultphases = axis2_phases_info_get_op_out_faultphases(phases_info, env);
-    if(NULL == op_out_faultphases)
+
+    if(op_out_faultphases)
+    {
+        status = AXIS2_OP_SET_PHASES_OUT_FAULT_FLOW(op_desc, env, op_out_faultphases);
+    }
+    else    
     {
         status = AXIS2_ERROR_GET_STATUS_CODE((*env)->error);
-        return status;
+        if(AXIS2_SUCCESS != status)
+        {
+            return status;
+        }
     }
-    
-    status = AXIS2_OP_SET_REMAINING_PHASES_INFLOW(axis2_opt, env, op_in_phases);
-    if(AXIS2_FAILURE == status)
-        return status;
-    status = AXIS2_OP_SET_PHASES_OUTFLOW(axis2_opt, env, op_out_phases);
-    if(AXIS2_FAILURE == status)
-        return status;
-    status = AXIS2_OP_SET_PHASES_IN_FAULT_FLOW(axis2_opt, env, op_in_faultphases);
-    if(AXIS2_FAILURE == status)
-        return status;
-    status = AXIS2_OP_SET_PHASES_OUT_FAULT_FLOW(axis2_opt, env, op_out_faultphases);
     
     return status;
     

Modified: webservices/axis2/trunk/c/modules/core/description/module_desc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/module_desc.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/module_desc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/module_desc.c Wed Mar  1 19:59:39 2006
@@ -331,29 +331,6 @@
     return axis2_module_desc_free(module_desc_l, env);
 }
 
-axis2_status_t AXIS2_CALL
-axis2_module_desc_array_list_free (void *module_desc_list,
-                                axis2_env_t **env)
-{
-    axis2_module_desc_t *module_desc = NULL;
-    axis2_array_list_t *module_desc_list_l = NULL;
-    int i = 0;
-    int size = 0;
-    
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
-    module_desc_list_l = (axis2_array_list_t *) module_desc_list;
-    size = AXIS2_ARRAY_LIST_SIZE(module_desc_list_l, env);
-    for(i = 0; i < size; i++)
-    {
-        module_desc = (axis2_module_desc_t *) 
-            AXIS2_ARRAY_LIST_GET(module_desc_list_l, env, i);
-        axis2_module_desc_free(module_desc, env);
-    }
-    AXIS2_ARRAY_LIST_FREE(module_desc_list_l, env);
-    return AXIS2_SUCCESS;
-}
-
 axis2_flow_t *AXIS2_CALL
 axis2_module_desc_get_inflow(axis2_module_desc_t *module_desc,
                                     axis2_env_t **env)

Modified: webservices/axis2/trunk/c/modules/core/description/op.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/op.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/op.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/op.c Wed Mar  1 19:59:39 2006
@@ -480,8 +480,8 @@
     if(NULL == array_list_l) return NULL;
     property = axis2_property_create(env);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env, 
-        axis2_module_desc_array_list_free);
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
+        axis2_array_list_free_void_arg);
+    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
     AXIS2_PROPERTY_SET_VALUE(property, env, array_list_l);
     
     status = AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY(op_impl->wsdl_op->
@@ -583,9 +583,8 @@
             return NULL;		
         }
     }
-    
 	status = axis2_op_set_qname(&(op_impl->op), env, qname);
-    if(AXIS2_FAILURE == status)
+    if(AXIS2_SUCCESS != status)
     {
         axis2_op_free(&(op_impl->op), env);
         return NULL;
@@ -628,20 +627,13 @@
     axis2_op_impl_t *op_impl = NULL;
     axis2_qname_t *op_qname = NULL;
     axis2_char_t *op_name = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     op_impl = AXIS2_INTF_TO_IMPL(op);
 
-    op_qname = AXIS2_OP_GET_QNAME(&(op_impl->op), env);
-    op_name = AXIS2_QNAME_GET_LOCALPART(op_qname, env); 
-    
-	if(NULL != op->ops)
-    {
-		AXIS2_FREE((*env)->allocator, op->ops);
-        op->ops = NULL;
-    }
+    op_qname = AXIS2_OP_GET_QNAME(op, env);
+    op_name = AXIS2_QNAME_GET_LOCALPART(op_qname, env);
     
-    if(NULL != op_impl->remaining_phases_inflow && 
+    if(op_impl->remaining_phases_inflow && 
         (0 != AXIS2_STRCMP(op_name, "TemplateOperation")))
     {
         int i = 0;
@@ -733,13 +725,8 @@
         op->param_container = NULL;
     }
     
-    if(NULL != op_impl->wsdl_op)
-    {
-	    AXIS2_WSDL_OP_FREE(op_impl->wsdl_op, env);
-        op_impl->wsdl_op = NULL;
-    }
-    
     op_impl->parent = NULL;
+
     if(op_impl->msg_recv)
     {
         AXIS2_MSG_RECV_FREE(op_impl->msg_recv, env);
@@ -764,6 +751,18 @@
         op_impl->modulerefs = NULL;
     }
     
+    if(NULL != op_impl->wsdl_op)
+    {
+	    AXIS2_WSDL_OP_FREE(op_impl->wsdl_op, env);
+        op_impl->wsdl_op = NULL;
+    }
+    
+	if(NULL != op->ops)
+    {
+		AXIS2_FREE((*env)->allocator, op->ops);
+        op->ops = NULL;
+    }
+    
     if(op_impl)    
     {
         AXIS2_FREE((*env)->allocator, op_impl);
@@ -954,6 +953,7 @@
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 	op_impl = AXIS2_INTF_TO_IMPL(op);
+    axis2_char_t *op_n = AXIS2_QNAME_GET_LOCALPART(qname, env); 
     
     return AXIS2_WSDL_OP_SET_QNAME(op_impl->wsdl_op, env, qname);
 }
@@ -1093,17 +1093,18 @@
 axis2_status_t AXIS2_CALL
 axis2_op_add_to_engage_module_list(axis2_op_t *op,
                                             axis2_env_t **env,
-                                            axis2_module_desc_t *module_name) 
+                                            axis2_module_desc_t *module_desc) 
 {
     axis2_op_impl_t *op_impl = NULL;
     axis2_array_list_t *collection_module = NULL;
-    axis2_module_desc_t *module_desc = NULL;
+    axis2_module_desc_t *module_desc_l = NULL;
     int size = 0;
     int index = 0;
     axis2_property_t *property = NULL;
+    axis2_qname_t *module_qname = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, module_name, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, module_desc, AXIS2_FAILURE);
     op_impl = AXIS2_INTF_TO_IMPL(op);
     
     property = (axis2_property_t *) 
@@ -1118,14 +1119,15 @@
     {
         return AXIS2_ERROR_GET_STATUS_CODE((*env)->error);
     }
-
+    module_qname = AXIS2_MODULE_DESC_GET_NAME(module_desc, env);
     for(index = 0; index < size; index++)
     {
-        module_desc = (axis2_module_desc_t *) AXIS2_ARRAY_LIST_GET(
+        axis2_qname_t *module_qname_l = NULL;
+
+        module_desc_l = (axis2_module_desc_t *) AXIS2_ARRAY_LIST_GET(
             collection_module, env, index);
-        
-        if(AXIS2_QNAME_EQUALS(AXIS2_MODULE_DESC_GET_NAME(module_desc, env), env,
-                AXIS2_MODULE_DESC_GET_NAME(module_name, env)))
+        module_qname_l = AXIS2_MODULE_DESC_GET_NAME(module_desc_l, env);        
+        if(AXIS2_QNAME_EQUALS(module_qname, env, module_qname_l))
         {
             AXIS2_ERROR_SET((*env)->error, 
                 AXIS2_ERROR_MODULE_ALREADY_ENGAGED_TO_OP, AXIS2_FAILURE);
@@ -1133,7 +1135,7 @@
         }
 
     }
-    return AXIS2_ARRAY_LIST_ADD(collection_module, env, module_name);
+    return AXIS2_ARRAY_LIST_ADD(collection_module, env, module_desc);
 }
 
 axis2_array_list_t *AXIS2_CALL

Modified: webservices/axis2/trunk/c/modules/core/description/param_container.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/param_container.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/param_container.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/param_container.c Wed Mar  1 19:59:39 2006
@@ -23,7 +23,8 @@
 typedef struct axis2_param_container_impl
 {
 	axis2_param_container_t param_container;
-    axis2_hash_t *params;	
+    axis2_hash_t *params;
+    axis2_array_list_t *params_list;
 } axis2_param_container_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(param_container) \
@@ -73,6 +74,7 @@
     }        
 	
     param_container_impl->params = NULL;
+    param_container_impl->params_list = NULL;
     
     param_container_impl->params = axis2_hash_make (env);
 	if(NULL == param_container_impl->params)
@@ -139,6 +141,15 @@
         }
 		axis2_hash_free(param_container_impl->params, env);
     }
+    if(param_container_impl->params_list)
+    {
+        /* This is the array list which is returned when all params are
+         * requested from param_container. Params referenced here are
+         * actually contained in params hash table
+         */
+        AXIS2_ARRAY_LIST_FREE(param_container_impl->params_list, env);
+        param_container_impl->params_list = NULL;
+    }
 	
     AXIS2_FREE((*env)->allocator, param_container_impl);    
     return status;
@@ -207,29 +218,36 @@
     axis2_param_container_impl_t *param_container_impl = NULL;
     axis2_hash_index_t *index_i = 0;
     axis2_status_t status = AXIS2_FAILURE;
-    /* create an array list with the initial default capacity 
-     * Caller of this method should free this array list
-     */
-    axis2_array_list_t *array_list_l = axis2_array_list_create(env, 20);
     void *value = NULL;
     
-    AXIS2_ENV_CHECK(env, NULL);
-    
+    AXIS2_ENV_CHECK(env, NULL); 
     param_container_impl = AXIS2_INTF_TO_IMPL(param_container);
+
+    if(!param_container_impl->params_list)
+    {
+        param_container_impl->params_list = axis2_array_list_create(env, 0);
+        if(!param_container_impl->params_list)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, 
+                AXIS2_FAILURE);
+            return NULL;
+        }
+    }
    
-    for (index_i = axis2_hash_first (param_container_impl->params, env); index_i; 
-            index_i = axis2_hash_next (env, index_i))
+    for (index_i = axis2_hash_first (param_container_impl->params, env); 
+            index_i; index_i = axis2_hash_next (env, index_i))
     {
         axis2_hash_this (index_i, NULL, NULL, &value);
-        status = AXIS2_ARRAY_LIST_ADD(array_list_l, env, value);
-        if(AXIS2_FAILURE == status)
+        status = AXIS2_ARRAY_LIST_ADD(param_container_impl->params_list, env, 
+            value);
+        if(AXIS2_SUCCESS != status)
         {
-            AXIS2_ARRAY_LIST_FREE(array_list_l ,env);
+            AXIS2_ARRAY_LIST_FREE(param_container_impl->params_list ,env);
             return NULL;            
         }
     }
     
-	return array_list_l;
+	return param_container_impl->params_list;
 }
 
 axis2_bool_t AXIS2_CALL 

Modified: webservices/axis2/trunk/c/modules/core/description/svc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/svc.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/svc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/svc.c Wed Mar  1 19:59:39 2006
@@ -28,7 +28,7 @@
 {
 	axis2_svc_t svc;
 	axis2_svc_grp_t *parent;
-	axis2_hash_t *wasaction_opeartionmap;  
+	axis2_hash_t *wasaction_op_map;  
     axis2_char_t *axis_svc_name; 
     /** to keep the time that last update time of the service */
     long last_update;
@@ -251,7 +251,7 @@
 axis2_svc_add_mapping(axis2_svc_t *svc,
                             axis2_env_t **env,
                             axis2_char_t * mapping_key , 
-                            axis2_op_t * axis2_opt);
+                            axis2_op_t * op_desc);
  
 axis2_status_t AXIS2_CALL
 axis2_svc_add_module_ref(axis2_svc_t *svc,
@@ -291,7 +291,7 @@
     svc_impl->svc.param_container = NULL;
     svc_impl->svc.flow_container = NULL;
     svc_impl->svc.wsdl_svc = NULL;
-    svc_impl->wasaction_opeartionmap = NULL;
+    svc_impl->wasaction_op_map = NULL;
     svc_impl->module_list = NULL;
     
     svc_impl->svc.param_container = axis2_param_container_create(env);		
@@ -318,8 +318,8 @@
         return NULL;
 	}
     
-    svc_impl->wasaction_opeartionmap = axis2_hash_make (env);				
-	if(NULL == svc_impl->wasaction_opeartionmap)
+    svc_impl->wasaction_op_map = axis2_hash_make (env);				
+	if(NULL == svc_impl->wasaction_op_map)
 	{
         axis2_svc_free(&(svc_impl->svc), env);
 		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);		
@@ -385,8 +385,8 @@
     }
     property = axis2_property_create(env);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env, 
-        axis2_module_desc_array_list_free);
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
+        axis2_array_list_free_void_arg);
+    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_SESSION);
     AXIS2_PROPERTY_SET_VALUE(property, env, array_list_l);
 
     status = AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY(svc_impl->svc.wsdl_svc->
@@ -513,12 +513,6 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     svc_impl = AXIS2_INTF_TO_IMPL(svc);
     
-	if(NULL != svc->ops)
-    {
-		AXIS2_FREE((*env)->allocator, svc->ops);
-        svc->ops = NULL;
-    }
-    
     if(NULL != svc->param_container)
     {
 	    AXIS2_PARAM_CONTAINER_FREE(svc->param_container, env);
@@ -539,12 +533,12 @@
     
     svc_impl->parent = NULL;
     
-    if(NULL != svc_impl->wasaction_opeartionmap)
+    if(NULL != svc_impl->wasaction_op_map)
     {
         /* By this time operations are already freed
         */
-		axis2_hash_free(svc_impl->wasaction_opeartionmap, env);
-        svc_impl->wasaction_opeartionmap = NULL;
+		axis2_hash_free(svc_impl->wasaction_op_map, env);
+        svc_impl->wasaction_op_map = NULL;
     }
     
     if(NULL != svc_impl->module_list)
@@ -572,6 +566,13 @@
         AXIS2_FREE((*env)->allocator, svc_impl->axis_svc_name);
         svc_impl->axis_svc_name = NULL;        
     }        
+    
+	if(NULL != svc->ops)
+    {
+		AXIS2_FREE((*env)->allocator, svc->ops);
+        svc->ops = NULL;
+    }
+
     if(svc_impl)
     {
 	    AXIS2_FREE((*env)->allocator, svc_impl);
@@ -598,6 +599,10 @@
         axis2_wsdl_interface_t *wsdl_interface = NULL;
         
         wsdl_interface = axis2_svc_get_svc_interface(svc, env);
+        axis2_qname_t *svc_qname = AXIS2_SVC_GET_QNAME(svc, env);
+        axis2_char_t *svc_name = AXIS2_QNAME_GET_LOCALPART(svc_qname, env);
+        axis2_qname_t *op_qname = AXIS2_OP_GET_QNAME(op, env);
+        axis2_char_t *op_name = AXIS2_QNAME_GET_LOCALPART(op_qname, env);
         status = AXIS2_WSDL_INTERFACE_SET_OP(wsdl_interface, env, op);
     }
     return status;
@@ -627,7 +632,7 @@
     if(NULL == op_l )
     {
         op_l = (axis2_op_t *) (axis2_hash_get (
-            svc_impl->wasaction_opeartionmap, op_str, AXIS2_HASH_KEY_STRING));
+            svc_impl->wasaction_op_map, op_str, AXIS2_HASH_KEY_STRING));
     }
     
     return op_l;	
@@ -884,7 +889,7 @@
         if(AXIS2_QNAME_EQUALS(AXIS2_MODULE_DESC_GET_NAME(modu, env), env,  
             AXIS2_MODULE_DESC_GET_NAME(moduleref, env)))
         {
-            /* module has alredy been engaged on the service. Operation 
+            /* module has already been engaged on the service. Operation 
              *terminated !!! 
              */
             AXIS2_ERROR_SET((*env)->error, 
@@ -923,7 +928,7 @@
     axis2_hash_t *map = NULL;
     axis2_hash_index_t *index = NULL;
     axis2_phase_resolver_t *pr = NULL;
-    axis2_op_t *axis2_opt = NULL;
+    axis2_op_t *op_desc = NULL;
     axis2_array_list_t *params = NULL;
     axis2_param_t *param = NULL;
     axis2_status_t status = AXIS2_FAILURE;
@@ -947,8 +952,8 @@
         int j = 0;
         void *v = NULL;
         axis2_hash_this (index, NULL, NULL, &v);
-        axis2_opt = (axis2_op_t *) v;
-        params = AXIS2_OP_GET_PARAMS(axis2_opt, env);
+        op_desc = (axis2_op_t *) v;
+        params = AXIS2_OP_GET_PARAMS(op_desc, env);
         /* Adding wsa-maping into service */
         size = AXIS2_ARRAY_LIST_SIZE(params, env);
         
@@ -968,7 +973,7 @@
                     AXIS2_WSA_ACTION))
             {
                 status = axis2_svc_add_mapping(svc, env,
-                    (axis2_char_t *) AXIS2_PARAM_GET_VALUE(param, env), axis2_opt);
+                    (axis2_char_t *) AXIS2_PARAM_GET_VALUE(param, env), op_desc);
                 if(AXIS2_SUCCESS != status)
                 {
                     if(pr)
@@ -982,7 +987,7 @@
                 
         }
         
-        status = AXIS2_PHASE_RESOLVER_BUILD_MODULE_OP(pr, env, axis2_opt);
+        status = AXIS2_PHASE_RESOLVER_BUILD_MODULE_OP(pr, env, op_desc);
         
         if(AXIS2_SUCCESS != status)
         {
@@ -994,7 +999,7 @@
             return status;
         }
         
-        status = axis2_svc_add_op(svc, env, axis2_opt);
+        status = axis2_svc_add_op(svc, env, op_desc);
         if(AXIS2_SUCCESS != status)
         {
             if(pr)
@@ -1557,17 +1562,17 @@
 axis2_svc_add_mapping(axis2_svc_t *svc,
                             axis2_env_t **env,
                             axis2_char_t * mapping_key , 
-                            axis2_op_t * axis2_opt)
+                            axis2_op_t * op_desc)
 {
     axis2_svc_impl_t *svc_impl = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, mapping_key, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, axis2_opt, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, op_desc, AXIS2_FAILURE);
     svc_impl = AXIS2_INTF_TO_IMPL(svc);
     
-    axis2_hash_set(svc_impl->wasaction_opeartionmap, mapping_key, 
-        AXIS2_HASH_KEY_STRING, axis2_opt);
+    axis2_hash_set(svc_impl->wasaction_op_map, mapping_key, 
+        AXIS2_HASH_KEY_STRING, op_desc);
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/modules/core/description/svc_grp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/svc_grp.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/svc_grp.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/svc_grp.c Wed Mar  1 19:59:39 2006
@@ -176,7 +176,7 @@
         return NULL;
     }
     
-    svc_grp_impl->module_list = axis2_array_list_create(env, 20);
+    svc_grp_impl->module_list = axis2_array_list_create(env, 0);
     if(NULL == svc_grp_impl->module_list)
     {
         axis2_svc_grp_free(&(svc_grp_impl->svc_grp), env);
@@ -249,11 +249,11 @@
                     axis2_env_t **env)
 {
     axis2_svc_grp_impl_t *svc_grp_impl = NULL;
-    
+ 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     
     svc_grp_impl = AXIS2_INTF_TO_IMPL(svc_grp);
-    
+
     if(NULL != svc_grp->ops)
     {
 		AXIS2_FREE((*env)->allocator, svc_grp->ops);
@@ -303,32 +303,10 @@
     
     if(NULL != svc_grp_impl->module_list)
     {
-        void *val = NULL;
-        int i = 0;
-        for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(svc_grp_impl->module_list, env); i++)
-        {
-            axis2_module_desc_t *module_desc = NULL;
-            module_desc = AXIS2_ARRAY_LIST_GET(svc_grp_impl->module_list, env, i);
-            
-            module_desc = (axis2_module_desc_t *) val;
-            if (module_desc)
-               AXIS2_MODULE_DESC_FREE (module_desc, env);
-            
-            val = NULL;
-            module_desc = NULL;
-               
-        }
         AXIS2_ARRAY_LIST_FREE(svc_grp_impl->module_list, env);
         svc_grp_impl->module_list = NULL;
     }
    
-    /* Samisa: parenet should not be freed here. 
-    if(NULL != svc_grp_impl->parent)
-    {
-        AXIS2_CONF_FREE(svc_grp_impl->parent, env);
-        svc_grp_impl->parent = NULL;
-    }*/
-    
     if(NULL != svc_grp_impl) 
     {
 	    AXIS2_FREE((*env)->allocator, svc_grp_impl);
@@ -742,7 +720,7 @@
     svc_grp_impl = AXIS2_INTF_TO_IMPL(svc_grp);
     if(!svc_grp_impl->module_list)
     {
-        svc_grp_impl->module_list = axis2_array_list_create(env, 20);
+        svc_grp_impl->module_list = axis2_array_list_create(env, 0);
         if(!svc_grp_impl->module_list)
             return AXIS2_FAILURE;
     }

Modified: webservices/axis2/trunk/c/modules/platforms/unix/axis2_unix.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/platforms/unix/axis2_unix.h?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/platforms/unix/axis2_unix.h (original)
+++ webservices/axis2/trunk/c/modules/platforms/unix/axis2_unix.h Wed Mar  1 19:59:39 2006
@@ -73,6 +73,7 @@
 
  #define AXIS2_PLATFORM_LOADLIBINIT()
  #define AXIS2_PLATFORM_LOADLIB(_lib)     dlopen(_lib, RTLD_LAZY)
+ /*#define AXIS2_PLATFORM_LOADLIB(_lib)     dlopen(_lib, RTLD_NOW)*/
 
  #define AXIS2_PLATFORM_UNLOADLIB         dlclose
  #define AXIS2_PLATFORM_GETPROCADDR       dlsym

Modified: webservices/axis2/trunk/c/modules/util/array_list.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/array_list.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/array_list.c (original)
+++ webservices/axis2/trunk/c/modules/util/array_list.c Wed Mar  1 19:59:39 2006
@@ -379,3 +379,15 @@
     
     return AXIS2_SUCCESS;
 }
+
+axis2_status_t AXIS2_CALL 
+axis2_array_list_free_void_arg(void *array_list, 
+                                axis2_env_t **env)
+{
+    axis2_array_list_t *array_list_l = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    
+    array_list_l = (axis2_array_list_t *) array_list;
+    return axis2_array_list_free(array_list_l, env);
+}

Modified: webservices/axis2/trunk/c/modules/util/axis2_array_list.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/axis2_array_list.h?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/axis2_array_list.h (original)
+++ webservices/axis2/trunk/c/modules/util/axis2_array_list.h Wed Mar  1 19:59:39 2006
@@ -186,7 +186,14 @@
     * If capacity is invalid (<= 0) then default capacity is used
     * @param capacity initial capacity of this array_list
     */
+
     AXIS2_DECLARE(axis2_array_list_t*) axis2_array_list_create(axis2_env_t **env, int capacity);
+    /**
+     * Free array passed as void pointer.
+     */
+    axis2_status_t AXIS2_CALL 
+    axis2_array_list_free_void_arg(void *array_list, 
+                                axis2_env_t **env);
 
 
 #define AXIS2_ARRAY_LIST_FREE(array_list, env) ((array_list)->ops->free(array_list, env))

Modified: webservices/axis2/trunk/c/modules/util/class_loader.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/class_loader.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/class_loader.c (original)
+++ webservices/axis2/trunk/c/modules/util/class_loader.c Wed Mar  1 19:59:39 2006
@@ -241,13 +241,13 @@
     }
     status = AXIS2_DLL_DESC_SET_DL_HANDLER(dll_desc, env, dl_handler);
 
-    if(AXIS2_FAILURE == status)
+    if(AXIS2_SUCCESS != status)
     {
         AXIS2_PLATFORM_UNLOADLIB(dl_handler);
         dl_handler = NULL;
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_DLL_LOADING_FAILED, 
             AXIS2_FAILURE);
-        return AXIS2_FAILURE;
+        return status;
     }
     
     return AXIS2_SUCCESS;

Modified: webservices/axis2/trunk/c/modules/util/property.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/property.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/property.c (original)
+++ webservices/axis2/trunk/c/modules/util/property.c Wed Mar  1 19:59:39 2006
@@ -101,7 +101,7 @@
     
     if(property_impl->value)
     {
-        if(property_impl->scope == AXIS2_SCOPE_REQUEST)
+        if(property_impl->scope != AXIS2_SCOPE_APPLICATION)
         {
             if(property_impl->free_func)
             {

Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_interface.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_interface.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_interface.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_interface.c Wed Mar  1 19:59:39 2006
@@ -287,6 +287,9 @@
                  hi = axis2_hash_next ( env, hi))
         {
             axis2_hash_this (hi, NULL, NULL, &val);
+            axis2_wsdl_op_t *op_o = (axis2_wsdl_op_t *) val;
+            axis2_qname_t *op_qn = AXIS2_WSDL_OP_GET_QNAME(op_o, env);
+            axis2_char_t *op_n = AXIS2_QNAME_GET_LOCALPART(op_qn, env);
             AXIS2_WSDL_OP_FREE_VOID_ARG(val, env);
             val = NULL;
                
@@ -463,15 +466,15 @@
                                     void *op) 
 {
     axis2_wsdl_interface_impl_t *interface_impl = NULL;
-    axis2_qname_t *wsdl_op_name = NULL;
+    axis2_qname_t *wsdl_op_qname = NULL;
     axis2_char_t *op_name = NULL;
         
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, op, AXIS2_FAILURE); 
     interface_impl = AXIS2_INTF_TO_IMPL(wsdl_interface);
     
-    wsdl_op_name = AXIS2_WSDL_OP_GET_QNAME(op, env);    
-    if (!wsdl_op_name) 
+    wsdl_op_qname = AXIS2_WSDL_OP_GET_QNAME(op, env);    
+    if (!wsdl_op_qname) 
     {
         /* The Operation name cannot be null (required) */
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_STATE_WSDL_OP, 
@@ -479,7 +482,7 @@
         return AXIS2_FAILURE;
     }
     
-    op_name = AXIS2_QNAME_GET_LOCALPART(wsdl_op_name, env);
+    op_name = AXIS2_QNAME_GET_LOCALPART(wsdl_op_qname, env);
     
     axis2_hash_set(interface_impl->ops, op_name, AXIS2_HASH_KEY_STRING, op);
     

Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_op.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_op.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_op.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_op.c Wed Mar  1 19:59:39 2006
@@ -400,7 +400,7 @@
 		                        axis2_qname_t *name)
 {
     axis2_wsdl_op_impl_t *wsdl_op_impl = NULL;
-    
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, name, AXIS2_FAILURE);
     

Modified: webservices/axis2/trunk/c/modules/wsdl/wsdl_svc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/wsdl_svc.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/wsdl_svc.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/wsdl_svc.c Wed Mar  1 19:59:39 2006
@@ -164,13 +164,13 @@
     
     wsdl_svc_impl = AXIS2_INTF_TO_IMPL(wsdl_svc);
     
-    if(NULL != wsdl_svc->wsdl_component)
+    if(wsdl_svc->wsdl_component)
     {
         AXIS2_WSDL_COMPONENT_FREE(wsdl_svc->wsdl_component, env);
         wsdl_svc->wsdl_component = NULL;
     }
     
-    if(NULL != wsdl_svc_impl->endpoints)
+    if(wsdl_svc_impl->endpoints)
     {
         axis2_hash_index_t *hi = NULL;
         void *val = NULL;
@@ -191,13 +191,13 @@
         wsdl_svc_impl->endpoints = NULL;
     }
     
-    if(NULL != wsdl_svc_impl->svc_interface)
+    if(wsdl_svc_impl->svc_interface)
     {
         AXIS2_WSDL_INTERFACE_FREE(wsdl_svc_impl->svc_interface, env);
         wsdl_svc_impl->svc_interface = NULL;
     }
     
-    if(NULL != wsdl_svc->ops)
+    if(wsdl_svc->ops)
     {
         AXIS2_FREE((*env)->allocator, wsdl_svc->ops);
         wsdl_svc->ops = NULL;

Modified: webservices/axis2/trunk/c/modules/xml/om/om_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/om_element.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/om_element.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/om_element.c Wed Mar  1 19:59:39 2006
@@ -167,6 +167,8 @@
     axis2_hash_t *attributes;
     /** List of namespaces */
     axis2_hash_t *namespaces;
+    /** to hold text value if it is a text element */
+    axis2_char_t *text_value;
     
     axis2_qname_t *qname;
     
@@ -227,6 +229,7 @@
     element->child_ele_iter = NULL;
     element->children_iter = NULL;
     element->children_qname_iter = NULL;
+    element->text_value = NULL;
     
     element->localname = (axis2_char_t *) AXIS2_STRDUP(localname,env);
     if (!element->localname)
@@ -734,6 +737,11 @@
         AXIS2_OM_CHILDREN_QNAME_ITERATOR_FREE(element_impl->children_qname_iter, env);
         element_impl->children_qname_iter = NULL;
     }
+    if(element_impl->text_value)
+    {
+        AXIS2_FREE((*env)->allocator, element_impl->text_value);
+        element_impl->text_value = NULL;
+    }
     AXIS2_FREE ((*env)->allocator, om_element->ops);
     AXIS2_FREE ((*env)->allocator, element_impl);
     return status;
@@ -1110,14 +1118,16 @@
                           axis2_env_t **env,
                           axis2_om_node_t *element_node)
 {
-    axis2_char_t* dest = NULL;
+    axis2_om_element_impl_t *element_impl = NULL;
+    axis2_char_t *dest = NULL;
     axis2_char_t* temp_text = NULL;
     axis2_om_text_t* text_node = NULL;
     axis2_om_node_t* temp_node = NULL;
     
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, element_node, NULL);
-    
+    element_impl = AXIS2_INTF_TO_IMPL(om_element);
+
     temp_node = AXIS2_OM_NODE_GET_FIRST_CHILD(element_node, env);
     
     while(temp_node)
@@ -1151,8 +1161,10 @@
 
         }
         temp_node = AXIS2_OM_NODE_GET_NEXT_SIBLING(temp_node, env);
-    }  
-    return dest;
+    }
+    element_impl->text_value = dest;
+    dest = NULL;  
+    return element_impl->text_value;
 }                          
 
 axis2_status_t AXIS2_CALL

Modified: webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/addr_echo/echo_client.c Wed Mar  1 19:59:39 2006
@@ -159,9 +159,9 @@
         printf("echo stub invoke failed!\n");
     }
     
-    if (node)
+    if (call)
     {
-        AXIS2_OM_NODE_FREE_TREE(node, &env);
+        AXIS2_CALL_FREE(call, &env);
     }
     return status;
 }

Modified: webservices/axis2/trunk/c/test/unit/wsdl/test_wsdl_component.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/unit/wsdl/test_wsdl_component.c?rev=382287&r1=382286&r2=382287&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/unit/wsdl/test_wsdl_component.c (original)
+++ webservices/axis2/trunk/c/test/unit/wsdl/test_wsdl_component.c Wed Mar  1 19:59:39 2006
@@ -44,7 +44,7 @@
     module_list = get_module_list(env);
     property = axis2_property_create(env);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env, 
-        axis2_module_desc_array_list_free);
+        axis2_array_list_free_void_arg);
     AXIS2_PROPERTY_SET_VALUE(property, env, module_list);
     AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
     axis2_hash_set(module_list_map, AXIS2_MODULEREF_KEY, 
@@ -54,7 +54,7 @@
     module_list = get_module_list(env);
     property = axis2_property_create(env);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env, 
-        axis2_module_desc_array_list_free);
+        axis2_array_list_free_void_arg);
     AXIS2_PROPERTY_SET_VALUE(property, env, module_list);
     AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
     axis2_hash_set(module_list_map, AXIS2_MODULEREF_KEY, 
@@ -64,7 +64,7 @@
     module_list = get_module_list(env);
     property = axis2_property_create(env);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env, 
-        axis2_module_desc_array_list_free);
+        axis2_array_list_free_void_arg);
     AXIS2_PROPERTY_SET_VALUE(property, env, module_list);
     AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
     axis2_hash_set(module_list_map, AXIS2_MODULEREF_KEY,