axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r405399 - in /webservices/axis2/trunk/c/modules/xml/xml_schema: ./ include/xml_schema/
Date Tue, 09 May 2006 11:57:32 GMT
Author: damitha
Date: Tue May  9 04:57:30 2006
New Revision: 405399

URL: http://svn.apache.org/viewcvs?rev=405399&view=rev
Log:
Fixing a bug found in casting

Modified:
    webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema.h
    webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_all.h
    webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_annotated.h
    webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_defines.h
    webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema.c
    webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_all.c
    webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_annotated.c

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema.h?rev=405399&r1=405398&r2=405399&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema.h (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema.h Tue May  9 04:57:30 2006
@@ -25,6 +25,7 @@
  *          Represents the World Wide Web Consortium (W3C) schema element
  */
 
+#include <xml_schema/axis2_xml_schema_defines.h>
 #include <xml_schema/axis2_xml_schema_annotated.h>
 #include <axis2_om_element.h>
 #include <axis2_om_node.h>
@@ -63,6 +64,14 @@
     free) (void *schema,
             axis2_env_t **env);
 
+    axis2_hash_t *(AXIS2_CALL *
+    super_objs) (void *schema,
+            axis2_env_t **env);
+
+    axis2_xml_schema_types_t (AXIS2_CALL *
+    type) (void *schema,
+            axis2_env_t **env);
+    
     axis2_xml_schema_annotated_t *(AXIS2_CALL *
     get_base_impl) (void *schema,
                     axis2_env_t **env);
@@ -224,6 +233,14 @@
 #define AXIS2_XML_SCHEMA_FREE(schema, env) \
 		(((axis2_xml_schema_t *) schema)->ops->\
             free(schema, env))
