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/07/06 08:02:31 UTC

svn commit: r419452 [39/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/wsdl20/extensions/attr_extensible.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/attr_extensible.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/attr_extensible.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/attr_extensible.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,438 @@
+/*
+ * 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_attr_extensible.h>
+#include <woden_xml_attr.h>
+#include <axis2_uri.h>
+#include <axis2_hash.h>
+
+typedef struct woden_attr_extensible_impl woden_attr_extensible_impl_t;
+
+/** 
+ * @brief Attribute Extensible Struct Impl
+ *   Axis2 Attribute Extensible  
+ */ 
+struct woden_attr_extensible_impl
+{
+    woden_attr_extensible_t extensible;
+    axis2_hash_t *super;
+    woden_obj_types_t obj_type;
+    axis2_hash_t *f_ext_attrs;
+    axis2_array_list_t *temp_attrs;
+};
+
+#define INTF_TO_IMPL(extensible) \
+    ((woden_attr_extensible_impl_t *) extensible)
+
+axis2_status_t AXIS2_CALL 
+woden_attr_extensible_free(
+        void *extensible,
+        const axis2_env_t *env);
+
+axis2_hash_t *AXIS2_CALL 
+woden_attr_extensible_super_objs(
+        void *extensible,
+        const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL 
+woden_attr_extensible_type(
+        void *extensible,
+        const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL 
+woden_attr_extensible_set_ext_attr(
+        void *extensible,
+        const axis2_env_t *env,
+        axis2_qname_t *attr_type,
+        woden_xml_attr_t *attr); 
+
+void *AXIS2_CALL 
+woden_attr_extensible_get_ext_attr(
+        void *extensible,
+        const axis2_env_t *env,
+        axis2_qname_t *attr_type); 
+
+axis2_array_list_t *AXIS2_CALL 
+woden_attr_extensible_get_ext_attrs(
+        void *extensible,
+        const axis2_env_t *env); 
+
+axis2_array_list_t *AXIS2_CALL 
+woden_attr_extensible_get_ext_attrs_for_namespace(
+        void *extensible,
+        const axis2_env_t *env,
+        axis2_uri_t *namespc);
+
+axis2_bool_t AXIS2_CALL 
+woden_attr_extensible_has_ext_attrs_for_namespace(
+        void *extensible,
+        const axis2_env_t *env,
+        axis2_uri_t *namespc);
+
+
+
+AXIS2_EXTERN woden_attr_extensible_t * AXIS2_CALL
+woden_attr_extensible_create(
+        const axis2_env_t *env)
+{
+    woden_attr_extensible_impl_t *extensible_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    extensible_impl = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_attr_extensible_impl_t));
+
+    extensible_impl->obj_type = WODEN_ATTR_EXTENSIBLE;
+    extensible_impl->super = NULL;
+    extensible_impl->f_ext_attrs = NULL;
+    extensible_impl->temp_attrs = NULL;
+
+    extensible_impl->extensible.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_attr_extensible_ops_t)); 
+    
+    extensible_impl->extensible.ops->free = 
+        woden_attr_extensible_free;
+    extensible_impl->extensible.ops->super_objs = 
+        woden_attr_extensible_super_objs;
+    extensible_impl->extensible.ops->type = 
+        woden_attr_extensible_type;
+    extensible_impl->extensible.ops->set_ext_attr = 
+        woden_attr_extensible_set_ext_attr;
+    extensible_impl->extensible.ops->get_ext_attr = 
+        woden_attr_extensible_get_ext_attr;
+    extensible_impl->extensible.ops->get_ext_attrs = 
+        woden_attr_extensible_get_ext_attrs;
+    extensible_impl->extensible.ops->get_ext_attrs_for_namespace = 
+        woden_attr_extensible_get_ext_attrs_for_namespace;
+    extensible_impl->extensible.ops->has_ext_attrs_for_namespace = 
+        woden_attr_extensible_has_ext_attrs_for_namespace;
+    
+    extensible_impl->super = axis2_hash_make(env);
+    if(!extensible_impl->super) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(extensible_impl->super, "WODEN_ATTR_EXTENSLBE", 
+            AXIS2_HASH_KEY_STRING, &(extensible_impl->extensible));
+ 
+
+    return &(extensible_impl->extensible);
+}
+
+axis2_status_t AXIS2_CALL
+woden_attr_extensible_free(
+        void *extensible,
+        const axis2_env_t *env)
+{
+    woden_attr_extensible_impl_t *extensible_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    extensible_impl = INTF_TO_IMPL(extensible);
+
+    if(extensible_impl->f_ext_attrs)
+    {
+        axis2_hash_free(extensible_impl->f_ext_attrs, env);
+        extensible_impl->f_ext_attrs = NULL;
+    }
+    
+    if(extensible_impl->temp_attrs)
+    {
+        int size = 0, i = 0;
+        size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->temp_attrs, env);
+        for(i = 0; i < size; i++)
+        {
+            void *ext_el = NULL;
+
+            ext_el = AXIS2_ARRAY_LIST_GET(extensible_impl->temp_attrs, env, i);
+            WODEN_XML_ATTR_FREE(ext_el, env);
+        }
+        AXIS2_ARRAY_LIST_FREE(extensible_impl->temp_attrs, env);
+        extensible_impl->temp_attrs = NULL;
+    }
+
+    if(extensible_impl->super)
+    {
+        axis2_hash_free(extensible_impl->super, env);
+        extensible_impl->super = NULL;
+    }
+    
+    if((&(extensible_impl->extensible))->ops)
+    {
+        AXIS2_FREE(env->allocator, (&(extensible_impl->extensible))->ops);
+        (&(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_attr_extensible_super_objs(
+        void *extensible,
+        const axis2_env_t *env)
+{
+    woden_attr_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_attr_extensible_type(
+        void *extensible,
+        const axis2_env_t *env)
+{
+    woden_attr_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_attr_extensible_resolve_methods(
+        woden_attr_extensible_t *extensible,
+        const axis2_env_t *env,
+        woden_attr_extensible_t *extensible_impl,
+        axis2_hash_t *methods)
+{
+    woden_attr_extensible_impl_t *extensible_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    extensible_impl_l = INTF_TO_IMPL(extensible_impl);
+
+    extensible->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    extensible->ops->to_attr_extensible_free = axis2_hash_get(methods, 
+            "to_attr_extensible_free", AXIS2_HASH_KEY_STRING);
+    extensible->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    extensible->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    extensible->ops->set_ext_attr = axis2_hash_get(methods, 
+            "set_ext_attr", AXIS2_HASH_KEY_STRING);
+    if(!extensible->ops->set_ext_attr && extensible_impl_l)
+            extensible->ops->set_ext_attr = 
+            extensible_impl_l->extensible.ops->set_ext_attr;
+    
+    extensible->ops->get_ext_attr = axis2_hash_get(methods, 
+            "get_ext_attr", AXIS2_HASH_KEY_STRING);
+    if(!extensible->ops->get_ext_attr && extensible_impl_l)
+            extensible->ops->get_ext_attr = 
+            extensible_impl_l->extensible.ops->get_ext_attr;
+    
+    extensible->ops->get_ext_attrs = axis2_hash_get(methods, 
+            "get_ext_attrs", AXIS2_HASH_KEY_STRING); 
+    if(!extensible->ops->get_ext_attrs && extensible_impl_l)
+            extensible->ops->get_ext_attrs = 
+            extensible_impl_l->extensible.ops->get_ext_attrs;
+    
+    extensible->ops->get_ext_attrs_for_namespace = axis2_hash_get(methods, 
+            "get_ext_attrs_for_namespace", AXIS2_HASH_KEY_STRING); 
+    if(!extensible->ops->get_ext_attrs_for_namespace && extensible_impl_l)
+            extensible->ops->get_ext_attrs_for_namespace = 
+            extensible_impl_l->extensible.ops->get_ext_attrs_for_namespace;
+    
+    extensible->ops->has_ext_attrs_for_namespace = axis2_hash_get(methods, 
+            "has_ext_attrs_for_namespace", AXIS2_HASH_KEY_STRING); 
+    if(!extensible->ops->has_ext_attrs_for_namespace && extensible_impl_l)
+            extensible->ops->has_ext_attrs_for_namespace = 
+            extensible_impl_l->extensible.ops->has_ext_attrs_for_namespace;
+
+    return AXIS2_SUCCESS;    
+}
+
+axis2_status_t AXIS2_CALL 
+woden_attr_extensible_set_ext_attr(
+        void *extensible,
+        const axis2_env_t *env,
+        axis2_qname_t *attr_type,
+        woden_xml_attr_t *attr)
+{
+    woden_attr_extensible_impl_t *extensible_impl = NULL;
+    axis2_char_t *str_attr_type = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, attr_type, AXIS2_FAILURE);
+    super = WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
+    
+    str_attr_type = AXIS2_QNAME_TO_STRING(attr_type, env);
+    if(attr)
+        axis2_hash_set(extensible_impl->f_ext_attrs, str_attr_type, 
+                AXIS2_HASH_KEY_STRING, attr);
+    else
+        axis2_hash_set(extensible_impl->f_ext_attrs, str_attr_type, 
+                AXIS2_HASH_KEY_STRING, NULL);
+    return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL 
+woden_attr_extensible_get_ext_attr(
+        void *extensible,
+        const axis2_env_t *env,
+        axis2_qname_t *attr_type) 
+{
+    woden_attr_extensible_impl_t *extensible_impl = NULL;
+    axis2_char_t *str_attr_type = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, attr_type, NULL);
+    super = WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
+
+    str_attr_type = AXIS2_QNAME_TO_STRING(attr_type, env);
+    return (woden_xml_attr_t *)axis2_hash_get(extensible_impl->f_ext_attrs, 
+            str_attr_type, AXIS2_HASH_KEY_STRING);
+}
+
+axis2_array_list_t *AXIS2_CALL 
+woden_attr_extensible_get_ext_attrs(
+        void *extensible,
+        const axis2_env_t *env) 
+{
+    woden_attr_extensible_impl_t *extensible_impl = NULL;
+    axis2_hash_index_t *index = NULL;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
+ 
+    if(extensible_impl->temp_attrs)
+    {
+        int size = 0, i = 0;
+        size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->temp_attrs, env);
+        for(i = 0; i < size; i++)
+        {
+            void *ext_el = NULL;
+
+            ext_el = AXIS2_ARRAY_LIST_GET(extensible_impl->temp_attrs, env, i);
+            WODEN_XML_ATTR_FREE(ext_el, env);
+        }
+        AXIS2_ARRAY_LIST_FREE(extensible_impl->temp_attrs, env);
+        extensible_impl->temp_attrs = NULL;
+    }
+    extensible_impl->temp_attrs = axis2_array_list_create(env, 0);
+    for (index = axis2_hash_first (extensible_impl->f_ext_attrs, env); index; 
+            index = axis2_hash_next (env, index))
+    {
+        void *value = NULL;
+        
+        axis2_hash_this (index, NULL, NULL, &value);
+        AXIS2_ARRAY_LIST_ADD(extensible_impl->temp_attrs, env, value);
+    }   
+    return extensible_impl->temp_attrs;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+woden_attr_extensible_get_ext_attrs_for_namespace(void *extensible,
+        const axis2_env_t *env,
+        axis2_uri_t *namespc) 
+{
+    woden_attr_extensible_impl_t *extensible_impl = NULL;
+    axis2_char_t *str_namespc = NULL;
+    axis2_hash_index_t *index = NULL;
+    axis2_hash_t *super = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, namespc, NULL);
+    super = WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
+
+    str_namespc = AXIS2_URI_TO_STRING(namespc, env, AXIS2_URI_UNP_OMITUSERINFO);
+    if(extensible_impl->temp_attrs)
+    {
+        int size = 0, i = 0;
+        size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->temp_attrs, env);
+        for(i = 0; i < size; i++)
+        {
+            void *ext_el = NULL;
+
+            ext_el = AXIS2_ARRAY_LIST_GET(extensible_impl->temp_attrs, env, i);
+            WODEN_XML_ATTR_FREE(ext_el, env);
+        }
+        AXIS2_ARRAY_LIST_FREE(extensible_impl->temp_attrs, env);
+        extensible_impl->temp_attrs = NULL;
+    }
+
+    extensible_impl->temp_attrs = axis2_array_list_create(env, 0);
+    for (index = axis2_hash_first (extensible_impl->f_ext_attrs, env); index; 
+            index = axis2_hash_next (env, index))
+    {
+        void *value = NULL;
+        
+        axis2_hash_this (index, NULL, NULL, &value);
+        AXIS2_ARRAY_LIST_ADD(extensible_impl->temp_attrs, env, value);
+    }
+
+    return extensible_impl->temp_attrs;
+}
+
+axis2_bool_t AXIS2_CALL 
+woden_attr_extensible_has_ext_attrs_for_namespace(void *extensible,
+        const axis2_env_t *env,
+        axis2_uri_t *namespc)
+{
+    woden_attr_extensible_impl_t *extensible_impl = NULL;
+    axis2_bool_t result = AXIS2_FALSE;
+    axis2_char_t *str_namespc = NULL;
+    axis2_hash_index_t *index = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, namespc, AXIS2_FAILURE);
+    super = WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+    extensible_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING)); 
+
+    str_namespc = AXIS2_URI_TO_STRING(namespc, env, AXIS2_URI_UNP_OMITUSERINFO);
+    for (index = axis2_hash_first (extensible_impl->f_ext_attrs, env); index; 
+            index = axis2_hash_next (env, index))
+    {
+        const void *v = NULL;
+        axis2_qname_t *key = NULL;
+        axis2_char_t *str_ns = NULL;
+        
+        axis2_hash_this (index, &v, NULL, NULL);
+        key = (axis2_qname_t *) v;
+        str_ns = AXIS2_QNAME_GET_URI(key, env);
+        if(0 == AXIS2_STRCMP(str_ns, str_namespc))
+        {
+            result = AXIS2_TRUE;
+            break;
+        }
+    }
+    return result;
+}
+
+

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/component_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/component_exts.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/component_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/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/wsdl20/extensions/element_extensible.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/element_extensible.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/element_extensible.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/element_extensible.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,404 @@
+/*
+ * 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->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->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_EXTENSLBE", 
+            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;
+}
+
+

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

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/ext_element.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/ext_element.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/ext_element.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/ext_element.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,51 @@
+/*
+ * 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_ext_element.h>
+
+axis2_status_t AXIS2_CALL
+woden_ext_element_resolve_methods(
+        woden_ext_element_t *ext_element,
+        const axis2_env_t *env,
+        axis2_hash_t *methods)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    
+    ext_element->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    ext_element->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+
+    ext_element->ops->set_ext_type = 
+            axis2_hash_get(methods, "set_ext_type", 
+            AXIS2_HASH_KEY_STRING);
+
+    ext_element->ops->get_ext_type = 
+            axis2_hash_get(methods, "get_ext_type", 
+            AXIS2_HASH_KEY_STRING);
+
+    ext_element->ops->set_required = 
+            axis2_hash_get(methods, "set_required", 
+            AXIS2_HASH_KEY_STRING);
+
+    ext_element->ops->is_required = 
+            axis2_hash_get(methods, "is_required", 
+            AXIS2_HASH_KEY_STRING);
+
+    return AXIS2_SUCCESS;    
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/ext_registry.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/ext_registry.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/ext_registry.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/ext_registry.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,871 @@
+/*
+ * 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_ext_registry.h>
+#include <woden_component_exts.h>
+
+#include <woden_wsdl_element.h>
+
+#include <woden_soap_module_deserializer.h>
+#include <woden_soap_header_block_deserializer.h>
+#include <woden_soap_module.h>
+#include <woden_soap_header_block.h>
+#include <woden_soap_binding_exts.h>
+#include <woden_soap_binding_fault_exts.h>
+#include <woden_soap_binding_op_exts.h>
+#include <woden_soap_binding_fault_ref_exts.h>
+#include <woden_soap_binding_msg_ref_exts.h>
+
+#include "soap/woden_soap_constants.h"
+
+#include <woden_string_attr.h>
+#include <woden_uri_attr.h>
+#include <woden_qname_or_token_any_attr.h>
+#include <woden_qname_list_or_token_any_attr.h>
+#include <axis2_uri.h>
+#include <axis2_hash.h>
+
+typedef struct woden_ext_registry_impl woden_ext_registry_impl_t;
+
+/** 
+ * @brief Extension Registry Struct Impl
+ *   Axis2 Extension Registry  
+ */ 
+struct woden_ext_registry_impl
+{
+    woden_ext_registry_t registry;
+    /*
+    This is a Map of Maps. The top-level Map is keyed by parent type,
+    and the inner Maps are keyed by element QN.
+    */
+    axis2_hash_t *deserializer_reg;
+    /*
+    This is a Map of Maps. The top-level Map is keyed by parent type,
+    and the inner Maps are keyed by element QN.
+    */
+    axis2_hash_t *ext_element_reg;
+    /*
+    This is a Map of Maps. The top-level Map is keyed by parent type,
+    and the inner Maps are keyed by attr qname.
+    */
+    axis2_hash_t *ext_attr_reg;
+
+    /*
+    * This is a Map of Maps. The top-level Map is keyed by parent component
+    * and the inner Map is keyed by (URI)extension namespace with a value of
+    * component extensions.
+    */
+    axis2_hash_t *comp_ext_reg;
+
+    axis2_array_list_t *key_set;
+
+    woden_string_attr_t *string_attr;
+    woden_uri_attr_t *uri_attr;
+    woden_qname_or_token_any_attr_t *qname_or_token_any_attr;
+    woden_qname_list_or_token_any_attr_t *qname_list_or_token_any_attr; 
+    woden_soap_module_deserializer_t *soap_module_deser; 
+    woden_soap_module_t *soap_module;
+    woden_soap_header_block_deserializer_t *soap_header_block_deser; 
+    woden_soap_header_block_t *soap_header_block;
+    woden_soap_binding_exts_t *soap_binding_ext;
+    woden_soap_binding_fault_exts_t *soap_binding_fault_ext;
+    woden_soap_binding_op_exts_t *soap_binding_op_ext;
+    woden_soap_binding_msg_ref_exts_t *soap_binding_msg_ref_ext;
+    woden_soap_binding_fault_ref_exts_t *soap_binding_fault_ref_ext;
+};
+
+#define INTF_TO_IMPL(registry) ((woden_ext_registry_impl_t *) registry)
+
+axis2_status_t AXIS2_CALL 
+woden_ext_registry_free(
+        void *registry,
+        const axis2_env_t *envv);
+
+axis2_status_t AXIS2_CALL
+woden_ext_registry_register_deserializer(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type,
+        axis2_qname_t *element_qtype,
+        void *ed);
+
+void *AXIS2_CALL
+woden_ext_registry_query_deserializer(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type,
+        axis2_qname_t *element_type);
+
+void *AXIS2_CALL
+woden_ext_registry_query_ext_element_type(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class,
+        axis2_qname_t *elem_qn);
+
+axis2_array_list_t *AXIS2_CALL
+woden_ext_registry_get_allowable_exts(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type);
+
+axis2_status_t AXIS2_CALL
+woden_ext_registry_register_ext_element_type(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type,
+        axis2_qname_t *element_qtype,
+        void *element);
+
+axis2_status_t AXIS2_CALL
+woden_ext_registry_register_ext_attr_type(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *owner_class,
+        axis2_qname_t *attr_qname,
+        void *attr);
+
+void *AXIS2_CALL
+woden_ext_registry_query_ext_attr_type(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class,
+        axis2_qname_t *attr_qn);
+
+axis2_status_t AXIS2_CALL
+woden_ext_registry_register_component_ext(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class,
+        axis2_uri_t *ext_namespc,
+        void *comp_ext);
+
+void *AXIS2_CALL
+woden_ext_registry_query_component_ext(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class,
+        axis2_uri_t *ext_namespc);
+
+axis2_array_list_t *AXIS2_CALL
+woden_ext_registry_query_component_ext_namespaces(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class);
+
+static axis2_status_t
+woden_ext_registry_populate(
+        void *registry,
+        const axis2_env_t *env);
+
+AXIS2_EXTERN woden_ext_registry_t * AXIS2_CALL
+woden_ext_registry_create(
+        const axis2_env_t *env)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    registry_impl = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_ext_registry_impl_t));
+
+    registry_impl->deserializer_reg = NULL;
+    registry_impl->ext_element_reg = NULL;
+    registry_impl->ext_attr_reg = NULL;
+    registry_impl->comp_ext_reg = NULL;
+    registry_impl->key_set = NULL;
+
+    registry_impl->string_attr = NULL;
+    registry_impl->uri_attr = NULL;
+    registry_impl->qname_or_token_any_attr = NULL;
+    registry_impl->qname_list_or_token_any_attr = NULL; 
+    registry_impl->soap_module_deser = NULL; 
+    registry_impl->soap_module = NULL;
+    registry_impl->soap_header_block_deser = NULL; 
+    registry_impl->soap_header_block = NULL;
+    registry_impl->soap_binding_ext = NULL;
+    registry_impl->soap_binding_fault_ext = NULL;
+    registry_impl->soap_binding_op_ext = NULL;
+    registry_impl->soap_binding_msg_ref_ext = NULL;
+    registry_impl->soap_binding_fault_ref_ext = NULL;
+
+    registry_impl->registry.ops = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_ext_registry_ops_t)); 
+    
+    registry_impl->registry.ops->free = 
+            woden_ext_registry_free;
+    registry_impl->registry.ops->register_deserializer = 
+            woden_ext_registry_register_deserializer;
+    registry_impl->registry.ops->query_deserializer = 
+            woden_ext_registry_query_deserializer;
+    registry_impl->registry.ops->query_ext_element_type = 
+            woden_ext_registry_query_ext_element_type;
+    registry_impl->registry.ops->get_allowable_exts = 
+            woden_ext_registry_get_allowable_exts;
+    registry_impl->registry.ops->register_ext_element_type = 
+            woden_ext_registry_register_ext_element_type;
+    registry_impl->registry.ops->register_ext_attr_type = 
+            woden_ext_registry_register_ext_attr_type;
+    registry_impl->registry.ops->query_ext_attr_type = 
+            woden_ext_registry_query_ext_attr_type;
+    registry_impl->registry.ops->register_component_ext = 
+            woden_ext_registry_register_component_ext;
+    registry_impl->registry.ops->query_component_ext = 
+            woden_ext_registry_query_component_ext;
+    registry_impl->registry.ops->query_component_ext_namespaces = 
+            woden_ext_registry_query_component_ext_namespaces;
+    
+    registry_impl->ext_attr_reg = axis2_hash_make(env);
+    if(!registry_impl->ext_attr_reg)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    registry_impl->deserializer_reg = axis2_hash_make(env);
+    if(!registry_impl->deserializer_reg)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    registry_impl->ext_element_reg = axis2_hash_make(env);
+    if(!registry_impl->ext_element_reg)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    registry_impl->comp_ext_reg = axis2_hash_make(env);
+    if(!registry_impl->comp_ext_reg)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    woden_ext_registry_populate(&(registry_impl->registry), env);
+    
+    return &(registry_impl->registry);
+}
+
+axis2_status_t AXIS2_CALL
+woden_ext_registry_free(
+        void *registry,
+        const axis2_env_t *env)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    if(registry_impl->deserializer_reg)
+    {
+        /* TODO */
+    }
+    
+    if(registry_impl->ext_element_reg)
+    {
+        /* TODO */
+    }
+    
+    if(registry_impl->ext_attr_reg)
+    {
+        /* TODO */
+    }
+    
+    if(registry_impl->comp_ext_reg)
+    {
+        /* TODO */
+    }
+    
+    if((&(registry_impl->registry))->ops)
+    {
+        AXIS2_FREE(env->allocator, (&(registry_impl->registry))->ops);
+        (&(registry_impl->registry))->ops = NULL;
+    }
+
+    if(registry_impl)
+    {
+        AXIS2_FREE(env->allocator, registry_impl);
+        registry_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+/**
+* Declare that the specified deserializer should be used to deserialize
+* all extensibility elements with a qname matching elementQN, when
+* encountered as immediate children of the element represented by the
+* specified parentType.
+*
+* @param parent type a class object indicating where in the WSDL
+* document this extensibility element was encountered. For
+* example, woden_binding would be used to indicate
+* this element was encountered as an immediate child of
+* a &lt;wsdl:binding&gt; element.
+* @param element QN the qname of the extensibility element
+* @param ed the extension deserializer to use
+*
+*/
+axis2_status_t AXIS2_CALL
+woden_ext_registry_register_deserializer(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type,
+        axis2_qname_t *element_qtype,
+        void *ed)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    axis2_hash_t *inner_deserializer_reg = NULL;
+    axis2_char_t *element_type = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    inner_deserializer_reg = axis2_hash_get(registry_impl->deserializer_reg, 
+            parent_type, AXIS2_HASH_KEY_STRING);
+    if(NULL == inner_deserializer_reg)
+    {
+        inner_deserializer_reg = axis2_hash_make(env);
+        axis2_hash_set(registry_impl->deserializer_reg, parent_type, 
+                AXIS2_HASH_KEY_STRING, inner_deserializer_reg);
+    }
+    element_type = AXIS2_QNAME_TO_STRING(element_qtype, env);
+    axis2_hash_set(inner_deserializer_reg, element_type, AXIS2_HASH_KEY_STRING, 
+            ed);
+    return AXIS2_SUCCESS;
+}
+
+/**
+* Look up the deserializer for the extensibility element with the
+* qname element QN, which was encountered as an immediate child
+* of the element represented by the specified parentType.
+*
+* @param parent type a class object indicating where in the WSDL
+* document this extensibility element was encountered. For
+* example, woden_binding would be used to indicate
+* this element was encountered as an immediate child of
+* a &lt;wsdl:binding&gt; element.
+* @param element QN the qname of the extensibility element
+*
+* @return the extension deserializer, if one was found. If none was
+* found. TODO Decide what to do if no deserializer found
+*
+*/
+void *AXIS2_CALL
+woden_ext_registry_query_deserializer(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type,
+        axis2_qname_t *element_type)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    axis2_hash_t *inner_deserializer_reg = NULL;
+    axis2_char_t *elem_name = NULL;
+    void *ed = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    inner_deserializer_reg = axis2_hash_get(registry_impl->deserializer_reg, 
+            parent_type, AXIS2_HASH_KEY_STRING);
+    elem_name = AXIS2_QNAME_TO_STRING(element_type, env);
+    if(NULL != inner_deserializer_reg)
+    {
+        ed = axis2_hash_get(inner_deserializer_reg, elem_name, 
+                AXIS2_HASH_KEY_STRING);
+    }
+    return ed;
+}
+
+/**
+* Look up the type of the extensibility element with the specified qname, which
+* was defined as a child of the element represented by the specified parent class.
+*
+* @param parent type a class object indicating where in the WSDL
+* document this extensibility attribute was encountered. For
+* example, woden_binding would be used to indicate
+* this attribute was defined on a &lt;wsdl:binding> element.
+* @param attr name the qname of the extensibility attribute
+*
+* @return one of the constants defined on the Attribute Extensible class
+*
+*/
+void *AXIS2_CALL
+woden_ext_registry_query_ext_element_type(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class,
+        axis2_qname_t *elem_qn)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    axis2_hash_t *inner_ext_attr_reg = NULL;
+    axis2_char_t *elem_name = NULL;
+    void *element = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    inner_ext_attr_reg = axis2_hash_get(registry_impl->ext_attr_reg, 
+            parent_class, AXIS2_HASH_KEY_STRING);
+    elem_name = AXIS2_QNAME_TO_STRING(elem_qn, env);
+    if(NULL != inner_ext_attr_reg)
+    {
+        element = axis2_hash_get(inner_ext_attr_reg, elem_name, 
+                AXIS2_HASH_KEY_STRING);
+    }
+    return element;
+}
+
+/**
+* Returns a set of QNames representing the extensibility elements
+* that are allowed as children of the specified parent type.
+* Basically, this method returns the keys associated with the set
+* of extension deserializers registered for this parent type.
+* Returns null if no extension deserializers are registered for
+* this parent type.
+*/
+axis2_array_list_t *AXIS2_CALL
+woden_ext_registry_get_allowable_exts(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    axis2_hash_t *inner_deserializer_reg = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    inner_deserializer_reg = axis2_hash_get(registry_impl->deserializer_reg, 
+            parent_type, AXIS2_HASH_KEY_STRING); 
+    if(NULL != inner_deserializer_reg)
+    {
+        axis2_hash_index_t *i = NULL;
+
+        registry_impl->key_set = axis2_array_list_create(env, 0);
+        for (i = axis2_hash_first (inner_deserializer_reg, env); i; i = 
+                axis2_hash_next (env, i))
+        {
+            void *v = NULL;
+
+            axis2_hash_this (i, NULL, NULL, &v);
+            AXIS2_ARRAY_LIST_ADD(registry_impl->key_set, env, v);
+        }
+    }
+    return registry_impl->key_set;
+}
+
+/**
+* Declare that the specified extensionType is the concrete
+* class which should be used to represent extensibility elements
+* with qnames matching elementQN, that are intended to exist as
+* children of the specified parentType.
+*
+* @param parentType a class object indicating where in the WSDL
+* definition this extension would exist. For example,
+* woden_binding would be used to indicate
+* this extensibility element would be added to the list of
+* extensibility elements belonging to a javax.wsdl.Binding,
+* after being instantiated.
+* @param element QN the qname of the extensibility element
+* @param extension type the concrete class which should be instantiated
+*
+*/
+axis2_status_t AXIS2_CALL
+woden_ext_registry_register_ext_element_type(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type,
+        axis2_qname_t *element_qtype,
+        void *element)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    axis2_hash_t *inner_ext_type_reg = NULL;
+    axis2_char_t *element_type = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    inner_ext_type_reg = axis2_hash_get(registry_impl->ext_element_reg, 
+            parent_type, AXIS2_HASH_KEY_STRING);
+    if(NULL == inner_ext_type_reg)
+    {
+        inner_ext_type_reg = axis2_hash_make(env);
+        axis2_hash_set(registry_impl->ext_element_reg, parent_type, 
+                AXIS2_HASH_KEY_STRING, inner_ext_type_reg);
+    }
+    element_type = AXIS2_QNAME_TO_STRING(element_qtype, env);
+    axis2_hash_set(inner_ext_type_reg, element_type, AXIS2_HASH_KEY_STRING, 
+            element);
+    return AXIS2_SUCCESS;
+}
+
+
+/**
+* Declare that the type of the specified extension attribute, when it occurs
+* as an attribute of the specified parent type, should be assumed to be
+* attrType.
+*
+* @param parent_type a class object indicating where in the WSDL
+* document this extensibility attribute was encountered. For
+* example, woden_bindin would be used to indicate
+* this attribute was defined on a &lt;wsdl:binding> element.
+* @param attr_qname the qname of the extensibility attribute
+* @param attr_type one of the constants defined on the Attribute Extensible
+* class
+*/
+axis2_status_t AXIS2_CALL
+woden_ext_registry_register_ext_attr_type(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *owner_class,
+        axis2_qname_t *attr_qname,
+        void *attr)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    axis2_hash_t *inner_ext_attr_reg = NULL;
+    axis2_char_t *attr_name = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    inner_ext_attr_reg = axis2_hash_get(registry_impl->ext_attr_reg, 
+            owner_class, AXIS2_HASH_KEY_STRING);
+    if(NULL == inner_ext_attr_reg)
+    {
+        inner_ext_attr_reg = axis2_hash_make(env);
+        axis2_hash_set(registry_impl->ext_attr_reg, owner_class, 
+                AXIS2_HASH_KEY_STRING, inner_ext_attr_reg);
+    }
+    attr_name = AXIS2_QNAME_TO_STRING(attr_qname, env);
+    axis2_hash_set(inner_ext_attr_reg, attr_name, AXIS2_HASH_KEY_STRING, attr);
+    return AXIS2_SUCCESS;
+}
+
+/**
+* Look up the type of the extensibility attribute with the specified qname,
+* which was defined on an element represented by the specified parent class.
+*
+* @param parentType a class object indicating where in the WSDL
+* document this extensibility attribute was encountered. For
+* example, woden_binding would be used to indicate
+* this attribute was defined on a &lt;wsdl:binding> element.
+* @param attr_qname the qname of the extensibility attribute
+*
+* @return one of the constants defined on the Attribute Extensible class
+*/
+void *AXIS2_CALL
+woden_ext_registry_query_ext_attr_type(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class,
+        axis2_qname_t *attr_qn)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    axis2_hash_t *inner_ext_attr_reg = NULL;
+    void *attr = NULL;
+    axis2_char_t *attr_name = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    inner_ext_attr_reg = axis2_hash_get(registry_impl->ext_attr_reg, 
+            parent_class, AXIS2_HASH_KEY_STRING);
+    attr_name = AXIS2_QNAME_TO_STRING(attr_qn, env);
+    if(NULL != inner_ext_attr_reg)
+    {
+        attr = axis2_hash_get(inner_ext_attr_reg, attr_name, 
+                AXIS2_HASH_KEY_STRING);
+    }
+    return attr;
+}
+
+/**
+* Register the object that will represent extensions from a specified 
+* namespace that will extend the specified WSDL component class.
+* 
+* @param parent_class the WSDL component class
+* @param ext_namespace the extension namespace
+* @param comp_ext_class the obj representing these extensions
+*/
+axis2_status_t AXIS2_CALL
+woden_ext_registry_register_component_ext(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class,
+        axis2_uri_t *ext_namespc,
+        void *comp_ext)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    axis2_hash_t *inner_comp_ext_reg = NULL;
+    axis2_char_t *namespc = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    inner_comp_ext_reg = axis2_hash_get(registry_impl->comp_ext_reg, 
+            parent_class, AXIS2_HASH_KEY_STRING);
+    if(NULL == inner_comp_ext_reg)
+    {
+        inner_comp_ext_reg = axis2_hash_make(env);
+        axis2_hash_set(registry_impl->comp_ext_reg, parent_class, 
+                AXIS2_HASH_KEY_STRING, inner_comp_ext_reg);
+    }
+    namespc = AXIS2_URI_TO_STRING(ext_namespc, env, AXIS2_URI_UNP_OMITUSERINFO);
+    axis2_hash_set(inner_comp_ext_reg, namespc, AXIS2_HASH_KEY_STRING, comp_ext);
+    return AXIS2_SUCCESS;
+}
+
+/**
+* Return the object that represents the extensions from the specified
+* namespace that extend the specified WSDL component class.
+* 
+* @param parent_class the WSDL component
+* @param ext_namespace the extension namespace
+* @return the object of the component extensions
+*/
+void *AXIS2_CALL
+woden_ext_registry_query_component_ext(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class,
+        axis2_uri_t *ext_namespc)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    axis2_hash_t *inner_comp_ext_reg = NULL;
+    void *comp_ext = NULL;
+    axis2_char_t *namespc = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    inner_comp_ext_reg = axis2_hash_get(registry_impl->comp_ext_reg, 
+            parent_class, AXIS2_HASH_KEY_STRING);
+    namespc = AXIS2_URI_TO_STRING(ext_namespc, env, AXIS2_URI_UNP_OMITUSERINFO);
+    if(NULL != inner_comp_ext_reg)
+    {
+        comp_ext = axis2_hash_get(inner_comp_ext_reg, namespc, 
+                AXIS2_HASH_KEY_STRING);
+    }
+    return comp_ext;
+}
+
+/**
+* Return the extension namespaces registered for the specified WSDL Component class.
+* 
+* @param parentClass the class of WSDL component extended by these namespaces
+* @return an array of namespace URIs
+*/
+axis2_array_list_t *AXIS2_CALL
+woden_ext_registry_query_component_ext_namespaces(
+        void *registry,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    axis2_hash_t *inner_comp_ext_reg = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    inner_comp_ext_reg = axis2_hash_get(registry_impl->comp_ext_reg, 
+            parent_class, AXIS2_HASH_KEY_STRING);
+    registry_impl->key_set = axis2_array_list_create(env, 0);
+    if(NULL != inner_comp_ext_reg)
+    {
+        axis2_hash_index_t *i = NULL;
+
+        for (i = axis2_hash_first (inner_comp_ext_reg, env); i; i = 
+                axis2_hash_next (env, i))
+        {
+            const void *key = NULL;
+
+            axis2_hash_this (i, &key, NULL, NULL);
+            AXIS2_ARRAY_LIST_ADD(registry_impl->key_set, env, key);
+        }
+    }
+    return registry_impl->key_set;
+}
+
+static axis2_status_t
+woden_ext_registry_populate(
+        void *registry,
+        const axis2_env_t *env)
+{
+    woden_ext_registry_impl_t *registry_impl = NULL;
+    axis2_qname_t *q_attr_soap_version = NULL;
+    axis2_qname_t *q_attr_soap_protocol = NULL;
+    axis2_qname_t *q_attr_soap_mepdefault = NULL;
+    axis2_qname_t *q_attr_soap_code = NULL;
+    axis2_qname_t *q_attr_soap_subcodes = NULL;
+    axis2_qname_t *q_attr_soap_mep = NULL;
+    axis2_qname_t *q_attr_soap_action = NULL;
+    axis2_qname_t *q_elem_soap_module = NULL;
+    axis2_qname_t *q_elem_soap_header = NULL;
+    axis2_uri_t *uri_ns_soap = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    registry_impl = INTF_TO_IMPL(registry);
+
+    /*********************** SOAP extension attributes ************************/
+   
+    registry_impl->string_attr = woden_string_attr_create(env, NULL, NULL, 
+            NULL, NULL);
+    registry_impl->uri_attr = woden_uri_attr_create(env, NULL, NULL, NULL, 
+            NULL);
+    registry_impl->qname_or_token_any_attr = 
+        woden_qname_or_token_any_attr_create(env, NULL, NULL, NULL, NULL);
+    registry_impl->qname_list_or_token_any_attr = 
+        woden_qname_list_or_token_any_attr_create(env, NULL, NULL, NULL, 
+                NULL);
+
+    q_attr_soap_version = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_VERSION);
+    woden_ext_registry_register_ext_attr_type(registry, env,
+        "binding_element", q_attr_soap_version, 
+        registry_impl->string_attr);
+   
+    q_attr_soap_protocol = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_PROTOCOL);
+    woden_ext_registry_register_ext_attr_type(registry, env,
+        "binding_element", q_attr_soap_protocol, 
+        registry_impl->uri_attr);
+   
+    q_attr_soap_mepdefault = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_MEPDEFAULT);
+    woden_ext_registry_register_ext_attr_type(registry, env,
+        "binding_element", q_attr_soap_mepdefault, 
+        registry_impl->uri_attr);
+   
+    q_attr_soap_code = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_CODE);
+    woden_ext_registry_register_ext_attr_type(registry, env, 
+        "binding_fault_element", q_attr_soap_code, 
+        registry_impl->qname_or_token_any_attr);
+   
+    q_attr_soap_subcodes = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_SUBCODES);
+    woden_ext_registry_register_ext_attr_type(registry, env, 
+        "binding_fault_element", q_attr_soap_subcodes, 
+        registry_impl->qname_list_or_token_any_attr);
+   
+    q_attr_soap_mep = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_MEP);
+    woden_ext_registry_register_ext_attr_type(registry, env, 
+        "binding_op_element", q_attr_soap_mep, 
+        registry_impl->uri_attr);
+   
+    q_attr_soap_action = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_ACTION);
+    woden_ext_registry_register_ext_attr_type(registry, env, 
+        "binding_op_element", q_attr_soap_action, 
+        registry_impl->uri_attr);
+    
+    /************** SOAPModule extension elements *****************************/
+
+    registry_impl->soap_module_deser = 
+        woden_soap_module_deserializer_create(env);
+    registry_impl->soap_module = woden_soap_module_create(env);
+    
+    q_elem_soap_module = axis2_qname_create_from_string(env, WODEN_Q_ELEM_SOAP_MODULE);
+    
+    woden_ext_registry_register_deserializer(registry, env, "binding_element",
+            q_elem_soap_module,
+            registry_impl->soap_module_deser);
+    
+    woden_ext_registry_register_ext_element_type(registry, env, "binding_element",
+            q_elem_soap_module,
+            registry_impl->soap_module);
+    
+    woden_ext_registry_register_deserializer(registry, env, "binding_fault_element",
+            q_elem_soap_module,
+            registry_impl->soap_module_deser);
+    
+    woden_ext_registry_register_ext_element_type(registry, env, "binding_fault_element",
+            q_elem_soap_module,
+            registry_impl->soap_module);
+    
+    woden_ext_registry_register_deserializer(registry, env, "binding_op_element",
+            q_elem_soap_module,
+            registry_impl->soap_module_deser);
+    
+    woden_ext_registry_register_ext_element_type(registry, env, "binding_op_element",
+            q_elem_soap_module,
+            registry_impl->soap_module);
+    
+    woden_ext_registry_register_deserializer(registry, env, "binding_msg_ref_element",
+            q_elem_soap_module,
+            registry_impl->soap_module_deser);
+    
+    woden_ext_registry_register_ext_element_type(registry, env, "binding_msg_ref_element",
+            q_elem_soap_module,
+            registry_impl->soap_module);
+    
+    woden_ext_registry_register_deserializer(registry, env, "binding_fault_ref_element",
+            q_elem_soap_module,
+            registry_impl->soap_module_deser);
+    
+    woden_ext_registry_register_ext_element_type(registry, env, "binding_fault_ref_element",
+            q_elem_soap_module,
+            registry_impl->soap_module);
+
+    /**************** SOAPHeaderBlock extension elements **********************/
+    registry_impl->soap_header_block_deser = 
+        woden_soap_header_block_deserializer_create(env);
+    registry_impl->soap_header_block = woden_soap_header_block_create(env);
+    
+    q_elem_soap_header = axis2_qname_create_from_string(env, WODEN_Q_ELEM_SOAP_HEADER);
+    
+    woden_ext_registry_register_deserializer(registry, env, "binding_fault_element",
+            q_elem_soap_header,
+            registry_impl->soap_header_block_deser);
+    
+    woden_ext_registry_register_ext_element_type(registry, env, "binding_fault_element",
+            q_elem_soap_header,
+            registry_impl->soap_header_block);
+    
+    woden_ext_registry_register_deserializer(registry, env, "binding_msg_ref_element",
+            q_elem_soap_header,
+            registry_impl->soap_header_block_deser);
+    
+    woden_ext_registry_register_ext_element_type(registry, env, "binding_msg_ref_element",
+            q_elem_soap_header,
+            registry_impl->soap_header_block);
+    
+    /*************** WSDL Component Extensions *******************************/ 
+    registry_impl->soap_binding_ext = woden_soap_binding_exts_create(env);
+    registry_impl->soap_binding_fault_ext = 
+        woden_soap_binding_fault_exts_create(env);
+    registry_impl->soap_binding_op_ext = 
+        woden_soap_binding_op_exts_create(env);
+    registry_impl->soap_binding_msg_ref_ext = 
+        woden_soap_binding_msg_ref_exts_create(env);
+    registry_impl->soap_binding_fault_ref_ext = 
+        woden_soap_binding_fault_ref_exts_create(env);
+
+    uri_ns_soap = axis2_uri_parse_string(env, WODEN_URI_NS_SOAP);
+
+    woden_ext_registry_register_component_ext(registry, env, "binding",
+            uri_ns_soap,
+            registry_impl->soap_binding_ext);
+    
+    woden_ext_registry_register_component_ext(registry, env, "binding_fault",
+            uri_ns_soap,
+            registry_impl->soap_binding_fault_ext);
+    
+    woden_ext_registry_register_component_ext(registry, env, "binding_op",
+            uri_ns_soap,
+            registry_impl->soap_binding_op_ext);
+    
+    woden_ext_registry_register_component_ext(registry, env, "binding_msg_ref",
+            uri_ns_soap,
+            registry_impl->soap_binding_msg_ref_ext);
+    
+    woden_ext_registry_register_component_ext(registry, env, "binding_fault_ref",
+            uri_ns_soap,
+            registry_impl->soap_binding_fault_ref_ext);
+    
+    return AXIS2_SUCCESS;
+}

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/Makefile.am?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/Makefile.am (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/Makefile.am Wed Jul  5 23:02:19 2006
@@ -0,0 +1,22 @@
+noinst_LTLIBRARIES = libwoden_extensions_soap.la
+
+libwoden_extensions_soap_la_SOURCES = \
+											soap_binding_exts.c \
+											soap_binding_fault_exts.c \
+											soap_binding_fault_ref_exts.c \
+											soap_binding_msg_ref_exts.c \
+											soap_binding_op_exts.c \
+											soap_header_block_element.c \
+											soap_module_element.c \
+											soap_header_block.c \
+											soap_module.c \
+											soap_module_deserializer.c \
+											soap_header_block_deserializer.c
+
+INCLUDES = -I$(top_builddir)/include \
+			@AXIOMINC@ \
+			@UTILINC@ \
+			@XMLSCHEMAINC@
+
+EXTRA_DIST = woden_soap_constants.h
+



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