axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nand...@apache.org
Subject svn commit: r429593 [3/3] - in /webservices/axis2/trunk/c/xml_schema: include/ samples/ src/ test/
Date Tue, 08 Aug 2006 05:57:52 GMT
Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_list.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_list.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_list.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_list.c Mon Aug  7 22:57:49
2006
@@ -30,8 +30,6 @@
     
     xml_schema_simple_type_content_t *sim_type_content;
     
-    axis2_hash_t *methods;
-    
     xml_schema_types_t obj_type;
     
     axis2_hash_t *ht_super;
@@ -102,7 +100,6 @@
     simple_type_list_impl->sim_type_content = NULL;
     simple_type_list_impl->simple_type_list.ops = NULL;
     simple_type_list_impl->simple_type_list.base.ops = NULL;
-    simple_type_list_impl->methods = NULL;
     simple_type_list_impl->item_type = NULL;
     simple_type_list_impl->item_type_name = NULL;
     simple_type_list_impl->ht_super = NULL;
@@ -137,30 +134,15 @@
     simple_type_list_impl->simple_type_list.ops->set_item_type_name = 
             xml_schema_simple_type_list_set_item_type_name;
    
-    simple_type_list_impl->methods = axis2_hash_make(env);
     simple_type_list_impl->ht_super = axis2_hash_make(env);
-    if(!simple_type_list_impl->methods || !simple_type_list_impl->ht_super)
+    if(!simple_type_list_impl->ht_super)
     {
         xml_schema_simple_type_list_free(
             &(simple_type_list_impl->simple_type_list), env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    axis2_hash_set(simple_type_list_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
-            xml_schema_simple_type_list_free);
-    axis2_hash_set(simple_type_list_impl->methods, "get_base_type", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_list_get_item_type);
-    axis2_hash_set(simple_type_list_impl->methods, "set_base_type", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_list_set_item_type);
-    axis2_hash_set(simple_type_list_impl->methods, "get_base_type_name", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_list_get_item_type_name);
-    axis2_hash_set(simple_type_list_impl->methods, "set_base_type_name", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_list_set_item_type_name);
-    axis2_hash_set(simple_type_list_impl->methods, "get_type", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_list_get_type);
-    axis2_hash_set(simple_type_list_impl->methods, "super_objs", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_list_super_objs);             
          
-    
+        
     simple_type_list_impl->sim_type_content = 
         xml_schema_simple_type_content_create(env);
         
@@ -171,22 +153,24 @@
         return NULL;        
     }
     
-    axis2_hash_set(simple_type_list_impl->ht_super, "XML_SCHEMA_SIMPLE_TYPE_LIST",
-            AXIS2_HASH_KEY_STRING, &(simple_type_list_impl->simple_type_list));  
           
+    axis2_hash_set(simple_type_list_impl->ht_super, 
+        AXIS2_STRDUP("XML_SCHEMA_SIMPLE_TYPE_LIST", env),
+        AXIS2_HASH_KEY_STRING, &(simple_type_list_impl->simple_type_list));      
       
               
-    axis2_hash_set(simple_type_list_impl->ht_super, "XML_SCHEMA_SIMPLE_TYPE_CONTENT",
-            AXIS2_HASH_KEY_STRING, &(simple_type_list_impl->sim_type_content));  
 
+    axis2_hash_set(simple_type_list_impl->ht_super, 
+        AXIS2_STRDUP("XML_SCHEMA_SIMPLE_TYPE_CONTENT", env),
+        AXIS2_HASH_KEY_STRING, &(simple_type_list_impl->sim_type_content));    
             
     annotated = XML_SCHEMA_SIMPLE_TYPE_CONTENT_GET_BASE_IMPL(
         simple_type_list_impl->sim_type_content, env);            
     if(NULL != annotated)
     {            
         axis2_hash_set(simple_type_list_impl->ht_super, 
-            "XML_SCHEMA_ANNOTATED",
+            AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env),
             AXIS2_HASH_KEY_STRING, annotated);    
      
         axis2_hash_set(simple_type_list_impl->ht_super, 
-            "XML_SCHEMA_OBJ",
+            AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
             AXIS2_HASH_KEY_STRING,
             XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(annotated, env));    
                       
@@ -194,7 +178,9 @@
     
     status = xml_schema_simple_type_content_resolve_methods(
             &(simple_type_list_impl->simple_type_list.base), env,                
                 simple_type_list_impl->sim_type_content, 
-            simple_type_list_impl->methods);
+            xml_schema_simple_type_list_super_objs,
+            xml_schema_simple_type_list_get_type,
+            xml_schema_simple_type_list_free);
     
     return &(simple_type_list_impl->simple_type_list);
 }
@@ -208,11 +194,6 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     simple_type_list_impl = AXIS2_INTF_TO_IMPL(simple_type_list);
 
