axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r411128 - in /webservices/axis2/trunk/c: modules/core/deployment/desc_builder.c util/include/axis2_param.h util/src/param.c
Date Fri, 02 Jun 2006 11:12:27 GMT
Author: damitha
Date: Fri Jun  2 04:12:27 2006
New Revision: 411128

URL: http://svn.apache.org/viewvc?rev=411128&view=rev
Log:
There was a bug in my earlier fix of Jira AXIS2 C 177.
Fixed it.

Modified:
    webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
    webservices/axis2/trunk/c/util/include/axis2_param.h
    webservices/axis2/trunk/c/util/src/param.c

Modified: webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c?rev=411128&r1=411127&r2=411128&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Fri Jun  2 04:12:27 2006
@@ -655,32 +655,22 @@
     childs = AXIS2_OM_ELEMENT_GET_CHILD_ELEMENTS(param_element, env, param_node);
     if(childs)
     {
-        axis2_hash_t *value_map = NULL;
+        axis2_array_list_t *value_list = NULL;
         
-        value_map = axis2_hash_make(env);
-        AXIS2_PARAM_SET_VALUE_MAP(param, env, value_map);
+        value_list = axis2_array_list_create(env, 0);
+        AXIS2_PARAM_SET_VALUE_LIST(param, env, value_list);
         
         while(AXIS2_TRUE == AXIS2_OM_CHILD_ELEMENT_ITERATOR_HAS_NEXT(childs, env))
         {
             axis2_om_node_t *node = NULL;
             axis2_om_element_t *element = NULL;
             axis2_param_t *param = NULL;
-            axis2_qname_t *att_qname = NULL;
-            axis2_om_attribute_t *para_name = NULL;
             axis2_char_t *pname = NULL;
             
             node = AXIS2_OM_CHILD_ELEMENT_ITERATOR_NEXT(childs, env);
             element = AXIS2_OM_NODE_GET_DATA_ELEMENT(node, env);
-            att_qname = axis2_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
-            para_name = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(element, env, 
-                att_qname);
-            AXIS2_QNAME_FREE(att_qname, env);
-            if(!para_name)
-            {
-                AXIS2_PARAM_FREE(param, env);
-                return AXIS2_FAILURE;
-            }
-            pname = AXIS2_OM_ATTRIBUTE_GET_VALUE(para_name, env);
+            param = axis2_param_create(env, NULL, NULL);
+            pname = AXIS2_OM_ELEMENT_GET_LOCALNAME(element, env);
             status = AXIS2_PARAM_SET_NAME(param, env, pname);
             if(AXIS2_SUCCESS != status)
             {
@@ -689,7 +679,7 @@
             }
             AXIS2_PARAM_SET_PARAM_TYPE(param, env, AXIS2_DOM_PARAM);
             set_attrs_and_value(param, env, element, node);
-            axis2_hash_set(value_map, pname, AXIS2_HASH_KEY_STRING, param);
+            AXIS2_ARRAY_LIST_ADD(value_list, env, param);
         }
     }
     else

Modified: webservices/axis2/trunk/c/util/include/axis2_param.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_param.h?rev=411128&r1=411127&r2=411128&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_param.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_param.h Fri Jun  2 04:12:27 2006
@@ -25,6 +25,7 @@
 #include <axis2_utils_defines.h>
 #include <axis2_env.h>
 #include <axis2_hash.h>
+#include <axis2_array_list.h>
 
 #ifdef __cplusplus
 extern "C"
@@ -140,13 +141,13 @@
             const axis2_env_t *env);
          
     axis2_status_t (AXIS2_CALL *
-    set_value_map) (
+    set_value_list) (
             struct axis2_param *param,
             const axis2_env_t *env,
-            axis2_hash_t *value_map);
+            axis2_array_list_t *value_list);
 
-    axis2_hash_t* (AXIS2_CALL *
-    get_value_map) (
+    axis2_array_list_t* (AXIS2_CALL *
+    get_value_list) (
             struct axis2_param *param,
             const axis2_env_t *env);
 
@@ -205,11 +206,11 @@
 #define AXIS2_PARAM_GET_ATTRIBUTES(param, env) \
     ((param)->ops->get_attributes (param, env))
 	    
-#define AXIS2_PARAM_SET_VALUE_MAP(param, env, value_map) \
-    ((param)->ops->set_value_map (param , env, value_map))
+#define AXIS2_PARAM_SET_VALUE_LIST(param, env, value_list) \
+    ((param)->ops->set_value_list (param , env, value_list))
 
-#define AXIS2_PARAM_GET_VALUE_MAP(param, env) \
-    ((param)->ops->get_value_map (param, env))
+#define AXIS2_PARAM_GET_VALUE_LIST(param, env) \
+    ((param)->ops->get_value_list (param, env))
 	
 /** @} */
     

Modified: webservices/axis2/trunk/c/util/src/param.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/param.c?rev=411128&r1=411127&r2=411128&view=diff
==============================================================================
--- webservices/axis2/trunk/c/util/src/param.c (original)
+++ webservices/axis2/trunk/c/util/src/param.c Fri Jun  2 04:12:27 2006
@@ -32,7 +32,7 @@
     /** Parameter type */
     int type; /*default is AXIS2_TEXT_PARAM */
     axis2_hash_t *attrs;
-    axis2_hash_t *value_map;
+    axis2_array_list_t *value_list;
 
 } axis2_param_impl_t;
 
