You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2006/05/10 08:39:36 UTC

svn commit: r405653 [2/2] - in /webservices/axis2/trunk/c/modules/xml/xml_schema: ./ include/xml_schema/

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_obj.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_obj.c?rev=405653&r1=405652&r2=405653&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_obj.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_obj.c Tue May  9 23:39:32 2006
@@ -26,6 +26,8 @@
 struct axis2_xml_schema_obj_impl
 {
     axis2_xml_schema_obj_t obj;
+    axis2_xml_schema_types_t obj_type;
+    axis2_hash_t *super;
     int line_num;
     int line_pos;
     axis2_char_t *source_uri;
@@ -36,8 +38,19 @@
 /***************** function pointers ******************************************/
 
 axis2_status_t AXIS2_CALL 
-axis2_xml_schema_obj_free(void *obj,
-                axis2_env_t **env);
+axis2_xml_schema_obj_free(
+        void *obj,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_xml_schema_obj_super_objs(
+        void *obj,
+        axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL 
+axis2_xml_schema_obj_type(
+        void *obj,
+        axis2_env_t **env);
 
 axis2_char_t * AXIS2_CALL
 axis2_xml_schema_obj_get_source_uri(void *obj,
@@ -88,6 +101,8 @@
         return NULL;
     }
 
+    obj_impl->obj_type = AXIS2_XML_SCHEMA_OBJ;
+    obj_impl->super = NULL;
     obj_impl->line_num = -1;
     obj_impl->line_pos = -1;
     obj_impl->source_uri = NULL;
@@ -105,6 +120,10 @@
 
     obj_impl->obj.ops->free = 
         axis2_xml_schema_obj_free;
+    obj_impl->obj.ops->super_objs = 
+        axis2_xml_schema_obj_super_objs;
+    obj_impl->obj.ops->type = 
+        axis2_xml_schema_obj_type;
     obj_impl->obj.ops->get_line_num = 
         axis2_xml_schema_obj_get_line_num;
     obj_impl->obj.ops->set_line_num = 
@@ -119,6 +138,16 @@
         axis2_xml_schema_obj_set_source_uri;
     obj_impl->obj.ops->equals = 
         axis2_xml_schema_obj_equals;
+
+    obj_impl->super = axis2_hash_make(env);
+    if(!obj_impl->super)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(obj_impl->super, "AXIS2_XML_SCHEMA_OBJ", AXIS2_HASH_KEY_STRING, 
+            &(obj_impl->obj));
+    
     return &(obj_impl->obj);
 }
 
@@ -137,6 +166,12 @@
         obj_impl->source_uri = NULL;
     }
 
+    if(obj_impl->super)
+    {
+        axis2_hash_free(obj_impl->super, env);
+        obj_impl->super = NULL;
+    }
+
     if(NULL != obj_impl->obj.ops)
     {
         AXIS2_FREE((*env)->allocator, obj_impl->obj.ops);
@@ -151,11 +186,35 @@
     return AXIS2_SUCCESS;
 }
 
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_obj_super_objs(void *obj,
+                axis2_env_t **env)
+{
+    axis2_xml_schema_obj_impl_t *obj_impl = NULL;
+
+    obj_impl = AXIS2_INTF_TO_IMPL(obj);
+
+    return obj_impl->super;
+}
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_obj_type(
+        void *obj,
+        axis2_env_t **env)
+{
+    axis2_xml_schema_obj_impl_t *obj_impl = NULL;
+
+    obj_impl = AXIS2_INTF_TO_IMPL(obj);
+    
+    return obj_impl->obj_type;
+}
+
 AXIS2_DECLARE(axis2_status_t)
-axis2_xml_schema_obj_resolve_methods(axis2_xml_schema_obj_t *obj,
-                                        axis2_env_t **env,
-                                        axis2_xml_schema_obj_t *obj_impl,
-                                        axis2_hash_t *methods)
+axis2_xml_schema_obj_resolve_methods(
+        axis2_xml_schema_obj_t *obj,
+        axis2_env_t **env,
+        axis2_xml_schema_obj_t *obj_impl,
+        axis2_hash_t *methods)
 {    
     axis2_xml_schema_obj_impl_t *obj_impl_l = NULL;
 
@@ -175,19 +234,49 @@
             
     obj->ops->free = axis2_hash_get(methods, "free", 
             AXIS2_HASH_KEY_STRING);
+            
+    obj->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+            
+    obj->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
 
-    obj->ops->get_line_num = 
+    obj->ops->get_line_num = axis2_hash_get(methods,
+            "get_line_num", AXIS2_HASH_KEY_STRING);
+    if(!obj->ops->get_line_num)
+            obj->ops->get_line_num = 
             obj_impl_l->obj.ops->get_line_num;
-    obj->ops->set_line_num = 
+    
+    obj->ops->set_line_num = axis2_hash_get(methods,
+            "set_line_num", AXIS2_HASH_KEY_STRING);
+    if(!obj->ops->set_line_num)
+            obj->ops->set_line_num = 
             obj_impl_l->obj.ops->set_line_num; 
-    obj->ops->get_line_pos = 
+    
+    obj->ops->get_line_pos = axis2_hash_get(methods,
+            "get_line_pos", AXIS2_HASH_KEY_STRING);
+    if(!obj->ops->get_line_pos)
+            obj->ops->get_line_pos = 
             obj_impl_l->obj.ops->get_line_pos;
-    obj->ops->set_line_pos = 
+    
+    obj->ops->set_line_pos = axis2_hash_get(methods,
+            "set_line_pos", AXIS2_HASH_KEY_STRING);
+    if(!obj->ops->set_line_pos)
+            obj->ops->set_line_pos = 
             obj_impl_l->obj.ops->set_line_pos; 
-    obj->ops->get_source_uri = 
+    
+    obj->ops->get_source_uri = axis2_hash_get(methods,
+            "get_source_uri", AXIS2_HASH_KEY_STRING);
+    if(!obj->ops->get_source_uri)
+            obj->ops->get_source_uri = 
             obj_impl_l->obj.ops->get_source_uri;
-    obj->ops->set_source_uri = 
+    
+    obj->ops->set_source_uri = axis2_hash_get(methods,
+            "set_source_uri", AXIS2_HASH_KEY_STRING);
+    if(!obj->ops->set_source_uri)
+            obj->ops->set_source_uri = 
             obj_impl_l->obj.ops->set_source_uri; 
+    
     obj->ops->equals = obj_impl_l->obj.ops->equals;
     
     return AXIS2_SUCCESS;    
@@ -198,8 +287,12 @@
                                     axis2_env_t **env)
 {
     axis2_xml_schema_obj_impl_t *obj_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    super = AXIS2_XML_SCHEMA_OBJ_SUPER_OBJS(obj, env);
+    obj_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, "AXIS2_XML_SCHEMA_OBJ", 
+                AXIS2_HASH_KEY_STRING));
     