-    if(NULL != simple_type_list_impl->methods)
-    {
-        axis2_hash_free(simple_type_list_impl->methods, env);
-        simple_type_list_impl->methods = NULL;
-    }
     if(NULL != simple_type_list_impl->ht_super)
     {
         axis2_hash_free(simple_type_list_impl->ht_super, env);

Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_restriction.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_restriction.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_restriction.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_restriction.c Mon Aug
 7 22:57:49 2006
@@ -31,8 +31,6 @@
     
     xml_schema_simple_type_content_t *sim_type_content;
     
-    axis2_hash_t *methods;
-    
     axis2_hash_t *ht_super;
     
     xml_schema_types_t obj_type;
@@ -42,7 +40,6 @@
     axis2_qname_t *base_type_name;
     
     xml_schema_obj_collection_t *facets;
-    
 };
 
 #define AXIS2_INTF_TO_IMPL(simple_type_restriction) \
@@ -109,7 +106,6 @@
     simple_type_restriction_impl->sim_type_content = NULL;
     simple_type_restriction_impl->simple_type_restriction.ops = NULL;
     simple_type_restriction_impl->simple_type_restriction.base.ops = NULL;
-    simple_type_restriction_impl->methods = NULL;
     simple_type_restriction_impl->base_type = NULL;
     simple_type_restriction_impl->base_type_name = NULL;
     simple_type_restriction_impl->facets = NULL;
@@ -149,28 +145,14 @@
             xml_schema_simple_type_restriction_get_facets;            
             
    
-    simple_type_restriction_impl->methods = axis2_hash_make(env);
     simple_type_restriction_impl->ht_super = axis2_hash_make(env);
-    if(!simple_type_restriction_impl->methods || !simple_type_restriction_impl->ht_super)
+    if(!simple_type_restriction_impl->ht_super)
     {
         xml_schema_simple_type_restriction_free(&(simple_type_restriction_impl->simple_type_restriction),
env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    axis2_hash_set(simple_type_restriction_impl->methods, "free", AXIS2_HASH_KEY_STRING,

-            xml_schema_simple_type_restriction_free);
-    axis2_hash_set(simple_type_restriction_impl->methods, "get_base_type", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_restriction_get_base_type);
-    axis2_hash_set(simple_type_restriction_impl->methods, "get_type", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_restriction_get_type);
-    axis2_hash_set(simple_type_restriction_impl->methods, "super_objs", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_restriction_super_objs);      
     axis2_hash_set(simple_type_restriction_impl->methods, "set_base_type", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_restriction_set_base_type);
-    axis2_hash_set(simple_type_restriction_impl->methods, "get_base_type_name", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_restriction_get_base_type_name);
-    axis2_hash_set(simple_type_restriction_impl->methods, "set_base_type_name", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_restriction_set_base_type_name);
-    
+   
     simple_type_restriction_impl->sim_type_content = 
         xml_schema_simple_type_content_create(env);
         
@@ -184,28 +166,35 @@
         return NULL;        
     }
     
-    axis2_hash_set(simple_type_restriction_impl->methods,
-            "XML_SCHEMA_SIMPLE_TYPE_RESTRICTION", 
+    axis2_hash_set(simple_type_restriction_impl->ht_super,
+            AXIS2_STRDUP("XML_SCHEMA_SIMPLE_TYPE_RESTRICTION", env), 
             AXIS2_HASH_KEY_STRING, &(simple_type_restriction_impl->simple_type_restriction));
               
-    axis2_hash_set(simple_type_restriction_impl->methods,
-            "XML_SCHEMA_SIMPLE_TYPE_CONTENT", 
-            AXIS2_HASH_KEY_STRING, simple_type_restriction_impl->sim_type_content);  
            
+            
+            
+    axis2_hash_set(simple_type_restriction_impl->ht_super,
+            AXIS2_STRDUP("XML_SCHEMA_SIMPLE_TYPE_CONTENT", env), 
+            AXIS2_HASH_KEY_STRING, simple_type_restriction_impl->sim_type_content); 
+                          
     annotated = XML_SCHEMA_SIMPLE_TYPE_CONTENT_GET_BASE_IMPL(
             simple_type_restriction_impl->sim_type_content, env);
             
     if(NULL != annotated)
     {
-        axis2_hash_set(simple_type_restriction_impl->methods,
-            "XML_SCHEMA_ANNOTATED", 
-            AXIS2_HASH_KEY_STRING, annotated);               
-        axis2_hash_set(simple_type_restriction_impl->methods,
-            "XML_SCHEMA_OBJ", AXIS2_HASH_KEY_STRING,              
+        axis2_hash_set(simple_type_restriction_impl->ht_super,
+            AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env), 
+            AXIS2_HASH_KEY_STRING, annotated);       
+                    
+        axis2_hash_set(simple_type_restriction_impl->ht_super,
+            AXIS2_STRDUP("XML_SCHEMA_OBJ", env), 
+            AXIS2_HASH_KEY_STRING,              
             XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(annotated, env));
     }            
   
     status = xml_schema_simple_type_content_resolve_methods(
             &(simple_type_restriction_impl->simple_type_restriction.base), env,  
                               simple_type_restriction_impl->sim_type_content, 
-            simple_type_restriction_impl->methods);
+            xml_schema_simple_type_restriction_super_objs,
+            xml_schema_simple_type_restriction_get_type,
+            xml_schema_simple_type_restriction_free);
     
     return &(simple_type_restriction_impl->simple_type_restriction);
 }