+
+#define AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env) \
+		(((axis2_xml_schema_t *) schema)->ops->\
+            super_objs(schema, env))
+
+#define AXIS2_XML_SCHEMA_TYPE(schema, env) \
+		(((axis2_xml_schema_t *) schema)->ops->\
+            type(schema, env))
 
 #define AXIS2_XML_SCHEMA_GET_BASE_IMPL(schema, env) \
 		(((axis2_xml_schema_t *) schema)->ops->\

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_all.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_all.h?rev=405399&r1=405398&r2=405399&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_all.h (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_all.h Tue May  9 04:57:30 2006
@@ -25,6 +25,7 @@
  *          Wide Web Consortium (W3C) all element (compositor).
  */
 
+#include <xml_schema/axis2_xml_schema_defines.h>
 #include <xml_schema/axis2_xml_schema_group_base.h>
 #include <axis2_hash.h>
 
@@ -50,9 +51,20 @@
      * @return status code
      */
     axis2_status_t (AXIS2_CALL *
-    free) (void *all,
+    free) (
+            void *all,
             axis2_env_t **env);
 
+    axis2_hash_t *(AXIS2_CALL *
+    super_objs) (
+            void *all,
+            axis2_env_t **env);
+
+    axis2_xml_schema_types_t (AXIS2_CALL *
+    type) (
+            void *all,
+            axis2_env_t **env);
+    
     struct axis2_xml_schema_group_base *(AXIS2_CALL *
     get_base_impl) (void *all,
                     axis2_env_t **env);
@@ -88,6 +100,14 @@
 #define AXIS2_XML_SCHEMA_ALL_FREE(all, env) \
 		(((axis2_xml_schema_all_t *) all)->ops->\
             free(all, env))
+
+#define AXIS2_XML_SCHEMA_ALL_SUPER_OBJS(all, env) \
+		(((axis2_xml_schema_all_t *) all)->ops->\
+            super_objs(all, env))
+
+#define AXIS2_XML_SCHEMA_ALL_TYPE(all, env) \
+		(((axis2_xml_schema_all_t *) all)->ops->\
+            type(all, env))
 
 #define AXIS2_XML_SCHEMA_ALL_GET_BASE_IMPL(all, env) \
 		(((axis2_xml_schema_all_t *) all)->ops->\

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_annotated.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_annotated.h?rev=405399&r1=405398&r2=405399&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_annotated.h (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_annotated.h Tue May  9 04:57:30 2006
@@ -22,6 +22,7 @@
  * @brief Axis2 Xml Schema Annotated Interface
  */
 
+#include <xml_schema/axis2_xml_schema_defines.h>
 #include <xml_schema/axis2_xml_schema_obj.h>
 
 /** @defgroup axis2_xml_schema_annotated Xml Schema Annotated
@@ -65,6 +66,16 @@
     free)(void *annotated,
             axis2_env_t **env);
     
+    axis2_hash_t *(AXIS2_CALL *
+    super_objs)(
+            void *annotated,
+            axis2_env_t **env);
+    
+    axis2_xml_schema_types_t (AXIS2_CALL *
+    type)(
+            void *annotated,
+            axis2_env_t **env);
+
     axis2_xml_schema_obj_t *(AXIS2_CALL *
     get_base_impl) (void *annotated,
                     axis2_env_t **env);
@@ -120,6 +131,14 @@
 
 #define AXIS2_XML_SCHEMA_ANNOTATED_FREE(annotated, env) \
 		(((axis2_xml_schema_annotated_t *) annotated)->ops->free(\
+            annotated, env))
+
+#define AXIS2_XML_SCHEMA_ANNOTATED_SUPER_OBJS(annotated, env) \
+		(((axis2_xml_schema_annotated_t *) annotated)->ops->super_objs(\
+            annotated, env))
+
+#define AXIS2_XML_SCHEMA_ANNOTATED_TYPE(annotated, env) \
+		(((axis2_xml_schema_annotated_t *) annotated)->ops->type(\
             annotated, env))
 
 #define AXIS2_XML_SCHEMA_ANNOTATED_GET_BASE_IMPL(annotated, env) \

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_defines.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_defines.h?rev=405399&r1=405398&r2=405399&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_defines.h (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/include/xml_schema/axis2_xml_schema_defines.h Tue May  9 04:57:30 2006
@@ -46,22 +46,10 @@
     typedef enum axis2_xml_schema_types
     {
         AXIS2_XML_SCHEMA = 0,
-        AXIS2_XML_SCHEMA_IMPORTED,
-        AXIS2_XML_SCHEMA_INLINED_SCHEMA,
-        AXIS2_XML_SCHEMA_XML_ATTR,
-        AXIS2_XML_SCHEMA_QNAME_ATTR,
-        AXIS2_XML_SCHEMA_URI_ATTR,
-        AXIS2_XML_SCHEMA_QNAME_LIST_ATTR,
-        AXIS2_XML_SCHEMA_STRING_ATTR,
-        AXIS2_XML_SCHEMA_QNAME_LIST_OR_TOKEN_ANY_ATTR,
-        AXIS2_XML_SCHEMA_QNAME_OR_TOKEN_ANY_ATTR,
-        AXIS2_XML_SCHEMA_BOOL_ATTR,
-        AXIS2_XML_SCHEMA_WSDL_ELEMENT,
-        AXIS2_XML_SCHEMA_ATTR_EXTENSIBLE,
-        AXIS2_XML_SCHEMA_ELEMENT_EXTENSIBLE,
-        AXIS2_XML_SCHEMA_FEATURE,
-        AXIS2_XML_SCHEMA_TYPES,
-        AXIS2_XML_SCHEMA_DOCUMENTATION
+        AXIS2_XML_SCHEMA_ALL,
+        AXIS2_XML_SCHEMA_GROUP_BASE,
+        AXIS2_XML_SCHEMA_ANNOTATED,
+        AXIS2_XML_SCHEMA_OBJ
     } axis2_xml_schema_types_t;
 
 /** @} */

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema.c?rev=405399&r1=405398&r2=405399&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema.c Tue May  9 04:57:30 2006
@@ -33,6 +33,8 @@
 {
     axis2_xml_schema_t schema;
     axis2_xml_schema_annotated_t *annotated;
+    axis2_xml_schema_types_t obj_type;
+    axis2_hash_t *super;
     axis2_hash_t *methods;
     axis2_xml_schema_form_t *attr_form_default;
     axis2_xml_schema_form_t *element_form_default;
@@ -60,6 +62,14 @@
 axis2_xml_schema_free(void *schema,
                         axis2_env_t **env);
 
+axis2_hash_t *AXIS2_CALL 
+axis2_xml_schema_super_objs(void *schema,
+                        axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL 
+axis2_xml_schema_type(void *schema,
+                        axis2_env_t **env);
+
 axis2_xml_schema_annotated_t *AXIS2_CALL
 axis2_xml_schema_get_base_impl(void *schema,
                                         axis2_env_t **env);
@@ -180,6 +190,7 @@
 
 static axis2_status_t 
 serialize_internal(void *schema,
+                    axis2_env_t **env,
                     void *writer);
 
 axis2_hash_t *AXIS2_CALL 
@@ -208,6 +219,8 @@
                     sizeof(axis2_xml_schema_impl_t));
 
     schema_impl->annotated = NULL;
+    schema_impl->super = NULL;
+    schema_impl->obj_type = AXIS2_XML_SCHEMA;
     schema_impl->methods = NULL;
     schema_impl->parent = parent;
     schema_impl->attr_form_default = NULL;
@@ -228,6 +241,8 @@
                     sizeof(axis2_xml_schema_ops_t));
 
     schema_impl->schema.ops->free = axis2_xml_schema_free;
+    schema_impl->schema.ops->super_objs = axis2_xml_schema_super_objs;
+    schema_impl->schema.ops->type = axis2_xml_schema_type;
     schema_impl->schema.ops->get_base_impl = 
             axis2_xml_schema_get_base_impl;
     schema_impl->schema.ops->get_namespace = 
@@ -297,6 +312,10 @@
     }
     axis2_hash_set(schema_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
             axis2_xml_schema_free);
+    axis2_hash_set(schema_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_super_objs);
+    axis2_hash_set(schema_impl->methods, "type", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_type);
     axis2_hash_set(schema_impl->methods, "get_namespace", 
             AXIS2_HASH_KEY_STRING, axis2_xml_schema_get_namespace);
     axis2_hash_set(schema_impl->methods, "get_attr_form_default", 
@@ -357,6 +376,16 @@
             AXIS2_HASH_KEY_STRING, axis2_xml_schema_add_type);
     
     schema_impl->annotated = axis2_xml_schema_annotated_create(env);
+
+    schema_impl->super = axis2_hash_make(env);
+    if(!schema_impl->super)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(schema_impl->super, "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING, 
+            &(schema_impl->schema));
+
     status = axis2_xml_schema_annotated_resolve_methods(
             &(schema_impl->schema.base), env, schema_impl->annotated, 
             schema_impl->methods);
@@ -379,6 +408,12 @@
         schema_impl->methods = NULL;
     }
 
+    if(schema_impl->super)
+    {
+        axis2_hash_free(schema_impl->super, env);
+        schema_impl->super = NULL;
+    }
+
     if(schema_impl->annotated)
     {
         AXIS2_XML_SCHEMA_OBJ_FREE(schema_impl->annotated, env);
@@ -399,6 +434,30 @@
     return AXIS2_SUCCESS;
 }
 
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_type(void *schema,
+                                axis2_env_t **env)
+{
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    schema_impl = AXIS2_INTF_TO_IMPL(schema);
+
+    return schema_impl->obj_type;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_super_objs(void *schema,
+                                axis2_env_t **env)
+{
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    schema_impl = AXIS2_INTF_TO_IMPL(schema);
+
+    return schema_impl->super;
+}
+
 axis2_xml_schema_annotated_t *AXIS2_CALL
 axis2_xml_schema_get_base_impl(void *schema,
                                 axis2_env_t **env)
@@ -430,65 +489,182 @@
             sizeof(axis2_xml_schema_ops_t));
     schema->ops->free = axis2_hash_get(methods, "free", 
             AXIS2_HASH_KEY_STRING);
-    schema->ops->get_base_impl = 
-            schema_impl_l->schema.ops->get_base_impl;
-    schema->ops->get_namespace = 
+    schema->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    schema->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+
+    schema->ops->get_namespace = axis2_hash_get(methods, "get_namespace",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_namespace)
+            schema->ops->get_namespace = 
             schema_impl_l->schema.ops->get_namespace;
-    schema->ops->get_attr_form_default = 
+    
+    schema->ops->get_attr_form_default = axis2_hash_get(methods, 
+            "get_attr_form_default", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_attr_form_default)
+            schema->ops->get_attr_form_default = 
             schema_impl_l->schema.ops->get_attr_form_default;
-    schema->ops->set_attr_form_default = 
+    
+    schema->ops->set_attr_form_default = axis2_hash_get(methods, 
+            "set_attr_form_default", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->set_attr_form_default)
+            schema->ops->set_attr_form_default = 
             schema_impl_l->schema.ops->set_attr_form_default;
-    schema->ops->get_attr_groups = 
+    
+    schema->ops->get_attr_groups = axis2_hash_get(methods, 
+            "get_attr_groups", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_attr_groups)
+            schema->ops->get_attr_groups = 
             schema_impl_l->schema.ops->get_attr_groups;
-    schema->ops->get_attrs = 
+    
+    schema->ops->get_attrs = axis2_hash_get(methods, "get_attrs",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_attrs)
+            schema->ops->get_attrs = 
             schema_impl_l->schema.ops->get_attrs;
-    schema->ops->get_block_default = 
+    
+    schema->ops->get_block_default = axis2_hash_get(methods, "get_block_default",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_block_default)
+            schema->ops->get_block_default = 
             schema_impl_l->schema.ops->get_block_default;
-    schema->ops->set_block_default = 
+    
+    schema->ops->set_block_default = axis2_hash_get(methods, "set_block_default",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->set_block_default)
+            schema->ops->set_block_default = 
             schema_impl_l->schema.ops->set_block_default;
-    schema->ops->get_element_form_default = 
+    
+    schema->ops->get_element_form_default = axis2_hash_get(methods, 
+            "get_element_form_default", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_element_form_default)
+            schema->ops->get_element_form_default = 
             schema_impl_l->schema.ops->get_element_form_default;
-    schema->ops->set_element_form_default = 
+    
+    schema->ops->set_element_form_default = axis2_hash_get(methods, 
+            "set_element_form_default", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->set_element_form_default)
+            schema->ops->set_element_form_default = 
             schema_impl_l->schema.ops->set_element_form_default;
-    schema->ops->get_elements = 
-            schema_impl_l->schema.ops->get_elements;
+    
+    schema->ops->get_elements = axis2_hash_get(methods, "get_elements",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_elements)
+            schema->ops->get_elements = schema_impl_l->schema.ops->get_elements;
+    
+    schema->ops->get_element_by_qname = axis2_hash_get(methods, 
+            "get_element_by_qname", AXIS2_HASH_KEY_STRING);        
+    if(!schema->ops->get_element_by_qname)
     schema->ops->get_element_by_qname = 
             schema_impl_l->schema.ops->get_element_by_qname;
-    schema->ops->get_type_by_qname = 
+    
+    schema->ops->get_type_by_qname = axis2_hash_get(methods, 
+            "get_type_by_qname", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_type_by_qname)
+            schema->ops->get_type_by_qname = 
             schema_impl_l->schema.ops->get_type_by_qname;
-    schema->ops->get_final_default = 
+    
+    schema->ops->get_final_default = axis2_hash_get(methods, "get_final_default",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_final_default)
+            schema->ops->get_final_default = 
             schema_impl_l->schema.ops->get_final_default;
-    schema->ops->set_final_default = 
+    
+    schema->ops->set_final_default = axis2_hash_get(methods, "set_final_default",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->set_final_default)
+            schema->ops->set_final_default = 
             schema_impl_l->schema.ops->set_final_default;
-    schema->ops->get_groups = 
+    
+    schema->ops->get_groups = axis2_hash_get(methods, "get_groups",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_groups)
+            schema->ops->get_groups = 
             schema_impl_l->schema.ops->get_groups;
-    schema->ops->get_includes = 
+    
+    schema->ops->get_includes = axis2_hash_get(methods, "get_includes",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_includes)
+            schema->ops->get_includes = 
             schema_impl_l->schema.ops->get_includes;
-    schema->ops->is_compiled = 
+    
+    schema->ops->is_compiled = axis2_hash_get(methods, "is_compiled",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->is_compiled)
+            schema->ops->is_compiled = 
             schema_impl_l->schema.ops->is_compiled;
-    schema->ops->get_items = 
+    
+    schema->ops->get_items = axis2_hash_get(methods, "get_items",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_items)
+            schema->ops->get_items = 
             schema_impl_l->schema.ops->get_items;
-    schema->ops->get_notations = 
+    
+    schema->ops->get_notations = axis2_hash_get(methods, "get_notations",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_notations)
+            schema->ops->get_notations = 
             schema_impl_l->schema.ops->get_notations;
-    schema->ops->get_schema_types = 
+    
+    schema->ops->get_schema_types = axis2_hash_get(methods, "get_schema_types",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_schema_types)
+            schema->ops->get_schema_types = 
             schema_impl_l->schema.ops->get_schema_types;
-    schema->ops->get_target_namespace = 
+    
+    schema->ops->get_target_namespace = axis2_hash_get(methods, 
+            "get_target_namespace", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_target_namespace)
+            schema->ops->get_target_namespace = 
             schema_impl_l->schema.ops->get_target_namespace;
-    schema->ops->set_target_namespace = 
+    
+    schema->ops->set_target_namespace = axis2_hash_get(methods, 
+            "set_target_namespace", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->set_target_namespace)
+            schema->ops->set_target_namespace = 
             schema_impl_l->schema.ops->set_target_namespace;
-    schema->ops->get_version = 
+    
+    schema->ops->get_version = axis2_hash_get(methods, "get_version",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_version)
+            schema->ops->get_version = 
             schema_impl_l->schema.ops->get_version;
-    schema->ops->compile = 
+    
+    schema->ops->compile = axis2_hash_get(methods, "compile",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->compile)
+            schema->ops->compile = 
             schema_impl_l->schema.ops->compile;
-    schema->ops->write_with_out = 
+    
+    schema->ops->write_with_out = axis2_hash_get(methods, "write_with_out",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->write_with_out)
+            schema->ops->write_with_out = 
             schema_impl_l->schema.ops->write_with_out;
-    schema->ops->write_with_writer = 
+    
+    schema->ops->write_with_writer = axis2_hash_get(methods, "write_with_writer",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->write_with_writer)
+            schema->ops->write_with_writer = 
             schema_impl_l->schema.ops->write_with_writer;
-    schema->ops->get_prefix_to_namespace_map = 
+    
+    schema->ops->get_prefix_to_namespace_map = axis2_hash_get(methods, 
+            "get_prefix_to_namespace_map", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->get_prefix_to_namespace_map)
+            schema->ops->get_prefix_to_namespace_map = 
             schema_impl_l->schema.ops->get_prefix_to_namespace_map;
-    schema->ops->set_prefix_to_namespace_map = 
+    
+    schema->ops->set_prefix_to_namespace_map = axis2_hash_get(methods, 
+            "set_prefix_to_namespace_map", AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->set_prefix_to_namespace_map)
+            schema->ops->set_prefix_to_namespace_map = 
             schema_impl_l->schema.ops->set_prefix_to_namespace_map;
-    schema->ops->add_type = 
+    
+    schema->ops->add_type = axis2_hash_get(methods, "add_type",
+            AXIS2_HASH_KEY_STRING);
+    if(!schema->ops->add_type)
+            schema->ops->add_type = 
             schema_impl_l->schema.ops->add_type;
     
     return axis2_xml_schema_annotated_resolve_methods(&(schema->base), 
@@ -500,7 +676,14 @@
                                  axis2_env_t **env,
                                  axis2_char_t *prefix)
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+
     return NULL;
 }
 
@@ -509,9 +692,12 @@
                                  axis2_env_t **env)
 {
     axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
-    schema_impl = AXIS2_INTF_TO_IMPL(schema);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
     
     return NULL;
 }
