You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2006/07/06 08:02:31 UTC

svn commit: r419452 [18/46] - in /webservices/axis2/trunk/c/woden: ./ include/ samples/ samples/wsdl10/ src/ src/builder/ src/builder/wsdl10/ src/schema/ src/types/ src/util/ src/wsdl/ src/wsdl/enumeration/ src/wsdl10/ src/wsdl10/enumeration/ src/wsdl1...

Added: webservices/axis2/trunk/c/woden/src/wsdl/component_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/component_exts.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/component_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/component_exts.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,188 @@
+/*
+ * 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_component_exts.h>
+#include <woden_wsdl_element.h>
+#include <axis2_uri.h>
+#include <axis2_hash.h>
+
+typedef struct woden_component_exts_impl woden_component_exts_impl_t;
+
+/** 
+ * @brief Component Extensions Struct Impl
+ *   Axis2 Component Extensions  
+ */ 
+struct woden_component_exts_impl
+{
+    woden_component_exts_t component_exts;
+    void *f_parent_element;
+    axis2_uri_t *f_namespc;
+};
+
+#define INTF_TO_IMPL(component_exts) ((woden_component_exts_impl_t *) component_exts)
+
+axis2_status_t AXIS2_CALL 
+woden_component_exts_free(
+        void *component_exts,
+        const axis2_env_t *envv);
+
+axis2_uri_t *AXIS2_CALL
+woden_component_exts_get_namespace(
+        void *component_exts,
+        const axis2_env_t *env);
+
+void *AXIS2_CALL
+woden_component_exts_get_parent_element(
+        void *component_exts,
+        const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+woden_component_exts_init(
+        void *component_exts,
+        const axis2_env_t *env,
+        woden_wsdl_element_t *parent_el,
+        axis2_uri_t *namespc);
+ 
+AXIS2_EXTERN woden_component_exts_t * AXIS2_CALL
+woden_component_exts_create(
+        const axis2_env_t *env)
+{
+    woden_component_exts_impl_t *component_exts_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    component_exts_impl = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_component_exts_impl_t));
+
+    component_exts_impl->f_parent_element = NULL;
+    component_exts_impl->f_namespc = NULL;
+
+    component_exts_impl->component_exts.ops = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_component_exts_ops_t)); 
+    
+    component_exts_impl->component_exts.ops->free = 
+            woden_component_exts_free;
+    component_exts_impl->component_exts.ops->init = 
+            woden_component_exts_init;
+    component_exts_impl->component_exts.ops->get_namespace = 
+            woden_component_exts_get_namespace;
+    component_exts_impl->component_exts.ops->get_parent_element = 
+            woden_component_exts_get_parent_element;
+    
+    return &(component_exts_impl->component_exts);
+}
+
+axis2_status_t AXIS2_CALL
+woden_component_exts_free(
+        void *component_exts,
+        const axis2_env_t *env)
+{
+    woden_component_exts_impl_t *component_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    component_exts_impl = INTF_TO_IMPL(component_exts);
+
+    if(component_exts_impl->f_parent_element)
+    {
+        WODEN_WSDL_ELEMENT_FREE(component_exts_impl->f_parent_element, env);
+        component_exts_impl->f_parent_element = NULL;
+    }
+    
+    if(component_exts_impl->f_namespc)
+    {
+        AXIS2_URI_FREE(component_exts_impl->f_namespc, env);
+        component_exts_impl->f_namespc = NULL;
+    }
+    
+    if((&(component_exts_impl->component_exts))->ops)
+    {
+        AXIS2_FREE(env->allocator, (&(component_exts_impl->component_exts))->ops);
+        (&(component_exts_impl->component_exts))->ops = NULL;
+    }
+
+    if(component_exts_impl)
+    {
+        AXIS2_FREE(env->allocator, component_exts_impl);
+        component_exts_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+woden_component_exts_resolve_methods(
+        woden_component_exts_t *component_exts,
+        const axis2_env_t *env,
+        axis2_hash_t *methods)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    
+    component_exts->ops = AXIS2_MALLOC(env->allocator, 
+            sizeof(woden_component_exts_ops_t));
+    component_exts->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    component_exts->ops->get_parent_element = axis2_hash_get(methods, 
+            "get_parent_element", AXIS2_HASH_KEY_STRING);
+    component_exts->ops->to_component_exts_free = axis2_hash_get(methods, 
+            "to_component_exts_free", AXIS2_HASH_KEY_STRING);
+    component_exts->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    component_exts->ops->init = axis2_hash_get(methods, 
+            "init", AXIS2_HASH_KEY_STRING); ;
+    component_exts->ops->get_namespace = axis2_hash_get(methods, 
+            "get_namespace", AXIS2_HASH_KEY_STRING); 
+
+    return AXIS2_SUCCESS;    
+}
+
+axis2_uri_t *AXIS2_CALL
+woden_component_exts_get_namespace(
+        void *component_exts,
+        const axis2_env_t *env)
+{
+    woden_component_exts_impl_t *component_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    component_exts_impl = INTF_TO_IMPL(component_exts);
+    return component_exts_impl->f_namespc;
+}
+
+void *AXIS2_CALL
+woden_component_exts_get_parent_element(
+        void *component_exts,
+        const axis2_env_t *env)
+{
+    woden_component_exts_impl_t *component_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    component_exts_impl = INTF_TO_IMPL(component_exts);
+    return component_exts_impl->f_parent_element;
+}
+
+axis2_status_t AXIS2_CALL
+woden_component_exts_init(
+        void *component_exts,
+        const axis2_env_t *env,
+        woden_wsdl_element_t *parent_el,
+        axis2_uri_t *namespc) 
+{
+    woden_component_exts_impl_t *component_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    component_exts_impl = INTF_TO_IMPL(component_exts);
+    component_exts_impl->f_parent_element = parent_el;
+    component_exts_impl->f_namespc = namespc;
+    return AXIS2_SUCCESS;
+}

Added: webservices/axis2/trunk/c/woden/src/wsdl/configurable.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/configurable.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/configurable.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/configurable.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,427 @@
+/*
+ * 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_configurable.h>
+#include <woden_documentable.h>
+
+
+typedef struct woden_configurable_impl woden_configurable_impl_t;
+
+/** 
+ * @brief Documentable Struct Impl
+ *   Axis2 Documentable  
+ */ 
+struct woden_configurable_impl
+{
+    woden_configurable_t configurable;
+    woden_documentable_t *documentable;
+    axis2_hash_t *methods;
+    axis2_hash_t *super;
+    axis2_array_list_t *f_features;
+    axis2_array_list_t *f_properties;
+};
+
+#define INTF_TO_IMPL(configurable) ((woden_configurable_impl_t *) configurable)
+
+axis2_status_t AXIS2_CALL 
+woden_configurable_free(
+        void *configurable,
+        const axis2_env_t *env);
+
+axis2_hash_t *AXIS2_CALL 
+woden_configurable_super_objs(
+        void *configurable,
+        const axis2_env_t *env);
+
+woden_documentable_t *AXIS2_CALL
+woden_configurable_get_base_impl(
+        void *configurable,
+        const axis2_env_t *env);
+
+axis2_array_list_t *AXIS2_CALL
+woden_configurable_get_features(
+        void *configurable,
+        const axis2_env_t *env);
+
+axis2_array_list_t *AXIS2_CALL
+woden_configurable_get_properties(
+        void *configurable,
+        const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+woden_configurable_add_feature_element(
+        void *configurable,
+        const axis2_env_t *env,
+        void *feature);
+
+axis2_array_list_t *AXIS2_CALL
+woden_configurable_get_feature_elements(
+        void *configurable,
+        const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+woden_configurable_add_property_element(
+        void *configurable,
+        const axis2_env_t *env,
+        void *property);
+
+axis2_array_list_t *AXIS2_CALL
+woden_configurable_get_property_elements(
+        void *configurable,
+        const axis2_env_t *env);
+
+
+static woden_configurable_t *
+create(
+        const axis2_env_t *env);
+
+static axis2_status_t
+woden_configurable_free_ops(
+        void *configurable,
+        const axis2_env_t *env);
+
+AXIS2_EXTERN woden_configurable_t * AXIS2_CALL
+woden_configurable_to_configurable_element(
+        void *configurable,
+        const axis2_env_t *env)
+{
+    woden_configurable_impl_t *configurable_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    if(!configurable)
+    {
+        configurable_impl = (woden_configurable_impl_t *) create(env);
+    }
+    else
+        configurable_impl = (woden_configurable_impl_t *) configurable;
+
+    woden_configurable_free_ops(configurable, env);
+
+    configurable_impl->configurable.base.configurable_element.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_configurable_element_ops_t));
+    woden_configurable_element_resolve_methods(&(configurable_impl->configurable.base.
+            configurable_element), env, configurable_impl->methods);
+    return configurable;
+}
+
+static woden_configurable_t *
+create(
+        const axis2_env_t *env)
+{
+    woden_configurable_impl_t *configurable_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    configurable_impl = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_configurable_impl_t));
+
+    configurable_impl->super = NULL;
+    configurable_impl->f_features = NULL;
+    configurable_impl->f_properties = NULL;
+    
+    configurable_impl->configurable.base.configurable_element.
+        ops = NULL;
+
+    configurable_impl->methods = axis2_hash_make(env);
+    if(!configurable_impl->methods)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(configurable_impl->methods, "add_property_element", 
+            AXIS2_HASH_KEY_STRING, woden_configurable_add_property_element);
+    axis2_hash_set(configurable_impl->methods, "get_property_elements", 
+            AXIS2_HASH_KEY_STRING, woden_configurable_get_property_elements);
+    axis2_hash_set(configurable_impl->methods, "add_feature_element", 
+            AXIS2_HASH_KEY_STRING, woden_configurable_add_feature_element);
+    axis2_hash_set(configurable_impl->methods, "get_feature_elements", 
+            AXIS2_HASH_KEY_STRING, woden_configurable_get_feature_elements);
+
+    configurable_impl->configurable.ops = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_configurable_ops_t));
+
+    configurable_impl->configurable.ops->free = woden_configurable_free;
+    configurable_impl->configurable.ops->super_objs = woden_configurable_super_objs;
+    configurable_impl->configurable.ops->get_base_impl = 
+        woden_configurable_get_base_impl;
+
+    return &(configurable_impl->configurable);
+}
+
+AXIS2_EXTERN woden_configurable_t * AXIS2_CALL
+woden_configurable_create(
+        const axis2_env_t *env)
+{
+    woden_configurable_impl_t *configurable_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    configurable_impl = (woden_configurable_impl_t *) create(env);
+
+    configurable_impl->documentable = 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, "WODEN_CONFIGURABLE", 
+            AXIS2_HASH_KEY_STRING, &(configurable_impl->configurable));
+    axis2_hash_set(configurable_impl->super, "WODEN_DOCUMENTABLE", 
+            AXIS2_HASH_KEY_STRING, configurable_impl->documentable);
+         
+    return &(configurable_impl->configurable);
+}
+
+static axis2_status_t
+woden_configurable_free_ops(
+        void *configurable,
+        const axis2_env_t *env)
+{
+    woden_configurable_impl_t *configurable_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    configurable_impl = INTF_TO_IMPL(configurable);
+
+    if(configurable_impl->configurable.base.configurable_element.ops)
+    {
+        AXIS2_FREE(env->allocator, configurable_impl->configurable.base.
+                configurable_element.ops);
+        configurable_impl->configurable.base.configurable_element.ops = 
+            NULL;
+    }
+     
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+woden_configurable_free(
+        void *configurable,
+        const axis2_env_t *env)
+{
+    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)
+    {
+        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
+woden_configurable_super_objs(
+        void *configurable,
+        const axis2_env_t *env)
+{
+    woden_configurable_impl_t *configurable_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    configurable_impl = INTF_TO_IMPL(configurable);
+
+    return configurable_impl->super;
+}
+
+woden_documentable_t *AXIS2_CALL
+woden_configurable_get_base_impl(
+        void *configurable,
+        const axis2_env_t *env)
+{
+    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
+woden_configurable_resolve_methods(
+        woden_configurable_t *configurable,
+        const axis2_env_t *env,
+        woden_configurable_t *configurable_impl,
+        axis2_hash_t *methods)
+{
+    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(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
+woden_configurable_get_features(
+        void *configurable,
+        const axis2_env_t *env)
+{
+    woden_configurable_impl_t *configurable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_CONFIGURABLE", AXIS2_HASH_KEY_STRING));
+
+    return configurable_impl->f_features;
+}
+
+axis2_array_list_t *AXIS2_CALL
+woden_configurable_get_properties(
+        void *configurable,
+        const axis2_env_t *env)
+{
+    woden_configurable_impl_t *configurable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_CONFIGURABLE", AXIS2_HASH_KEY_STRING));
+
+    return configurable_impl->f_properties;
+}
+
+axis2_status_t AXIS2_CALL
+woden_configurable_add_feature_element(
+        void *configurable,
+        const axis2_env_t *env,
+        void *feature)
+{
+    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 = WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "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
+woden_configurable_get_feature_elements(
+        void *configurable,
+        const axis2_env_t *env)
+{
+    woden_configurable_impl_t *configurable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_CONFIGURABLE", AXIS2_HASH_KEY_STRING));
+
+    return configurable_impl->f_features;
+}
+
+axis2_status_t AXIS2_CALL
+woden_configurable_add_property_element(
+        void *configurable,
+        const axis2_env_t *env,
+        void *property)
+{
+    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 = WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "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
+woden_configurable_get_property_elements(
+        void *configurable,
+        const axis2_env_t *env)
+{
+    woden_configurable_impl_t *configurable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env);
+    configurable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_CONFIGURABLE", AXIS2_HASH_KEY_STRING));
+
+    return configurable_impl->f_properties;
+}

Added: webservices/axis2/trunk/c/woden/src/wsdl/configurable_component.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/configurable_component.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/configurable_component.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/configurable_component.c Wed Jul  5 23:02:19 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_configurable_component.h>
+
+axis2_status_t AXIS2_CALL
+woden_configurable_component_resolve_methods(
+        woden_configurable_component_t *configurable_component,
+        const 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;
+    
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl/configurable_element.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/configurable_element.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/configurable_element.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/configurable_element.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,44 @@
+/*
+ * 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_configurable_element.h>
+
+axis2_status_t AXIS2_CALL
+woden_configurable_element_resolve_methods(
+        woden_configurable_element_t *configurable_element,
+        const axis2_env_t *env,
+        axis2_hash_t *methods)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    
+    configurable_element->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    configurable_element->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+
+    configurable_element->ops->add_feature_element = axis2_hash_get(methods,
+            "add_feature_element", AXIS2_HASH_KEY_STRING);
+    configurable_element->ops->get_feature_elements = axis2_hash_get(methods,
+            "get_feature_elements", AXIS2_HASH_KEY_STRING);
+    configurable_element->ops->add_property_element = axis2_hash_get(methods,
+            "add_property_element", AXIS2_HASH_KEY_STRING);
+    configurable_element->ops->get_property_elements = axis2_hash_get(methods,
+            "get_property_elements", AXIS2_HASH_KEY_STRING);
+
+    return AXIS2_SUCCESS;    
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl/direction.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/direction.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/direction.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/direction.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,149 @@
+/*
+ * 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_direction.h>
+
+typedef struct woden_direction_impl woden_direction_impl_t;
+
+/** 
+ * @brief Direction Struct Impl
+ *   Axis2 Direction  
+ */ 
+struct woden_direction_impl
+{
+    woden_direction_t direction;
+    axis2_char_t *f_value;
+};
+
+#define INTF_TO_IMPL(direction) ((woden_direction_impl_t *) direction)
+
+static woden_direction_t *WODEN_DIRECTION_IN = NULL;
+static woden_direction_t *WODEN_DIRECTION_OUT = NULL;
+
+axis2_status_t AXIS2_CALL 
+woden_direction_free(
+        void *direction,
+        const axis2_env_t *env);
+
+axis2_char_t *AXIS2_CALL
+woden_direction_to_string(
+        void *direction,
+        const axis2_env_t *env);
+
+static woden_direction_t *
+create(
+        const axis2_env_t *env)
+{
+    woden_direction_impl_t *direction_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    direction_impl = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_direction_impl_t));
+
+    direction_impl->f_value = NULL;
+   
+    direction_impl->direction.ops = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_direction_ops_t));
+    
+    direction_impl->direction.ops->free = woden_direction_free;
+
+    direction_impl->direction.ops->to_string = woden_direction_to_string;
+    
+
+    return &(direction_impl->direction);
+}
+
+AXIS2_EXTERN woden_direction_t * AXIS2_CALL
+woden_direction_create(
+        const axis2_env_t *env,
+        axis2_char_t *value)
+{
+    woden_direction_impl_t *direction_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    direction_impl = (woden_direction_impl_t *) create(env);
+
+    direction_impl->f_value = AXIS2_STRDUP(value, env);
+
+    return &(direction_impl->direction);
+}
+
+AXIS2_EXTERN woden_direction_t *AXIS2_CALL
+woden_direction_get_direction_in(
+        const axis2_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+    
+    if(!WODEN_DIRECTION_IN)
+        WODEN_DIRECTION_IN = woden_direction_create(env, "in");
+
+    return WODEN_DIRECTION_IN;
+}
+
+AXIS2_EXTERN woden_direction_t *AXIS2_CALL
+woden_direction_get_direction_out(
+        const axis2_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, NULL);
+
+    if(!WODEN_DIRECTION_OUT)
+        WODEN_DIRECTION_OUT = woden_direction_create(env, "out");
+    return WODEN_DIRECTION_OUT;
+}
+
+axis2_status_t AXIS2_CALL
+woden_direction_free(
+        void *direction,
+        const axis2_env_t *env)
+{
+    woden_direction_impl_t *direction_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    direction_impl = INTF_TO_IMPL(direction);
+
+    if(direction_impl->f_value)
+    {
+        AXIS2_FREE(env->allocator, direction_impl->f_value);
+        direction_impl->f_value = NULL;
+    }
+
+    if((&(direction_impl->direction))->ops)
+    {
+        AXIS2_FREE(env->allocator, (&(direction_impl->direction))->ops);
+        (&(direction_impl->direction))->ops = NULL;
+    }
+
+    if(direction_impl)
+    {
+        AXIS2_FREE(env->allocator, direction_impl);
+        direction_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+woden_direction_to_string(
+        void *direction,
+        const axis2_env_t *env)
+{
+    woden_direction_impl_t *direction_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    direction_impl = INTF_TO_IMPL(direction);
+
+    return direction_impl->f_value;
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl/documentable.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/documentable.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/documentable.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/documentable.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,334 @@
+/*
+ * 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_documentable.h>
+#include <woden_documentation_element.h>
+#include <woden_wsdl_obj.h>
+
+typedef struct woden_documentable_impl woden_documentable_impl_t;
+
+/** 
+ * @brief Documentable Struct Impl
+ *   Axis2 Documentable  
+ */ 
+struct woden_documentable_impl
+{
+    woden_documentable_t documentable;
+    woden_wsdl_obj_t *wsdl_obj;
+    axis2_hash_t *methods;
+    axis2_hash_t *super;
+    axis2_array_list_t *f_doc_elems;
+};
+
+#define INTF_TO_IMPL(documentable) ((woden_documentable_impl_t *) documentable)
+
+axis2_status_t AXIS2_CALL 
+woden_documentable_free(
+        void *documentable,
+        const axis2_env_t *env);
+
+axis2_hash_t *AXIS2_CALL 
+woden_documentable_super_objs(
+        void *documentable,
+        const axis2_env_t *env);
+
+woden_wsdl_obj_t *AXIS2_CALL
+woden_documentable_get_base_impl(
+        void *documentable,
+        const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+woden_documentable_add_documentation_element(
+        void *documentable,
+        const axis2_env_t *env,
+        woden_documentation_element_t *documentation);
+
+axis2_array_list_t *AXIS2_CALL
+woden_documentable_get_documentation_elements(
+        void *documentable,
+        const axis2_env_t *env);
+
+static woden_documentable_t *
+create(
+        const axis2_env_t *env);
+
+static axis2_status_t
+woden_documentable_free_ops(
+        void *documentable,
+        const axis2_env_t *env);
+
+AXIS2_EXTERN woden_documentable_t * AXIS2_CALL
+woden_documentable_to_documentable_element(
+        void *documentable,
+        const axis2_env_t *env)
+{
+    woden_documentable_impl_t *documentable_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    if(!documentable)
+    {
+        documentable_impl = (woden_documentable_impl_t *) create(env);
+    }
+    else
+        documentable_impl = (woden_documentable_impl_t *) documentable;
+
+    woden_documentable_free_ops(documentable, env);
+
+    documentable_impl->documentable.base.documentable_element.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_documentable_element_ops_t));
+    woden_documentable_element_resolve_methods(&(documentable_impl->
+            documentable.base.documentable_element), env, 
+            documentable_impl->methods);
+    return documentable;
+}
+
+
+static woden_documentable_t *
+create(
+        const axis2_env_t *env)
+{
+    woden_documentable_impl_t *documentable_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    documentable_impl = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_documentable_impl_t));
+
+    documentable_impl->f_doc_elems = NULL;
+    documentable_impl->super = NULL;
+    
+    documentable_impl->documentable.base.documentable_element.
+        ops = NULL;
+    documentable_impl->documentable.ops = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_documentable_ops_t));
+
+    documentable_impl->methods = axis2_hash_make(env);
+    if(!documentable_impl->methods)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    documentable_impl->documentable.ops->free = woden_documentable_free;
+    documentable_impl->documentable.ops->super_objs = woden_documentable_super_objs;
+    documentable_impl->documentable.ops->get_base_impl = woden_documentable_get_base_impl;
+    documentable_impl->documentable.ops->add_documentation_element = 
+        woden_documentable_add_documentation_element;
+    documentable_impl->documentable.ops->get_documentation_elements = 
+        woden_documentable_get_documentation_elements;
+
+    return &(documentable_impl->documentable);
+}
+
+AXIS2_EXTERN woden_documentable_t * AXIS2_CALL
+woden_documentable_create(
+        const axis2_env_t *env)
+{
+    woden_documentable_impl_t *documentable_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    documentable_impl = (woden_documentable_impl_t *) create(env);
+
+    documentable_impl->wsdl_obj = 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, "WODEN_DOCUMENTABLE", 
+            AXIS2_HASH_KEY_STRING, &(documentable_impl->documentable));
+    axis2_hash_set(documentable_impl->super, "WODEN_WSDL_OBJ", 
+            AXIS2_HASH_KEY_STRING, documentable_impl->wsdl_obj);
+            
+
+    return &(documentable_impl->documentable);
+}
+
+static axis2_status_t
+woden_documentable_free_ops(
+        void *documentable,
+        const axis2_env_t *env)
+{
+    woden_documentable_impl_t *documentable_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentable_impl = INTF_TO_IMPL(documentable);
+
+    if(documentable_impl->documentable.base.documentable_element.ops)
+    {
+        AXIS2_FREE(env->allocator, documentable_impl->documentable.base.
+                documentable_element.ops);
+        documentable_impl->documentable.base.documentable_element.ops = 
+            NULL;
+    }
+     
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+woden_documentable_free(
+        void *documentable,
+        const axis2_env_t *env)
+{
+    woden_documentable_impl_t *documentable_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentable_impl = INTF_TO_IMPL(documentable);
+
+    if(documentable_impl->f_doc_elems)
+    {
+        AXIS2_ARRAY_LIST_FREE(documentable_impl->f_doc_elems, env);
+        documentable_impl->f_doc_elems = NULL;
+    }
+    
+    if(documentable_impl->wsdl_obj)
+    {
+        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;
+    }
+
+    woden_documentable_free_ops(documentable, env);
+    
+    if(documentable_impl->documentable.ops)
+    {
+        AXIS2_FREE(env->allocator, documentable_impl->documentable.ops);
+        documentable_impl->documentable.ops = NULL;
+    }
+    
+    if(documentable_impl)
+    {
+        AXIS2_FREE(env->allocator, documentable_impl);
+        documentable_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+woden_documentable_super_objs(
+        void *documentable,
+        const axis2_env_t *env)
+{
+    woden_documentable_impl_t *documentable_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    documentable_impl = INTF_TO_IMPL(documentable);
+
+    return documentable_impl->super;
+}
+
+woden_wsdl_obj_t *AXIS2_CALL
+woden_documentable_get_base_impl(
+        void *documentable,
+        const axis2_env_t *env)
+{
+    woden_documentable_impl_t *documentable_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    documentable_impl = INTF_TO_IMPL(documentable);
+
+    return documentable_impl->wsdl_obj;
+}
+
+axis2_status_t AXIS2_CALL
+woden_documentable_resolve_methods(
+        woden_documentable_t *documentable,
+        const axis2_env_t *env,
+        woden_documentable_t *documentable_impl,
+        axis2_hash_t *methods)
+{
+    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(woden_documentable_ops_t));
+    
+    documentable->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    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;
+}
+
+axis2_status_t AXIS2_CALL
+woden_documentable_add_documentation_element(
+        void *documentable,
+        const axis2_env_t *env,
+        woden_documentation_element_t *documentation)
+{
+    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);
+    super = WODEN_DOCUMENTABLE_SUPER_OBJS(documentable, env);
+    documentable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_DOCUMENTABLE", AXIS2_HASH_KEY_STRING));
+   
+    if(!documentable_impl->f_doc_elems)
+    {
+        documentable_impl->f_doc_elems = axis2_array_list_create(env, 0);
+        if(!documentable_impl->f_doc_elems)
+        {
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
+    return AXIS2_ARRAY_LIST_ADD(documentable_impl->f_doc_elems, env, 
+            documentation);
+}
+
+axis2_array_list_t *AXIS2_CALL
+woden_documentable_get_documentation_elements(
+        void *documentable,
+        const axis2_env_t *env)
+{
+    woden_documentable_impl_t *documentable_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_DOCUMENTABLE_SUPER_OBJS(documentable, env);
+    documentable_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_DOCUMENTABLE", AXIS2_HASH_KEY_STRING));
+   
+
+    return documentable_impl->f_doc_elems;
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl/documentable_element.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/documentable_element.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/documentable_element.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/documentable_element.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,41 @@
+/*
+ * 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_documentable_element.h>
+
+axis2_status_t AXIS2_CALL
+woden_documentable_element_resolve_methods(
+        woden_documentable_element_t *documentable_element,
+        const axis2_env_t *env,
+        axis2_hash_t *methods)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    
+    documentable_element->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    documentable_element->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    documentable_element->ops->add_documentation_element = 
+            axis2_hash_get(methods, "add_documention_element", 
+            AXIS2_HASH_KEY_STRING);
+    documentable_element->ops->get_documentation_elements = 
+            axis2_hash_get(methods, "get_documentation_elements", 
+            AXIS2_HASH_KEY_STRING);
+
+    return AXIS2_SUCCESS;    
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl/documentation.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/documentation.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/documentation.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/documentation.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,433 @@
+/*
+ * 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_documentation.h>
+#include <woden_documentation_element.h>
+#include <woden_ext_element.h>
+#include <woden_xml_attr.h>
+#include <woden_wsdl_obj.h>
+
+typedef struct woden_documentation_impl woden_documentation_impl_t;
+
+/** 
+ * @brief Documentation Struct Impl
+ *   Axis2 Documentation  
+ */ 
+struct woden_documentation_impl
+{
+    woden_documentation_t documentation;
+    woden_obj_types_t obj_type;
+    woden_wsdl_element_t *wsdl_element;
+    axis2_hash_t *super;
+    axis2_hash_t *methods;
+
+    void *f_content;
+};
+
+#define INTF_TO_IMPL(documentation) ((woden_documentation_impl_t *) documentation)
+
+axis2_status_t AXIS2_CALL 
+woden_documentation_free(
+        void *documentation,
+        const axis2_env_t *env);
+
+axis2_hash_t *AXIS2_CALL 
+woden_documentation_super_objs(
+        void *documentation,
+        const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL
+woden_documentation_type(
+        void *documentation,
+        const axis2_env_t *env);
+
+woden_wsdl_element_t *AXIS2_CALL
+woden_documentation_get_base_impl(
+        void *documentation,
+        const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+woden_documentation_set_content(
+        void *documentation,
+        const axis2_env_t *env,
+        void *doc_el);
+
+void *AXIS2_CALL
+woden_documentation_get_content(
+        void *documentation,
+        const axis2_env_t *env);
+
+static woden_documentation_t *
+create(const axis2_env_t *env);
+
+static axis2_status_t
+woden_documentation_free_ops(
+        void *documentation,
+        const axis2_env_t *env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_EXTERN woden_documentation_t * AXIS2_CALL
+woden_documentation_to_documentation_element(
+        void *documentation,
+        const axis2_env_t *env)
+{
+    woden_documentation_impl_t *documentation_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    if(!documentation)
+    {
+        documentation_impl = (woden_documentation_impl_t *) create(env);
+    }
+    else
+        documentation_impl = (woden_documentation_impl_t *) documentation;
+
+    woden_documentation_free_ops(documentation, env);
+
+    documentation_impl->documentation.base.documentation_element.ops = 
+        AXIS2_MALLOC(env->allocator, 
+        sizeof(woden_documentation_element_ops_t));
+    woden_documentation_element_resolve_methods(&(documentation_impl->
+            documentation.base.documentation_element), env, 
+            documentation_impl->methods);
+    return documentation;
+}
+
+AXIS2_EXTERN woden_documentation_t * AXIS2_CALL
+woden_documentation_to_attr_extensible(
+        void *documentation,
+        const axis2_env_t *env)
+{
+    woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+
+    if(!documentation)
+    {
+        documentation_impl = (woden_documentation_impl_t *) create(env);
+    }
+    else
+        documentation_impl = (woden_documentation_impl_t *) documentation;
+
+    woden_documentation_free_ops(documentation, env);
+
+    documentation_impl->documentation.base.wsdl_element.base.attr_extensible.
+            ops = AXIS2_MALLOC(env->allocator, 
+            sizeof(woden_attr_extensible_ops_t));
+    woden_attr_extensible_resolve_methods(&(documentation_impl->
+            documentation.base.wsdl_element.base.attr_extensible), env, 
+            NULL, documentation_impl->methods);
+    return documentation;
+
+}
+
+AXIS2_EXTERN woden_documentation_t * AXIS2_CALL
+woden_documentation_to_element_extensible(
+        void *documentation,
+        const axis2_env_t *env)
+{
+    woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+
+    if(!documentation)
+    {
+        documentation_impl = (woden_documentation_impl_t *) create(env);
+    }
+    else
+        documentation_impl = (woden_documentation_impl_t *) documentation;
+
+    woden_documentation_free_ops(documentation, env);
+
+    documentation_impl->documentation.base.wsdl_element.base.
+        element_extensible.ops = AXIS2_MALLOC(env->allocator, 
+        sizeof(woden_element_extensible_ops_t));
+    woden_element_extensible_resolve_methods(&(documentation_impl->
+            documentation.base.wsdl_element.base.element_extensible), 
+            env, NULL, documentation_impl->methods);
+    return documentation;
+
+}
+
+/************************End of Woden C Internal Methods***********************/
+static woden_documentation_t *
+create(
+        const axis2_env_t *env)
+{
+    woden_documentation_impl_t *documentation_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    documentation_impl = AXIS2_MALLOC(env->allocator, sizeof(
+                woden_documentation_impl_t));
+
+    documentation_impl->wsdl_element = NULL;
+    documentation_impl->super = NULL;
+    documentation_impl->obj_type = WODEN_DOCUMENTATION;
+    documentation_impl->f_content = NULL;
+    documentation_impl->methods = NULL;
+    
+    documentation_impl->documentation.base.documentation_element.ops = NULL; 
+    documentation_impl->documentation.base.wsdl_element.base.attr_extensible.
+        ops = NULL; 
+    documentation_impl->documentation.base.wsdl_element.base.element_extensible.
+        ops = NULL; 
+   
+    documentation_impl->documentation.ops = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_documentation_ops_t));
+
+    documentation_impl->documentation.ops->free = woden_documentation_free;
+    documentation_impl->documentation.ops->super_objs = 
+        woden_documentation_super_objs;
+    documentation_impl->documentation.ops->type = woden_documentation_type;
+    documentation_impl->documentation.ops->get_base_impl = 
+        woden_documentation_get_base_impl;
+
+    documentation_impl->methods = axis2_hash_make(env);
+    if(!documentation_impl->methods) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(documentation_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            woden_documentation_free);
+    axis2_hash_set(documentation_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
+            woden_documentation_super_objs);
+    axis2_hash_set(documentation_impl->methods, "type", AXIS2_HASH_KEY_STRING, 
+            woden_documentation_type);
+    axis2_hash_set(documentation_impl->methods, "set_content", 
+            AXIS2_HASH_KEY_STRING, woden_documentation_set_content);
+    axis2_hash_set(documentation_impl->methods, "get_content", 
+            AXIS2_HASH_KEY_STRING, woden_documentation_get_content);
+    
+    return &(documentation_impl->documentation);
+}
+
+AXIS2_EXTERN woden_documentation_t * AXIS2_CALL
+woden_documentation_create(
+        const axis2_env_t *env)
+{
+    woden_documentation_impl_t *documentation_impl = NULL;
+   
+    documentation_impl = (woden_documentation_impl_t *) create(env);
+
+    documentation_impl->wsdl_element = 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, "WODEN_DOCUMENTATION", 
+            AXIS2_HASH_KEY_STRING, &(documentation_impl->documentation));
+    axis2_hash_set(documentation_impl->super, "WODEN_WSDL_ELEMENT", 
+            AXIS2_HASH_KEY_STRING, documentation_impl->wsdl_element);
+
+    return &(documentation_impl->documentation);
+}
+
+static axis2_status_t
+woden_documentation_free_ops(
+        void *documentation,
+        const axis2_env_t *env)
+{
+    woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentation_impl = INTF_TO_IMPL(documentation);
+
+    if(documentation_impl->documentation.base.documentation_element.ops)
+    {
+        AXIS2_FREE(env->allocator, documentation_impl->documentation.base.
+                documentation_element.ops);
+        documentation_impl->documentation.base.documentation_element.ops = 
+            NULL;
+    }
+
+    if(documentation_impl->documentation.base.wsdl_element.base.attr_extensible.
+            ops)
+    {
+        AXIS2_FREE(env->allocator, documentation_impl->documentation.
+                base.wsdl_element.base.attr_extensible.ops);
+        documentation_impl->documentation.base.wsdl_element.base.
+            attr_extensible.ops = NULL;
+    }
+    
+    if(documentation_impl->documentation.base.wsdl_element.base.
+            element_extensible.ops)
+    {
+        AXIS2_FREE(env->allocator, documentation_impl->documentation.base.
+                wsdl_element.base.element_extensible.ops);
+        documentation_impl->documentation.base.wsdl_element.base.
+            element_extensible.ops = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+woden_documentation_free(
+        void *documentation,
+        const axis2_env_t *env)
+{
+    woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentation_impl = INTF_TO_IMPL(documentation);
+
+    if(documentation_impl->f_content)
+    {
+        /*AXIS2_FREE(documentation_impl->f_content, env);*/
+        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);
+        documentation_impl->methods = NULL;
+    }
+
+    if(documentation_impl->wsdl_element)
+    {
+        WODEN_WSDL_OBJ_FREE(documentation_impl->wsdl_element, env);
+        documentation_impl->wsdl_element = NULL;
+    }
+
+    woden_documentation_free_ops(documentation, env);
+
+    if((&(documentation_impl->documentation))->ops)
+    {
+        AXIS2_FREE(env->allocator, documentation_impl->documentation.ops);
+        (&(documentation_impl->documentation))->ops = NULL;
+    }
+    
+    if(documentation_impl)
+    {
+        AXIS2_FREE(env->allocator, documentation_impl);
+        documentation_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+woden_documentation_super_objs(
+        void *documentation,
+        const axis2_env_t *env)
+{
+    woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    documentation_impl = INTF_TO_IMPL(documentation);
+
+    return documentation_impl->super;
+}
+
+woden_obj_types_t AXIS2_CALL
+woden_documentation_type(void *documentation,
+        const axis2_env_t *env)
+{
+    woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentation_impl = INTF_TO_IMPL(documentation);
+
+    return documentation_impl->obj_type;
+}
+
+woden_wsdl_element_t *AXIS2_CALL
+woden_documentation_get_base_impl(
+        void *documentation,
+        const axis2_env_t *env)
+{
+    woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    documentation_impl = INTF_TO_IMPL(documentation);
+
+    return documentation_impl->wsdl_element;
+}
+
+axis2_status_t AXIS2_CALL
+woden_documentation_resolve_methods(
+        woden_documentation_t *documentation,
+        const axis2_env_t *env,
+        woden_documentation_t *documentation_impl,
+        axis2_hash_t *methods)
+{
+    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(woden_documentation_ops_t));
+    
+    documentation->ops->free = axis2_hash_get(methods, "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
+woden_documentation_set_content(
+        void *documentation,
+        const axis2_env_t *env,
+        void *doc_el)
+{
+    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);
+    super = WODEN_DOCUMENTATION_SUPER_OBJS(documentation, env);
+    documentation_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_DOCUMENTATION", AXIS2_HASH_KEY_STRING));
+   
+    if(documentation_impl->f_content)
+    {
+        /* Free f_content */
+    }
+    documentation_impl->f_content = doc_el;
+    return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL
+woden_documentation_get_content(
+        void *documentation,
+        const axis2_env_t *env)
+{
+    woden_documentation_impl_t *documentation_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_DOCUMENTATION_SUPER_OBJS(documentation, env);
+    documentation_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_DOCUMENTATION", AXIS2_HASH_KEY_STRING));
+
+    return documentation_impl->f_content;
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl/documentation_element.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/documentation_element.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/documentation_element.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/documentation_element.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,41 @@
+/*
+ * 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_documentation_element.h>
+
+axis2_status_t AXIS2_CALL
+woden_documentation_element_resolve_methods(
+        woden_documentation_element_t *documentation_element,
+        const axis2_env_t *env,
+        axis2_hash_t *methods)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    
+    documentation_element->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    documentation_element->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    documentation_element->ops->set_content = 
+            axis2_hash_get(methods, "set_content", 
+            AXIS2_HASH_KEY_STRING);
+    documentation_element->ops->get_content = 
+            axis2_hash_get(methods, "get_content", 
+            AXIS2_HASH_KEY_STRING);
+
+    return AXIS2_SUCCESS;    
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl/element_decl.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/element_decl.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/element_decl.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/element_decl.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,464 @@
+/*
+ * 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_element_decl.h>
+#include <axis2_uri.h>
+#include <axis2_hash.h>
+
+typedef struct woden_element_decl_impl woden_element_decl_impl_t;
+
+/** 
+ * @brief Element Declaration Struct Impl
+ *   Axis2 Element Declaration  
+ */ 
+struct woden_element_decl_impl
+{
+    woden_element_decl_t decl;
+    woden_obj_types_t obj_type;
+    axis2_hash_t *super;
+
+    axis2_qname_t *f_qname;
+    axis2_uri_t *f_system;
+    axis2_char_t *f_content_model;
+    axis2_generic_obj_t *f_content;
+};
+
+#define INTF_TO_IMPL(decl) \
+    ((woden_element_decl_impl_t *) decl)
+
+axis2_status_t AXIS2_CALL 
+woden_element_decl_free(
+        void *decl,
+        const axis2_env_t *envv);
+
+axis2_hash_t *AXIS2_CALL 
+woden_element_decl_super_objs(
+        void *decl,
+        const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL 
+woden_element_decl_type(
+        void *decl,
+        const axis2_env_t *envv);
+
+/* ************************************************************
+ *  Element Declaration interface methods (the WSDL Component model)
+ * ************************************************************/
+axis2_qname_t *AXIS2_CALL 
+woden_element_decl_get_qname(
+        void *decl,
+        const axis2_env_t *env); 
+
+axis2_uri_t *AXIS2_CALL 
+woden_element_decl_get_system(
+        void *decl,
+        const axis2_env_t *env); 
+
+axis2_char_t *AXIS2_CALL 
+woden_element_decl_get_content_model(
+        void *decl,
+        const axis2_env_t *env); 
+
+axis2_generic_obj_t *AXIS2_CALL 
+woden_element_decl_get_content(
+        void *decl,
+        const axis2_env_t *env); 
+
+/* ************************************************************
+ *  Non-API implementation methods
+ * ************************************************************/
+
+axis2_status_t AXIS2_CALL 
+woden_element_decl_set_qname(
+        void *decl,
+        const axis2_env_t *env,
+        axis2_qname_t *qname); 
+
+axis2_status_t AXIS2_CALL 
+woden_element_decl_set_system(
+        void *decl,
+        const axis2_env_t *env,
+        axis2_uri_t *type_system_uri); 
+
+axis2_status_t AXIS2_CALL 
+woden_element_decl_set_content_model(
+        void *decl,
+        const axis2_env_t *env,
+        axis2_char_t *content_model); 
+
+axis2_status_t AXIS2_CALL 
+woden_element_decl_set_content(
+        void *decl,
+        const axis2_env_t *env,
+        axis2_generic_obj_t *element_content);
+
+
+AXIS2_EXTERN woden_element_decl_t * AXIS2_CALL
+woden_element_decl_create(
+        const axis2_env_t *env)
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    decl_impl = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_element_decl_impl_t));
+
+    decl_impl->obj_type = WODEN_ELEMENT_DECL;
+    decl_impl->super = NULL;
+    decl_impl->f_qname = NULL;
+    decl_impl->f_system = NULL;
+    decl_impl->f_content_model = NULL;
+    decl_impl->f_content = NULL;
+
+    decl_impl->decl.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_element_decl_ops_t)); 
+    
+    decl_impl->decl.ops->free = 
+        woden_element_decl_free;
+    decl_impl->decl.ops->super_objs = 
+        woden_element_decl_super_objs;
+    decl_impl->decl.ops->type = 
+        woden_element_decl_type;
+    
+    decl_impl->decl.ops->get_qname = 
+        woden_element_decl_get_qname;
+    decl_impl->decl.ops->get_system = 
+        woden_element_decl_get_system;
+    decl_impl->decl.ops->get_content_model = 
+        woden_element_decl_get_content_model;
+    decl_impl->decl.ops->get_content = 
+        woden_element_decl_get_content; 
+    decl_impl->decl.ops->set_qname = 
+        woden_element_decl_set_qname;
+    decl_impl->decl.ops->set_system = 
+        woden_element_decl_set_system;
+    decl_impl->decl.ops->set_content_model = 
+        woden_element_decl_set_content_model;
+    decl_impl->decl.ops->set_content = 
+        woden_element_decl_set_content;
+          
+    decl_impl->super = axis2_hash_make(env);
+    if(!decl_impl->super) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(decl_impl->super, "WODEN_ELEMENT_DECL", 
+            AXIS2_HASH_KEY_STRING, &(decl_impl->decl));
+ 
+    return &(decl_impl->decl);
+}
+
+axis2_status_t AXIS2_CALL
+woden_element_decl_free(void *decl,
+                const axis2_env_t *env)
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    decl_impl = INTF_TO_IMPL(decl);
+
+    if(decl_impl->super)
+    {
+        axis2_hash_free(decl_impl->super, env);
+        decl_impl->super = NULL;
+    }
+
+    if((&(decl_impl->decl))->ops)
+    {
+        AXIS2_FREE(env->allocator, (&(decl_impl->decl))->ops);
+        (&(decl_impl->decl))->ops = NULL;
+    }
+
+    if(decl_impl)
+    {
+        AXIS2_FREE(env->allocator, decl_impl);
+        decl_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+woden_element_decl_super_objs(
+        void *decl,
+        const axis2_env_t *env)
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    decl_impl = INTF_TO_IMPL(decl);
+
+    return decl_impl->super;
+}
+
+woden_obj_types_t AXIS2_CALL 
+woden_element_decl_type(
+        void *decl,
+        const axis2_env_t *env)
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    decl_impl = INTF_TO_IMPL(decl);
+    
+    return decl_impl->obj_type;
+}
+
+axis2_status_t AXIS2_CALL
+woden_element_decl_resolve_methods(
+        woden_element_decl_t *decl,
+        const axis2_env_t *env,
+        woden_element_decl_t *decl_impl,
+        axis2_hash_t *methods)
+{
+    woden_element_decl_impl_t *decl_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    decl_impl_l = INTF_TO_IMPL(decl_impl);
+    
+    decl->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    decl->ops->to_element_decl_free = axis2_hash_get(methods, 
+            "to_element_decl_free", AXIS2_HASH_KEY_STRING); 
+    decl->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    decl->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    decl->ops->get_qname = axis2_hash_get(methods, 
+            "get_qname", AXIS2_HASH_KEY_STRING); 
+    if(!decl->ops->get_qname && decl_impl_l)
+            decl->ops->get_qname = 
+            decl_impl_l->decl.ops->get_qname;
+    
+    decl->ops->get_system = axis2_hash_get(methods, 
+            "get_system", AXIS2_HASH_KEY_STRING); 
+    if(!decl->ops->get_system && decl_impl_l)
+            decl->ops->get_system = 
+            decl_impl_l->decl.ops->get_system;
+    
+    decl->ops->get_content_model = axis2_hash_get(methods, 
+            "get_content_model", AXIS2_HASH_KEY_STRING); 
+    if(!decl->ops->get_content_model && decl_impl_l)
+            decl->ops->get_content_model = 
+            decl_impl_l->decl.ops->get_content_model;
+    
+    decl->ops->get_content = axis2_hash_get(methods, 
+            "get_content", AXIS2_HASH_KEY_STRING); 
+    if(!decl->ops->get_content && decl_impl_l)
+            decl->ops->get_content = 
+            decl_impl_l->decl.ops->get_content;
+    
+    decl->ops->set_qname = axis2_hash_get(methods, 
+            "set_qname", AXIS2_HASH_KEY_STRING); 
+    if(!decl->ops->set_qname && decl_impl_l)
+            decl->ops->set_qname = 
+            decl_impl_l->decl.ops->set_qname;
+    
+    decl->ops->set_system = axis2_hash_get(methods, 
+            "set_system", AXIS2_HASH_KEY_STRING); 
+    if(!decl->ops->set_system && decl_impl_l)
+            decl->ops->set_system = 
+            decl_impl_l->decl.ops->set_system;
+    
+    decl->ops->set_content_model = axis2_hash_get(methods, 
+            "set_content_model", AXIS2_HASH_KEY_STRING); 
+    if(!decl->ops->set_content_model && decl_impl_l)
+            decl->ops->set_content_model = 
+            decl_impl_l->decl.ops->set_content_model;
+    
+    decl->ops->set_content = axis2_hash_get(methods, 
+            "set_content", AXIS2_HASH_KEY_STRING); 
+    if(!decl->ops->set_content && decl_impl_l)
+            decl->ops->set_content = 
+            decl_impl_l->decl.ops->set_content;
+    
+    return AXIS2_SUCCESS;    
+}
+/* ************************************************************
+ *  Element Declaration interface methods (the WSDL Component model)
+ * ************************************************************/
+axis2_qname_t *AXIS2_CALL 
+woden_element_decl_get_qname(
+        void *decl,
+        const axis2_env_t *env) 
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_ELEMENT_DECL_SUPER_OBJS(decl, env);
+    decl_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_DECL", AXIS2_HASH_KEY_STRING)); 
+    
+    return decl_impl->f_qname;
+}
+
+axis2_uri_t *AXIS2_CALL 
+woden_element_decl_get_system(
+        void *decl,
+        const axis2_env_t *env) 
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_ELEMENT_DECL_SUPER_OBJS(decl, env);
+    decl_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_DECL", AXIS2_HASH_KEY_STRING)); 
+    
+    return decl_impl->f_system;
+}
+
+axis2_char_t *AXIS2_CALL 
+woden_element_decl_get_content_model(
+        void *decl,
+        const axis2_env_t *env) 
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_ELEMENT_DECL_SUPER_OBJS(decl, env);
+    decl_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_DECL", AXIS2_HASH_KEY_STRING)); 
+    
+    return decl_impl->f_content_model;
+}
+
+axis2_generic_obj_t *AXIS2_CALL 
+woden_element_decl_get_content(
+        void *decl,
+        const axis2_env_t *env) 
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_ELEMENT_DECL_SUPER_OBJS(decl, env);
+    decl_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_DECL", AXIS2_HASH_KEY_STRING)); 
+    
+    return decl_impl->f_content;
+}
+
+
+
+
+/* ************************************************************
+ *  Non-API implementation methods
+ * ************************************************************/
+
+axis2_status_t AXIS2_CALL 
+woden_element_decl_set_qname(
+        void *decl,
+        const axis2_env_t *env,
+        axis2_qname_t *qname) 
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, qname, AXIS2_FAILURE);
+    super = WODEN_ELEMENT_DECL_SUPER_OBJS(decl, env);
+    decl_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_DECL", AXIS2_HASH_KEY_STRING)); 
+
+    if(decl_impl->f_qname)
+    {
+        AXIS2_QNAME_FREE(decl_impl->f_qname, env);
+        decl_impl->f_qname = NULL;
+    }
+    decl_impl->f_qname = AXIS2_QNAME_CLONE(qname, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL 
+woden_element_decl_set_system(
+        void *decl,
+        const axis2_env_t *env,
+        axis2_uri_t *type_system_uri) 
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, type_system_uri, AXIS2_FAILURE);
+    super = WODEN_ELEMENT_DECL_SUPER_OBJS(decl, env);
+    decl_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_DECL", AXIS2_HASH_KEY_STRING)); 
+
+    if(decl_impl->f_system)
+    {
+        AXIS2_URI_FREE(decl_impl->f_system, env);
+    }
+    decl_impl->f_system = type_system_uri;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL 
+woden_element_decl_set_content_model(
+        void *decl,
+        const axis2_env_t *env,
+        axis2_char_t *content_model) 
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, content_model, AXIS2_FAILURE);
+    super = WODEN_ELEMENT_DECL_SUPER_OBJS(decl, env);
+    decl_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_DECL", AXIS2_HASH_KEY_STRING)); 
+
+    if(decl_impl->f_content_model)
+    {
+        AXIS2_FREE(env->allocator, decl_impl->f_content_model);
+        decl_impl->f_content_model = NULL;
+    }
+    decl_impl->f_content_model = AXIS2_STRDUP(content_model, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL 
+woden_element_decl_set_content(
+        void *decl,
+        const axis2_env_t *env,
+        axis2_generic_obj_t *element_content) 
+{
+    woden_element_decl_impl_t *decl_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, element_content, AXIS2_FAILURE);
+    super = WODEN_ELEMENT_DECL_SUPER_OBJS(decl, env);
+    decl_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_DECL", AXIS2_HASH_KEY_STRING)); 
+
+    if(decl_impl->f_content)
+    {
+        /* TODO */
+    }
+    decl_impl->f_content = element_content;
+    return AXIS2_SUCCESS;
+}
+
+
+
+
+