@@ -219,11 +208,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     simple_type_restriction_impl = AXIS2_INTF_TO_IMPL(simple_type_restriction);
 
-    if(NULL != simple_type_restriction_impl->methods)
-    {
-        axis2_hash_free(simple_type_restriction_impl->methods, env);
-        simple_type_restriction_impl->methods = NULL;
-    }
+  
     if(NULL != simple_type_restriction_impl->ht_super)
     {
         axis2_hash_free(simple_type_restriction_impl->ht_super, env);

Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_union.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_union.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_union.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_simple_type_union.c Mon Aug  7 22:57:49
2006
@@ -30,8 +30,6 @@
     
     xml_schema_simple_type_content_t *sim_type_content;
     
-    axis2_hash_t *methods;
-    
     axis2_hash_t *ht_super;
     
     xml_schema_types_t obj_type;
@@ -112,7 +110,6 @@
     simple_type_union_impl->sim_type_content = NULL;
     simple_type_union_impl->simple_type_union.ops = NULL;
     simple_type_union_impl->simple_type_union.base.ops = NULL;
-    simple_type_union_impl->methods = NULL;
     simple_type_union_impl->member_types_qnames = NULL;
     simple_type_union_impl->member_types_source = NULL;
     simple_type_union_impl->ht_super = NULL;
@@ -150,30 +147,15 @@
     simple_type_union_impl->simple_type_union.ops->set_member_types_qnames =
             xml_schema_simple_type_union_set_member_types_qnames;            
             
-   
-    simple_type_union_impl->methods = axis2_hash_make(env);
     simple_type_union_impl->ht_super = axis2_hash_make(env);
     
-    if(!simple_type_union_impl->methods || !simple_type_union_impl->ht_super)
+    if(!simple_type_union_impl->ht_super)
     {
         xml_schema_simple_type_union_free(
             &(simple_type_union_impl->simple_type_union), env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    axis2_hash_set(simple_type_union_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
-            xml_schema_simple_type_union_free);
-    axis2_hash_set(simple_type_union_impl->methods, "get_base_types", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_union_get_base_types);
-    axis2_hash_set(simple_type_union_impl->methods, "get_type", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_union_get_type);
-    axis2_hash_set(simple_type_union_impl->methods, "super_objs", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_union_super_objs);            
    axis2_hash_set(simple_type_union_impl->methods, "set_member_types_source", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_union_set_member_types_source);
-    axis2_hash_set(simple_type_union_impl->methods, "get_member_types_source", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_union_get_member_types_source);
-    axis2_hash_set(simple_type_union_impl->methods, "get_member_types_qnames", 
-            AXIS2_HASH_KEY_STRING, xml_schema_simple_type_union_get_member_types_qnames);
     
     simple_type_union_impl->sim_type_content = 
         xml_schema_simple_type_content_create(env);
@@ -196,28 +178,35 @@
     }
 
     
-    axis2_hash_set(simple_type_union_impl->ht_super, "XML_SCHEMA_SIMPLE_TYPE_UNION", 
-            AXIS2_HASH_KEY_STRING, &(simple_type_union_impl->simple_type_union));
-
-    axis2_hash_set(simple_type_union_impl->ht_super, "XML_SCHEMA_SIMPLE_TYPE_CONTENT",

-            AXIS2_HASH_KEY_STRING, simple_type_union_impl->sim_type_content);
+    axis2_hash_set(simple_type_union_impl->ht_super, 
+        AXIS2_STRDUP("XML_SCHEMA_SIMPLE_TYPE_UNION", env), 
+        AXIS2_HASH_KEY_STRING, &(simple_type_union_impl->simple_type_union));
+
+    axis2_hash_set(simple_type_union_impl->ht_super, 
+        AXIS2_STRDUP("XML_SCHEMA_SIMPLE_TYPE_CONTENT", env), 
+        AXIS2_HASH_KEY_STRING, 
+        simple_type_union_impl->sim_type_content);
     
     annotated = XML_SCHEMA_SIMPLE_TYPE_CONTENT_GET_BASE_IMPL(
         simple_type_union_impl->sim_type_content, env);
 
     if(NULL != annotated)
     {
-        axis2_hash_set(simple_type_union_impl->ht_super, "XML_SCHEMA_ANNOTATED", 
+        axis2_hash_set(simple_type_union_impl->ht_super, 
+            AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env), 
             AXIS2_HASH_KEY_STRING, annotated);
             
-        axis2_hash_set(simple_type_union_impl->ht_super, "XML_SCHEMA_OBJ",
+        axis2_hash_set(simple_type_union_impl->ht_super, 
+            AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
             AXIS2_HASH_KEY_STRING, 
             XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(annotated, env));
     }
             
     status = xml_schema_simple_type_content_resolve_methods(
             &(simple_type_union_impl->simple_type_union.base), env,              
                   simple_type_union_impl->sim_type_content, 
-            simple_type_union_impl->methods);
+            xml_schema_simple_type_union_super_objs,
+            xml_schema_simple_type_union_get_type,
+            xml_schema_simple_type_union_free);
     
     return &(simple_type_union_impl->simple_type_union);
 }
@@ -231,11 +220,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     simple_type_union_impl = AXIS2_INTF_TO_IMPL(simple_type_union);
 
-    if(NULL != simple_type_union_impl->methods)
-    {
-        axis2_hash_free(simple_type_union_impl->methods, env);
-        simple_type_union_impl->methods = NULL;
-    }
+   
     if(NULL != simple_type_union_impl->ht_super)
     {
         axis2_hash_free(simple_type_union_impl->ht_super, env);

Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_type.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_type.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_type.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_type.c Mon Aug  7 22:57:49 2006
@@ -37,8 +37,6 @@
     
     xml_schema_annotated_t *annotated;
     
-    axis2_hash_t *methods;
-    
     xml_schema_data_type_t *data_type;
     
     xml_schema_derivation_method_t *derive_by;
@@ -154,7 +152,6 @@
     type_impl->final_resolved = NULL;
     type_impl->schema = NULL;
     type_impl->data_type = NULL;
-    type_impl->methods = NULL;
     type_impl->annotated = NULL;
     type_impl->base_schema_type = NULL;
     type_impl->qname = NULL;
@@ -205,13 +202,7 @@
     type_impl->type.ops->get_qname = 
             xml_schema_type_get_qname;
    
-    type_impl->methods = axis2_hash_make(env);
-    if(!type_impl->methods)
-    {
-        xml_schema_type_free(&(type_impl->type), env);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
+   
 
     type_impl->final_derivation = xml_schema_derivation_method_create(env, 
             "none");
@@ -221,34 +212,6 @@
         return NULL;
     }            
     
-    axis2_hash_set(type_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
-            xml_schema_type_free);
-    axis2_hash_set(type_impl->methods, "get_base_schema_type", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_get_base_schema_type);
-    axis2_hash_set(type_impl->methods, "get_type", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_get_type);
-    axis2_hash_set(type_impl->methods, "super_objs", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_super_objs);            
-    axis2_hash_set(type_impl->methods, "get_data_type", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_get_data_type);
-    axis2_hash_set(type_impl->methods, "get_derive_by", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_get_derive_by);
-    axis2_hash_set(type_impl->methods, "get_final", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_get_final);
-    axis2_hash_set(type_impl->methods, "set_final", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_set_final);
-    axis2_hash_set(type_impl->methods, "get_final_resolved", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_get_final_resolved);
-    axis2_hash_set(type_impl->methods, "is_mixed", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_is_mixed);
-    axis2_hash_set(type_impl->methods, "set_mixed", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_set_mixed);
-    axis2_hash_set(type_impl->methods, "get_name", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_get_name);
-    axis2_hash_set(type_impl->methods, "set_name", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_set_name);
-    axis2_hash_set(type_impl->methods, "get_qname", 
-            AXIS2_HASH_KEY_STRING, xml_schema_type_get_qname);
     
     type_impl->annotated = xml_schema_annotated_create(env);
     if(!type_impl->annotated)
@@ -262,20 +225,25 @@
         xml_schema_type_free(&(type_impl->annotated), env);
         return NULL;
     }
-    axis2_hash_set(type_impl->ht_super, "XML_SCHEMA_TYPE", 
+    axis2_hash_set(type_impl->ht_super,
+        AXIS2_STRDUP("XML_SCHEMA_TYPE", env), 
         AXIS2_HASH_KEY_STRING, &(type_impl->type));
         
-    axis2_hash_set(type_impl->ht_super, "XML_SCHEMA_ANNOTATED", 
+    axis2_hash_set(type_impl->ht_super,
+        AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env), 
         AXIS2_HASH_KEY_STRING, type_impl->annotated);
             
-    axis2_hash_set(type_impl->ht_super, "XML_SCHEMA_OBJ", 
+    axis2_hash_set(type_impl->ht_super, 
+        AXIS2_STRDUP("XML_SCHEMA_OBJ", env), 
         AXIS2_HASH_KEY_STRING, 
         XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(type_impl->annotated, env));
             
     
     status = xml_schema_annotated_resolve_methods(
             &(type_impl->type.base), env, type_impl->annotated, 
-            type_impl->methods);
+            xml_schema_type_super_objs,
+            xml_schema_type_get_type,
+            xml_schema_type_free);
     
     return &(type_impl->type);
 }
@@ -288,13 +256,12 @@
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     type_impl = AXIS2_INTF_TO_IMPL(type);
-
-    if(NULL != type_impl->methods)
+    if(NULL != type_impl->qname)
     {
-        axis2_hash_free(type_impl->methods, env);
-        type_impl->methods = NULL;
+        AXIS2_QNAME_FREE(type_impl->qname, env);
+        type_impl->qname = NULL;
+    
     }
-
     if(NULL != type_impl->annotated)
     {
         XML_SCHEMA_ANNOTATED_FREE(type_impl->annotated, env);
@@ -331,13 +298,14 @@
                                 xml_schema_type_t *type,
                                 const axis2_env_t *env,
                                 xml_schema_type_t *type_impl,
-                                axis2_hash_t *methods)
+                                XML_SCHEMA_SUPER_OBJS_FN super_objs,
+                                XML_SCHEMA_GET_TYPE_FN get_type,
+                                XML_SCHEMA_FREE_FN free_fn)
 {
     xml_schema_type_impl_t *sch_type_impl = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, type_impl, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
     
     sch_type_impl = (xml_schema_type_impl_t *) type_impl;
     
@@ -349,82 +317,44 @@
         return AXIS2_FAILURE;     
     }       
             