-    obj_impl = AXIS2_INTF_TO_IMPL(obj);
     return obj_impl->line_num;
 }
 
@@ -209,8 +302,11 @@
                         int line_num)
 {
     axis2_xml_schema_obj_impl_t *obj_impl = NULL;
+    axis2_hash_t *super = NULL;
 
-    obj_impl = AXIS2_INTF_TO_IMPL(obj);
+    super = AXIS2_XML_SCHEMA_OBJ_SUPER_OBJS(obj, env);
+    obj_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, "AXIS2_XML_SCHEMA_OBJ", 
+                AXIS2_HASH_KEY_STRING));
 
     obj_impl->line_num = line_num;
 
@@ -222,8 +318,11 @@
                                     axis2_env_t **env)
 {
     axis2_xml_schema_obj_impl_t *obj_impl = NULL;
+    axis2_hash_t *super = NULL;
     
-    obj_impl = AXIS2_INTF_TO_IMPL(obj);
+    super = AXIS2_XML_SCHEMA_OBJ_SUPER_OBJS(obj, env);
+    obj_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, "AXIS2_XML_SCHEMA_OBJ", 
+                AXIS2_HASH_KEY_STRING));
     return obj_impl->line_pos;
 }
 
@@ -233,8 +332,11 @@
                         int line_pos)
 {
     axis2_xml_schema_obj_impl_t *obj_impl = NULL;
+    axis2_hash_t *super = NULL;
 
-    obj_impl = AXIS2_INTF_TO_IMPL(obj);
+    super = AXIS2_XML_SCHEMA_OBJ_SUPER_OBJS(obj, env);
+    obj_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, "AXIS2_XML_SCHEMA_OBJ", 
+                AXIS2_HASH_KEY_STRING));
 
     obj_impl->line_pos = line_pos;
 