@@ -522,9 +708,12 @@
                                  axis2_xml_schema_form_t *value)
 {
     axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    schema_impl = AXIS2_INTF_TO_IMPL(schema);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
     
     return AXIS2_SUCCESS;
 }
@@ -534,9 +723,12 @@
                                  axis2_env_t **env)
 {
     axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
-    schema_impl = AXIS2_INTF_TO_IMPL(schema);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
     
     return NULL;
 }
@@ -546,9 +738,12 @@
                                  axis2_env_t **env)
 {
     axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
-    schema_impl = AXIS2_INTF_TO_IMPL(schema);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
     
     return NULL;
 }
@@ -557,6 +752,14 @@
 axis2_xml_schema_get_block_default(void *schema,
                                     axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -565,6 +768,14 @@
                         axis2_env_t **env,
                         axis2_xml_schema_derivation_method_t *block_default) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return AXIS2_SUCCESS;
 }
 
@@ -572,6 +783,14 @@
 axis2_xml_schema_get_element_form_default(void *schema,
                                             axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -580,6 +799,14 @@
                             axis2_env_t **env,
                             axis2_xml_schema_form_t *element_form_default) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return AXIS2_SUCCESS;
 }
 
@@ -587,6 +814,14 @@
 axis2_xml_schema_get_elements(void *schema,
                                 axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -595,6 +830,14 @@
                                         axis2_env_t **env,
                                         axis2_qname_t *qname) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -603,6 +846,14 @@
                                     axis2_env_t **env,
                                     axis2_qname_t *qname) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -610,6 +861,14 @@
 axis2_xml_schema_get_final_default(void *schema,
                                     axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -618,6 +877,14 @@
                         axis2_env_t **env,
                         axis2_xml_schema_derivation_method_t *final_default) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return AXIS2_SUCCESS;
 }
 