-    type->ops->free = axis2_hash_get(methods, "free", 
-            AXIS2_HASH_KEY_STRING);
-    type->ops->get_type = axis2_hash_get(methods, "get_type",
-            AXIS2_HASH_KEY_STRING);
-    type->ops->super_objs = axis2_hash_get(methods, "super_objs",
-            AXIS2_HASH_KEY_STRING);                        
+    type->ops->free = free_fn;
+    type->ops->get_type = get_type;
+    type->ops->super_objs = super_objs;
             
+    type->ops->get_base_schema_type = 
+        sch_type_impl->type.ops->get_base_schema_type;
 
-    type->ops->get_base_schema_type = axis2_hash_get(methods, "get_base_schema_type",
-         AXIS2_HASH_KEY_STRING);            
-    if(!type->ops->get_base_schema_type)           
-        type->ops->get_base_schema_type = 
-            sch_type_impl->type.ops->get_base_schema_type;
-
-    type->ops->get_data_type = axis2_hash_get(methods, "get_data_type",
-         AXIS2_HASH_KEY_STRING);            
-    if(!type->ops->get_data_type)           
-        type->ops->get_data_type = 
-            sch_type_impl->type.ops->get_data_type;
-
-    type->ops->get_derive_by = axis2_hash_get(methods, "get_derive_by",
-         AXIS2_HASH_KEY_STRING);            
-    if(!type->ops->get_derive_by)           
-        type->ops->get_derive_by = 
-            sch_type_impl->type.ops->get_derive_by;
-            
-    type->ops->get_final = axis2_hash_get(methods, "get_final",
-         AXIS2_HASH_KEY_STRING);            
-    if(!type->ops->get_final)         
+    type->ops->get_data_type = 
+        sch_type_impl->type.ops->get_data_type;
+
+    type->ops->get_derive_by = 
+        sch_type_impl->type.ops->get_derive_by;
+        
     type->ops->get_final = 