@@ -246,8 +348,8 @@
                                     axis2_env_t **env)
 {
     axis2_xml_schema_obj_impl_t *obj_impl = NULL;
+    axis2_hash_t *super = NULL;
     
-    obj_impl = AXIS2_INTF_TO_IMPL(obj);
     return obj_impl->source_uri;
 }
 
@@ -257,8 +359,11 @@
                         axis2_char_t *source_uri)
 {
     axis2_xml_schema_obj_impl_t *obj_impl = NULL;
+    axis2_hash_t *super = NULL;
 
-    obj_impl = AXIS2_INTF_TO_IMPL(obj);
+    super = AXIS2_XML_SCHEMA_OBJ_SUPER_OBJS(obj, env);
+    obj_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, "AXIS2_XML_SCHEMA_OBJ", 
+                AXIS2_HASH_KEY_STRING));
 
     if(NULL != obj_impl->source_uri)
     {
@@ -276,8 +381,11 @@
                                 void *obj_comp)
 {
     axis2_xml_schema_obj_impl_t *obj_impl = NULL;
+    axis2_hash_t *super = NULL;
 
-    obj_impl = AXIS2_INTF_TO_IMPL(obj);
+    super = AXIS2_XML_SCHEMA_OBJ_SUPER_OBJS(obj, env);
+    obj_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, "AXIS2_XML_SCHEMA_OBJ", 
+                AXIS2_HASH_KEY_STRING));
 
     return AXIS2_TRUE;
 }

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_obj_collection.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_obj_collection.c?rev=405653&r1=405652&r2=405653&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_obj_collection.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_obj_collection.c Tue May  9 23:39:32 2006
@@ -36,8 +36,9 @@
 /**************************** end function prototypes ************************/ 
 
 axis2_status_t AXIS2_CALL 