@@ -625,6 +892,14 @@
 axis2_xml_schema_get_groups(void *schema,
                             axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -632,6 +907,14 @@
 axis2_xml_schema_get_includes(void *schema,
                                 axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -646,6 +929,14 @@
 axis2_xml_schema_get_items(void *schema,
                            axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
     
 }
@@ -654,6 +945,14 @@
 axis2_xml_schema_get_notations(void *schema,
                                 axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -661,6 +960,14 @@
 axis2_xml_schema_get_schema_types(void *schema,
                                     axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -668,6 +975,14 @@
 axis2_xml_schema_get_target_namespace(void *schema,
                                         axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -676,6 +991,14 @@
                                         axis2_env_t **env,
                                         axis2_char_t *target_namespc) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  AXIS2_FAILURE);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return AXIS2_SUCCESS;
 }
 
@@ -683,6 +1006,14 @@
 axis2_xml_schema_get_version(void *schema,
                                 axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -691,6 +1022,14 @@
                             axis2_env_t **env,
                             axis2_validation_event_handler_t *veh) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  AXIS2_FAILURE);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return AXIS2_SUCCESS;
 
 }
@@ -700,6 +1039,14 @@
                                 axis2_env_t **env,
                                 void *outstream) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  AXIS2_FAILURE);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return AXIS2_SUCCESS;
 }
 