-            sch_type_impl->type.ops->get_final;
-            
-    type->ops->set_final = axis2_hash_get(methods, "set_final",
-        AXIS2_HASH_KEY_STRING);            
-    if(!type->ops->set_final)          
-        type->ops->set_final = 
-            sch_type_impl->type.ops->set_final;
-
-    type->ops->get_final_resolved = axis2_hash_get(methods, "get_final_resolved",
-        AXIS2_HASH_KEY_STRING);            
-    if(!type->ops->get_final_resolved)            
+        sch_type_impl->type.ops->get_final;
+        
+    type->ops->set_final = 
+        sch_type_impl->type.ops->set_final;
     type->ops->get_final_resolved = 
-            sch_type_impl->type.ops->get_final_resolved;
+        sch_type_impl->type.ops->get_final_resolved;
             
-    type->ops->is_mixed = axis2_hash_get(methods, "is_mixed",
-        AXIS2_HASH_KEY_STRING);            
-    if(!type->ops->is_mixed)  
     type->ops->is_mixed = 
-            sch_type_impl->type.ops->is_mixed;
+        sch_type_impl->type.ops->is_mixed;
      
-    type->ops->set_mixed = axis2_hash_get(methods, "set_mixed",
-        AXIS2_HASH_KEY_STRING);            
-    if(!type->ops->set_mixed)              
     type->ops->set_mixed = 