-axis2_xml_schema_obj_collection_free(axis2_xml_schema_obj_collection_t *obj_collection,
-                axis2_env_t **env);
+axis2_xml_schema_obj_collection_free(
+        axis2_xml_schema_obj_collection_t *obj_collection,
+        axis2_env_t **env);
 
 int AXIS2_CALL
 axis2_xml_schema_obj_collection_get_count(axis2_xml_schema_obj_collection_t *obj_collection,

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_particle.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_particle.c?rev=405653&r1=405652&r2=405653&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_particle.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_particle.c Tue May  9 23:39:32 2006
@@ -26,19 +26,15 @@
 struct axis2_xml_schema_particle_impl
 {
     axis2_xml_schema_particle_t particle;
-    
     axis2_xml_schema_annotated_t *annotated;
-    
+    axis2_xml_schema_types_t obj_type;
+    axis2_hash_t *super;
+    axis2_hash_t *methods;
     long max_occurs;
-    
     axis2_char_t *max_occurs_string;
-    
     long min_occurs;
-    
     axis2_char_t *min_occurs_string;
     
-    axis2_hash_t *methods;
-    
 };
 
 #define AXIS2_INTF_TO_IMPL(particle) \
@@ -47,8 +43,19 @@
 /*************** function prototypes *****************************************/
 
 axis2_status_t AXIS2_CALL 
-axis2_xml_schema_particle_free(void *particle,
-                        axis2_env_t **env);
+axis2_xml_schema_particle_free(
+        void *particle,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_xml_schema_particle_super_objs(
+        void *particle,
+        axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL 
+axis2_xml_schema_particle_type(
+        void *particle,
+        axis2_env_t **env);
 
 axis2_xml_schema_annotated_t *AXIS2_CALL
 axis2_xml_schema_particle_get_base_impl(void *particle,
@@ -90,6 +97,8 @@
         return NULL;
     }
     particle_impl->annotated = NULL;
+    particle_impl->obj_type = AXIS2_XML_SCHEMA_PARTICLE;
+    particle_impl->super = NULL;
     particle_impl->particle.ops = NULL;
     particle_impl->particle.base.ops = NULL;
     particle_impl->methods = NULL;
@@ -109,6 +118,10 @@
     
     particle_impl->particle.ops->free = 
             axis2_xml_schema_particle_free;
+    particle_impl->particle.ops->super_objs = 
+            axis2_xml_schema_particle_super_objs;
+    particle_impl->particle.ops->type = 
+            axis2_xml_schema_particle_type;
     particle_impl->particle.ops->get_base_impl = 
             axis2_xml_schema_particle_get_base_impl;
     particle_impl->particle.ops->get_max_occurs = 
@@ -129,6 +142,10 @@
     }
     axis2_hash_set(particle_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
             axis2_xml_schema_particle_free);
+    axis2_hash_set(particle_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_particle_super_objs);
+    axis2_hash_set(particle_impl->methods, "type", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_particle_type);
     axis2_hash_set(particle_impl->methods, "get_max_occurs", 
             AXIS2_HASH_KEY_STRING, axis2_xml_schema_particle_get_max_occurs);
     axis2_hash_set(particle_impl->methods, "set_max_occurs", 
@@ -144,6 +161,19 @@
         axis2_xml_schema_particle_free(&(particle_impl->particle), env);
         return NULL;        
     }
+
+    particle_impl->super = axis2_hash_make(env);
+    if(!particle_impl->super)
+    {
+        axis2_xml_schema_particle_free(&(particle_impl->particle), env);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(particle_impl->super, "AXIS2_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING, 
+            &(particle_impl->particle));
+    axis2_hash_set(particle_impl->super, "AXIS2_XML_SCHEMA_ANNOTATED", AXIS2_HASH_KEY_STRING, 
+            &(particle_impl->annotated));
+
     status = axis2_xml_schema_annotated_resolve_methods(
             &(particle_impl->particle.base), env, particle_impl->annotated, 
             particle_impl->methods);
@@ -160,6 +190,12 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     particle_impl = AXIS2_INTF_TO_IMPL(particle);
 
+    if(NULL != particle_impl->super)
+    {
+        axis2_hash_free(particle_impl->super, env);
+        particle_impl->super = NULL;
+    }
+    
     if(NULL != particle_impl->methods)
     {
         axis2_hash_free(particle_impl->methods, env);
@@ -191,6 +227,30 @@
     return AXIS2_SUCCESS;
 }
 
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_particle_super_objs(void *particle,
+                                axis2_env_t **env)
+{
+    axis2_xml_schema_particle_impl_t *particle_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    particle_impl = AXIS2_INTF_TO_IMPL(particle);
+
+    return particle_impl->super;
+}
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_particle_type(void *particle,
+                                axis2_env_t **env)
+{
+    axis2_xml_schema_particle_impl_t *particle_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    particle_impl = AXIS2_INTF_TO_IMPL(particle);
+
+    return particle_impl->obj_type;
+}
+
 axis2_xml_schema_annotated_t *AXIS2_CALL
 axis2_xml_schema_particle_get_base_impl(void *particle,
                                 axis2_env_t **env)
@@ -228,15 +288,33 @@
     
     particle->ops->free = axis2_hash_get(methods, "free", 
             AXIS2_HASH_KEY_STRING);
-    particle->ops->get_base_impl = 
-            particle_impl_l->particle.ops->get_base_impl;
-    particle->ops->get_max_occurs = 
+    particle->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    particle->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+
+    particle->ops->get_max_occurs = axis2_hash_get(methods, "get_max_occurs", 
+            AXIS2_HASH_KEY_STRING);
+    if(!particle->ops->get_max_occurs)
+            particle->ops->get_max_occurs = 
             particle_impl_l->particle.ops->get_max_occurs;
-    particle->ops->set_max_occurs = 
+    
+    particle->ops->set_max_occurs = axis2_hash_get(methods, "set_max_occurs", 
+            AXIS2_HASH_KEY_STRING);
+    if(!particle->ops->set_max_occurs)
+            particle->ops->set_max_occurs = 
             particle_impl_l->particle.ops->set_max_occurs;
-    particle->ops->get_min_occurs = 
+    
+    particle->ops->get_min_occurs = axis2_hash_get(methods, "get_min_occurs", 
+            AXIS2_HASH_KEY_STRING);
+    if(!particle->ops->get_min_occurs)
+            particle->ops->get_min_occurs = 
             particle_impl_l->particle.ops->get_min_occurs;
-    particle->ops->set_min_occurs = 
+    
+    particle->ops->set_min_occurs = axis2_hash_get(methods, "set_min_occurs", 
+            AXIS2_HASH_KEY_STRING);
+    if(!particle->ops->set_min_occurs)
+            particle->ops->set_min_occurs = 
             particle_impl_l->particle.ops->set_min_occurs;
     
     return axis2_xml_schema_annotated_resolve_methods(&(particle->base), 
@@ -247,8 +325,15 @@
 axis2_xml_schema_particle_get_max_occurs(void *particle,
                                             axis2_env_t **env)
 {
+    axis2_xml_schema_particle_impl_t *particle_impl = NULL;
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(particle)->max_occurs;
+    super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
+    particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING));
+
+    return particle_impl->max_occurs;
 }
 
 axis2_status_t AXIS2_CALL
@@ -256,8 +341,15 @@
                                             axis2_env_t **env,
                                             long max_occurs)
 {
+    axis2_xml_schema_particle_impl_t *particle_impl = NULL;
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(particle)->max_occurs = max_occurs;
+    super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
+    particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING));
+
+    particle_impl->max_occurs = max_occurs;
     return AXIS2_SUCCESS;
 }
 