Added: webservices/axis2/trunk/c/woden/src/wsdl/element_extensible.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/element_extensible.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/element_extensible.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/element_extensible.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,410 @@
+/*
+ * 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_element_extensible.h>
+#include <woden_ext_element.h>
+#include <woden_xml_attr.h>
+#include <axis2_uri.h>
+#include <axis2_hash.h>
+
+typedef struct woden_element_extensible_impl woden_element_extensible_impl_t;
+
+/** 
+ * @brief Element Extensible Struct Impl
+ *   Axis2 Element Extensible  
+ */ 
+struct woden_element_extensible_impl
+{
+    woden_element_extensible_t extensible;
+    woden_obj_types_t obj_type;
+    axis2_hash_t *super;
+    axis2_array_list_t *f_ext_elements;
+    axis2_array_list_t *temp_elems;
+};
+
+#define INTF_TO_IMPL(extensible) \
+    ((woden_element_extensible_impl_t *) extensible)
+
+axis2_status_t AXIS2_CALL 
+woden_element_extensible_free(
+        void *extensible,
+        const axis2_env_t *envv);
+
+axis2_hash_t *AXIS2_CALL 
+woden_element_extensible_super_objs(
+        void *extensible,
+        const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL 
+woden_element_extensible_type(
+        void *extensible,
+        const axis2_env_t *envv);
+
+axis2_status_t AXIS2_CALL 
+woden_element_extensible_add_ext_element(
+        void *extensible,
+        const axis2_env_t *env,
+        woden_ext_element_t *ext_el); 
+
+axis2_status_t AXIS2_CALL 
+woden_element_extensible_remove_ext_element(
+        void *extensible,
+        const axis2_env_t *env,
+        woden_ext_element_t *ext_el); 
+
+axis2_array_list_t *AXIS2_CALL 
+woden_element_extensible_get_ext_elements(
+        void *extensible,
+        const axis2_env_t *env); 
+
+axis2_array_list_t *AXIS2_CALL 
+woden_element_extensible_get_ext_elements_of_type(
+        void *extensible,
+        const axis2_env_t *env,
+        axis2_qname_t *ext_type);
+
+axis2_bool_t AXIS2_CALL 
+woden_element_extensible_has_ext_elements_for_namespace(
+        void *extensible,
+        const axis2_env_t *env,
+        axis2_uri_t *namespc);
+
+
+
+AXIS2_EXTERN woden_element_extensible_t * AXIS2_CALL
+woden_element_extensible_create(
+        const axis2_env_t *env)
+{
+    woden_element_extensible_impl_t *extensible_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    extensible_impl = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_element_extensible_impl_t));
+
+    extensible_impl->obj_type = WODEN_ELEMENT_EXTENSIBLE;
+    extensible_impl->super = NULL;
+    extensible_impl->f_ext_elements = NULL;
+    extensible_impl->temp_elems = NULL;
+
+    extensible_impl->extensible.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_element_extensible_ops_t)); 
+    
+    extensible_impl->extensible.ops->free = 
+        woden_element_extensible_free;
+    extensible_impl->extensible.ops->type = 
+        woden_element_extensible_type;
+    extensible_impl->extensible.ops->super_objs = 
+        woden_element_extensible_super_objs;
+
+    extensible_impl->extensible.ops->add_ext_element = 
+        woden_element_extensible_add_ext_element;
+    extensible_impl->extensible.ops->remove_ext_element = 
+        woden_element_extensible_remove_ext_element;
+    extensible_impl->extensible.ops->get_ext_elements = 
+        woden_element_extensible_get_ext_elements;
+    extensible_impl->extensible.ops->get_ext_elements_of_type = 
+        woden_element_extensible_get_ext_elements_of_type;
+    extensible_impl->extensible.ops->has_ext_elements_for_namespace = 
+        woden_element_extensible_has_ext_elements_for_namespace;
+
+    extensible_impl->f_ext_elements = axis2_array_list_create(env, 0);
+    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, "WODEN_ELEMENT_EXTENSIBLE", 
+            AXIS2_HASH_KEY_STRING, &(extensible_impl->extensible));
+ 
+    return &(extensible_impl->extensible);
+}
+
+axis2_status_t AXIS2_CALL
+woden_element_extensible_free(void *extensible,
+                const axis2_env_t *env)
+{
+    woden_element_extensible_impl_t *extensible_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    extensible_impl = INTF_TO_IMPL(extensible);
+
+    if(extensible_impl->f_ext_elements)
+    {
+        AXIS2_ARRAY_LIST_FREE(extensible_impl->f_ext_elements, env);
+        extensible_impl->f_ext_elements = NULL;
+    }
+    
+    if(extensible_impl->temp_elems)
+    {
+        int size = 0, i = 0;
+        size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->temp_elems, env);
+        for(i = 0; i < size; i++)
+        {
+            void *ext_el = NULL;
+
+            ext_el = AXIS2_ARRAY_LIST_GET(extensible_impl->temp_elems, env, i);
+            WODEN_XML_ATTR_FREE(ext_el, env);
+        }
+        AXIS2_ARRAY_LIST_FREE(extensible_impl->temp_elems, env);
+        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);
+        (&(extensible_impl->extensible))->ops = NULL;
+    }
+
+    if(extensible_impl)
+    {
+        AXIS2_FREE(env->allocator, extensible_impl);
+        extensible_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+woden_element_extensible_super_objs(
+        void *extensible,
+        const axis2_env_t *env)
+{
+    woden_element_extensible_impl_t *extensible_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    extensible_impl = INTF_TO_IMPL(extensible);
+
+    return extensible_impl->super;
+}
+
+woden_obj_types_t AXIS2_CALL 
+woden_element_extensible_type(
+        void *extensible,
+        const axis2_env_t *env)
+{
+    woden_element_extensible_impl_t *extensible_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    extensible_impl = INTF_TO_IMPL(extensible);
+    
+    return extensible_impl->obj_type;
+}
+
+axis2_status_t AXIS2_CALL
+woden_element_extensible_resolve_methods(
+        woden_element_extensible_t *extensible,
+        const axis2_env_t *env,
+        woden_element_extensible_t *extensible_impl,
+        axis2_hash_t *methods)
+{
+    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->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;    
+}
+
+axis2_status_t AXIS2_CALL 
+woden_element_extensible_add_ext_element(
+        void *extensible,
+        const axis2_env_t *env,
+        woden_ext_element_t *ext_el) 
+{
+    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);
+    super = WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+    
+    
+    return AXIS2_ARRAY_LIST_ADD(extensible_impl->f_ext_elements, env, ext_el);
+}
+
+axis2_status_t AXIS2_CALL 
+woden_element_extensible_remove_ext_element(
+                                    void *extensible,
+                                    const axis2_env_t *env,
+                                    woden_ext_element_t *ext_el) 
+{
+    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);
+    super = WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "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);
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+woden_element_extensible_get_ext_elements(void *extensible,
+                                                const axis2_env_t *env) 
+{
+    woden_element_extensible_impl_t *extensible_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+    
+    return extensible_impl->f_ext_elements;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+woden_element_extensible_get_ext_elements_of_type(void *extensible,
+                                                        const axis2_env_t *env,
+                                                        axis2_qname_t *ext_type) 
+{
+    woden_element_extensible_impl_t *extensible_impl = NULL;
+    int i = 0;
+    int size = 0;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, ext_type, NULL);
+    super = WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+    if(extensible_impl->temp_elems)
+    {
+        int size = 0, i = 0;
+        size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->temp_elems, env);
+        for(i = 0; i < size; i++)
+        {
+            void *ext_el = NULL;
+
+            ext_el = AXIS2_ARRAY_LIST_GET(extensible_impl->temp_elems, env, i);
+            WODEN_XML_ATTR_FREE(ext_el, env);
+        }
+        AXIS2_ARRAY_LIST_FREE(extensible_impl->temp_elems, env);
+        extensible_impl->temp_elems = NULL;
+    }
+
+    extensible_impl->temp_elems = axis2_array_list_create(env, 0);
+    size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->f_ext_elements, env);
+    for(i = 0; i < size; i++)
+    {
+        woden_ext_element_t *ext_elem = NULL;
+        axis2_qname_t *ext_type_l = NULL;
+        
+        ext_elem = (woden_ext_element_t *)AXIS2_ARRAY_LIST_GET(
+                extensible_impl->f_ext_elements, env, i);
+        ext_type_l = WODEN_EXT_ELEMENT_GET_EXT_TYPE(ext_elem, env);
+        if(AXIS2_TRUE == AXIS2_QNAME_EQUALS(ext_type, env, ext_type_l))
+        {
+            AXIS2_ARRAY_LIST_ADD(extensible_impl->temp_elems, env, ext_elem);
+        }
+    }
+    return extensible_impl->temp_elems;
+}
+
+axis2_bool_t AXIS2_CALL 
+woden_element_extensible_has_ext_elements_for_namespace(
+        void *extensible,
+        const axis2_env_t *env,
+        axis2_uri_t *namespc)
+{
+    woden_element_extensible_impl_t *extensible_impl = NULL;
+    axis2_bool_t result = AXIS2_FALSE;
+    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);
+    super = WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+    ext_ns = AXIS2_URI_TO_STRING(namespc, env, AXIS2_URI_UNP_OMITUSERINFO);
+    size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->f_ext_elements, env);
+    for(i = 0; i < size; i++)
+    {
+        woden_ext_element_t *ext_elem = NULL;
+        axis2_qname_t *ext_type = NULL;
+        axis2_char_t *uri = NULL;
+        
+        ext_elem = (woden_ext_element_t *) AXIS2_ARRAY_LIST_GET(
+                extensible_impl->f_ext_elements, env, i);
+        ext_type = WODEN_EXT_ELEMENT_GET_EXT_TYPE(ext_elem, env);
+        uri = AXIS2_QNAME_GET_URI(ext_type, env);
+        if(0 == AXIS2_STRCMP(uri, ext_ns))
+        {
+            result = AXIS2_TRUE;
+            break;
+        }
+    }
+    return result;
+}
+
+



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