-            sch_type_impl->type.ops->set_mixed;
+        sch_type_impl->type.ops->set_mixed;
             
-    type->ops->get_name = axis2_hash_get(methods, "get_name",
-        AXIS2_HASH_KEY_STRING);            
-    if(!type->ops->get_name)             
-        type->ops->get_name = 
-            sch_type_impl->type.ops->get_name;
+    type->ops->get_name = 
+        sch_type_impl->type.ops->get_name;
             
-    type->ops->set_name = axis2_hash_get(methods, "set_name",
-        AXIS2_HASH_KEY_STRING);            
-    if(!type->ops->set_name)             
     type->ops->set_name = 
             sch_type_impl->type.ops->set_name;
             
-    type->ops->get_qname = axis2_hash_get(methods, "get_qname",
-        AXIS2_HASH_KEY_STRING);            
-    if(!type->ops->get_qname)            
     type->ops->get_qname = 
             sch_type_impl->type.ops->get_qname;
     
     return xml_schema_annotated_resolve_methods(&(type->base), 
-            env, sch_type_impl->annotated, methods);
+            env, sch_type_impl->annotated, super_objs, get_type, free_fn);
 }
 
 void *AXIS2_CALL

Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_use.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_use.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_use.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_use.c Mon Aug  7 22:57:49 2006
@@ -31,8 +31,7 @@
     xml_schema_types_t obj_type; 
     
     axis2_hash_t *ht_super;
-    
-    axis2_hash_t *methods;
+   
     
     axis2_array_list_t *members;
 };
@@ -87,7 +86,6 @@
     use_impl->schema_enum = NULL;
     use_impl->obj_type = XML_SCHEMA_USE;
     use_impl->ht_super = NULL;
-    use_impl->methods = NULL;
     use_impl->members = NULL;
     use_impl->use.base.ops = NULL;
     use_impl->use.ops = AXIS2_MALLOC(env->allocator, 
@@ -118,24 +116,6 @@
     AXIS2_ARRAY_LIST_ADD(use_impl->members, env, 
         AXIS2_STRDUP(XML_SCHEMA_CONST_REQUIRED, env));
 
-    use_impl->methods = axis2_hash_make(env);
-    if(!use_impl->methods)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
-    axis2_hash_set(use_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
-            xml_schema_use_free);
-
-    axis2_hash_set(use_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
-            xml_schema_use_super_objs);
-
-    axis2_hash_set(use_impl->methods, "get_type", AXIS2_HASH_KEY_STRING, 
-            xml_schema_use_get_type);
-
-    axis2_hash_set(use_impl->methods, "get_values", AXIS2_HASH_KEY_STRING, 
-            xml_schema_use_get_values);
-
     use_impl->schema_enum = xml_schema_enum_create(env, value);
 
     use_impl->ht_super = axis2_hash_make(env);
@@ -144,14 +124,21 @@
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    axis2_hash_set(use_impl->ht_super, "XML_SCHEMA_USE", AXIS2_HASH_KEY_STRING, 
+    axis2_hash_set(use_impl->ht_super, 
+            AXIS2_STRDUP("XML_SCHEMA_USE", env),
+            AXIS2_HASH_KEY_STRING, 
             &(use_impl->use));
-    axis2_hash_set(use_impl->ht_super, "XML_SCHEMA_ENUM", AXIS2_HASH_KEY_STRING, 
+            
+    axis2_hash_set(use_impl->ht_super, 
+            AXIS2_STRDUP("XML_SCHEMA_ENUM", env), 
+            AXIS2_HASH_KEY_STRING, 
             use_impl->schema_enum);
 
     status = xml_schema_enum_resolve_methods(
             &(use_impl->use.base), env, use_impl->schema_enum, 
-            use_impl->methods); 
+            xml_schema_use_super_objs,
+            xml_schema_use_get_type,
+            xml_schema_use_free); 
 
     return &(use_impl->use);
 }
@@ -196,11 +183,7 @@
         use_impl->ht_super = NULL;
     }
     