@@ -265,8 +357,15 @@
 axis2_xml_schema_particle_get_min_occurs(void *particle,
                                             axis2_env_t **env)
 {
+    axis2_xml_schema_particle_impl_t *particle_impl = NULL;
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(particle)->min_occurs;
+    super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
+    particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING));
+
+    return particle_impl->min_occurs;
 }
 
 axis2_status_t AXIS2_CALL
@@ -274,8 +373,15 @@
                                             axis2_env_t **env,
                                             long min_occurs)
 {
+    axis2_xml_schema_particle_impl_t *particle_impl = NULL;
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(particle)->min_occurs = min_occurs;
+    super = AXIS2_XML_SCHEMA_PARTICLE_SUPER_OBJS(particle, env);
+    particle_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_XML_SCHEMA_PARTICLE", AXIS2_HASH_KEY_STRING));
+
+    particle_impl->min_occurs = min_occurs;
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_use.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_use.c?rev=405653&r1=405652&r2=405653&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_use.c (original)
+++ webservices/axis2/trunk/c/modules/xml/xml_schema/xml_schema_use.c Tue May  9 23:39:32 2006
@@ -26,6 +26,8 @@
 {
     axis2_xml_schema_use_t use;
     axis2_xml_schema_enum_t *schema_enum;
+    axis2_xml_schema_types_t obj_type; 
+    axis2_hash_t *super;
     axis2_hash_t *methods;
     axis2_array_list_t *members;
 };
@@ -36,6 +38,16 @@
 axis2_xml_schema_use_free(void *use,
                         axis2_env_t **env);
 
+axis2_hash_t *AXIS2_CALL 
+axis2_xml_schema_use_super_objs(
+        void *use,
+        axis2_env_t **env);
+
+axis2_xml_schema_types_t AXIS2_CALL 
+axis2_xml_schema_use_type(
+        void *use,
+        axis2_env_t **env);
+
 axis2_xml_schema_enum_t *AXIS2_CALL
 axis2_xml_schema_use_get_base_impl(void *use,
                                 axis2_env_t **env);
@@ -68,6 +80,8 @@
     }                    
 
     use_impl->schema_enum = NULL;
+    use_impl->obj_type = AXIS2_XML_SCHEMA_USE;
+    use_impl->super = NULL;
     use_impl->methods = NULL;
     use_impl->members = NULL;
     use_impl->use.ops = AXIS2_MALLOC((*env)->allocator, 
@@ -80,6 +94,8 @@
         return NULL;
     }
     use_impl->use.ops->free = axis2_xml_schema_use_free;
+    use_impl->use.ops->super_objs = axis2_xml_schema_use_super_objs;
+    use_impl->use.ops->type = axis2_xml_schema_use_type;
     use_impl->use.ops->get_base_impl = axis2_xml_schema_use_get_base_impl;
     use_impl->use.ops->get_values = 
             axis2_xml_schema_use_get_values;
@@ -101,11 +117,29 @@
     axis2_hash_set(use_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
             axis2_xml_schema_use_free);
 