@@ -712,8 +1059,17 @@
 
 static axis2_status_t 
 serialize_internal(void *schema,
+                    axis2_env_t **env,
                     void *writer)
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  AXIS2_FAILURE);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return AXIS2_SUCCESS;
 }
 
@@ -721,6 +1077,14 @@
 axis2_xml_schema_get_prefix_to_namespace_map(void *schema,
                                                 axis2_env_t **env) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  NULL);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return NULL;
 }
 
@@ -729,6 +1093,14 @@
                                                 axis2_env_t **env,
                                                 axis2_hash_t *map) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  AXIS2_FAILURE);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return AXIS2_SUCCESS;
 }
 
@@ -737,5 +1109,13 @@
                             axis2_env_t **env,
                             axis2_xml_schema_type_t *type) 
 {
+    axis2_xml_schema_impl_t *schema_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env,  AXIS2_FAILURE);
+    super = AXIS2_XML_SCHEMA_SUPER_OBJS(schema, env);
+    schema_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA", AXIS2_HASH_KEY_STRING));
+    
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_all.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_all.c?rev=405399&r1=405398&r2=405399&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_all.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_all.c Tue May  9 04:57:30 2006
@@ -27,6 +27,8 @@
 {
     axis2_xml_schema_all_t all;
     axis2_xml_schema_group_base_t *base;
+    axis2_xml_schema_types_t obj_type;
+    axis2_hash_t *super;
     axis2_hash_t *methods;
     axis2_xml_schema_obj_collection_t *items;
 };