-    if(NULL != use_impl->methods)
-    {
-        axis2_hash_free(use_impl->methods, env);
-        use_impl->methods = NULL;
-    }
+   
     if(NULL != use_impl->use.base.ops)
     {
         AXIS2_FREE(env->allocator, use_impl->use.base.ops);

Modified: webservices/axis2/trunk/c/xml_schema/src/xml_schema_xpath.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_schema_xpath.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_schema_xpath.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_schema_xpath.c Mon Aug  7 22:57:49 2006
@@ -25,8 +25,9 @@
 struct xml_schema_xpath_impl
 {
     xml_schema_xpath_t xpath;
+    
     xml_schema_annotated_t *annotated;
-    axis2_hash_t *methods;
+
     axis2_char_t *x_path;
     
     axis2_hash_t *ht_super;
@@ -71,7 +72,6 @@
                     sizeof(xml_schema_xpath_impl_t));
 
     xpath_impl->annotated = NULL;
-    xpath_impl->methods = NULL;
     xpath_impl->x_path = NULL;
     xpath_impl->ht_super = NULL;
     xpath_impl->obj_type = XML_SCHEMA_XPATH;
@@ -90,19 +90,6 @@
     xpath_impl->xpath.ops->super_objs =
             xml_schema_xpath_super_objs;                       
    
-    xpath_impl->methods = axis2_hash_make(env);
-    if(!xpath_impl->methods)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
-    axis2_hash_set(xpath_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
-            xml_schema_xpath_free);
-    axis2_hash_set(xpath_impl->methods, "get_xpath", 
-            AXIS2_HASH_KEY_STRING, xml_schema_xpath_get_xpath);
-    axis2_hash_set(xpath_impl->methods, "set_xpath", 
-            AXIS2_HASH_KEY_STRING, xml_schema_xpath_set_xpath);
-    
     xpath_impl->annotated = xml_schema_annotated_create(env);
     
     xpath_impl->ht_super = axis2_hash_make(env);
@@ -112,16 +99,25 @@
         return NULL;
     }
 
-    axis2_hash_set(xpath_impl->ht_super, "XML_SCHEMA_XPATH", AXIS2_HASH_KEY_STRING,
+    axis2_hash_set(xpath_impl->ht_super, 
+        AXIS2_STRDUP("XML_SCHEMA_XPATH", env),
+        AXIS2_HASH_KEY_STRING,
         &(xpath_impl->xpath));
-    axis2_hash_set(xpath_impl->ht_super, "XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING,
+        
+    axis2_hash_set(xpath_impl->ht_super, 
+        AXIS2_STRDUP("XML_SCHEMA_ANNOTATED", env),
+        AXIS2_HASH_KEY_STRING,
         xpath_impl->annotated);        
-    axis2_hash_set(xpath_impl->ht_super, "XML_SCHEMA_OBJ", AXIS2_HASH_KEY_STRING,
+    axis2_hash_set(xpath_impl->ht_super, 
+        AXIS2_STRDUP("XML_SCHEMA_OBJ", env),
+        AXIS2_HASH_KEY_STRING,
         XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(xpath_impl->annotated, env));
 
     status = xml_schema_annotated_resolve_methods(
             &(xpath_impl->xpath.base), env, xpath_impl->annotated, 
-            xpath_impl->methods);
+            xml_schema_xpath_super_objs,
+            xml_schema_xpath_get_type,
+            xml_schema_xpath_free);
     
     return &(xpath_impl->xpath);
 }
@@ -144,12 +140,6 @@
     {
         axis2_hash_free(xpath_impl->ht_super, env);
         xpath_impl->ht_super = NULL;
-    }
-
-    if(xpath_impl->methods)
-    {
-        axis2_hash_free(xpath_impl->methods, env);
-        xpath_impl->methods = NULL;
     }
 
     if(xpath_impl->annotated)

Modified: webservices/axis2/trunk/c/xml_schema/src/xml_severity_type.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_severity_type.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_severity_type.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_severity_type.c Mon Aug  7 22:57:49 2006
@@ -30,8 +30,6 @@
     
     xml_schema_enum_t *schema_enum;
     
-    axis2_hash_t *methods;
-    
     axis2_array_list_t *members;
     
     axis2_hash_t *ht_super;
@@ -78,7 +76,6 @@
     }                    
 
     severity_type_impl->schema_enum = NULL;
-    severity_type_impl->methods = NULL;
     severity_type_impl->members = NULL;
     severity_type_impl->ht_super = NULL;
     severity_type_impl->type = XML_SCHEMA_SEVERITY_TYPE;
@@ -115,24 +112,6 @@
     AXIS2_ARRAY_LIST_ADD(severity_type_impl->members, env, 
         AXIS2_STRDUP(XML_SCHEMA_CONST_WARNING, env));
 