+    axis2_hash_set(use_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_use_super_objs);
+
+    axis2_hash_set(use_impl->methods, "type", AXIS2_HASH_KEY_STRING, 
+            axis2_xml_schema_use_type);
+
     axis2_hash_set(use_impl->methods, "get_values", AXIS2_HASH_KEY_STRING, 
             axis2_xml_schema_use_get_values);
 
     use_impl->schema_enum = axis2_xml_schema_enum_create(env, value);
 
+    use_impl->super = axis2_hash_make(env);
+    if(!use_impl->super)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(use_impl->super, "AXIS2_XML_SCHEMA_USE", AXIS2_HASH_KEY_STRING, 
+            &(use_impl->use));
+    axis2_hash_set(use_impl->super, "AXIS2_XML_SCHEMA_ENUM", AXIS2_HASH_KEY_STRING, 
+            use_impl->schema_enum);
+
+
     status = axis2_xml_schema_enum_resolve_methods(
             &(use_impl->use.base), env, use_impl->schema_enum, 
             use_impl->methods); 
@@ -147,6 +181,18 @@
         use_impl->schema_enum = NULL;
     }
     
+    if(NULL != use_impl->super)
+    {
+        axis2_hash_free(use_impl->super, env);
+        use_impl->super = NULL;
+    }
+    
+    if(NULL != use_impl->methods)
+    {
+        axis2_hash_free(use_impl->methods, env);
+        use_impl->methods = NULL;
+    }
+
     if((&(use_impl->use))->ops)
     {
         AXIS2_FREE((*env)->allocator, (&(use_impl->use))->ops);
@@ -161,6 +207,32 @@
     return AXIS2_SUCCESS;
 }
 
+axis2_hash_t *AXIS2_CALL
+axis2_xml_schema_use_super_objs(
+        void *use,
+        axis2_env_t **env)
+{
+    axis2_xml_schema_use_impl_t *use_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    use_impl = AXIS2_INTF_TO_IMPL(use);
+
+    return use_impl->super;
+}
+
+axis2_xml_schema_types_t AXIS2_CALL
+axis2_xml_schema_use_type(
+        void *use,
+        axis2_env_t **env)
+{
+    axis2_xml_schema_use_impl_t *use_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    use_impl = AXIS2_INTF_TO_IMPL(use);
+
+    return use_impl->obj_type;
+}
+
 axis2_xml_schema_enum_t *AXIS2_CALL
 axis2_xml_schema_use_get_base_impl(void *use,
                                 axis2_env_t **env)
@@ -175,10 +247,10 @@
 
 AXIS2_DECLARE(axis2_status_t)
 axis2_xml_schema_use_resolve_methods(
-                                axis2_xml_schema_use_t *use,
-                                axis2_env_t **env,
-                                axis2_xml_schema_use_t *use_impl,
-                                axis2_hash_t *methods)
+       axis2_xml_schema_use_t *use,
+       axis2_env_t **env,
+       axis2_xml_schema_use_t *use_impl,
+       axis2_hash_t *methods)
 {
     axis2_xml_schema_use_impl_t *use_impl_l = NULL;
 
@@ -198,9 +270,15 @@
     }
     use->ops->free = axis2_hash_get(methods, "free", 
             AXIS2_HASH_KEY_STRING);
-    use->ops->get_base_impl = 
-            use_impl_l->use.ops->get_base_impl;
-    use->ops->get_values = 
+    use->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    use->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    use->ops->get_values = axis2_hash_get(methods, "get_values", 
+            AXIS2_HASH_KEY_STRING);
+    if(!use->ops->get_values)
+            use->ops->get_values = 
             use_impl_l->use.ops->get_values;
     
     return axis2_xml_schema_enum_resolve_methods(&(use->base), 
@@ -211,6 +289,12 @@
 axis2_xml_schema_use_get_values(void *use,
                                         axis2_env_t **env)
 {
-    return AXIS2_INTF_TO_IMPL(use)->members;
+    axis2_xml_schema_use_impl_t *use_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    super = AXIS2_XML_SCHEMA_USE_SUPER_OBJS(use, env);
+    use_impl = AXIS2_INTF_TO_IMPL(axis2_hash_get(super, "AXIS2_XML_SCHEMA_USE",
+                AXIS2_HASH_KEY_STRING));
+    return use_impl->members;
 }