@@ -34,12 +36,24 @@
 #define AXIS2_INTF_TO_IMPL(all) ((axis2_xml_schema_all_impl_t *) all)
 
 axis2_status_t AXIS2_CALL 
-axis2_xml_schema_all_free(void *all,
-                        axis2_env_t **env);
+axis2_xml_schema_all_free(
+        void *all,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_xml_schema_all_super_objs(
+        void *all,
+        axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL 
+axis2_xml_schema_all_type(
+        void *all,
+        axis2_env_t **env);
 
 axis2_xml_schema_group_base_t *AXIS2_CALL
-axis2_xml_schema_all_get_base_impl(void *all,
-                                        axis2_env_t **env);
+axis2_xml_schema_all_get_base_impl(
+        void *all,
+        axis2_env_t **env);
 
 axis2_xml_schema_obj_collection_t *AXIS2_CALL
 axis2_xml_schema_all_get_items(void *all,
@@ -56,6 +70,8 @@
                     sizeof(axis2_xml_schema_all_impl_t));
 
     all_impl->base = NULL;
+    all_impl->super = NULL;
+    all_impl->obj_type = AXIS2_XML_SCHEMA_ALL;
     all_impl->methods = NULL;
     all_impl->items = NULL;
     all_impl->all.ops = AXIS2_MALLOC((*env)->allocator, 
@@ -75,10 +91,26 @@
     }
     axis2_hash_set(all_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
             axis2_xml_schema_all_free);
+    axis2_hash_set(all_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_all_super_objs);
+    axis2_hash_set(all_impl->methods, "type", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_all_type);
     axis2_hash_set(all_impl->methods, "get_items", 
             AXIS2_HASH_KEY_STRING, axis2_xml_schema_all_get_items);
     
     all_impl->base = axis2_xml_schema_group_base_create(env);
+    
+    all_impl->super = axis2_hash_make(env);
+    if(!all_impl->super)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(all_impl->super, "AXIS2_XML_SCHEMA_GROUP_BASE", AXIS2_HASH_KEY_STRING, 
+            all_impl->base);
+    axis2_hash_set(all_impl->super, "AXIS2_XML_SCHEMA_ALL", AXIS2_HASH_KEY_STRING, 
+            &(all_impl->all));
+
     status = axis2_xml_schema_group_base_resolve_methods(
             &(all_impl->all.base), env, all_impl->base, 
             all_impl->methods);
@@ -106,6 +138,12 @@
         axis2_hash_free(all_impl->methods, env);
         all_impl->methods = NULL;
     }
+    
+    if(all_impl->super)
+    {
+        axis2_hash_free(all_impl->super, env);
+        all_impl->super = NULL;
+    }
 
     if(all_impl->base)
     {
@@ -127,16 +165,30 @@
     return AXIS2_SUCCESS;
 }
 
-axis2_xml_schema_group_base_t *AXIS2_CALL
-axis2_xml_schema_all_get_base_impl(void *all,
-                                axis2_env_t **env)
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_all_super_objs(
+        void *all,
+        axis2_env_t **env)
 {
     axis2_xml_schema_all_impl_t *all_impl = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
     all_impl = AXIS2_INTF_TO_IMPL(all);
 
-    return all_impl->base;
+    return all_impl->super;
+}
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_all_type(
+        void *all,
+        axis2_env_t **env)
+{
+    axis2_xml_schema_all_impl_t *all_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    all_impl = AXIS2_INTF_TO_IMPL(all);
+
+    return all_impl->obj_type;
 }
 
 AXIS2_DECLARE(axis2_status_t)
@@ -158,9 +210,15 @@
             sizeof(axis2_xml_schema_all_ops_t));
     all->ops->free = axis2_hash_get(methods, "free", 
             AXIS2_HASH_KEY_STRING);