-    severity_type_impl->methods = axis2_hash_make(env);
-    if(!severity_type_impl->methods)
-    {
-        xml_schema_severity_type_free(&(severity_type_impl->severity_type), env);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
-
-    axis2_hash_set(severity_type_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
-            xml_schema_severity_type_free);
-    axis2_hash_set(severity_type_impl->methods, "get_values", AXIS2_HASH_KEY_STRING, 
-            xml_schema_severity_type_get_values);
-    axis2_hash_set(severity_type_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,
-            xml_schema_severity_type_super_objs);
-    axis2_hash_set(severity_type_impl->methods, "get_type",
-            AXIS2_HASH_KEY_STRING,
-            xml_schema_severity_type_get_type);
-            
     severity_type_impl->schema_enum = xml_schema_enum_create(env, value);
     if(!severity_type_impl->schema_enum)
     {
@@ -149,15 +128,19 @@
         return NULL;
     }
     
-    axis2_hash_set(severity_type_impl->ht_super, "XML_SCHEMA_SEVERITY_TYPE",
-       AXIS2_HASH_KEY_STRING,  &(severity_type_impl->severity_type));
+    axis2_hash_set(severity_type_impl->ht_super, 
+        AXIS2_STRDUP("XML_SCHEMA_SEVERITY_TYPE", env),
+        AXIS2_HASH_KEY_STRING,  &(severity_type_impl->severity_type));
     
-    axis2_hash_set(severity_type_impl->ht_super, "XML_SCHEMA_ENUM",
+    axis2_hash_set(severity_type_impl->ht_super, 
+        AXIS2_STRDUP("XML_SCHEMA_ENUM", env),
         AXIS2_HASH_KEY_STRING, severity_type_impl->schema_enum);        
 
     status = xml_schema_enum_resolve_methods(
             &(severity_type_impl->severity_type.base), env, severity_type_impl->schema_enum,

-            severity_type_impl->methods); 
+            xml_schema_severity_type_super_objs,
+            xml_schema_severity_type_get_type,
+            xml_schema_severity_type_free); 
 
     return &(severity_type_impl->severity_type);
 }

Modified: webservices/axis2/trunk/c/xml_schema/src/xml_tokenized_type.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/src/xml_tokenized_type.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/src/xml_tokenized_type.c (original)
+++ webservices/axis2/trunk/c/xml_schema/src/xml_tokenized_type.c Mon Aug  7 22:57:49 2006
@@ -29,8 +29,6 @@
     
     xml_schema_enum_t *schema_enum;
     
-    axis2_hash_t *methods;
-    
     axis2_array_list_t *members;
     
     axis2_hash_t *ht_super;
@@ -81,7 +79,6 @@
     }
     
     tokenized_type_impl->schema_enum = NULL;
-    tokenized_type_impl->methods = NULL;
     tokenized_type_impl->members = NULL;
     tokenized_type_impl->obj_type = XML_SCHEMA_TOKENIZED_TYPE;
     tokenized_type_impl->tokenized_type.ops = NULL;
@@ -141,26 +138,6 @@
     AXIS2_ARRAY_LIST_ADD(tokenized_type_impl->members, env, 
         AXIS2_STRDUP("None", env));
 
-    tokenized_type_impl->methods = axis2_hash_make(env);
-    
-    if(!tokenized_type_impl->methods)
-    {
-        xml_schema_tokenized_type_free(&(tokenized_type_impl->tokenized_type), env);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
-    
-    axis2_hash_set(tokenized_type_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
-            xml_schema_tokenized_type_free);
-    axis2_hash_set(tokenized_type_impl->methods, "get_values", AXIS2_HASH_KEY_STRING,

-            xml_schema_tokenized_type_get_values);
-
-    axis2_hash_set(tokenized_type_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING,

-            xml_schema_tokenized_type_super_objs);
-
-    axis2_hash_set(tokenized_type_impl->methods, "get_type", AXIS2_HASH_KEY_STRING, 
-            xml_schema_tokenized_type_get_type);
-
     tokenized_type_impl->schema_enum = xml_schema_enum_create(env, value);
 
     tokenized_type_impl->ht_super = axis2_hash_make(env);
@@ -179,7 +156,9 @@
     
     status = xml_schema_enum_resolve_methods(
             &(tokenized_type_impl->tokenized_type.base), env, tokenized_type_impl->schema_enum,

-            tokenized_type_impl->methods); 
+            xml_schema_tokenized_type_super_objs,
+            xml_schema_tokenized_type_get_type,
+            xml_schema_tokenized_type_free); 
 
     return &(tokenized_type_impl->tokenized_type);
 }

Modified: webservices/axis2/trunk/c/xml_schema/test/xml_schema_test.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xml_schema/test/xml_schema_test.c?rev=429593&r1=429592&r2=429593&view=diff
==============================================================================
--- webservices/axis2/trunk/c/xml_schema/test/xml_schema_test.c (original)
+++ webservices/axis2/trunk/c/xml_schema/test/xml_schema_test.c Mon Aug  7 22:57:49 2006
@@ -648,7 +648,7 @@
     axiom_document_t *doc   = NULL;
     reader = axiom_xml_reader_create_for_file(env, filename, NULL);
     om_builder = axiom_stax_builder_create(env, reader);
-    doc = axiom_document_create(env, NULL, om_builder); 
+    doc = AXIOM_STAX_BUILDER_GET_DOCUMENT(om_builder, env); 
     AXIOM_DOCUMENT_BUILD_ALL(doc, env);
     return doc;    
 }



---------------------------------------------------------------------
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