@@ -85,13 +85,13 @@
         const axis2_env_t *env);
 
 axis2_status_t AXIS2_CALL 
-axis2_param_set_value_map(
+axis2_param_set_value_list(
         axis2_param_t *param,
         const axis2_env_t *env,
-        axis2_hash_t *value_map);
+        axis2_array_list_t *value_list);
 
-axis2_hash_t* AXIS2_CALL 
-axis2_param_get_value_map(
+axis2_array_list_t* AXIS2_CALL 
+axis2_param_get_value_list(
         axis2_param_t *param,
         const axis2_env_t *env);
 
@@ -121,7 +121,7 @@
     param_impl->locked = AXIS2_FALSE;
     param_impl->type = AXIS2_TEXT_PARAM;
     param_impl->attrs = NULL;
-    param_impl->value_map = NULL;
+    param_impl->value_list = NULL;
     
     param_impl->param.ops = 
 		AXIS2_MALLOC (env->allocator, sizeof(axis2_param_ops_t));
@@ -147,10 +147,10 @@
         axis2_param_set_attributes;
     param_impl->param.ops->get_attributes = 
         axis2_param_get_attributes;
-    param_impl->param.ops->set_value_map = 
-        axis2_param_set_value_map;
-    param_impl->param.ops->get_value_map = 
-        axis2_param_get_value_map;
+    param_impl->param.ops->set_value_list = 
+        axis2_param_set_value_list;
+    param_impl->param.ops->get_value_list = 
+        axis2_param_get_value_list;
     param_impl->param.ops->free = axis2_param_free;
     
     return &(param_impl->param);
@@ -294,46 +294,45 @@
 }
 
 axis2_status_t AXIS2_CALL 
-axis2_param_set_value_map(
+axis2_param_set_value_list(
         axis2_param_t *param,
         const axis2_env_t *env,
-        axis2_hash_t *value_map)
+        axis2_array_list_t *value_list)
 {
     axis2_param_impl_t *param_impl = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK(env->error, value_map, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, value_list, AXIS2_FAILURE);
     param_impl = AXIS2_INTF_TO_IMPL(param);
-
-    if(param_impl->value_map)
+ 
+    if(param_impl->value_list)
     {
-        axis2_hash_index_t *i = NULL;
-        void *v = NULL;
-
-        for (i = axis2_hash_first (param_impl->value_map, env); i; 
-                i = axis2_hash_next (env, i))
+        int i = 0, size = 0;
+        
+        size = AXIS2_ARRAY_LIST_SIZE(param_impl->value_list, env);
+        for (i = 0; i < size; i++)
         {
             axis2_param_t *param = NULL;
-            
-            axis2_hash_this (i, NULL, NULL, &v);
-            param = (axis2_param_t *) v;
+
+            param = (axis2_param_t *) AXIS2_ARRAY_LIST_GET(
+                    param_impl->value_list, env, i);
             AXIS2_PARAM_FREE(param, env);
         }
-        axis2_hash_free(param_impl->value_map, env);
+        AXIS2_ARRAY_LIST_FREE(param_impl->value_list, env);
     }
-   
-    param_impl->value_map = value_map;
+    param_impl->value_list = value_list;
+
     return AXIS2_SUCCESS;
 }
 
-axis2_hash_t* AXIS2_CALL 
-axis2_param_get_value_map(
+axis2_array_list_t* AXIS2_CALL 
+axis2_param_get_value_list(
         axis2_param_t *param,
         const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
     
-    return AXIS2_INTF_TO_IMPL(param)->value_map;
+    return AXIS2_INTF_TO_IMPL(param)->value_list;
 }
 
 axis2_status_t AXIS2_CALL 
@@ -374,21 +373,20 @@
         axis2_hash_free(param_impl->attrs, env);
     }
     
-    if(param_impl->value_map)
+    if(param_impl->value_list)
     {
-        axis2_hash_index_t *i = NULL;
-        void *v = NULL;
-
-        for (i = axis2_hash_first (param_impl->value_map, env); i; 
-                i = axis2_hash_next (env, i))
+        int i = 0, size = 0;
+        
+        size = AXIS2_ARRAY_LIST_SIZE(param_impl->value_list, env);
+        for (i = 0; i < size; i++)
         {
             axis2_param_t *param = NULL;
 
-            axis2_hash_this (i, NULL, NULL, &v);
-            param = (axis2_param_t *) v;
+            param = (axis2_param_t *) AXIS2_ARRAY_LIST_GET(
+                    param_impl->value_list, env, i);
             AXIS2_PARAM_FREE(param, env);
         }
-        axis2_hash_free(param_impl->value_map, env);
+        AXIS2_ARRAY_LIST_FREE(param_impl->value_list, env);
     }
     param_name = axis2_param_get_name(param, env);
     AXIS2_FREE(env->allocator, param_name);



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


Mime
View raw message