-    all->ops->get_base_impl = 
-            all_impl_l->all.ops->get_base_impl;
-    all->ops->get_items = 
+    all->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    all->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+
+    all->ops->get_items = axis2_hash_get(methods, "get_items",
+            AXIS2_HASH_KEY_STRING);
+    if(!all->ops->get_items)
+            all->ops->get_items = 
             all_impl_l->all.ops->get_items;
     
     return axis2_xml_schema_group_base_resolve_methods(&(all->base), 
@@ -171,7 +229,14 @@
 axis2_xml_schema_all_get_items(void *all,
                                     axis2_env_t **env)
 {
+    axis2_xml_schema_all_impl_t *all_impl = NULL;
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(all)->items;
+    super = AXIS2_XML_SCHEMA_ALL_SUPER_OBJS(all, env);
+    all_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA_ALL", AXIS2_HASH_KEY_STRING));
+
+    return all_impl->items;
 }
 

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_annotated.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_annotated.c?rev=405399&r1=405398&r2=405399&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_annotated.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_annotated.c Tue May  9 04:57:30 2006
@@ -29,7 +29,11 @@
     axis2_xml_schema_annotated_t annotated;
     
     axis2_xml_schema_obj_t *schema_obj;
-    
+   
+    axis2_xml_schema_types_t obj_type;
+
+    axis2_hash_t *super;
+
     axis2_hash_t *methods;
     
     axis2_xml_schema_annotation_t *annotation;
@@ -45,8 +49,19 @@
 /*************** function prototypes *****************************************/
 
 axis2_status_t AXIS2_CALL 
-axis2_xml_schema_annotated_free(void *annotated,
-                        axis2_env_t **env);
+axis2_xml_schema_annotated_free(
+        void *annotated,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_xml_schema_annotated_super_objs(
+        void *annotated,
+        axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL 
+axis2_xml_schema_annotated_type(
+        void *annotated,
+        axis2_env_t **env);
 
 axis2_xml_schema_obj_t *AXIS2_CALL
 axis2_xml_schema_annotated_get_base_impl(void *annotated,
@@ -97,6 +112,8 @@
     }
     
     annotated_impl->schema_obj = NULL;
+    annotated_impl->obj_type = AXIS2_XML_SCHEMA_ANNOTATED;
+    annotated_impl->super = NULL;
     annotated_impl->methods = NULL;
     annotated_impl->id = NULL;
     annotated_impl->annotation = NULL;
@@ -115,6 +132,10 @@
     
     annotated_impl->annotated.ops->free = 
             axis2_xml_schema_annotated_free;
+    annotated_impl->annotated.ops->super_objs = 
+            axis2_xml_schema_annotated_super_objs;
+    annotated_impl->annotated.ops->type = 
+            axis2_xml_schema_annotated_type;
     annotated_impl->annotated.ops->get_base_impl = 
             axis2_xml_schema_annotated_get_base_impl;
     annotated_impl->annotated.ops->get_id = 
@@ -138,6 +159,10 @@
     }
     axis2_hash_set(annotated_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
             axis2_xml_schema_annotated_free);
+    axis2_hash_set(annotated_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_annotated_super_objs);
+    axis2_hash_set(annotated_impl->methods, "type", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_annotated_type);
     axis2_hash_set(annotated_impl->methods, "get_id", AXIS2_HASH_KEY_STRING, 
             axis2_xml_schema_annotated_get_id);
     axis2_hash_set(annotated_impl->methods, "set_id", AXIS2_HASH_KEY_STRING, 
@@ -157,6 +182,18 @@
         axis2_xml_schema_annotated_free(&(annotated_impl->annotated), env);
         return NULL;
     }
+
+    annotated_impl->super = axis2_hash_make(env);
+    if(!annotated_impl->super)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(annotated_impl->super, "AXIS2_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING, 
+           &(annotated_impl->annotated) );
+    axis2_hash_set(annotated_impl->super, "AXIS2_XML_SCHEMA_OBJ", AXIS2_HASH_KEY_STRING, 
+           annotated_impl->schema_obj );
+
     status = axis2_xml_schema_obj_resolve_methods(
             &(annotated_impl->annotated.base), env, annotated_impl->schema_obj, 
             annotated_impl->methods);
@@ -192,6 +229,12 @@
         annotated_impl->unhandled_attrs = NULL;
     }  
 
+    if(NULL != annotated_impl->super)
+    {
+        axis2_hash_free(annotated_impl->super, env);
+        annotated_impl->super = NULL;
+    }
+
     if(NULL != annotated_impl->methods)
     {
         axis2_hash_free(annotated_impl->methods, env);
@@ -220,6 +263,28 @@
     return AXIS2_SUCCESS;
 }
 
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_annotated_super_objs(
+        void *annotated,
+        axis2_env_t **env)
+{
+    axis2_xml_schema_annotated_impl_t *annotated_impl = NULL;
+    annotated_impl = AXIS2_INTF_TO_IMPL(annotated);
+
+    return annotated_impl->super;
+}
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_annotated_type(
+        void *annotated,
+        axis2_env_t **env)
+{
+    axis2_xml_schema_annotated_impl_t *annotated_impl = NULL;
+    annotated_impl = AXIS2_INTF_TO_IMPL(annotated);
+
+    return annotated_impl->obj_type;
+}
+
 axis2_xml_schema_obj_t *AXIS2_CALL
 axis2_xml_schema_annotated_get_base_impl(void *annotated,
                                 axis2_env_t **env)
@@ -254,19 +319,45 @@
     }
     annotated->ops->free = axis2_hash_get(methods, "free", 
             AXIS2_HASH_KEY_STRING);
-    annotated->ops->get_base_impl = 
-            annotated_impl_l->annotated.ops->get_base_impl;
-    annotated->ops->get_id = 
+    annotated->ops->super_objs = 
+            annotated_impl_l->annotated.ops->super_objs;
+    annotated->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+
+    annotated->ops->get_id = axis2_hash_get(methods, "get_id", 
+            AXIS2_HASH_KEY_STRING);
+    if(!annotated->ops->get_id)
+            annotated->ops->get_id = 
             annotated_impl_l->annotated.ops->get_id;
