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/06/01 06:34:48 UTC

svn commit: r410740 [6/7] - in /webservices/axis2/trunk/c/woden: include/woden/wsdl20/ include/woden/wsdl20/extensions/ include/woden/wsdl20/xml/ include/woden/xml/ src/wsdl20/ src/wsdl20/extensions/ src/xml/

Added: webservices/axis2/trunk/c/woden/src/wsdl20/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/svc.c?rev=410740&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/svc.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/svc.c Wed May 31 21:34:47 2006
@@ -0,0 +1,783 @@
+/*
+ * 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_svc.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>
+
+typedef struct axis2_woden_svc_impl axis2_woden_svc_impl_t;
+
+/** 
+ * @brief Service Struct Impl
+ *	Axis2 Service  
+ */ 
+struct axis2_woden_svc_impl
+{
+    axis2_woden_svc_t svc;
+    axis2_woden_obj_types_t obj_type;
+    axis2_woden_configurable_t *configurable;
+    axis2_hash_t *super;
+    axis2_hash_t *methods;
+    axis2_qname_t *f_qname;
+    axis2_qname_t *f_interface_qname;
+    void *f_interface;
+    axis2_array_list_t *f_endpoints;
+};
+
+#define INTF_TO_IMPL(svc) ((axis2_woden_svc_impl_t *) svc)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_svc_free(
+        void *svc,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_svc_super_objs(
+        void *svc,
+        axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL 
+axis2_woden_svc_type(
+        void *svc,
+        axis2_env_t **env);
+
+axis2_woden_configurable_t *AXIS2_CALL
+axis2_woden_svc_get_base_impl(
+        void *svc,
+        axis2_env_t **env);
+/* ************************************************************
+ *  Service interface methods (the WSDL Component model)
+ * ************************************************************/
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_svc_get_qname(
+        void *svc,
+        axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_svc_get_interface(
+        void *svc,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_svc_get_endpoints(
+        void *svc,
+        axis2_env_t **env);
+/* ************************************************************
+ *  Service Element interface methods (the XML Element model)
+ * ************************************************************/
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_qname(
+        void *svc,
+        axis2_env_t **env,
+        axis2_qname_t *qname);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_interface_qname(
+        void *svc,
+        axis2_env_t **env,
+        axis2_qname_t *interface_qname);
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_svc_get_interface_qname(
+        void *svc,
+        axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_svc_get_interface_element(
+        void *svc,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_add_endpoint_element(
+        void *svc,
+        axis2_env_t **env,
+        void *endpoint);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_svc_get_endpoint_elements(
+        void *svc,
+        axis2_env_t **env);
+
+/******************************************************************************
+ *  Non-API implementation methods
+ *****************************************************************************/  
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_interface_element(
+        void *svc,
+        axis2_env_t **env,
+        void *interface);
+
+
+static axis2_woden_svc_t *
+create(axis2_env_t **env);
+
+static axis2_status_t
+axis2_woden_svc_free_ops(
+        void *svc,
+        axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_svc_element(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!svc)
+    {
+        svc_impl = (axis2_woden_svc_impl_t *) create(env);
+    }
+    else
+        svc_impl = (axis2_woden_svc_impl_t *) svc;
+
+    axis2_woden_svc_free_ops(svc, env);
+
+    svc_impl->svc.base.svc_element.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_svc_element_ops_t));
+    axis2_woden_svc_element_resolve_methods(&(svc_impl->svc.base.
+            svc_element), env, svc_impl->methods);
+    return svc;
+}
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_documentable_element(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!svc)
+    {
+        svc_impl = (axis2_woden_svc_impl_t *) create(env);
+    }
+    else
+        svc_impl = (axis2_woden_svc_impl_t *) svc;
+
+    axis2_woden_svc_free_ops(svc, env);
+
+    svc_impl->svc.base.svc_element.base.documentable_element.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_documentable_element_ops_t));
+    axis2_woden_documentable_element_resolve_methods(&(svc_impl->svc.base.
+            svc_element.base.documentable_element), env, 
+            svc_impl->methods);
+    return svc;
+}
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_configurable(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!svc)
+    {
+        svc_impl = (axis2_woden_svc_impl_t *) create(env);
+    }
+    else
+        svc_impl = (axis2_woden_svc_impl_t *) svc;
+
+    axis2_woden_svc_free_ops(svc, env);
+
+    svc_impl->svc.base.configurable.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_configurable_ops_t));
+    axis2_woden_configurable_resolve_methods(&(svc_impl->svc.base.
+            configurable), env, svc_impl->configurable, 
+            svc_impl->methods);
+    return svc;
+}
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_configurable_component(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!svc)
+    {
+        svc_impl = (axis2_woden_svc_impl_t *) create(env);
+    }
+    else
+        svc_impl = (axis2_woden_svc_impl_t *) svc;
+
+    axis2_woden_svc_free_ops(svc, env);
+  
+    svc_impl->svc.base.configurable_component.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_configurable_component_ops_t));
+    axis2_woden_configurable_component_resolve_methods(&(svc_impl->svc.base.
+            configurable_component), env, svc_impl->methods);
+    return svc;
+}
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_wsdl_component(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if(!svc)
+    {
+        svc_impl = (axis2_woden_svc_impl_t *) create(env);
+    }
+    else
+        svc_impl = (axis2_woden_svc_impl_t *) svc;
+
+    axis2_woden_svc_free_ops(svc, env);
+
+    svc_impl->svc.base.configurable_component.wsdl_component.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+        sizeof(axis2_woden_wsdl_component_ops_t));
+    axis2_woden_wsdl_component_resolve_methods(&(svc_impl->svc.base.
+            configurable_component.wsdl_component), env, svc_impl->methods);
+    return svc;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_svc_t *
+create(axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    svc_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_svc_impl_t));
+
+    svc_impl->obj_type= AXIS2_WODEN_SVC;
+    svc_impl->super = NULL;
+    svc_impl->methods = NULL;
+    svc_impl->f_qname = NULL;
+    svc_impl->f_interface_qname = NULL;
+    svc_impl->f_interface = NULL;
+    svc_impl->f_endpoints = NULL;
+    
+    svc_impl->svc.base.svc_element.ops = NULL;
+    svc_impl->svc.base.svc_element.base.documentable_element.ops = 
+            NULL;
+    svc_impl->svc.base.configurable.ops = NULL;
+    svc_impl->svc.base.configurable_component.ops = NULL;
+    svc_impl->svc.base.configurable_component.wsdl_component.ops = NULL;
+    
+    svc_impl->svc.ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_svc_ops_t));
+
+    svc_impl->svc.ops->free = axis2_woden_svc_free;
+    svc_impl->svc.ops->super_objs = axis2_woden_svc_super_objs;
+    svc_impl->svc.ops->type = axis2_woden_svc_type;
+    svc_impl->svc.ops->get_base_impl = axis2_woden_svc_get_base_impl;
+
+    svc_impl->svc.ops->get_qname = axis2_woden_svc_get_qname;
+    svc_impl->svc.ops->get_interface = axis2_woden_svc_get_interface;
+    svc_impl->svc.ops->get_endpoints = 
+        axis2_woden_svc_get_endpoints;
+    svc_impl->svc.ops->set_interface_element = 
+        axis2_woden_svc_set_interface_element;
+ 
+    svc_impl->methods = axis2_hash_make(env);
+    if(!svc_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(svc_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_svc_free);
+    axis2_hash_set(svc_impl->methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_svc_super_objs);
+    axis2_hash_set(svc_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_svc_type);
+
+    axis2_hash_set(svc_impl->methods, "get_qname", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_svc_get_qname);
+    axis2_hash_set(svc_impl->methods, "get_interface", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_svc_get_interface);
+    axis2_hash_set(svc_impl->methods, "get_endpoints", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_svc_get_endpoints);
+    axis2_hash_set(svc_impl->methods, "set_qname", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_svc_set_qname);
+    axis2_hash_set(svc_impl->methods, "set_interface_qname", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_svc_set_interface_qname);
+    axis2_hash_set(svc_impl->methods, "get_interface_qname", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_svc_get_interface_qname);
+    axis2_hash_set(svc_impl->methods, "get_interface_element", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_svc_get_interface_element);
+    axis2_hash_set(svc_impl->methods, "add_endpoint_element", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_svc_add_endpoint_element);
+    axis2_hash_set(svc_impl->methods, "get_endpoint_elements", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_svc_get_endpoint_elements);
+    axis2_hash_set(svc_impl->methods, "set_interface_element", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_svc_set_interface_element);
+
+    return &(svc_impl->svc);
+}
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_create(axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    svc_impl = (axis2_woden_svc_impl_t *) create(env);
+
+    svc_impl->configurable = axis2_woden_configurable_create(env);
+
+    svc_impl->super = axis2_hash_make(env);
+    if(!svc_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(svc_impl->super, "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING, 
+            &(svc_impl->svc));
+    axis2_hash_set(svc_impl->super, "AXIS2_WODEN_NESTED_CONFIGURABLE", AXIS2_HASH_KEY_STRING, 
+            svc_impl->configurable);
+ 
+    return &(svc_impl->svc);
+}
+
+static axis2_status_t
+axis2_woden_svc_free_ops(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    svc_impl = INTF_TO_IMPL(svc);
+
+    if(svc_impl->svc.base.svc_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+                svc_element.ops);
+        svc_impl->svc.base.svc_element.ops = NULL;
+    }
+
+    if(svc_impl->svc.base.svc_element.base.documentable_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+                svc_element.base.documentable_element.ops);
+        svc_impl->svc.base.svc_element.base.documentable_element.ops = 
+            NULL;
+    }
+    
+    if(svc_impl->svc.base.configurable.ops)
+    {
+        AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+                configurable.ops);
+        svc_impl->svc.base.configurable.ops = 
+            NULL;
+    }
+    
+    if(svc_impl->svc.base.configurable_component.ops)
+    {
+        AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+                configurable_component.ops);
+        svc_impl->svc.base.configurable_component.ops = NULL;
+    }
+
+    if(svc_impl->svc.base.configurable_component.wsdl_component.ops)
+    {
+        AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+                configurable_component.wsdl_component.ops);
+        svc_impl->svc.base.configurable_component.wsdl_component.ops = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_free(void *svc,
+                        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    svc_impl = INTF_TO_IMPL(svc);
+
+    if(svc_impl->f_qname)
+    {
+        WODEN_QNAME_FREE(svc_impl->f_qname, env);
+        svc_impl->f_qname = NULL;
+    }
+
+    if(svc_impl->f_interface_qname)
+    {
+        WODEN_QNAME_FREE(svc_impl->f_interface_qname, env);
+        svc_impl->f_interface_qname = NULL;
+    }
+
+    if(svc_impl->f_interface)
+    {
+        AXIS2_WODEN_INTERFACE_FREE(svc_impl->f_interface, env);
+        svc_impl->f_interface = NULL;
+    }
+
+    if(svc_impl->f_endpoints)
+    {
+        AXIS2_ARRAY_LIST_FREE(svc_impl->f_endpoints, env);
+        svc_impl->f_endpoints = NULL;
+    }
+   
+    /* TODO free f_parent */
+    
+    if(svc_impl->super)
+    {
+        axis2_hash_free(svc_impl->super, env);
+        svc_impl->super = NULL;
+    }
+    
+    if(svc_impl->methods)
+    {
+        axis2_hash_free(svc_impl->methods, env);
+        svc_impl->methods = NULL;
+    }
+
+    if(svc_impl->configurable)
+    {
+        AXIS2_WODEN_NESTED_CONFIGURABLE_FREE(svc_impl->configurable, env);
+        svc_impl->configurable = NULL;
+    }
+
+    axis2_woden_svc_free_ops(svc, env);
+
+    if((&(svc_impl->svc))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(svc_impl->svc))->ops);
+        (&(svc_impl->svc))->ops = NULL;
+    }
+    
+    if(svc_impl)
+    {
+        AXIS2_FREE((*env)->allocator, svc_impl);
+        svc_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_svc_super_objs(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    svc_impl = INTF_TO_IMPL(svc);
+
+    return svc_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_svc_type(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    svc_impl = INTF_TO_IMPL(svc);
+
+    return svc_impl->obj_type;
+}
+
+axis2_woden_configurable_t *AXIS2_CALL
+axis2_woden_svc_get_base_impl(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    svc_impl = INTF_TO_IMPL(svc);
+
+    return svc_impl->configurable;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_resolve_methods(
+        axis2_woden_svc_t *svc,
+        axis2_env_t **env,
+        axis2_woden_svc_t *svc_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_svc_impl_t *svc_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    svc_impl_l = INTF_TO_IMPL(svc_impl);
+    
+    svc->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    svc->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    svc->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    svc->ops->get_qname = axis2_hash_get(methods, 
+            "get_qname", AXIS2_HASH_KEY_STRING);
+    if(!svc->ops->get_qname && svc_impl_l)
+            svc->ops->get_qname = 
+            svc_impl_l->svc.ops->get_qname;
+    
+    svc->ops->get_interface = axis2_hash_get(methods, 
+            "get_interface", AXIS2_HASH_KEY_STRING);
+    if(!svc->ops->get_interface && svc_impl_l)
+            svc->ops->get_interface = 
+            svc_impl_l->svc.ops->get_interface;
+    
+    svc->ops->get_endpoints = axis2_hash_get(methods, 
+            "get_endpoints", AXIS2_HASH_KEY_STRING);
+    if(!svc->ops->get_endpoints && svc_impl_l)
+            svc->ops->get_endpoints = 
+            svc_impl_l->svc.ops->get_endpoints;
+    
+    svc->ops->set_interface_element = axis2_hash_get(methods, 
+            "set_interface_element", AXIS2_HASH_KEY_STRING);
+    if(!svc->ops->set_interface_element && svc_impl_l)
+            svc->ops->set_interface_element = 
+            svc_impl_l->svc.ops->set_interface_element;
+
+    return AXIS2_SUCCESS;
+}
+/* ************************************************************
+ *  Service interface methods (the WSDL Component model)
+ * ************************************************************/
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_svc_get_qname(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+    svc_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+    
+    return svc_impl->f_qname;
+}
+
+void *AXIS2_CALL
+axis2_woden_svc_get_interface(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+    svc_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+    
+    return svc_impl->f_interface;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_svc_get_endpoints(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+    svc_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+    
+    return svc_impl->f_endpoints;
+}
+/* ************************************************************
+ *  Service Element interface methods (the XML Element model)
+ * ************************************************************/
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_qname(
+        void *svc,
+        axis2_env_t **env,
+        axis2_qname_t *qname)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+    svc_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+    if(svc_impl->f_qname)
+    {
+        AXIS2_QNAME_FREE(svc_impl->f_qname, env);
+    }
+    svc_impl->f_qname = AXIS2_QNAME_CLONE(qname, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_interface_qname(
+        void *svc,
+        axis2_env_t **env,
+        axis2_qname_t *interface_qname)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+    svc_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+    if(svc_impl->f_interface_qname)
+    {
+        AXIS2_QNAME_FREE(svc_impl->f_interface_qname, env);
+    }
+
+    svc_impl->f_interface_qname = AXIS2_QNAME_CLONE(interface_qname, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_svc_get_interface_qname(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+    svc_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+    return svc_impl->f_interface_qname;
+}
+
+void *AXIS2_CALL
+axis2_woden_svc_get_interface_element(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+    svc_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+    return svc_impl->f_interface;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_add_endpoint_element(
+        void *svc,
+        axis2_env_t **env,
+        void *endpoint)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+    svc_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+    if(!svc_impl->f_endpoints)
+    {
+        svc_impl->f_endpoints = axis2_array_list_create(env, 0);
+        if(!svc_impl->f_endpoints)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
+
+    return AXIS2_ARRAY_LIST_ADD(svc_impl->f_endpoints, env, endpoint);
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_svc_get_endpoint_elements(
+        void *svc,
+        axis2_env_t **env)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+    svc_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+    
+    return svc_impl->f_endpoints;
+}
+/******************************************************************************
+ *  Non-API implementation methods
+ *****************************************************************************/  
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_interface_element(
+        void *svc,
+        axis2_env_t **env,
+        void *interface)
+{
+    axis2_woden_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+    svc_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+    if(svc_impl->f_interface)
+    {
+        /* TODO */
+    }
+
+    svc_impl->f_interface = interface;
+    return AXIS2_SUCCESS;
+}
+
+

Added: webservices/axis2/trunk/c/woden/src/wsdl20/types.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/types.c?rev=410740&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/types.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/types.c Wed May 31 21:34:47 2006
@@ -0,0 +1,1157 @@
+/*
+ * 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_types.h>
+#include <woden/wsdl20/xml/axis2_woden_documentation_element.h>
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
+#include <woden/wsdl20/extensions/axis2_woden_ext_element.h>
+#include <woden/xml/axis2_woden_xml_attr.h>
+#include <woden/schema/axis2_woden_schema.h>
+
+typedef struct axis2_woden_types_impl axis2_woden_types_impl_t;
+
+/** 
+ * @brief Types Struct Impl
+ *	Axis2 Types  
+ */ 
+struct axis2_woden_types_impl
+{
+    axis2_woden_types_t types;
+    axis2_woden_obj_types_t obj_type;
+    axis2_woden_documentable_t *documentable;
+    axis2_hash_t *super;
+    axis2_hash_t *methods;
+    axis2_char_t *f_type_system;
+    axis2_array_list_t *f_schemas;
+    axis2_array_list_t *schema_defs;
+};
+
+#define INTF_TO_IMPL(types) ((axis2_woden_types_impl_t *) types)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_types_free(
+        void *types,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_types_super_objs(
+        void *types,
+        axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL 
+axis2_woden_types_type(
+        void *types,
+        axis2_env_t **env);
+
+axis2_woden_documentable_t *AXIS2_CALL
+axis2_woden_types_get_base_impl(
+        void *types,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_types_set_type_system(
+        void *types,
+        axis2_env_t **env,
+        axis2_char_t *type_system);
+
+axis2_char_t *AXIS2_CALL 
+axis2_woden_types_get_type_system(
+        void *types,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_types_add_schema(
+        void *types,
+        axis2_env_t **env,
+        axis2_xml_schema_t *schema);
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_types_remove_schema(
+        void *types,
+        axis2_env_t **env,
+        axis2_xml_schema_t *schema);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_types_get_schemas(
+        void *types,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_types_get_schemas_with_namespace(
+        void *types,
+        axis2_env_t **env,
+        axis2_url_t *namespc);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_types_get_inlined_schemas(
+        void *types,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_types_get_imported_schemas(
+        void *types,
+        axis2_env_t **env);
+
+void *AXIS2_CALL 
+axis2_woden_types_get_element_declaration(
+        void *types,
+        axis2_env_t **env,
+        axis2_qname_t *qname);
+
+void *AXIS2_CALL 
+axis2_woden_types_get_type_definition(
+        void *types,
+        axis2_env_t **env,
+        axis2_qname_t *qname);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_types_get_referenceable_schema_defs(
+        void *types,
+        axis2_env_t **env);
+
+static axis2_array_list_t * 
+axis2_woden_types_get_referenceable_schema_defs_with_namespace(
+        void *types,
+        axis2_env_t **env,
+        axis2_char_t *namespc);
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_types_is_namespace_in_scope_with_namespace_uri(
+        void *types,
+        axis2_env_t **env,
+        axis2_url_t *namespc_uri);
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_types_is_namespace_in_scope_with_qname(
+        void *types,
+        axis2_env_t **env,
+        axis2_qname_t *qname);
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_types_is_namespace_in_scope_with_namespace(
+        void *types,
+        axis2_env_t **env,
+        axis2_char_t *namespc);
+
+static axis2_woden_types_t *
+create(axis2_env_t **env);
+
+static axis2_status_t
+axis2_woden_types_free_ops(
+        void *types,
+        axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_types_t *)
+axis2_woden_types_to_types_element(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!types)
+    {
+        types_impl = (axis2_woden_types_impl_t *) create(env);
+    }
+    else
+        types_impl = (axis2_woden_types_impl_t *) types;
+
+    axis2_woden_types_free_ops(types, env);
+
+    types_impl->types.base.types_element.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_types_element_ops_t));
+    axis2_woden_types_element_resolve_methods(&(types_impl->types.base.
+            types_element), env, types_impl->methods);
+    return types;
+}
+
+AXIS2_DECLARE(axis2_woden_types_t *)
+axis2_woden_types_to_documentable_element(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!types)
+    {
+        types_impl = (axis2_woden_types_impl_t *) create(env);
+    }
+    else
+        types_impl = (axis2_woden_types_impl_t *) types;
+
+    axis2_woden_types_free_ops(types, env);
+
+    types_impl->types.base.types_element.documentable_element.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_documentable_element_ops_t));
+    axis2_woden_documentable_element_resolve_methods(&(types_impl->types.base.
+            types_element.documentable_element), env, 
+            types_impl->methods);
+    return types;
+}
+
+AXIS2_DECLARE(axis2_woden_types_t *)
+axis2_woden_types_to_documentable(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!types)
+    {
+        types_impl = (axis2_woden_types_impl_t *) create(env);
+    }
+    else
+        types_impl = (axis2_woden_types_impl_t *) types;
+
+    axis2_woden_types_free_ops(types, env);
+
+    types_impl->types.base.documentable.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_documentable_ops_t));
+    axis2_woden_documentable_resolve_methods(&(types_impl->types.base.
+            documentable), env, types_impl->documentable, 
+            types_impl->methods);
+    return types;
+}
+
+AXIS2_DECLARE(axis2_woden_types_t *)
+axis2_woden_types_to_wsdl_obj(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    void *wsdl_obj = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!types)
+    {
+        types_impl = (axis2_woden_types_impl_t *) create(env);
+    }
+    else
+        types_impl = (axis2_woden_types_impl_t *) types;
+
+    axis2_woden_types_free_ops(types, env);
+
+    types_impl->types.base.documentable.base.wsdl_obj.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_wsdl_obj_ops_t));
+    wsdl_obj = AXIS2_WODEN_DOCUMENTABLE_GET_BASE_IMPL(types_impl->documentable,
+            env);
+    axis2_woden_wsdl_obj_resolve_methods(&(types_impl->types.base.
+            documentable.base.wsdl_obj), env, wsdl_obj, types_impl->methods);
+    return types;
+}
+
+AXIS2_DECLARE(axis2_woden_types_t *)
+axis2_woden_types_to_wsdl_component(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if(!types)
+    {
+        types_impl = (axis2_woden_types_impl_t *) create(env);
+    }
+    else
+        types_impl = (axis2_woden_types_impl_t *) types;
+
+    axis2_woden_types_free_ops(types, env);
+
+    types_impl->types.base.documentable.base.wsdl_obj.base.wsdl_component.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+        sizeof(axis2_woden_wsdl_component_ops_t));
+    axis2_woden_wsdl_component_resolve_methods(&(types_impl->types.base.
+            documentable.base.wsdl_obj.base.wsdl_component), env, 
+            types_impl->methods);
+    return types;
+}
+
+AXIS2_DECLARE(axis2_woden_types_t *)
+axis2_woden_types_to_attr_extensible(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if(!types)
+    {
+        types_impl = (axis2_woden_types_impl_t *) create(env);
+    }
+    else
+        types_impl = (axis2_woden_types_impl_t *) types;
+
+    axis2_woden_types_free_ops(types, env);
+
+    types_impl->types.base.documentable.base.wsdl_obj.base.
+            wsdl_element.base.attr_extensible.ops =
+            AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_attr_extensible_ops_t));
+    axis2_woden_attr_extensible_resolve_methods(&(types_impl->types.base.
+            documentable.base.wsdl_obj.base.wsdl_element.base.attr_extensible),
+            env, NULL, types_impl->methods);
+    return types;
+
+}
+
+AXIS2_DECLARE(axis2_woden_types_t *)
+axis2_woden_types_to_element_extensible(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if(!types)
+    {
+        types_impl = (axis2_woden_types_impl_t *) create(env);
+    }
+    else
+        types_impl = (axis2_woden_types_impl_t *) types;
+
+    axis2_woden_types_free_ops(types, env);
+    
+    types_impl->types.base.documentable.base.wsdl_obj.base.wsdl_element.
+                base.element_extensible.ops = AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_element_extensible_ops_t));
+    axis2_woden_element_extensible_resolve_methods(&(types_impl->types.base.
+                documentable.base.wsdl_obj.base.wsdl_element.base.element_extensible),
+                env, NULL, types_impl->methods);
+    return types;
+
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_types_t *
+create(axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    types_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_types_impl_t));
+
+    types_impl->obj_type= AXIS2_WODEN_TYPES;
+    types_impl->super = NULL;
+    types_impl->methods = NULL;
+    types_impl->f_type_system = NULL;
+    types_impl->f_schemas = NULL;
+    
+    types_impl->types.base.types_element.ops = NULL;
+    types_impl->types.base.types_element.documentable_element.ops = 
+            NULL;
+    types_impl->types.base.documentable.ops = NULL;
+    types_impl->types.base.documentable.base.wsdl_obj.base.wsdl_component.ops = 
+            NULL;
+    types_impl->types.base.documentable.base.wsdl_obj.ops = NULL;
+    types_impl->types.base.documentable.base.wsdl_obj.base.wsdl_element.
+            base.attr_extensible.ops = NULL;
+    types_impl->types.base.documentable.base.wsdl_obj.base.wsdl_element.
+            base.element_extensible.ops = NULL;
+    
+    types_impl->types.ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_types_ops_t));
+
+    types_impl->f_schemas = axis2_array_list_create(env, 0);
+
+    types_impl->types.ops->free = axis2_woden_types_free;
+    types_impl->types.ops->super_objs = axis2_woden_types_super_objs;
+    types_impl->types.ops->type = axis2_woden_types_type;
+    types_impl->types.ops->get_base_impl = axis2_woden_types_get_base_impl;
+    types_impl->types.ops->get_element_declaration = 
+        axis2_woden_types_get_element_declaration;
+    types_impl->types.ops->get_type_definition = 
+        axis2_woden_types_get_type_definition;
+    types_impl->types.ops->get_referenceable_schema_defs = 
+        axis2_woden_types_get_referenceable_schema_defs;
+    types_impl->types.ops->is_namespace_in_scope_with_namespace_uri = 
+        axis2_woden_types_is_namespace_in_scope_with_namespace_uri;
+    types_impl->types.ops->is_namespace_in_scope_with_qname = 
+        axis2_woden_types_is_namespace_in_scope_with_qname;
+    types_impl->types.ops->is_namespace_in_scope_with_namespace = 
+        axis2_woden_types_is_namespace_in_scope_with_namespace;
+ 
+    types_impl->methods = axis2_hash_make(env);
+    if(!types_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(types_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_free);
+    axis2_hash_set(types_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_super_objs);
+    axis2_hash_set(types_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_types_type);
+
+    axis2_hash_set(types_impl->methods, "set_type_system", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_set_type_system);
+    axis2_hash_set(types_impl->methods, "get_type_system", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_get_type_system);
+    axis2_hash_set(types_impl->methods, "add_schema", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_add_schema);
+    axis2_hash_set(types_impl->methods, "remove_schema", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_remove_schema);
+    axis2_hash_set(types_impl->methods, "get_schemas", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_get_schemas);
+    axis2_hash_set(types_impl->methods, "get_schemas_with_namespace", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_get_schemas_with_namespace);
+    axis2_hash_set(types_impl->methods, "get_inlined_schemas", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_get_inlined_schemas);
+    axis2_hash_set(types_impl->methods, "get_imported_schemas", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_get_imported_schemas);
+    axis2_hash_set(types_impl->methods, "get_element_declaration", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_get_element_declaration);
+    axis2_hash_set(types_impl->methods, "get_type_definition", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_get_type_definition);
+    axis2_hash_set(types_impl->methods, "get_referenceable_schema_defs", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_get_referenceable_schema_defs);
+    axis2_hash_set(types_impl->methods, "get_referenceable_schema_defs_with_namespace", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_get_referenceable_schema_defs_with_namespace);
+    axis2_hash_set(types_impl->methods, "is_namespace_in_scope_with_namespace_uri", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_is_namespace_in_scope_with_namespace_uri);
+    axis2_hash_set(types_impl->methods, "is_namespace_in_scope_with_qname", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_is_namespace_in_scope_with_qname);
+    axis2_hash_set(types_impl->methods, "is_namespace_in_scope_with_namespace", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_types_is_namespace_in_scope_with_namespace);
+    
+
+    return &(types_impl->types);
+}
+
+AXIS2_DECLARE(axis2_woden_types_t *)
+axis2_woden_types_create(axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    types_impl = (axis2_woden_types_impl_t *) create(env);
+
+    types_impl->documentable = axis2_woden_documentable_create(env);
+
+    types_impl->super = axis2_hash_make(env);
+    if(!types_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(types_impl->super, "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING, 
+            &(types_impl->types));
+    axis2_hash_set(types_impl->super, "AXIS2_WODEN_DOCUMENTABLE", AXIS2_HASH_KEY_STRING, 
+            types_impl->documentable);
+    
+    return &(types_impl->types);
+}
+
+static axis2_status_t
+axis2_woden_types_free_ops(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    types_impl = INTF_TO_IMPL(types);
+
+    if(types_impl->types.base.types_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, types_impl->types.base.
+                types_element.ops);
+        types_impl->types.base.types_element.ops = NULL;
+    }
+
+    if(types_impl->types.base.types_element.documentable_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, types_impl->types.base.
+                types_element.documentable_element.ops);
+        types_impl->types.base.types_element.documentable_element.ops = 
+            NULL;
+    }
+    
+    if(types_impl->types.base.documentable.ops)
+    {
+        AXIS2_FREE((*env)->allocator, types_impl->types.base.
+                documentable.ops);
+        types_impl->types.base.documentable.ops = 
+            NULL;
+    }
+    
+    if(types_impl->types.base.documentable.base.wsdl_obj.ops)
+    {
+        AXIS2_FREE((*env)->allocator, types_impl->types.base.
+                documentable.base.wsdl_obj.ops);
+        types_impl->types.base.documentable.base.wsdl_obj.ops = 
+            NULL;
+    }
+    
+    if(types_impl->types.base.documentable.base.wsdl_obj.base.wsdl_component.ops)
+    {
+        AXIS2_FREE((*env)->allocator, types_impl->types.base.
+                documentable.base.wsdl_obj.base.wsdl_component.ops);
+        types_impl->types.base.documentable.base.wsdl_obj.base.wsdl_component.
+            ops = NULL;
+    }
+
+    if(types_impl->types.base.documentable.base.wsdl_obj.base.
+            wsdl_element.base.attr_extensible.ops)
+    {
+        AXIS2_FREE((*env)->allocator, types_impl->types.base.documentable.
+                base.wsdl_obj.base.wsdl_element.base.attr_extensible.ops);
+        types_impl->types.base.documentable.base.wsdl_obj.base.wsdl_element.
+                base.attr_extensible.ops = NULL;
+    }
+
+    if(types_impl->types.base.documentable.base.wsdl_obj.base.
+            wsdl_element.base.element_extensible.ops)
+    {
+        AXIS2_FREE((*env)->allocator, types_impl->types.base.documentable.
+                base.wsdl_obj.base.wsdl_element.base.element_extensible.ops);
+        types_impl->types.base.documentable.base.wsdl_obj.base.wsdl_element.
+                base.element_extensible.ops = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_woden_types_free(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    types_impl = INTF_TO_IMPL(types);
+
+    if(types_impl->f_schemas)
+    {
+        AXIS2_ARRAY_LIST_FREE(types_impl->f_schemas, env);
+        types_impl->f_schemas = NULL;
+    }
+    
+    if(types_impl->schema_defs)
+    {
+        AXIS2_ARRAY_LIST_FREE(types_impl->schema_defs, env);
+        types_impl->schema_defs = NULL;
+    }
+
+    if(types_impl->f_type_system)
+    {
+        AXIS2_FREE((*env)->allocator, types_impl->f_type_system);
+        types_impl->f_type_system = NULL;
+    }
+    
+    if(types_impl->super)
+    {
+        axis2_hash_free(types_impl->super, env);
+        types_impl->super = NULL;
+    }
+    
+    if(types_impl->methods)
+    {
+        axis2_hash_free(types_impl->methods, env);
+        types_impl->methods = NULL;
+    }
+
+    if(types_impl->documentable)
+    {
+        AXIS2_WODEN_DOCUMENTABLE_FREE(types_impl->documentable, env);
+        types_impl->documentable = NULL;
+    }
+
+    axis2_woden_types_free_ops(types, env);
+
+    if((&(types_impl->types))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(types_impl->types))->ops);
+        (&(types_impl->types))->ops = NULL;
+    }
+    
+    if(types_impl)
+    {
+        AXIS2_FREE((*env)->allocator, types_impl);
+        types_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_types_super_objs(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    types_impl = INTF_TO_IMPL(types);
+
+    return types_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_types_type(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    types_impl = INTF_TO_IMPL(types);
+
+    return types_impl->obj_type;
+}
+
+axis2_woden_documentable_t *AXIS2_CALL
+axis2_woden_types_get_base_impl(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    types_impl = INTF_TO_IMPL(types);
+
+    return types_impl->documentable;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_types_resolve_methods(
+        axis2_woden_types_t *types,
+        axis2_env_t **env,
+        axis2_woden_types_t *types_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_types_impl_t *types_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    types_impl_l = INTF_TO_IMPL(types_impl);
+    
+    types->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    types->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    types->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+
+    types->ops->get_element_declaration = axis2_hash_get(methods, 
+            "get_element_declaration", AXIS2_HASH_KEY_STRING);
+    if(!types->ops->get_element_declaration && types_impl_l)
+            types->ops->get_element_declaration = 
+            types_impl_l->types.ops->get_element_declaration;
+    
+    types->ops->get_type_definition = axis2_hash_get(methods, 
+            "get_type_definition", AXIS2_HASH_KEY_STRING);
+    if(!types->ops->get_type_definition && types_impl_l)
+            types->ops->get_type_definition = 
+            types_impl_l->types.ops->get_type_definition;
+    
+    types->ops->get_referenceable_schema_defs = axis2_hash_get(methods, 
+            "get_referenceable_schema_defs", AXIS2_HASH_KEY_STRING);
+    if(!types->ops->get_referenceable_schema_defs && types_impl_l)
+            types->ops->get_referenceable_schema_defs = 
+            types_impl_l->types.ops->get_referenceable_schema_defs;
+    
+    types->ops->is_namespace_in_scope_with_namespace_uri = 
+        axis2_hash_get(methods, "is_namespace_in_scope_with_namespace_uri", 
+        AXIS2_HASH_KEY_STRING);
+    if(!types->ops->is_namespace_in_scope_with_namespace_uri && types_impl_l)
+            types->ops->is_namespace_in_scope_with_namespace_uri = 
+            types_impl_l->types.ops->is_namespace_in_scope_with_namespace_uri;
+    
+    types->ops->is_namespace_in_scope_with_qname = axis2_hash_get(methods, 
+            "is_namespace_in_scope_with_qname", AXIS2_HASH_KEY_STRING);
+    if(!types->ops->is_namespace_in_scope_with_qname && types_impl_l)
+            types->ops->is_namespace_in_scope_with_qname = 
+            types_impl_l->types.ops->is_namespace_in_scope_with_qname;
+    
+    types->ops->is_namespace_in_scope_with_namespace = axis2_hash_get(methods, 
+            "is_namespace_in_scope_with_namespace", AXIS2_HASH_KEY_STRING);
+    if(!types->ops->is_namespace_in_scope_with_namespace && types_impl_l)
+            types->ops->is_namespace_in_scope_with_namespace = 
+            types_impl_l->types.ops->is_namespace_in_scope_with_namespace;
+   
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_types_set_type_system(
+        void *types,
+        axis2_env_t **env,
+        axis2_char_t *type_system)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, type_system, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+
+    if(types_impl->f_type_system)
+    {
+        AXIS2_FREE((*env)->allocator, types_impl->f_type_system);
+    }
+    types_impl->f_type_system = AXIS2_STRDUP(type_system, env);
+    if(!types_impl->f_type_system)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE)
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL 
+axis2_woden_types_get_type_system(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+    return types_impl->f_type_system;
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_types_add_schema(
+        void *types,
+        axis2_env_t **env,
+        axis2_xml_schema_t *schema)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, schema, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+        
+    return AXIS2_ARRAY_LIST_ADD(types_impl->f_schemas, env, schema);
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_types_remove_schema(
+        void *types,
+        axis2_env_t **env,
+        axis2_xml_schema_t *schema)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    int index = 0;
+    axis2_status_t code = AXIS2_FAILURE;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, schema, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+
+    index = AXIS2_ARRAY_LIST_INDEX_OF(types_impl->f_schemas, env, schema);
+    AXIS2_ARRAY_LIST_REMOVE(types_impl->f_schemas, env, index);
+    code = AXIS2_ERROR_GET_STATUS_CODE((*env)->error);
+    return code;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_types_get_schemas(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+    return types_impl->f_schemas;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_types_get_schemas_with_namespace(
+        void *types,
+        axis2_env_t **env,
+        axis2_url_t *namespc)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    int i = 0, size = 0;
+    axis2_char_t *str_namespc = NULL;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+
+    if(namespc)
+        str_namespc = AXIS2_URL_TO_EXTERNAL_FORM(namespc, env);
+    size = AXIS2_ARRAY_LIST_SIZE(types_impl->f_schemas, env);
+    for(i = 0; i < size; i++)
+    {
+        axis2_char_t *str_namespc_l = NULL;        
+        axis2_woden_schema_t *schema = (axis2_woden_schema_t *) 
+            AXIS2_ARRAY_LIST_GET(types_impl->f_schemas, env, i);
+        str_namespc_l = AXIS2_WODEN_SCHEMA_GET_NAMESPACE_AS_STRING(schema, env);
+        /* get schemas whose namespace is missing */
+        if(!str_namespc && !str_namespc_l)
+            AXIS2_ARRAY_LIST_ADD(types_impl->schema_defs, env, schema);
+        else if(str_namespc && str_namespc_l && 0 == AXIS2_STRCMP(str_namespc, 
+                    str_namespc_l)) 
+        {
+                AXIS2_ARRAY_LIST_ADD(types_impl->schema_defs ,env, schema);
+        }
+    }
+    return types_impl->schema_defs;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_types_get_inlined_schemas(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    int i = 0, size = 0;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+
+    size = AXIS2_ARRAY_LIST_SIZE(types_impl->f_schemas, env);
+    for(i = 0; i < size; i++)
+    {
+        axis2_woden_schema_t *s = (axis2_woden_schema_t *) 
+            AXIS2_ARRAY_LIST_GET(types_impl->f_schemas, env, i);
+        if(AXIS2_WODEN_INLINED_SCHEMA == AXIS2_WODEN_SCHEMA_TYPE(s, env))
+        {
+            AXIS2_ARRAY_LIST_ADD(types_impl->schema_defs, env, s);
+        }
+    }
+    return types_impl->schema_defs;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_types_get_imported_schemas(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    int i = 0, size = 0;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+
+    size = AXIS2_ARRAY_LIST_SIZE(types_impl->f_schemas, env);
+    for(i = 0; i < size; i++)
+    {
+        axis2_woden_schema_t *s = (axis2_woden_schema_t *) 
+            AXIS2_ARRAY_LIST_GET(types_impl->f_schemas, env, i);
+        if(AXIS2_WODEN_IMPORTED_SCHEMA == AXIS2_WODEN_SCHEMA_TYPE(s, env))
+        {
+            AXIS2_ARRAY_LIST_ADD(types_impl->schema_defs, env, s);
+        }
+    }
+    return types_impl->schema_defs;
+}
+
+void *AXIS2_CALL 
+axis2_woden_types_get_element_declaration(
+        void *types,
+        axis2_env_t **env,
+        axis2_qname_t *qname)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    axis2_xml_schema_element_t *xml_schema_el = NULL;
+    axis2_array_list_t *schemas = NULL;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+    /* Can't resolve the element if the QName is NULL.*/
+    if(NULL == qname)
+      return NULL;
+   
+    axis2_char_t *uri = AXIS2_QNAME_GET_URI(qname, env);
+    schemas = axis2_woden_types_get_referenceable_schema_defs_with_namespace(
+            types, env, uri);
+    if(schemas)
+    {
+        int i = 0, size = 0;
+
+        /* search the schemas with this qname's namespace */
+        size = AXIS2_ARRAY_LIST_SIZE(schemas, env);
+        for(i = 0; i < size; i++)
+        {
+            axis2_xml_schema_t *xml_schema = (axis2_xml_schema_t *)
+                AXIS2_ARRAY_LIST_GET(schemas, env, i);
+            xml_schema_el = AXIS2_XML_SCHEMA_GET_ELEMENT_BY_QNAME(xml_schema, 
+                    env, qname);
+            if(xml_schema_el) 
+            {
+                break;
+            }
+        }
+    }
+    return xml_schema_el;
+}
+
+void *AXIS2_CALL 
+axis2_woden_types_get_type_definition(
+        void *types,
+        axis2_env_t **env,
+        axis2_qname_t *qname)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    axis2_xml_schema_type_t *xml_schema_type = NULL;
+    axis2_array_list_t *schema_refs = NULL;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+
+    if(qname)
+    {
+        axis2_char_t *uri = AXIS2_QNAME_GET_URI(qname, env);
+        schema_refs = 
+            axis2_woden_types_get_referenceable_schema_defs_with_namespace(
+            types, env, uri);
+        if(schema_refs)
+        {
+            int i = 0, size = 0;
+
+            /* search the schemas with this qname's namespace */
+            size = AXIS2_ARRAY_LIST_SIZE(schema_refs, env);
+            for(i = 0; i < size; i++)
+            {
+                axis2_xml_schema_t *xml_schema = (axis2_xml_schema_t *)
+                    AXIS2_ARRAY_LIST_GET(schema_refs, env, i);
+                xml_schema_type = AXIS2_XML_SCHEMA_GET_TYPE_BY_QNAME(xml_schema, 
+                        env, qname);
+                if(xml_schema_type) 
+                {
+                    break;
+                }
+            }
+        }
+    }
+    return xml_schema_type;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_types_get_referenceable_schema_defs(
+        void *types,
+        axis2_env_t **env)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    int i = 0, size = 0;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+
+    if(types_impl->schema_defs)
+    {
+        int i = 0, size = 0;
+        size = AXIS2_ARRAY_LIST_SIZE(types_impl->schema_defs, env);
+        for(i = 0; i < size; i++)
+        {
+            axis2_woden_schema_t *schema = AXIS2_ARRAY_LIST_GET(
+                    types_impl->schema_defs, env, i);
+            AXIS2_WODEN_SCHEMA_FREE(schema, env);
+        }
+        axis2_array_list_free(types_impl->schema_defs, env);
+    }
+    types_impl->schema_defs = axis2_array_list_create(env, 0);
+    if(!types_impl->schema_defs)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    size = AXIS2_ARRAY_LIST_SIZE(types_impl->f_schemas, env);
+    for(i = 0; i < size; i++)
+    {
+        axis2_woden_schema_t *s = (axis2_woden_schema_t *) 
+            AXIS2_ARRAY_LIST_GET(types_impl->f_schemas, env, i);
+        axis2_xml_schema_t *schema_def = AXIS2_WODEN_SCHEMA_GET_SCHEMA_DEF(s, 
+                env);
+        if(AXIS2_TRUE == AXIS2_WODEN_SCHEMA_IS_REFERENCEABLE(s, env) &&
+                NULL != schema_def)
+        {
+            AXIS2_ARRAY_LIST_ADD(types_impl->schema_defs, env, schema_def);
+        }
+    }
+    return types_impl->schema_defs;
+}
+
+static axis2_array_list_t *AXIS2_CALL 
+axis2_woden_types_get_referenceable_schema_defs_with_namespace(
+        void *types,
+        axis2_env_t **env,
+        axis2_char_t *namespc)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    int i = 0, size = 0;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, namespc, NULL);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+   
+    size = AXIS2_ARRAY_LIST_SIZE(types_impl->f_schemas, env);
+    for(i = 0; i < size; i++)
+    {
+        axis2_woden_schema_t *schema = 
+            (axis2_woden_schema_t *) AXIS2_ARRAY_LIST_GET(types_impl->f_schemas, 
+             env, i);
+        axis2_char_t *namespc_l = 
+            AXIS2_WODEN_SCHEMA_GET_NAMESPACE_AS_STRING(schema, env);
+        axis2_xml_schema_t *schema_def = 
+            AXIS2_WODEN_SCHEMA_GET_SCHEMA_DEF(schema, env);
+        if(AXIS2_TRUE == AXIS2_WODEN_SCHEMA_IS_REFERENCEABLE(schema, env) &&
+                0 == AXIS2_STRCMP(namespc, namespc_l) && NULL != schema_def)
+        {
+            AXIS2_ARRAY_LIST_ADD(types_impl->schema_defs, env, schema_def);
+        }
+    }
+    return types_impl->schema_defs;
+}
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_types_is_namespace_in_scope_with_namespace_uri(
+        void *types,
+        axis2_env_t **env,
+        axis2_url_t *namespc_uri)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    AXIS2_PARAM_CHECK((*env)->error, namespc_uri, AXIS2_FAILURE);
+    axis2_char_t *str_uri = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+
+    str_uri = AXIS2_URL_TO_EXTERNAL_FORM(namespc_uri, env);
+    return is_namespace_in_scope_with_namespace(types, env, str_uri);
+}
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_types_is_namespace_in_scope_with_qname(
+        void *types,
+        axis2_env_t **env,
+        axis2_qname_t *qname)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    axis2_char_t *str_uri = NULL;
+    axis2_url_t *uri = NULL;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, qname, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+
+    str_uri = AXIS2_QNAME_GET_URI(qname, env);
+    uri = axis2_url_parse_string(env, str_uri);
+    return is_namespace_in_scope_with_namespace_uri(types, env, uri);
+}
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_types_is_namespace_in_scope_with_namespace(
+        void *types,
+        axis2_env_t **env,
+        axis2_char_t *namespc)
+{
+    axis2_woden_types_impl_t *types_impl = NULL;
+    axis2_bool_t result = AXIS2_FALSE;
+    int i = 0, size = 0;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, namespc, AXIS2_FAILURE);
+    super = AXIS2_WODEN_TYPES_SUPER_OBJS(types, env);
+    types_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_TYPES", AXIS2_HASH_KEY_STRING));
+
+    size = AXIS2_ARRAY_LIST_SIZE(types_impl->f_schemas, env);
+    for(i = 0; i < size; i++)
+    {
+        axis2_char_t *namespc_l = NULL;
+        
+        axis2_woden_schema_t *s = (axis2_woden_schema_t *) AXIS2_ARRAY_LIST_GET(
+                types_impl->f_schemas, env, i);
+        if(!s)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_WSDL_SCHEMA_IS_NULL, 
+                    AXIS2_FAILURE);
+            return AXIS2_FALSE;
+        }
+        namespc_l = AXIS2_WODEN_SCHEMA_GET_NAMESPACE_AS_STRING(s, env);
+        if(AXIS2_TRUE ==AXIS2_WODEN_SCHEMA_IS_REFERENCEABLE(s, env) &&
+                0 == AXIS2_STRCMP(namespc, namespc_l)) 
+        {
+            result = AXIS2_TRUE;
+            break;
+        }
+    }
+    return result;
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl20/wsdl_element.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/wsdl_element.c?rev=410740&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/wsdl_element.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/wsdl_element.c Wed May 31 21:34:47 2006
@@ -0,0 +1,629 @@
+/*
+ * 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/xml/axis2_woden_wsdl_element.h>
+#include <woden/wsdl20/extensions/axis2_woden_element_extensible.h>
+#include <woden/wsdl20/extensions/axis2_woden_attr_extensible.h>
+#include <woden/wsdl20/extensions/axis2_woden_ext_element.h>
+#include <woden/xml/axis2_woden_xml_attr.h>
+#include <axis2_url.h>
+#include <axis2_hash.h>
+
+typedef struct axis2_woden_wsdl_element_impl axis2_woden_wsdl_element_impl_t;
+
+/** 
+ * @brief Wsdl Element Struct Impl
+ *	Axis2 Wsdl Element  
+ */ 
+struct axis2_woden_wsdl_element_impl
+{
+    axis2_woden_wsdl_element_t wsdl_element;
+    axis2_woden_obj_types_t obj_type;
+    axis2_hash_t *super;
+    axis2_hash_t *methods;
+    axis2_woden_attr_extensible_t *f_attr_ext;
+    axis2_woden_element_extensible_t *f_elem_ext;
+};
+
+#define INTF_TO_IMPL(wsdl_element) \
+    ((axis2_woden_wsdl_element_impl_t *) wsdl_element)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_wsdl_element_free(
+        void *wsdl_element,
+        axis2_env_t **envv);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_wsdl_element_super_objs(
+        void *wsdl_element,
+        axis2_env_t **envv);
+
+axis2_woden_obj_types_t AXIS2_CALL 
+axis2_woden_wsdl_element_type(
+        void *wsdl_element,
+        axis2_env_t **envv);
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_wsdl_element_set_ext_attr(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_qname_t *attr_type,
+        axis2_woden_xml_attr_t *attr); 
+
+void *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_attr(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_qname_t *attr_type); 
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_attrs(
+        void *wsdl_element,
+        axis2_env_t **env); 
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_attrs_for_namespace(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_url_t *namespc);
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_wsdl_element_has_ext_attrs_for_namespace(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_url_t *namespc);
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_wsdl_element_add_ext_element(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_woden_ext_element_t *ext_el); 
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_wsdl_element_remove_ext_element(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_woden_ext_element_t *ext_el); 
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_elements(
+        void *wsdl_element,
+        axis2_env_t **env); 
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_elements_of_type(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_qname_t *elem_type);
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_wsdl_element_has_ext_elements_for_namespace(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_url_t *namespc);
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_wsdl_element_add_ext_element(
+        void *wsdl_element,
+        axis2_env_t **env,
+axis2_woden_ext_element_t *ext_el); 
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_wsdl_element_remove_ext_element(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_woden_ext_element_t *ext_el);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_elements(
+        void *wsdl_element,
+        axis2_env_t **env); 
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_elements_of_type(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_qname_t *ext_type);
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_wsdl_element_has_ext_elements_for_namespace(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_url_t *namespc);
+
+static axis2_woden_wsdl_element_t *
+create(
+        axis2_env_t **env);
+
+static axis2_status_t
+axis2_woden_wsdl_element_free_ops(
+        void *wsdl_element,
+        axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_wsdl_element_t *)
+axis2_woden_wsdl_element_to_attr_extensible(
+        void *wsdl_element,
+        axis2_env_t **env)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if(!wsdl_element)
+    {
+        wsdl_element_impl = (axis2_woden_wsdl_element_impl_t *) create(env);
+    }
+    else
+        wsdl_element_impl = (axis2_woden_wsdl_element_impl_t *) wsdl_element;
+
+    axis2_woden_wsdl_element_free_ops(wsdl_element, env);
+
+    wsdl_element_impl->wsdl_element.base.attr_extensible.ops = 
+            AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_attr_extensible_ops_t));
+    axis2_woden_attr_extensible_resolve_methods(&(wsdl_element_impl->
+            wsdl_element.base.attr_extensible), env, NULL, wsdl_element_impl->methods);
+    return wsdl_element;
+
+}
+
+AXIS2_DECLARE(axis2_woden_wsdl_element_t *)
+axis2_woden_wsdl_element_to_element_extensible(
+        void *wsdl_element,
+        axis2_env_t **env)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if(!wsdl_element)
+    {
+        wsdl_element_impl = (axis2_woden_wsdl_element_impl_t *) create(env);
+    }
+    else
+        wsdl_element_impl = (axis2_woden_wsdl_element_impl_t *) wsdl_element;
+
+    axis2_woden_wsdl_element_free_ops(wsdl_element, env);
+
+    wsdl_element_impl->wsdl_element.base.element_extensible.ops = 
+            AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_element_extensible_ops_t));
+    axis2_woden_element_extensible_resolve_methods(&(wsdl_element_impl->
+            wsdl_element.base.element_extensible), env, NULL, wsdl_element_impl->methods);
+    return wsdl_element;
+
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_wsdl_element_t *
+create(
+        axis2_env_t **env)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    wsdl_element_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_wsdl_element_impl_t));
+
+    wsdl_element_impl->super = NULL;
+    wsdl_element_impl->methods = NULL;
+    wsdl_element_impl->obj_type = AXIS2_WODEN_WSDL_ELEMENT;
+    wsdl_element_impl->f_attr_ext = NULL;
+    wsdl_element_impl->f_elem_ext = NULL;
+
+    wsdl_element_impl->wsdl_element.base.attr_extensible.ops = NULL;
+    wsdl_element_impl->wsdl_element.base.element_extensible.ops = NULL;
+    wsdl_element_impl->wsdl_element.ops = 
+            AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_wsdl_element_ops_t)); 
+   
+    wsdl_element_impl->wsdl_element.ops->free = axis2_woden_wsdl_element_free;
+    wsdl_element_impl->wsdl_element.ops->super_objs = 
+        axis2_woden_wsdl_element_super_objs;
+    wsdl_element_impl->wsdl_element.ops->type = axis2_woden_wsdl_element_type;
+    
+    wsdl_element_impl->methods = axis2_hash_make(env);
+    if(!wsdl_element_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(wsdl_element_impl->methods, "free", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_element_free);
+    axis2_hash_set(wsdl_element_impl->methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_element_super_objs);
+    axis2_hash_set(wsdl_element_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_element_type);
+    axis2_hash_set(wsdl_element_impl->methods, "set_ext_attr", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_element_set_ext_attr);
+    axis2_hash_set(wsdl_element_impl->methods, "get_ext_attr", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_element_get_ext_attr);
+    axis2_hash_set(wsdl_element_impl->methods, "get_ext_attrs", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_element_get_ext_attrs);
+    axis2_hash_set(wsdl_element_impl->methods, "get_ext_attrs_for_namespace", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_wsdl_element_get_ext_attrs_for_namespace);
+    axis2_hash_set(wsdl_element_impl->methods, "has_ext_attrs_for_namespace", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_wsdl_element_has_ext_attrs_for_namespace);
+    axis2_hash_set(wsdl_element_impl->methods, "add_ext_element", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_element_add_ext_element);
+    axis2_hash_set(wsdl_element_impl->methods, "remove_ext_element", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_element_remove_ext_element);
+    axis2_hash_set(wsdl_element_impl->methods, "get_ext_elements", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_element_get_ext_elements);
+    axis2_hash_set(wsdl_element_impl->methods, "get_ext_elements_of_type", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_wsdl_element_get_ext_elements_of_type);
+    axis2_hash_set(wsdl_element_impl->methods, "has_ext_elements_for_namespace", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_wsdl_element_has_ext_elements_for_namespace);
+    
+    return &(wsdl_element_impl->wsdl_element);
+}
+
+AXIS2_DECLARE(axis2_woden_wsdl_element_t *)
+axis2_woden_wsdl_element_create(
+        axis2_env_t **env)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    wsdl_element_impl = (axis2_woden_wsdl_element_impl_t *) create;
+
+    wsdl_element_impl->f_attr_ext = axis2_woden_attr_extensible_create(env);
+    if(!wsdl_element_impl->f_attr_ext)
+    {
+        return NULL;
+    }
+    wsdl_element_impl->f_elem_ext = axis2_woden_element_extensible_create(env);
+    if(!wsdl_element_impl->f_elem_ext)
+    {
+        return NULL;
+    }
+
+    wsdl_element_impl->super = axis2_hash_make(env);
+    if(!wsdl_element_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(wsdl_element_impl->super, "AXIS2_WODEN_WSDL_ELEMENT", 
+            AXIS2_HASH_KEY_STRING, &(wsdl_element_impl->wsdl_element));
+ 
+    return &(wsdl_element_impl->wsdl_element);
+}
+
+static axis2_status_t
+axis2_woden_wsdl_element_free_ops(
+        void *wsdl_element,
+        axis2_env_t **env)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    wsdl_element_impl = INTF_TO_IMPL(wsdl_element);
+
+    if(wsdl_element_impl->wsdl_element.base.attr_extensible.ops)
+    {
+        AXIS2_FREE((*env)->allocator, wsdl_element_impl->wsdl_element.base.
+                attr_extensible.ops);
+        wsdl_element_impl->wsdl_element.base.attr_extensible.ops = NULL;
+    }
+
+    if(wsdl_element_impl->wsdl_element.base.element_extensible.ops)
+    {
+        AXIS2_FREE((*env)->allocator, wsdl_element_impl->wsdl_element.base.
+                element_extensible.ops);
+        wsdl_element_impl->wsdl_element.base.element_extensible.ops = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_woden_wsdl_element_free(
+        void *wsdl_element,
+        axis2_env_t **env)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    wsdl_element_impl = INTF_TO_IMPL(wsdl_element);
+
+    if(wsdl_element_impl->f_attr_ext)
+    {
+        AXIS2_WODEN_ATTR_EXTENSIBLE_FREE(wsdl_element_impl->f_attr_ext, env);
+        wsdl_element_impl->f_attr_ext = NULL;
+    }
+    
+    if(wsdl_element_impl->f_elem_ext)
+    {
+        AXIS2_WODEN_ELEMENT_EXTENSIBLE_FREE(wsdl_element_impl->f_elem_ext, env);
+        wsdl_element_impl->f_elem_ext = NULL;
+    }
+    
+    if(wsdl_element_impl->super)
+    {
+        axis2_hash_free(wsdl_element_impl->super, env);
+        wsdl_element_impl->super = NULL;
+    }
+    
+    if(wsdl_element_impl->methods)
+    {
+        axis2_hash_free(wsdl_element_impl->methods, env);
+        wsdl_element_impl->methods = NULL;
+    }
+
+    axis2_woden_wsdl_element_free_ops(wsdl_element, env);
+
+    if(wsdl_element_impl->wsdl_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, wsdl_element_impl->wsdl_element.ops);
+        wsdl_element_impl->wsdl_element.ops = NULL;
+    }
+
+    if(wsdl_element_impl)
+    {
+        AXIS2_FREE((*env)->allocator, wsdl_element_impl);
+        wsdl_element_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_wsdl_element_super_objs(
+        void *wsdl_element,
+        axis2_env_t **env)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    wsdl_element_impl = INTF_TO_IMPL(wsdl_element);
+    
+    return wsdl_element_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_wsdl_element_type(
+        void *wsdl_element,
+        axis2_env_t **env)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    wsdl_element_impl = INTF_TO_IMPL(wsdl_element);
+    
+    return wsdl_element_impl->obj_type;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_wsdl_element_resolve_methods(
+        axis2_woden_wsdl_element_t *wsdl_element,
+        axis2_env_t **env,
+        axis2_woden_wsdl_element_t *wsdl_element_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    wsdl_element_impl_l = INTF_TO_IMPL(wsdl_element);
+    
+    wsdl_element->ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_wsdl_element_ops_t));
+    wsdl_element->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    wsdl_element->ops->super_objs = axis2_hash_get(methods, 
+            "super_objs", AXIS2_HASH_KEY_STRING);
+    wsdl_element->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+
+    return AXIS2_SUCCESS;    
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_wsdl_element_set_ext_attr(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_qname_t *attr_type,
+        axis2_woden_xml_attr_t *attr)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, attr_type, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, attr, AXIS2_FAILURE);
+    super = AXIS2_WODEN_WSDL_ELEMENT_SUPER_OBJS(wsdl_element, env);
+    wsdl_element_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_WSDL_ELEMENT", AXIS2_HASH_KEY_STRING)); 
+
+    return AXIS2_WODEN_ATTR_EXTENSIBLE_SET_EXT_ATTR(wsdl_element_impl->f_attr_ext, 
+            env, attr_type, attr);    
+}
+
+void *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_attr(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_qname_t *attr_type) 
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, attr_type, AXIS2_FAILURE);
+    super = AXIS2_WODEN_WSDL_ELEMENT_SUPER_OBJS(wsdl_element, env);
+    wsdl_element_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_WSDL_ELEMENT", AXIS2_HASH_KEY_STRING)); 
+    
+    return AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(wsdl_element_impl->f_attr_ext, 
+            env, attr_type);
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_attrs(
+        void *wsdl_element,
+        axis2_env_t **env) 
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_WSDL_ELEMENT_SUPER_OBJS(wsdl_element, env);
+    wsdl_element_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_WSDL_ELEMENT", AXIS2_HASH_KEY_STRING)); 
+
+    return AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTRS(wsdl_element_impl->f_attr_ext, 
+            env);
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_attrs_for_namespace(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_url_t *namespc) 
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, namespc, AXIS2_FAILURE);
+    super = AXIS2_WODEN_WSDL_ELEMENT_SUPER_OBJS(wsdl_element, env);
+    wsdl_element_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_WSDL_ELEMENT", AXIS2_HASH_KEY_STRING)); 
+
+    return AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTRS_FOR_NAMESPACE(
+            wsdl_element_impl->f_attr_ext, env, namespc);
+}
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_wsdl_element_has_ext_attrs_for_namespace(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_url_t *namespc)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, namespc, AXIS2_FAILURE);
+    super = AXIS2_WODEN_WSDL_ELEMENT_SUPER_OBJS(wsdl_element, env);
+    wsdl_element_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_WSDL_ELEMENT", AXIS2_HASH_KEY_STRING)); 
+
+    return AXIS2_WODEN_ATTR_EXTENSIBLE_HAS_EXT_ATTRS_FOR_NAMESPACE(
+            wsdl_element_impl->f_attr_ext, env, namespc);
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_wsdl_element_add_ext_element(
+        void *wsdl_element,
+        axis2_env_t **env,
+axis2_woden_ext_element_t *ext_el) 
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, ext_el, AXIS2_FAILURE);
+    super = AXIS2_WODEN_WSDL_ELEMENT_SUPER_OBJS(wsdl_element, env);
+    wsdl_element_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_WSDL_ELEMENT", AXIS2_HASH_KEY_STRING)); 
+    
+    return AXIS2_WODEN_ELEMENT_EXTENSIBLE_ADD_EXT_ELEMENT(wsdl_element_impl->
+            f_elem_ext, env, ext_el);
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_wsdl_element_remove_ext_element(
+        void *wsdl_element,
+        axis2_env_t **env,
+axis2_woden_ext_element_t *ext_el) 
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, ext_el, AXIS2_FAILURE);
+    super = AXIS2_WODEN_WSDL_ELEMENT_SUPER_OBJS(wsdl_element, env);
+    wsdl_element_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_WSDL_ELEMENT", AXIS2_HASH_KEY_STRING)); 
+
+    return AXIS2_WODEN_ELEMENT_EXTENSIBLE_REMOVE_EXT_ELEMENT(wsdl_element_impl->
+            f_elem_ext, env, ext_el);
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_elements(
+        void *wsdl_element,
+axis2_env_t **env) 
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_WSDL_ELEMENT_SUPER_OBJS(wsdl_element, env);
+    wsdl_element_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_WSDL_ELEMENT", AXIS2_HASH_KEY_STRING)); 
+    
+    return AXIS2_WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS(wsdl_element_impl->
+            f_elem_ext, env);
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_wsdl_element_get_ext_elements_of_type(
+        void *wsdl_element,
+        axis2_env_t **env,
+axis2_qname_t *ext_type) 
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, ext_type, AXIS2_FAILURE);
+    axis2_hash_t *super = NULL;
+
+    super = AXIS2_WODEN_WSDL_ELEMENT_SUPER_OBJS(wsdl_element, env);
+    wsdl_element_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_WSDL_ELEMENT", AXIS2_HASH_KEY_STRING)); 
+
+    return AXIS2_WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS_OF_TYPE(
+            wsdl_element_impl->f_elem_ext, env, ext_type);
+}
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_wsdl_element_has_ext_elements_for_namespace(
+        void *wsdl_element,
+        axis2_env_t **env,
+        axis2_url_t *namespc)
+{
+    axis2_woden_wsdl_element_impl_t *wsdl_element_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, namespc, AXIS2_FAILURE);
+    super = AXIS2_WODEN_WSDL_ELEMENT_SUPER_OBJS(wsdl_element, env);
+    wsdl_element_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_WSDL_ELEMENT", AXIS2_HASH_KEY_STRING)); 
+
+    return AXIS2_WODEN_ELEMENT_EXTENSIBLE_HAS_EXT_ELEMENTS_FOR_NAMESPACE(
+            wsdl_element_impl->f_elem_ext, env, namespc);
+}
+
+



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