axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r406516 [3/8] - in /webservices/axis2/trunk/c/modules/wsdl/woden: include/woden/ include/woden/wsdl20/ include/woden/wsdl20/extensions/ include/woden/wsdl20/xml/ src/wsdl20/ src/wsdl20/extensions/ src/wsdl20/xml/
Date Mon, 15 May 2006 03:32:56 GMT
Added: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/binding.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/binding.c?rev=406516&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/binding.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/binding.c Sun May 14 20:32:53 2006
@@ -0,0 +1,1048 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/axis2_woden_wsdl_obj.h>
+#include <woden/wsdl20/axis2_woden_binding.h>
+#include <woden/wsdl20/extensions/axis2_woden_ext_element.h>
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
+#include <woden/xml/axis2_woden_xml_attr.h>
+#include <woden/wsdl20/xml/axis2_woden_documentation_element.h>
+#include <woden/wsdl20/axis2_woden_binding_fault.h>
+
+typedef struct axis2_woden_binding_impl axis2_woden_binding_impl_t;
+
+/** 
+ * @brief Binding Struct Impl
+ *	Axis2 Binding  
+ */ 
+struct axis2_woden_binding_impl
+{
+    axis2_woden_binding_t binding;
+    axis2_woden_configurable_t *configurable;
+    axis2_woden_obj_types_t obj_type;
+    axis2_hash_t *super;
+    axis2_hash_t *methods;
+    axis2_array_list_t *f_extended_bindings;
+    axis2_qname_t *f_qname;
+    axis2_array_list_t *f_extends_qnames;
+    axis2_array_list_t *f_style_default;
+    axis2_array_list_t *f_binding_fault_elements;
+    axis2_array_list_t *f_binding_op_elements;
+};
+
+#define INTF_TO_IMPL(binding) ((axis2_woden_binding_impl_t *) binding)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_binding_free(
+        void *binding,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_binding_super_objs(
+        void *binding,
+        axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL 
+axis2_woden_binding_type(
+        void *binding,
+        axis2_env_t **env);
+
+axis2_woden_configurable_t *AXIS2_CALL
+axis2_woden_binding_get_base_impl(
+        void *binding,
+        axis2_env_t **env);
+
+/* ************************************************************
+ *  Binding binding methods (the WSDL Component model)
+ * ************************************************************/
+axis2_qname_t *AXIS2_CALL
+axis2_woden_binding_get_qname(
+        void *binding,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_extended_bindings(
+        void *binding,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_binding_faults(
+        void *binding,
+        axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_binding_get_binding_fault(
+        void *binding,
+        axis2_env_t **env,
+        axis2_qname_t *qname);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_binding_ops(
+        void *binding,
+        axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_binding_to_element(
+        void *binding,
+        axis2_env_t **env);
+
+/* ************************************************************
+ *  BindingElement binding methods (the XML Element model)
+ * ************************************************************/
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_set_qname(
+        void *binding,
+        axis2_env_t **env,
+        axis2_qname_t *qname);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_add_style_default_uri(
+        void *binding,
+        axis2_env_t **env,
+        axis2_url_t *uri);
+
+void *AXIS2_CALL
+axis2_woden_binding_get_style_default(
+        void *binding,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_add_extended_qname(
+        void *binding,
+        axis2_env_t **env,
+        axis2_woden_wsdl_element_t *qname);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_extends_qnames(
+        void *binding,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_add_binding_fault_element(
+        void *binding,
+        axis2_env_t **env,
+        void *fault);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_binding_fault_elements(
+        void *binding,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_add_binding_op_element(
+        void *binding,
+        axis2_env_t **env,
+        void *op);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_binding_op_elements(
+        void *binding,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_add_extended_binding(
+        void *binding,
+        axis2_env_t **env,
+        void *extended_binding);
+
+
+static axis2_woden_binding_t *
+create(axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_binding_t *)
+axis2_woden_binding_to_binding_element(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!binding)
+    {
+        binding_impl = (axis2_woden_binding_impl_t *) create(env);
+    }
+    else
+        binding_impl = (axis2_woden_binding_impl_t *) binding;
+
+    binding_impl->binding.base.binding_element.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_binding_element_ops_t));
+    axis2_woden_binding_element_resolve_methods(&(binding_impl->binding.base.
+            binding_element), env, binding_impl->methods);
+    return binding;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_to_binding_element_free(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_impl = INTF_TO_IMPL(binding);
+
+    if(binding_impl->binding.base.binding_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_impl->binding.base.
+                binding_element.ops);
+        binding_impl->binding.base.binding_element.ops = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_DECLARE(axis2_woden_binding_t *)
+axis2_woden_binding_to_configurable_element(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!binding)
+    {
+        binding_impl = (axis2_woden_binding_impl_t *) create(env);
+    }
+    else
+        binding_impl = (axis2_woden_binding_impl_t *) binding;
+
+    binding_impl->binding.base.binding_element.base.configurable_element.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_configurable_element_ops_t));
+    axis2_woden_configurable_element_resolve_methods(&(binding_impl->binding.base.
+            binding_element.base.configurable_element), env, binding_impl->methods);
+    return binding;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_to_configurable_element_free(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_impl = INTF_TO_IMPL(binding);
+
+    if(binding_impl->binding.base.binding_element.base.configurable_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_impl->binding.base.
+                binding_element.base.configurable_element.ops);
+        binding_impl->binding.base.binding_element.base.configurable_element.ops = 
+            NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_DECLARE(axis2_woden_binding_t *)
+axis2_woden_binding_to_documentable_element(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!binding)
+    {
+        binding_impl = (axis2_woden_binding_impl_t *) create(env);
+    }
+    else
+        binding_impl = (axis2_woden_binding_impl_t *) binding;
+
+    binding_impl->binding.base.binding_element.base.documentable_element.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_documentable_element_ops_t));
+    axis2_woden_documentable_element_resolve_methods(&(binding_impl->binding.base.
+            binding_element.base.documentable_element), env, 
+            binding_impl->methods);
+    return binding;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_to_documentable_element_free(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_impl = INTF_TO_IMPL(binding);
+
+    if(binding_impl->binding.base.binding_element.base.documentable_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_impl->binding.base.
+                binding_element.base.documentable_element.ops);
+        binding_impl->binding.base.binding_element.base.documentable_element.ops = 
+            NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_DECLARE(axis2_woden_binding_t *)
+axis2_woden_binding_to_configurable(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!binding)
+    {
+        binding_impl = (axis2_woden_binding_impl_t *) create(env);
+    }
+    else
+        binding_impl = (axis2_woden_binding_impl_t *) binding;
+
+    binding_impl->binding.base.configurable.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_configurable_ops_t));
+    axis2_woden_configurable_resolve_methods(&(binding_impl->binding.base.
+            configurable), env, binding_impl->configurable, 
+            binding_impl->methods);
+    return binding;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_to_configurable_free(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_impl = INTF_TO_IMPL(binding);
+
+    if(binding_impl->binding.base.configurable.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_impl->binding.base.
+                configurable.ops);
+        binding_impl->binding.base.configurable.ops = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_binding_t *
+create(axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_binding_impl_t));
+
+    binding_impl->obj_type= AXIS2_WODEN_BINDING;
+    binding_impl->super = NULL;
+    binding_impl->methods = NULL;
+    binding_impl->f_qname = NULL;
+    binding_impl->f_extended_bindings = NULL;
+    binding_impl->f_extends_qnames = NULL;
+    binding_impl->f_style_default = NULL;
+    binding_impl->f_binding_fault_elements = NULL;
+    binding_impl->f_binding_op_elements = NULL;
+    
+    binding_impl->binding.base.binding_element.ops = NULL;
+    binding_impl->binding.base.binding_element.base.documentable_element.ops = NULL;
+    binding_impl->binding.base.binding_element.base.configurable_element.ops = NULL;
+    binding_impl->binding.base.configurable.ops = NULL;
+    
+    binding_impl->binding.ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_binding_ops_t));
+
+    binding_impl->binding.ops->free = axis2_woden_binding_free;
+    binding_impl->binding.ops->super_objs = axis2_woden_binding_super_objs;
+    binding_impl->binding.ops->type = axis2_woden_binding_type;
+    binding_impl->binding.ops->get_base_impl = axis2_woden_binding_get_base_impl;
+    
+    binding_impl->binding.ops->get_qname = axis2_woden_binding_get_qname;
+    binding_impl->binding.ops->get_extended_bindings = 
+        axis2_woden_binding_get_extended_bindings;
+    binding_impl->binding.ops->get_binding_faults = 
+        axis2_woden_binding_get_binding_faults;
+    binding_impl->binding.ops->get_binding_fault = 
+        axis2_woden_binding_get_binding_fault;
+    binding_impl->binding.ops->get_binding_ops = 
+        axis2_woden_binding_get_binding_ops;
+    binding_impl->binding.ops->to_element = 
+        axis2_woden_binding_to_element;
+ 
+    binding_impl->methods = axis2_hash_make(env);
+    if(!binding_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_free);
+    axis2_hash_set(binding_impl->methods, "to_binding_element_free", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_to_binding_element_free);
+    axis2_hash_set(binding_impl->methods, "to_configurable_element_free", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_to_configurable_element_free);
+    axis2_hash_set(binding_impl->methods, "to_documentable_element_free", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_to_documentable_element_free);
+    axis2_hash_set(binding_impl->methods, "to_configurable_free", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_to_configurable_free);
+    axis2_hash_set(binding_impl->methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_binding_super_objs);
+    axis2_hash_set(binding_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_binding_type);
+
+    axis2_hash_set(binding_impl->methods, "get_qname", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_get_qname);
+    axis2_hash_set(binding_impl->methods, "get_extended_bindings", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_get_extended_bindings);
+    axis2_hash_set(binding_impl->methods, "get_binding_faults", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_get_binding_faults);
+    axis2_hash_set(binding_impl->methods, "get_binding_fault", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_get_binding_fault);
+    axis2_hash_set(binding_impl->methods, "get_binding_ops", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_get_binding_ops);
+    axis2_hash_set(binding_impl->methods, "to_element", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_to_element);
+    axis2_hash_set(binding_impl->methods, "set_qname", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_set_qname);
+    axis2_hash_set(binding_impl->methods, "add_style_default_uri", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_add_style_default_uri);
+    axis2_hash_set(binding_impl->methods, "get_style_default", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_get_style_default);
+    axis2_hash_set(binding_impl->methods, "add_extends_qnames", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_get_extends_qnames);
+    axis2_hash_set(binding_impl->methods, "get_extends_qnames", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_get_extends_qnames);
+    axis2_hash_set(binding_impl->methods, "add_binding_fault_element", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_add_binding_fault_element);
+    axis2_hash_set(binding_impl->methods, "get_binding_fault_elements", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_get_binding_fault_elements);
+    axis2_hash_set(binding_impl->methods, "add_binding_op_element", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_add_binding_op_element);
+    axis2_hash_set(binding_impl->methods, "get_binding_op_elements", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_get_binding_op_elements);
+    axis2_hash_set(binding_impl->methods, "add_extended_binding", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_binding_add_extended_binding);
+
+    return &(binding_impl->binding);
+}
+
+AXIS2_DECLARE(axis2_woden_binding_t *)
+axis2_woden_binding_create(axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_impl = (axis2_woden_binding_impl_t *) create(env);
+
+    binding_impl->configurable = axis2_woden_configurable_create(env);
+
+    binding_impl->super = axis2_hash_make(env);
+    if(!binding_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_impl->super, "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING, 
+            &(binding_impl->binding));
+    axis2_hash_set(binding_impl->super, "AXIS2_WODEN_CONFIGURABLE", AXIS2_HASH_KEY_STRING, 
+            binding_impl->configurable);
+ 
+    return &(binding_impl->binding);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_free(void *binding,
+                        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_impl = INTF_TO_IMPL(binding);
+
+    if(binding_impl->f_extended_bindings)
+    {
+        AXIS2_ARRAY_LIST_FREE(binding_impl->f_extended_bindings, env);
+        binding_impl->f_extended_bindings = NULL;
+    }
+
+    if(binding_impl->f_qname)
+    {
+        AXIS2_QNAME_FREE(binding_impl->f_qname, env);
+        binding_impl->f_qname = NULL;
+    }
+
+    if(binding_impl->f_extends_qnames)
+    {
+        AXIS2_ARRAY_LIST_FREE(binding_impl->f_extends_qnames, env);
+        binding_impl->f_extends_qnames = NULL;
+    }
+
+    if(binding_impl->f_style_default)
+    {
+        AXIS2_ARRAY_LIST_FREE(binding_impl->f_style_default, env);
+        binding_impl->f_style_default = NULL;
+    }
+
+    if(binding_impl->f_binding_fault_elements)
+    {
+        AXIS2_ARRAY_LIST_FREE(binding_impl->f_binding_fault_elements, env);
+        binding_impl->f_binding_fault_elements = NULL;
+    }
+
+    if(binding_impl->f_binding_op_elements)
+    {
+        AXIS2_ARRAY_LIST_FREE(binding_impl->f_binding_op_elements, env);
+        binding_impl->f_binding_op_elements = NULL;
+    }
+   
+    if(binding_impl->super)
+    {
+        axis2_hash_free(binding_impl->super, env);
+        binding_impl->super = NULL;
+    }
+    
+    if(binding_impl->methods)
+    {
+        axis2_hash_free(binding_impl->methods, env);
+        binding_impl->methods = NULL;
+    }
+
+    if(binding_impl->configurable)
+    {
+        AXIS2_WODEN_CONFIGURABLE_FREE(binding_impl->configurable, env);
+        binding_impl->configurable = NULL;
+    }
+
+    if(binding_impl->binding.base.binding_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_impl->binding.base.
+                binding_element.ops);
+        binding_impl->binding.base.binding_element.ops = NULL;
+    }
+
+    if(binding_impl->binding.base.binding_element.base.configurable_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_impl->binding.base.
+                binding_element.base.configurable_element.ops);
+        binding_impl->binding.base.binding_element.base.configurable_element.ops = 
+            NULL;
+    }
+    
+    if(binding_impl->binding.base.binding_element.base.documentable_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_impl->binding.base.
+                binding_element.base.documentable_element.ops);
+        binding_impl->binding.base.binding_element.base.documentable_element.ops = 
+            NULL;
+    }
+    
+    if(binding_impl->binding.base.configurable.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_impl->binding.base.
+                configurable.ops);
+        binding_impl->binding.base.configurable.ops = 
+            NULL;
+    }
+    
+    if((&(binding_impl->binding))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(binding_impl->binding))->ops);
+        (&(binding_impl->binding))->ops = NULL;
+    }
+    
+    if(binding_impl)
+    {
+        AXIS2_FREE((*env)->allocator, binding_impl);
+        binding_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_binding_super_objs(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_impl = INTF_TO_IMPL(binding);
+
+    return binding_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_binding_type(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_impl = INTF_TO_IMPL(binding);
+
+    return binding_impl->obj_type;
+}
+
+axis2_woden_configurable_t *AXIS2_CALL
+axis2_woden_binding_get_base_impl(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    binding_impl = INTF_TO_IMPL(binding);
+
+    return binding_impl->configurable;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_resolve_methods(
+        axis2_woden_binding_t *binding,
+        axis2_env_t **env,
+        axis2_woden_binding_t *binding_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_binding_impl_t *binding_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    binding_impl_l = INTF_TO_IMPL(binding_impl);
+    
+    binding->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    binding->ops->to_binding_free = axis2_hash_get(methods, "to_binding_free", 
+            AXIS2_HASH_KEY_STRING);
+    binding->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    binding->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    binding->ops->get_qname = axis2_hash_get(methods, 
+            "get_qname", AXIS2_HASH_KEY_STRING);
+    if(!binding->ops->get_qname && binding_impl_l)
+            binding->ops->get_qname = 
+            binding_impl_l->binding.ops->get_qname;
+    
+    binding->ops->get_extended_bindings = axis2_hash_get(methods, 
+            "get_extended_bindings", AXIS2_HASH_KEY_STRING);
+    if(!binding->ops->get_extended_bindings && binding_impl_l)
+            binding->ops->get_extended_bindings = 
+            binding_impl_l->binding.ops->get_extended_bindings;
+    
+    binding->ops->get_binding_faults = axis2_hash_get(methods, 
+            "get_binding_faults", AXIS2_HASH_KEY_STRING);
+    if(!binding->ops->get_binding_faults && binding_impl_l)
+            binding->ops->get_binding_faults = 
+            binding_impl_l->binding.ops->get_binding_faults;
+
+    binding->ops->get_binding_fault = axis2_hash_get(methods, 
+            "get_binding_fault", AXIS2_HASH_KEY_STRING);
+    if(!binding->ops->get_binding_fault && binding_impl_l)
+            binding->ops->get_binding_fault = 
+            binding_impl_l->binding.ops->get_binding_fault;
+
+    binding->ops->get_binding_ops = axis2_hash_get(methods, 
+            "get_binding_ops", AXIS2_HASH_KEY_STRING);
+    if(!binding->ops->get_binding_ops && binding_impl_l)
+            binding->ops->get_binding_ops = 
+            binding_impl_l->binding.ops->get_binding_ops;
+
+    binding->ops->to_element = axis2_hash_get(methods, 
+            "to_element", AXIS2_HASH_KEY_STRING);
+    if(!binding->ops->to_element && binding_impl_l)
+            binding->ops->to_element = 
+            binding_impl_l->binding.ops->to_element;
+   
+    return AXIS2_SUCCESS;
+}
+
+/* ************************************************************
+ *  Binding binding methods (the WSDL Component model)
+ * ************************************************************/
+axis2_qname_t *AXIS2_CALL
+axis2_woden_binding_get_qname(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+    
+    return binding_impl->f_qname;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_extended_bindings(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+
+    return binding_impl->f_extended_bindings;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_binding_faults(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+
+    return binding_impl->f_binding_fault_elements;
+}
+
+void *AXIS2_CALL
+axis2_woden_binding_get_binding_fault(
+        void *binding,
+        axis2_env_t **env,
+        axis2_qname_t *qname)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+    int i = 0, size = 0;
+    void *fault;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, qname, NULL);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+
+    size = AXIS2_ARRAY_LIST_SIZE(binding_impl->f_binding_fault_elements, env);
+    for(i = 0; i < size; i++)
+    {
+        void *flt = NULL;
+        axis2_qname_t *qname_l = NULL;
+        
+        flt = AXIS2_ARRAY_LIST_GET(binding_impl->f_binding_fault_elements, 
+                env, i);
+        qname_l = (axis2_qname_t *) AXIS2_BINDING_FAULT_GET_QNAME(flt, env);
+        if(AXIS2_TRUE == AXIS2_QNAME_EQUALS(qname, env, qname_l))
+        {
+            fault = flt;
+            break;
+        }
+    }
+
+    return fault;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_binding_ops(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+
+    return binding_impl->f_binding_op_elements;
+}
+
+void *AXIS2_CALL
+axis2_woden_binding_to_element(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+    
+    return &(binding_impl->binding);
+}
+
+/* ************************************************************
+ *  BindingElement binding methods (the XML Element model)
+ * ************************************************************/
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_set_qname(
+        void *binding,
+        axis2_env_t **env,
+        axis2_qname_t *qname)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, qname, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+
+    if(binding_impl->f_qname)
+    {
+        AXIS2_QNAME_FREE(binding_impl->f_qname, env);
+    }
+    binding_impl->f_qname = AXIS2_QNAME_CLONE(qname, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_add_style_default_uri(
+        void *binding,
+        axis2_env_t **env,
+        axis2_url_t *uri)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, uri, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+
+    if(!binding_impl->f_style_default)
+    {
+        binding_impl->f_style_default = axis2_array_list_create(env, 0);
+        if(!binding_impl->f_style_default)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
+    AXIS2_ARRAY_LIST_ADD(binding_impl->f_style_default, env, uri);
+
+    return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL
+axis2_woden_binding_get_style_default(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+
+    return binding_impl->f_style_default;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_add_extended_qname(
+        void *binding,
+        axis2_env_t **env,
+        axis2_woden_wsdl_element_t *qname)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, qname, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+    
+    if(!binding_impl->f_extends_qnames)
+    {
+        binding_impl->f_extends_qnames = axis2_array_list_create(env, 0);
+        if(!binding_impl->f_extends_qnames)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
+    AXIS2_ARRAY_LIST_ADD(binding_impl->f_extends_qnames, env, qname);
+
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_extends_qnames(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+
+    return binding_impl->f_extends_qnames;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_add_binding_fault_element(
+        void *binding,
+        axis2_env_t **env,
+        void *fault)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, fault, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+    
+    if(!binding_impl->f_binding_fault_elements)
+    {
+        binding_impl->f_binding_fault_elements = axis2_array_list_create(env, 0);
+        if(!binding_impl->f_binding_fault_elements)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
+    AXIS2_ARRAY_LIST_ADD(binding_impl->f_binding_fault_elements, env, fault);
+
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_binding_fault_elements(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+
+    return binding_impl->f_binding_fault_elements;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_add_binding_op_element(
+        void *binding,
+        axis2_env_t **env,
+        void *op)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, op, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+    
+    if(!binding_impl->f_binding_op_elements)
+    {
+        binding_impl->f_binding_op_elements = axis2_array_list_create(env, 0);
+        if(!binding_impl->f_binding_op_elements)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
+    AXIS2_ARRAY_LIST_ADD(binding_impl->f_binding_op_elements, env, op);
+
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_binding_get_binding_op_elements(
+        void *binding,
+        axis2_env_t **env)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+
+    return binding_impl->f_binding_op_elements;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_binding_add_extended_binding(
+        void *binding,
+        axis2_env_t **env,
+        void *extended_binding)
+{
+    axis2_woden_binding_impl_t *binding_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, binding, AXIS2_FAILURE);
+    super = AXIS2_WODEN_BINDING_SUPER_OBJS(binding, env);
+    binding_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_BINDING", AXIS2_HASH_KEY_STRING));
+
+    if(!binding_impl->f_extended_bindings)
+    {
+        binding_impl->f_extended_bindings = axis2_array_list_create(env, 0);
+        if(!binding_impl->f_extended_bindings)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
+    AXIS2_ARRAY_LIST_ADD(binding_impl->f_extended_bindings, env, extended_binding);
+    return AXIS2_SUCCESS;
+}
+
+
+
+
+

Added: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/configurable.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/configurable.c?rev=406516&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/configurable.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/configurable.c Sun May 14 20:32:53 2006
@@ -0,0 +1,353 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/axis2_woden_configurable.h>
+#include <woden/wsdl20/axis2_woden_documentable.h>
+
+
+typedef struct axis2_woden_configurable_impl axis2_woden_configurable_impl_t;
+
+/** 
+ * @brief Documentable Struct Impl
+ *	Axis2 Documentable  
+ */ 
+struct axis2_woden_configurable_impl
+{
+    axis2_woden_configurable_t configurable;
+    axis2_woden_documentable_t *documentable;
+    axis2_hash_t *super;
+    axis2_array_list_t *f_features;
+    axis2_array_list_t *f_properties;
+};
+
+#define INTF_TO_IMPL(configurable) ((axis2_woden_configurable_impl_t *) configurable)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_configurable_free(
+        void *configurable,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_configurable_super_objs(
+        void *configurable,
+        axis2_env_t **env);
+
+axis2_woden_documentable_t *AXIS2_CALL
+axis2_woden_configurable_get_base_impl(
+        void *configurable,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_configurable_get_features(
+        void *configurable,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_configurable_get_properties(
+        void *configurable,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_configurable_add_feature_element(
+        void *configurable,
+        axis2_env_t **env,
+        void *feature);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_configurable_get_feature_elements(
+        void *configurable,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_configurable_add_property_element(
+        void *configurable,
+        axis2_env_t **env,
+        void *property);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_configurable_get_property_elements(
+        void *configurable,
+        axis2_env_t **env);
+
+
+static axis2_woden_configurable_t *
+create(
+        axis2_env_t **env)
+{
+    axis2_woden_configurable_impl_t *configurable_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    configurable_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_configurable_impl_t));
+
+    configurable_impl->super = NULL;
+    configurable_impl->f_features = NULL;
+    configurable_impl->f_properties = NULL;
+    
+    configurable_impl->configurable.ops = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_configurable_ops_t));
+
+    configurable_impl->configurable.ops->free = axis2_woden_configurable_free;
+    configurable_impl->configurable.ops->super_objs = axis2_woden_configurable_super_objs;
+    configurable_impl->configurable.ops->get_base_impl = 
+        axis2_woden_configurable_get_base_impl;
+
+    return &(configurable_impl->configurable);
+}
+
+AXIS2_DECLARE(axis2_woden_configurable_t *)
+axis2_woden_configurable_create(
+        axis2_env_t **env)
+{
+    axis2_woden_configurable_impl_t *configurable_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    configurable_impl = (axis2_woden_configurable_impl_t *) create(env);
+
+    configurable_impl->documentable = axis2_woden_documentable_create(env);
+
+    configurable_impl->super = axis2_hash_make(env);
+    if(!configurable_impl->super)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(configurable_impl->super, "AXIS2_WODEN_CONFIGURABLE", 
+            AXIS2_HASH_KEY_STRING, &(configurable_impl->configurable));
+    axis2_hash_set(configurable_impl->super, "AXIS2_WODEN_DOCUMENTABLE", 
+            AXIS2_HASH_KEY_STRING, configurable_impl->documentable);
+         
+    return &(configurable_impl->configurable);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_configurable_free(
+        void *configurable,
+        axis2_env_t **env)
+{
+    axis2_woden_configurable_impl_t *configurable_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    configurable_impl = INTF_TO_IMPL(configurable);
+
+    if(configurable_impl->f_features)
+    {
+        AXIS2_ARRAY_LIST_FREE(configurable_impl->f_features, env);
+        configurable_impl->f_features = NULL;
+    }
+    
+    if(configurable_impl->f_properties)
+    {
+        AXIS2_ARRAY_LIST_FREE(configurable_impl->f_properties, env);
+        configurable_impl->f_properties = NULL;
+    }
+    
+    if(configurable_impl->documentable)
+    {
+        AXIS2_WODEN_DOCUMENTABLE_FREE(configurable_impl->documentable, env);
+        configurable_impl->documentable = NULL;
+    }
+
+    if(configurable_impl->super)
+    {
+        axis2_hash_free(configurable_impl->super, env);
+        configurable_impl->super = NULL;
+    }
+    
+    if(configurable_impl->configurable.ops)
+    {
+        AXIS2_FREE((*env)->allocator, configurable_impl->configurable.ops);
+        configurable_impl->configurable.ops = NULL;
+    }
+    
+    if(configurable_impl)
+    {
+        AXIS2_FREE((*env)->allocator, configurable_impl);
+        configurable_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_configurable_super_objs(
+        void *configurable,
+        axis2_env_t **env)
+{
+    axis2_woden_configurable_impl_t *configurable_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    configurable_impl = INTF_TO_IMPL(configurable);
+
+    return configurable_impl->super;
+}
+
+axis2_woden_documentable_t *AXIS2_CALL
+axis2_woden_configurable_get_base_impl(
+        void *configurable,
+        axis2_env_t **env)
+{
+    axis2_woden_configurable_impl_t *configurable_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    configurable_impl = INTF_TO_IMPL(configurable);
+
+    return configurable_impl->documentable;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_configurable_resolve_methods(
+        axis2_woden_configurable_t *configurable,
+        axis2_env_t **env,
+        axis2_woden_configurable_t *configurable_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_configurable_impl_t *configurable_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    configurable_impl_l = INTF_TO_IMPL(configurable_impl);
+    
+    configurable->ops = AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_configurable_ops_t));
+    configurable->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    configurable->ops->to_configurable_free = axis2_hash_get(methods, 
+            "to_configurable_free", AXIS2_HASH_KEY_STRING);
+    configurable->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_configurable_get_features(
+        void *configurable,
+        axis2_env_t **env)
+{
+    axis2_woden_configurable_impl_t *configurable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_CONFIGURABLE", AXIS2_HASH_KEY_STRING));
+
+    return configurable_impl->f_features;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_configurable_get_properties(
+        void *configurable,
+        axis2_env_t **env)
+{
+    axis2_woden_configurable_impl_t *configurable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_CONFIGURABLE", AXIS2_HASH_KEY_STRING));
+
+    return configurable_impl->f_properties;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_configurable_add_feature_element(
+        void *configurable,
+        axis2_env_t **env,
+        void *feature)
+{
+    axis2_woden_configurable_impl_t *configurable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, feature, AXIS2_FAILURE);
+    super = AXIS2_WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_CONFIGURABLE", AXIS2_HASH_KEY_STRING));
+   
+    if(!configurable_impl->f_features)
+    {
+        configurable_impl->f_features = axis2_array_list_create(env, 0);
+        if(!configurable_impl->f_features)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
+    return AXIS2_ARRAY_LIST_ADD(configurable_impl->f_features, env, 
+            feature);
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_configurable_get_feature_elements(
+        void *configurable,
+        axis2_env_t **env)
+{
+    axis2_woden_configurable_impl_t *configurable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_CONFIGURABLE", AXIS2_HASH_KEY_STRING));
+
+    return configurable_impl->f_features;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_configurable_add_property_element(
+        void *configurable,
+        axis2_env_t **env,
+        void *property)
+{
+    axis2_woden_configurable_impl_t *configurable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, property, AXIS2_FAILURE);
+    super = AXIS2_WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_CONFIGURABLE", AXIS2_HASH_KEY_STRING));
+   
+    if(!configurable_impl->f_properties)
+    {
+        configurable_impl->f_properties = axis2_array_list_create(env, 0);
+        if(!configurable_impl->f_properties)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
+    return AXIS2_ARRAY_LIST_ADD(configurable_impl->f_properties, env, 
+            property);
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_configurable_get_property_elements(
+        void *configurable,
+        axis2_env_t **env)
+{
+    axis2_woden_configurable_impl_t *configurable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_CONFIGURABLE", AXIS2_HASH_KEY_STRING));
+
+    return configurable_impl->f_properties;
+}

Added: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/configurable_component.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/configurable_component.c?rev=406516&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/configurable_component.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/configurable_component.c Sun May 14 20:32:53 2006
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/axis2_woden_configurable_component.h>
+
+axis2_status_t AXIS2_CALL
+axis2_woden_configurable_component_resolve_methods(
+        axis2_woden_configurable_component_t *configurable_component,
+        axis2_env_t **env,
+        axis2_hash_t *methods)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    
+    configurable_component->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    configurable_component->ops->to_configurable_component_free = axis2_hash_get(methods, 
+            "to_configurable_component_free", AXIS2_HASH_KEY_STRING);
+    configurable_component->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    configurable_component->ops->get_features = axis2_hash_get(methods,
+            "get_features", AXIS2_HASH_KEY_STRING);
+    configurable_component->ops->get_properties = axis2_hash_get(methods,
+            "get_properties", AXIS2_HASH_KEY_STRING);
+
+    return AXIS2_SUCCESS;
+    
+}
+

Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/documentable.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/documentable.c?rev=406516&r1=406515&r2=406516&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/documentable.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/documentable.c Sun May 14 20:32:53 2006
@@ -27,6 +27,7 @@
 {
     axis2_woden_documentable_t documentable;
     axis2_woden_wsdl_obj_t *wsdl_obj;
+    axis2_hash_t *super;
     axis2_array_list_t *f_doc_elems;
 };
 
@@ -37,6 +38,11 @@
         void *documentable,
         axis2_env_t **env);
 
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_documentable_super_objs(
+        void *documentable,
+        axis2_env_t **env);
+
 axis2_woden_wsdl_obj_t *AXIS2_CALL
 axis2_woden_documentable_get_base_impl(
         void *documentable,
@@ -64,11 +70,13 @@
                     sizeof(axis2_woden_documentable_impl_t));
 
     documentable_impl->f_doc_elems = NULL;
+    documentable_impl->super = NULL;
     
     documentable_impl->documentable.ops = AXIS2_MALLOC((*env)->allocator, 
                     sizeof(axis2_woden_documentable_ops_t));
 
     documentable_impl->documentable.ops->free = axis2_woden_documentable_free;
+    documentable_impl->documentable.ops->super_objs = axis2_woden_documentable_super_objs;
     documentable_impl->documentable.ops->get_base_impl = axis2_woden_documentable_get_base_impl;
     documentable_impl->documentable.ops->add_documentation_element = 
         axis2_woden_documentable_add_documentation_element;
@@ -89,6 +97,18 @@
 
     documentable_impl->wsdl_obj = axis2_woden_wsdl_obj_create(env);
 
+    documentable_impl->super = axis2_hash_make(env);
+    if(!documentable_impl->super)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(documentable_impl->super, "AXIS2_WODEN_DOCUMENTABLE", 
+            AXIS2_HASH_KEY_STRING, &(documentable_impl->documentable));
+    axis2_hash_set(documentable_impl->super, "AXIS2_WODEN_WSDL_OBJ", 
+            AXIS2_HASH_KEY_STRING, documentable_impl->wsdl_obj);
+            
+
     return &(documentable_impl->documentable);
 }
 
@@ -113,6 +133,12 @@
         AXIS2_WODEN_WSDL_OBJ_FREE(documentable_impl->wsdl_obj, env);
         documentable_impl->wsdl_obj = NULL;
     }
+
+    if(documentable_impl->super)
+    {
+        axis2_hash_free(documentable_impl->super, env);
+        documentable_impl->super = NULL;
+    }
     
     if(documentable_impl->documentable.ops)
     {
@@ -128,6 +154,19 @@
     return AXIS2_SUCCESS;
 }
 
+axis2_hash_t *AXIS2_CALL
+axis2_woden_documentable_super_objs(
+        void *documentable,
+        axis2_env_t **env)
+{
+    axis2_woden_documentable_impl_t *documentable_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    documentable_impl = INTF_TO_IMPL(documentable);
+
+    return documentable_impl->super;
+}
+
 axis2_woden_wsdl_obj_t *AXIS2_CALL
 axis2_woden_documentable_get_base_impl(
         void *documentable,
@@ -145,21 +184,36 @@
 axis2_woden_documentable_resolve_methods(
         axis2_woden_documentable_t *documentable,
         axis2_env_t **env,
+        axis2_woden_documentable_t *documentable_impl,
         axis2_hash_t *methods)
 {
+    axis2_woden_documentable_impl_t *documentable_impl_l = NULL;
+    
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
-    
+    documentable_impl_l = INTF_TO_IMPL(documentable_impl);
+
     documentable->ops = AXIS2_MALLOC((*env)->allocator, 
                 sizeof(axis2_woden_documentable_ops_t));
+    
     documentable->ops->free = axis2_hash_get(methods, "free", 
             AXIS2_HASH_KEY_STRING);
-    documentable->ops->type = axis2_hash_get(methods, "type", 
+    documentable->ops->to_documentable_free = axis2_hash_get(methods, 
+            "to_documentable_free", AXIS2_HASH_KEY_STRING);
+    documentable->ops->super_objs = axis2_hash_get(methods, "super_objs", 
             AXIS2_HASH_KEY_STRING);
+
     documentable->ops->add_documentation_element = axis2_hash_get(methods, 
             "add_documentation_element", AXIS2_HASH_KEY_STRING);
+    if(!documentable->ops->add_documentation_element && documentable_impl_l)
+            documentable->ops->add_documentation_element = 
+            documentable_impl_l->documentable.ops->add_documentation_element;
+
     documentable->ops->get_documentation_elements = axis2_hash_get(methods, 
             "get_documentation_elements", AXIS2_HASH_KEY_STRING);
+    if(!documentable->ops->get_documentation_elements && documentable_impl_l)
+            documentable->ops->get_documentation_elements = 
+            documentable_impl_l->documentable.ops->get_documentation_elements;
     
     return AXIS2_SUCCESS;
 }
@@ -171,9 +225,13 @@
         axis2_woden_documentation_element_t *documentation)
 {
     axis2_woden_documentable_impl_t *documentable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, documentation, AXIS2_FAILURE);
-    documentable_impl = INTF_TO_IMPL(documentable);
+    super = AXIS2_WODEN_DOCUMENTABLE_SUPER_OBJS(documentable, env);
+    documentable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_DOCUMENTABLE", AXIS2_HASH_KEY_STRING));
    
     if(!documentable_impl->f_doc_elems)
     {
@@ -194,9 +252,13 @@
         axis2_env_t **env)
 {
     axis2_woden_documentable_impl_t *documentable_impl = NULL;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    documentable_impl = INTF_TO_IMPL(documentable);
+    super = AXIS2_WODEN_DOCUMENTABLE_SUPER_OBJS(documentable, env);
+    documentable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_DOCUMENTABLE", AXIS2_HASH_KEY_STRING));
+   
 
     return documentable_impl->f_doc_elems;
 }

Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/documentation.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/documentation.c?rev=406516&r1=406515&r2=406516&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/documentation.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/documentation.c Sun May 14 20:32:53 2006
@@ -30,6 +30,7 @@
     axis2_woden_documentation_t documentation;
     axis2_woden_obj_types_t obj_type;
     axis2_woden_wsdl_element_t *wsdl_element;
+    axis2_hash_t *super;
     axis2_hash_t *methods;
     void *f_content;
 };
@@ -41,6 +42,11 @@
         void *documentation,
         axis2_env_t **env);
 
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_documentation_super_objs(
+        void *documentation,
+        axis2_env_t **env);
+
 axis2_woden_obj_types_t AXIS2_CALL
 axis2_woden_documentation_type(
         void *documentation,
@@ -190,7 +196,7 @@
             sizeof(axis2_woden_attr_extensible_ops_t));
     axis2_woden_attr_extensible_resolve_methods(&(documentation_impl->
             documentation.base.wsdl_element.base.attr_extensible), env, 
-            documentation_impl->methods);
+            NULL, documentation_impl->methods);
     return documentation;
 
 }
@@ -236,7 +242,7 @@
         sizeof(axis2_woden_element_extensible_ops_t));
     axis2_woden_element_extensible_resolve_methods(&(documentation_impl->
             documentation.base.wsdl_element.base.element_extensible), 
-            env, documentation_impl->methods);
+            env, NULL, documentation_impl->methods);
     return documentation;
 
 }
@@ -273,6 +279,7 @@
                     sizeof(axis2_woden_documentation_impl_t));
 
     documentation_impl->wsdl_element = NULL;
+    documentation_impl->super = NULL;
     documentation_impl->obj_type = AXIS2_WODEN_DOCUMENTATION;
     documentation_impl->f_content = NULL;
     documentation_impl->methods = NULL;
@@ -281,6 +288,8 @@
                     sizeof(axis2_woden_documentation_ops_t));
 
     documentation_impl->documentation.ops->free = axis2_woden_documentation_free;
+    documentation_impl->documentation.ops->super_objs = 
+        axis2_woden_documentation_super_objs;
     documentation_impl->documentation.ops->type = axis2_woden_documentation_type;
     documentation_impl->documentation.ops->get_base_impl = 
         axis2_woden_documentation_get_base_impl;
@@ -302,6 +311,8 @@
     axis2_hash_set(documentation_impl->methods, "to_element_extensible_free", 
             AXIS2_HASH_KEY_STRING, 
             axis2_woden_documentation_to_element_extensible_free);
+    axis2_hash_set(documentation_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_documentation_super_objs);
     axis2_hash_set(documentation_impl->methods, "type", AXIS2_HASH_KEY_STRING, 
             axis2_woden_documentation_type);
     axis2_hash_set(documentation_impl->methods, "set_content", 
@@ -333,7 +344,8 @@
 }
 
 AXIS2_DECLARE(axis2_woden_documentation_t *)
-axis2_woden_documentation_create(axis2_env_t **env)
+axis2_woden_documentation_create(
+        axis2_env_t **env)
 {
     axis2_woden_documentation_impl_t *documentation_impl = NULL;
    
@@ -342,12 +354,24 @@
 
     documentation_impl->wsdl_element = axis2_woden_wsdl_element_create(env);
 
+    documentation_impl->super = axis2_hash_make(env);
+    if(!documentation_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(documentation_impl->super, "AXIS2_WODEN_DOCUMENTATION", 
+            AXIS2_HASH_KEY_STRING, &(documentation_impl->documentation));
+    axis2_hash_set(documentation_impl->super, "AXIS2_WODEN_WSDL_ELEMENT", 
+            AXIS2_HASH_KEY_STRING, documentation_impl->wsdl_element);
+
     return &(documentation_impl->documentation);
 }
 
 axis2_status_t AXIS2_CALL
-axis2_woden_documentation_free(void *documentation,
-                        axis2_env_t **env)
+axis2_woden_documentation_free(
+        void *documentation,
+        axis2_env_t **env)
 {
     axis2_woden_documentation_impl_t *documentation_impl = NULL;
 
@@ -360,6 +384,12 @@
         documentation_impl->f_content = NULL;
     }
     
+    if(documentation_impl->super)
+    {
+        axis2_hash_free(documentation_impl->super, env);
+        documentation_impl->super = NULL;
+    }
+    
     if(documentation_impl->methods)
     {
         axis2_hash_free(documentation_impl->methods, env);
@@ -412,6 +442,19 @@
     return AXIS2_SUCCESS;
 }
 
+axis2_hash_t *AXIS2_CALL
+axis2_woden_documentation_super_objs(
+        void *documentation,
+        axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentation_impl = INTF_TO_IMPL(documentation);
+
+    return documentation_impl->super;
+}
+
 axis2_woden_obj_types_t AXIS2_CALL
 axis2_woden_documentation_type(void *documentation,
         axis2_env_t **env)
@@ -425,8 +468,9 @@
 }
 
 axis2_woden_wsdl_element_t *AXIS2_CALL
-axis2_woden_documentation_get_base_impl(void *documentation,
-                                axis2_env_t **env)
+axis2_woden_documentation_get_base_impl(
+        void *documentation,
+        axis2_env_t **env)
 {
     axis2_woden_documentation_impl_t *documentation_impl = NULL;
 
@@ -440,220 +484,30 @@
 axis2_woden_documentation_resolve_methods(
         axis2_woden_documentation_t *documentation,
         axis2_env_t **env,
+        axis2_woden_documentation_t *documentation_impl,
         axis2_hash_t *methods)
 {
+    axis2_woden_documentation_impl_t *documentation_impl_l = NULL;
+    
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    documentation_impl_l = INTF_TO_IMPL (documentation_impl);
     
     documentation->ops = AXIS2_MALLOC((*env)->allocator, 
                 sizeof(axis2_woden_documentation_ops_t));
+    
     documentation->ops->free = axis2_hash_get(methods, "free", 
             AXIS2_HASH_KEY_STRING);
     documentation->ops->to_documentation_free = axis2_hash_get(methods, 
             "to_documentation_free", AXIS2_HASH_KEY_STRING);
+    documentation->ops->super_objs = axis2_hash_get(methods, 
+            "super_objs", AXIS2_HASH_KEY_STRING);
     documentation->ops->type = axis2_hash_get(methods, "type", 
             AXIS2_HASH_KEY_STRING);
-
-    return AXIS2_SUCCESS;
-}
-
-axis2_status_t AXIS2_CALL 
-axis2_woden_documentation_set_ext_attr(
-        void *documentation,
-        axis2_env_t **env,
-        axis2_qname_t *attr_type,
-        axis2_woden_xml_attr_t *attr)
-{
-    axis2_woden_documentation_impl_t *documentation_impl = NULL;
-    void *attr_ext = NULL;
-    axis2_status_t status = AXIS2_FAILURE;
-        
-    documentation_impl = INTF_TO_IMPL(documentation);
-    
-    attr_ext = axis2_woden_wsdl_element_to_attr_extensible(
-            documentation_impl->wsdl_element, env);
-    status = AXIS2_WODEN_ATTR_EXTENSIBLE_SET_EXT_ATTR(attr_ext, env, attr_type, 
-            attr);
-    AXIS2_WODEN_ATTR_EXTENSIBLE_TO_ATTR_EXTENSIBLE_FREE(attr_ext, env);
-    return status;
-}
-
-axis2_woden_xml_attr_t *AXIS2_CALL 
-axis2_woden_documentation_get_ext_attr(
-        void *documentation,
-        axis2_env_t **env,
-        axis2_qname_t *attr_type) 
-{
-    axis2_woden_documentation_impl_t *documentation_impl = NULL;
-    void *attr_ext = NULL;
-    void *ret = NULL;
-    
-    documentation_impl = INTF_TO_IMPL(documentation);
-    
-    attr_ext = axis2_woden_wsdl_element_to_attr_extensible(
-            documentation_impl->wsdl_element, env);
-    ret = AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(attr_ext, env, attr_type);
-    AXIS2_WODEN_ATTR_EXTENSIBLE_TO_ATTR_EXTENSIBLE_FREE(attr_ext, env);
-    return ret;
-}
-
-axis2_array_list_t *AXIS2_CALL 
-axis2_woden_documentation_get_ext_attrs(
-        void *documentation,
-        axis2_env_t **env) 
-{
-    axis2_woden_documentation_impl_t *documentation_impl = NULL;
-    void *attr_ext = NULL;
-    void *ret = NULL;
-    
-    documentation_impl = INTF_TO_IMPL(documentation);
-
-    attr_ext = axis2_woden_wsdl_element_to_attr_extensible(
-            documentation_impl->wsdl_element, env);
-    ret = AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTRS(attr_ext, env);
-    AXIS2_WODEN_ATTR_EXTENSIBLE_TO_ATTR_EXTENSIBLE_FREE(attr_ext, env);
-    return ret;
-}
-
-axis2_array_list_t *AXIS2_CALL 
-axis2_woden_documentation_get_ext_attrs_for_namespace(
-        void *documentation,
-        axis2_env_t **env,
-        axis2_url_t *namespc) 
-{
-    axis2_woden_documentation_impl_t *documentation_impl = NULL;
-    void *attr_ext = NULL;
-    void *ret = NULL;
     
-    documentation_impl = INTF_TO_IMPL(documentation);
-
-    attr_ext = axis2_woden_wsdl_element_to_attr_extensible(
-            documentation_impl->wsdl_element, env);
-    ret = AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTRS_FOR_NAMESPACE(
-            attr_ext, env, namespc);
-    AXIS2_WODEN_ATTR_EXTENSIBLE_TO_ATTR_EXTENSIBLE_FREE(attr_ext, env);
-    return ret;
-}
-
-axis2_bool_t AXIS2_CALL 
-axis2_woden_documentation_has_ext_attrs_for_namespace(
-        void *documentation,
-        axis2_env_t **env,
-        axis2_url_t *namespc)
-{
-    axis2_woden_documentation_impl_t *documentation_impl = NULL;
-    void *attr_ext = NULL;
-    axis2_bool_t ret = AXIS2_FALSE;
-
-    documentation_impl = INTF_TO_IMPL(documentation);
-
-    attr_ext = axis2_woden_wsdl_element_to_attr_extensible(
-            documentation_impl->wsdl_element, env);
-    ret = AXIS2_WODEN_ATTR_EXTENSIBLE_HAS_EXT_ATTRS_FOR_NAMESPACE(
-            attr_ext, env, namespc);
-    AXIS2_WODEN_ATTR_EXTENSIBLE_TO_ATTR_EXTENSIBLE_FREE(attr_ext, env);
-    return ret;
-}
-
-axis2_status_t AXIS2_CALL 
-axis2_woden_documentation_add_ext_element(
-        void *documentation,
-        axis2_env_t **env,
-        axis2_woden_ext_element_t *ext_el) 
-{
-    axis2_woden_documentation_impl_t *documentation_impl = NULL;
-    void *element_ext = NULL;
-    axis2_status_t status = AXIS2_FAILURE;
-
-    documentation_impl = INTF_TO_IMPL(documentation);
-    
-    element_ext = axis2_woden_wsdl_element_to_element_extensible(
-            documentation_impl->wsdl_element, env);
-    status = AXIS2_WODEN_ELEMENT_EXTENSIBLE_ADD_EXT_ELEMENT(element_ext, env, 
-            ext_el);
-    AXIS2_WODEN_ELEMENT_EXTENSIBLE_TO_ELEMENT_EXTENSIBLE_FREE(element_ext, env);
-    return status;
-}
-
-axis2_status_t AXIS2_CALL 
-axis2_woden_documentation_remove_ext_element(
-        void *documentation,
-        axis2_env_t **env,
-        axis2_woden_ext_element_t *ext_el) 
-{
-    axis2_woden_documentation_impl_t *documentation_impl = NULL;
-    void *element_ext = NULL;
-    axis2_status_t status = AXIS2_FAILURE;
-
-    documentation_impl = INTF_TO_IMPL(documentation);
-
-    element_ext = axis2_woden_wsdl_element_to_element_extensible(
-            documentation_impl->wsdl_element, env);
-    status = AXIS2_WODEN_ELEMENT_EXTENSIBLE_REMOVE_EXT_ELEMENT(element_ext, env, 
-            ext_el);
-    AXIS2_WODEN_ELEMENT_EXTENSIBLE_TO_ELEMENT_EXTENSIBLE_FREE(element_ext, env);
-    return status;
-}
-
-axis2_array_list_t *AXIS2_CALL 
-axis2_woden_documentation_get_ext_elements(
-        void *documentation,
-        axis2_env_t **env) 
-{
-    axis2_woden_documentation_impl_t *documentation_impl = NULL;
-    void *element_ext = NULL;
-    void *ret = NULL;
-
-    documentation_impl = INTF_TO_IMPL(documentation);
-    
-    element_ext = axis2_woden_wsdl_element_to_element_extensible(
-            documentation_impl->wsdl_element, env);
-    ret = AXIS2_WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS(element_ext, env);
-    AXIS2_WODEN_ELEMENT_EXTENSIBLE_TO_ELEMENT_EXTENSIBLE_FREE(element_ext, env);
-    return ret;
-}
-
-axis2_array_list_t *AXIS2_CALL 
-axis2_woden_documentation_get_ext_elements_of_type(
-        void *documentation,
-        axis2_env_t **env,
-        axis2_qname_t *ext_type) 
-{
-    axis2_woden_documentation_impl_t *documentation_impl = NULL;
-    void *element_ext = NULL;
-    void *ret = NULL;
-    
-    documentation_impl = INTF_TO_IMPL(documentation);
-
-    element_ext = axis2_woden_wsdl_element_to_element_extensible(
-            documentation_impl->wsdl_element, env);
-    ret = AXIS2_WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS_OF_TYPE(element_ext, env, 
-            ext_type);
-    AXIS2_WODEN_ELEMENT_EXTENSIBLE_TO_ELEMENT_EXTENSIBLE_FREE(element_ext, env);
-    return ret;
-}
-
-axis2_bool_t AXIS2_CALL 
-axis2_woden_documentation_has_ext_elements_for_namespace(
-        void *documentation,
-        axis2_env_t **env,
-        axis2_url_t *namespc)
-{
-    axis2_woden_documentation_impl_t *documentation_impl = NULL;
-    void *element_ext = NULL;
-    axis2_bool_t ret = AXIS2_FALSE;
-
-    documentation_impl = INTF_TO_IMPL(documentation);
-
-    element_ext = axis2_woden_wsdl_element_to_element_extensible(
-            documentation_impl->wsdl_element, env);
-    ret = AXIS2_WODEN_ELEMENT_EXTENSIBLE_HAS_EXT_ELEMENTS_FOR_NAMESPACE(
-            element_ext, env, namespc);
-    AXIS2_WODEN_ELEMENT_EXTENSIBLE_TO_ELEMENT_EXTENSIBLE_FREE(element_ext, env);
-    return ret;
+    return AXIS2_SUCCESS;
 }
 
-
 axis2_status_t AXIS2_CALL
 axis2_woden_documentation_set_content(
         void *documentation,
@@ -661,9 +515,13 @@
         void *doc_el)
 {
     axis2_woden_documentation_impl_t *documentation_impl = NULL;
+    axis2_hash_t *super = NULL;
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, documentation, AXIS2_FAILURE);
-    documentation_impl = INTF_TO_IMPL(documentation);
+    super = AXIS2_WODEN_DOCUMENTATION_SUPER_OBJS(documentation, env);
+    documentation_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_DOCUMENTATION", AXIS2_HASH_KEY_STRING));
    
     if(documentation_impl->f_content)
     {
@@ -679,9 +537,12 @@
         axis2_env_t **env)
 {
     axis2_woden_documentation_impl_t *documentation_impl = NULL;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    documentation_impl = INTF_TO_IMPL(documentation);
+    super = AXIS2_WODEN_DOCUMENTATION_SUPER_OBJS(documentation, env);
+    documentation_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_DOCUMENTATION", AXIS2_HASH_KEY_STRING));
 
     return documentation_impl->f_content;
 }

Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/extensions/attr_extensible.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/extensions/attr_extensible.c?rev=406516&r1=406515&r2=406516&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/extensions/attr_extensible.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/extensions/attr_extensible.c Sun May 14 20:32:53 2006
@@ -28,6 +28,7 @@
 struct axis2_woden_attr_extensible_impl
 {
     axis2_woden_attr_extensible_t extensible;
+    axis2_hash_t *super;
     axis2_woden_obj_types_t obj_type;
     axis2_hash_t *f_ext_attrs;
     axis2_array_list_t *temp_attrs;
@@ -41,6 +42,11 @@
         void *extensible,
         axis2_env_t **env);
 
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_attr_extensible_super_objs(
+        void *extensible,
+        axis2_env_t **env);
+
 axis2_woden_obj_types_t AXIS2_CALL 
 axis2_woden_attr_extensible_type(
         void *extensible,
@@ -89,6 +95,7 @@
                     sizeof(axis2_woden_attr_extensible_impl_t));
 
     extensible_impl->obj_type = AXIS2_WODEN_ATTR_EXTENSIBLE;
+    extensible_impl->super = NULL;
     extensible_impl->f_ext_attrs = NULL;
     extensible_impl->temp_attrs = NULL;
 
@@ -98,6 +105,8 @@
     
     extensible_impl->extensible.ops->free = 
         axis2_woden_attr_extensible_free;
+    extensible_impl->extensible.ops->super_objs = 
+        axis2_woden_attr_extensible_super_objs;
     extensible_impl->extensible.ops->type = 
         axis2_woden_attr_extensible_type;
     extensible_impl->extensible.ops->set_ext_attr = 
@@ -111,6 +120,16 @@
     extensible_impl->extensible.ops->has_ext_attrs_for_namespace = 
         axis2_woden_attr_extensible_has_ext_attrs_for_namespace;
     
+    extensible_impl->super = axis2_hash_make(env);
+    if(!extensible_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(extensible_impl->super, "AXIS2_WODEN_ATTR_EXTENSLBE", 
+            AXIS2_HASH_KEY_STRING, &(extensible_impl->extensible));
+ 
+
     return &(extensible_impl->extensible);
 }
 
@@ -145,6 +164,12 @@
         extensible_impl->temp_attrs = NULL;
     }
 
+    if(extensible_impl->super)
+    {
+        axis2_hash_free(extensible_impl->super, env);
+        extensible_impl->super = NULL;
+    }
+    
     if((&(extensible_impl->extensible))->ops)
     {
         AXIS2_FREE((*env)->allocator, (&(extensible_impl->extensible))->ops);
@@ -159,6 +184,19 @@
     return AXIS2_SUCCESS;
 }
 
+axis2_hash_t *AXIS2_CALL
+axis2_woden_attr_extensible_super_objs(
+        void *extensible,
+        axis2_env_t **env)
+{
+    axis2_woden_attr_extensible_impl_t *extensible_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    extensible_impl = INTF_TO_IMPL(extensible);
+
+    return extensible_impl->super;
+}
+
 axis2_woden_obj_types_t AXIS2_CALL
 axis2_woden_attr_extensible_type(
         void *extensible,
@@ -176,27 +214,53 @@
 axis2_woden_attr_extensible_resolve_methods(
         axis2_woden_attr_extensible_t *extensible,
         axis2_env_t **env,
+        axis2_woden_attr_extensible_t *extensible_impl,
         axis2_hash_t *methods)
 {
+    axis2_woden_attr_extensible_impl_t *extensible_impl_l = NULL;
+    
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
-    
+    extensible_impl_l = INTF_TO_IMPL(extensible_impl);
+
     extensible->ops->free = axis2_hash_get(methods, "free", 
             AXIS2_HASH_KEY_STRING);
     extensible->ops->to_attr_extensible_free = axis2_hash_get(methods, 
             "to_attr_extensible_free", AXIS2_HASH_KEY_STRING);
+    extensible->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
     extensible->ops->type = axis2_hash_get(methods, "type", 
             AXIS2_HASH_KEY_STRING);
+    
     extensible->ops->set_ext_attr = axis2_hash_get(methods, 
             "set_ext_attr", AXIS2_HASH_KEY_STRING);
+    if(!extensible->ops->set_ext_attr && extensible_impl_l)
+            extensible->ops->set_ext_attr = 
+            extensible_impl_l->extensible.ops->set_ext_attr;
+    
     extensible->ops->get_ext_attr = axis2_hash_get(methods, 
             "get_ext_attr", AXIS2_HASH_KEY_STRING);
+    if(!extensible->ops->get_ext_attr && extensible_impl_l)
+            extensible->ops->get_ext_attr = 
+            extensible_impl_l->extensible.ops->get_ext_attr;
+    
     extensible->ops->get_ext_attrs = axis2_hash_get(methods, 
             "get_ext_attrs", AXIS2_HASH_KEY_STRING); 
+    if(!extensible->ops->get_ext_attrs && extensible_impl_l)
+            extensible->ops->get_ext_attrs = 
+            extensible_impl_l->extensible.ops->get_ext_attrs;
+    
     extensible->ops->get_ext_attrs_for_namespace = axis2_hash_get(methods, 
             "get_ext_attrs_for_namespace", AXIS2_HASH_KEY_STRING); 
+    if(!extensible->ops->get_ext_attrs_for_namespace && extensible_impl_l)
+            extensible->ops->get_ext_attrs_for_namespace = 
+            extensible_impl_l->extensible.ops->get_ext_attrs_for_namespace;
+    
     extensible->ops->has_ext_attrs_for_namespace = axis2_hash_get(methods, 
             "has_ext_attrs_for_namespace", AXIS2_HASH_KEY_STRING); 
+    if(!extensible->ops->has_ext_attrs_for_namespace && extensible_impl_l)
+            extensible->ops->has_ext_attrs_for_namespace = 
+            extensible_impl_l->extensible.ops->has_ext_attrs_for_namespace;
 
     return AXIS2_SUCCESS;    
 }
@@ -210,10 +274,13 @@
 {
     axis2_woden_attr_extensible_impl_t *extensible_impl = NULL;
     axis2_char_t *str_attr_type = NULL;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, attr_type, AXIS2_FAILURE);
-    extensible_impl = INTF_TO_IMPL(extensible);
+    super = AXIS2_WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
     
     str_attr_type = AXIS2_QNAME_TO_STRING(attr_type, env);
     if(attr)
@@ -233,10 +300,13 @@
 {
     axis2_woden_attr_extensible_impl_t *extensible_impl = NULL;
     axis2_char_t *str_attr_type = NULL;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, attr_type, AXIS2_FAILURE);
-    extensible_impl = INTF_TO_IMPL(extensible);
+    super = AXIS2_WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
 
     str_attr_type = AXIS2_QNAME_TO_STRING(attr_type, env);
     return (axis2_woden_xml_attr_t *)axis2_hash_get(extensible_impl->f_ext_attrs, 
@@ -250,9 +320,12 @@
 {
     axis2_woden_attr_extensible_impl_t *extensible_impl = NULL;
     axis2_hash_index_t *index = NULL;
+    axis2_hash_t *super = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    extensible_impl = INTF_TO_IMPL(extensible);
+    super = AXIS2_WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
  
     if(extensible_impl->temp_attrs)
     {
@@ -288,10 +361,13 @@
     axis2_woden_attr_extensible_impl_t *extensible_impl = NULL;
     axis2_char_t *str_namespc = NULL;
     axis2_hash_index_t *index = NULL;
+    axis2_hash_t *super = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, namespc, AXIS2_FAILURE);
-    extensible_impl = INTF_TO_IMPL(extensible);
+    super = AXIS2_WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
 
     str_namespc = AXIS2_URL_TO_EXTERNAL_FORM(namespc, env);
     if(extensible_impl->temp_attrs)
@@ -331,10 +407,13 @@
     axis2_bool_t result = AXIS2_FALSE;
     axis2_char_t *str_namespc = NULL;
     axis2_hash_index_t *index = NULL;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, namespc, AXIS2_FAILURE);
-    extensible_impl = INTF_TO_IMPL(extensible);
+    super = AXIS2_WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
 
     str_namespc = AXIS2_URL_TO_EXTERNAL_FORM(namespc, env);
     for (index = axis2_hash_first (extensible_impl->f_ext_attrs, env); index; 

Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/extensions/element_extensible.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/extensions/element_extensible.c?rev=406516&r1=406515&r2=406516&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/extensions/element_extensible.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/extensions/element_extensible.c Sun May 14 20:32:53 2006
@@ -29,6 +29,7 @@
 {
     axis2_woden_element_extensible_t extensible;
     axis2_woden_obj_types_t obj_type;
+    axis2_hash_t *super;
     axis2_array_list_t *f_ext_elements;
     axis2_array_list_t *temp_elems;
 };
@@ -41,6 +42,11 @@
         void *extensible,
         axis2_env_t **envv);
 
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_element_extensible_super_objs(
+        void *extensible,
+        axis2_env_t **env);
+
 axis2_woden_obj_types_t AXIS2_CALL 
 axis2_woden_element_extensible_type(
         void *extensible,
@@ -88,6 +94,7 @@
                     sizeof(axis2_woden_element_extensible_impl_t));
 
     extensible_impl->obj_type = AXIS2_WODEN_ELEMENT_EXTENSIBLE;
+    extensible_impl->super = NULL;
     extensible_impl->f_ext_elements = NULL;
     extensible_impl->temp_elems = NULL;
 
@@ -109,7 +116,16 @@
         axis2_woden_element_extensible_get_ext_elements_of_type;
     extensible_impl->extensible.ops->has_ext_elements_for_namespace = 
         axis2_woden_element_extensible_has_ext_elements_for_namespace;
-    
+        
+    extensible_impl->super = axis2_hash_make(env);
+    if(!extensible_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(extensible_impl->super, "AXIS2_WODEN_ELEMENT_EXTENSLBE", 
+            AXIS2_HASH_KEY_STRING, &(extensible_impl->extensible));
+ 
     return &(extensible_impl->extensible);
 }
 
@@ -143,6 +159,12 @@
         extensible_impl->temp_elems = NULL;
     }
 
+    if(extensible_impl->super)
+    {
+        axis2_hash_free(extensible_impl->super, env);
+        extensible_impl->super = NULL;
+    }
+
     if((&(extensible_impl->extensible))->ops)
     {
         AXIS2_FREE((*env)->allocator, (&(extensible_impl->extensible))->ops);
@@ -157,6 +179,19 @@
     return AXIS2_SUCCESS;
 }
 
+axis2_hash_t *AXIS2_CALL
+axis2_woden_element_extensible_super_objs(
+        void *extensible,
+        axis2_env_t **env)
+{
+    axis2_woden_element_extensible_impl_t *extensible_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    extensible_impl = INTF_TO_IMPL(extensible);
+
+    return extensible_impl->super;
+}
+
 axis2_woden_obj_types_t AXIS2_CALL 
 axis2_woden_element_extensible_type(
         void *extensible,
@@ -174,25 +209,53 @@
 axis2_woden_element_extensible_resolve_methods(
         axis2_woden_element_extensible_t *extensible,
         axis2_env_t **env,
+        axis2_woden_element_extensible_t *extensible_impl,
         axis2_hash_t *methods)
 {
+    axis2_woden_element_extensible_impl_t *extensible_impl_l = NULL;
+    
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    extensible_impl_l = INTF_TO_IMPL(extensible_impl);
     
     extensible->ops->free = axis2_hash_get(methods, "free", 
             AXIS2_HASH_KEY_STRING);
     extensible->ops->to_element_extensible_free = axis2_hash_get(methods, 
             "to_element_extensible_free", AXIS2_HASH_KEY_STRING); 
+    extensible->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    extensible->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
     extensible->ops->add_ext_element = axis2_hash_get(methods, 
             "add_ext_element", AXIS2_HASH_KEY_STRING); 
+    if(!extensible->ops->add_ext_element && extensible_impl_l)
+            extensible->ops->add_ext_element = 
+            extensible_impl_l->extensible.ops->add_ext_element;
+    
     extensible->ops->remove_ext_element = axis2_hash_get(methods, 
             "remove_ext_element", AXIS2_HASH_KEY_STRING); 
+    if(!extensible->ops->remove_ext_element && extensible_impl_l)
+            extensible->ops->remove_ext_element = 
+            extensible_impl_l->extensible.ops->remove_ext_element;
+    
     extensible->ops->get_ext_elements = axis2_hash_get(methods, 
             "get_ext_elements", AXIS2_HASH_KEY_STRING); 
+    if(!extensible->ops->get_ext_elements && extensible_impl_l)
+            extensible->ops->get_ext_elements = 
+            extensible_impl_l->extensible.ops->get_ext_elements;
+    
     extensible->ops->get_ext_elements_of_type = axis2_hash_get(methods, 
             "get_ext_elements_of_type", AXIS2_HASH_KEY_STRING);
+    if(!extensible->ops->get_ext_elements_of_type && extensible_impl_l)
+            extensible->ops->get_ext_elements_of_type = 
+            extensible_impl_l->extensible.ops->get_ext_elements_of_type;
+    
     extensible->ops->has_ext_elements_for_namespace = axis2_hash_get(methods, 
             "has_ext_elements_for_namespace", AXIS2_HASH_KEY_STRING);
+    if(!extensible->ops->has_ext_elements_for_namespace && extensible_impl_l)
+            extensible->ops->has_ext_elements_for_namespace = 
+            extensible_impl_l->extensible.ops->has_ext_elements_for_namespace;
 
     return AXIS2_SUCCESS;    
 }
@@ -204,10 +267,13 @@
                                     axis2_woden_ext_element_t *ext_el) 
 {
     axis2_woden_element_extensible_impl_t *extensible_impl = NULL;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, ext_el, AXIS2_FAILURE);
-    extensible_impl = INTF_TO_IMPL(extensible);
+    super = AXIS2_WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
     
     return AXIS2_ARRAY_LIST_ADD(extensible_impl->f_ext_elements, env, ext_el);
 }
@@ -220,10 +286,13 @@
 {
     axis2_woden_element_extensible_impl_t *extensible_impl = NULL;
     int index = -1;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, ext_el, AXIS2_FAILURE);
-    extensible_impl = INTF_TO_IMPL(extensible);
+    super = AXIS2_WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
 
     index = AXIS2_ARRAY_LIST_INDEX_OF(extensible_impl->f_ext_elements, env, ext_el);
     AXIS2_ARRAY_LIST_REMOVE(extensible_impl->f_ext_elements, env, index);
@@ -235,9 +304,12 @@
                                                 axis2_env_t **env) 
 {
     axis2_woden_element_extensible_impl_t *extensible_impl = NULL;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    extensible_impl = INTF_TO_IMPL(extensible);
+    super = AXIS2_WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
     
     return extensible_impl->f_ext_elements;
 }
@@ -250,10 +322,13 @@
     axis2_woden_element_extensible_impl_t *extensible_impl = NULL;
     int i = 0;
     int size = 0;
+    axis2_hash_t *super = NULL;
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, ext_type, AXIS2_FAILURE);
-    extensible_impl = INTF_TO_IMPL(extensible);
+    super = AXIS2_WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
 
     if(extensible_impl->temp_elems)
     {
@@ -298,10 +373,13 @@
     axis2_char_t *ext_ns = NULL;
     int i = 0;
     int size = 0;
+    axis2_hash_t *super = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, namespc, AXIS2_FAILURE);
-    extensible_impl = INTF_TO_IMPL(extensible);
+    super = AXIS2_WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
 
     ext_ns = AXIS2_URL_TO_EXTERNAL_FORM(namespc, env);
     size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->f_ext_elements, env);



Mime
View raw message