-    annotated->ops->set_id = 
+    
+    annotated->ops->set_id = axis2_hash_get(methods, "set_id", 
+            AXIS2_HASH_KEY_STRING);
+    if(!annotated->ops->set_id)
+            annotated->ops->set_id = 
             annotated_impl_l->annotated.ops->set_id;
-    annotated->ops->get_annotation = 
+
+    annotated->ops->get_annotation = axis2_hash_get(methods, "get_annotation", 
+            AXIS2_HASH_KEY_STRING);
+    if(!annotated->ops->get_annotation)
+            annotated->ops->get_annotation = 
             annotated_impl_l->annotated.ops->get_annotation;
-    annotated->ops->set_annotation = 
+    
+    annotated->ops->set_annotation = axis2_hash_get(methods, "set_annotation", 
+            AXIS2_HASH_KEY_STRING);
+    if(!annotated->ops->set_annotation)
+            annotated->ops->set_annotation = 
             annotated_impl_l->annotated.ops->set_annotation;
-    annotated->ops->get_unhandled_attrs = 
+    
+    annotated->ops->get_unhandled_attrs = axis2_hash_get(methods, 
+            "get_unhandled_attrs", AXIS2_HASH_KEY_STRING);
+    if(!annotated->ops->get_unhandled_attrs)
+            annotated->ops->get_unhandled_attrs = 
             annotated_impl_l->annotated.ops->get_unhandled_attrs;
-    annotated->ops->set_unhandled_attrs = 
+    
+    annotated->ops->set_unhandled_attrs = axis2_hash_get(methods, 
+            "set_unhandled_attrs", AXIS2_HASH_KEY_STRING);
+    if(!annotated->ops->set_unhandled_attrs)
+            annotated->ops->set_unhandled_attrs = 
             annotated_impl_l->annotated.ops->set_unhandled_attrs;
 
     return axis2_xml_schema_obj_resolve_methods(&(annotated->base), 
@@ -277,8 +368,14 @@
 axis2_xml_schema_annotated_get_id(void *annotated,
                                         axis2_env_t **env)
 {
+    axis2_xml_schema_annotated_impl_t *annotated_impl = NULL;
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(annotated)->id;
+    super = AXIS2_XML_SCHEMA_ANNOTATED_SUPER_OBJS(annotated, env);
+    annotated_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING));
+    return annotated_impl->id;
 }
 
 axis2_status_t AXIS2_CALL
@@ -287,9 +384,12 @@
                                             axis2_char_t *id)
 {
     axis2_xml_schema_annotated_impl_t *annotated_impl = NULL;
-    
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    annotated_impl = AXIS2_INTF_TO_IMPL(annotated);
+    super = AXIS2_XML_SCHEMA_ANNOTATED_SUPER_OBJS(annotated, env);
+    annotated_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING));
     if(annotated_impl->id)
     {
         AXIS2_FREE((*env)->allocator, annotated_impl->id);
@@ -304,8 +404,14 @@
 axis2_xml_schema_annotated_get_annotation(void *annotated,
                                         axis2_env_t **env)
 {
+    axis2_xml_schema_annotated_impl_t *annotated_impl = NULL;
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(annotated)->annotation;
+    super = AXIS2_XML_SCHEMA_ANNOTATED_SUPER_OBJS(annotated, env);
+    annotated_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING));
+    return annotated_impl->annotation;
 }
 
 axis2_status_t AXIS2_CALL
@@ -315,9 +421,12 @@
                                                 annotation)
 {
     axis2_xml_schema_annotated_impl_t *annotated_impl = NULL;
+    axis2_hash_t *super = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    annotated_impl = AXIS2_INTF_TO_IMPL(annotated);
+    super = AXIS2_XML_SCHEMA_ANNOTATED_SUPER_OBJS(annotated, env);
+    annotated_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING));
     if(NULL != annotated_impl->annotation)
     {
         /* TODO Free annotation */
@@ -332,8 +441,14 @@
 axis2_xml_schema_annotated_get_unhandled_attrs(void *annotated,
                                                 axis2_env_t **env)
 {
+    axis2_xml_schema_annotated_impl_t *annotated_impl = NULL;
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(annotated)->unhandled_attrs;
+    super = AXIS2_XML_SCHEMA_ANNOTATED_SUPER_OBJS(annotated, env);
+    annotated_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING));
+    return annotated_impl->unhandled_attrs;
 }
 
 axis2_status_t AXIS2_CALL
@@ -343,9 +458,12 @@
                                                     unhandled_attrs)
 {
     axis2_xml_schema_annotated_impl_t *annotated_impl = NULL;
+    axis2_hash_t *super = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    annotated_impl = AXIS2_INTF_TO_IMPL(annotated);
+    super = AXIS2_XML_SCHEMA_ANNOTATED_SUPER_OBJS(annotated, env);
+    annotated_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+        "AXIS2_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING));
     if(annotated_impl->unhandled_attrs)
     {
         /* TODO Free unhandled_attrs */



Mime
View raw message