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 [16/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/util/component_model_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/util/component_model_builder.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/util/component_model_builder.c (added)
+++ webservices/axis2/trunk/c/woden/src/util/component_model_builder.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,1500 @@
+/*
+ * 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_model_builder.h>
+#include <woden_desc_element.h>
+#include <woden_include_element.h>
+#include <woden_import_element.h>
+#include <woden_desc.h>
+#include <woden_types.h>
+#include <woden_element_decl.h>
+#include <woden_type_def.h>
+#include <woden_configurable.h>
+#include <woden_configurable_element.h>
+#include <woden_interface.h>
+#include <woden_interface_element.h>
+#include <woden_interface_fault.h>
+#include <woden_interface_fault_element.h>
+#include <woden_interface_op.h>
+#include <woden_interface_op_element.h>
+#include <woden_interface_fault_ref.h>
+#include <woden_interface_fault_ref_element.h>
+#include <woden_interface_msg_ref.h>
+#include <woden_interface_msg_ref_element.h>
+#include <woden_binding.h>
+#include <woden_binding_element.h>
+#include <woden_binding_fault.h>
+#include <woden_binding_fault_element.h>
+#include <woden_binding_op.h>
+#include <woden_binding_op_element.h>
+#include <woden_binding_fault_ref.h>
+#include <woden_binding_fault_ref_element.h>
+#include <woden_binding_msg_ref.h>
+#include <woden_binding_msg_ref_element.h>
+#include <woden_ext_registry.h>
+#include <woden_component_exts.h>
+#include <woden_property.h>
+#include <woden_property_element.h>
+
+#include <xml_schema.h>
+#include <xml_schema_obj_table.h>
+
+#include "../wsdl20/woden_constants.h"
+#include <axis2_array_list.h>
+#include <axis2_uri.h>
+
+typedef struct woden_component_model_builder_impl
+{
+    woden_component_model_builder_t builder;
+    void *f_desc;
+    axis2_array_list_t *f_schemas_done;
+    axis2_array_list_t *f_interfaces_done;
+    axis2_array_list_t *f_bindings_done;
+    axis2_array_list_t *f_svcs_done;
+    
+}woden_component_model_builder_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(builder) \
+    ((woden_component_model_builder_impl_t *) builder)
+
+axis2_status_t AXIS2_CALL
+woden_component_model_builder_free (
+        void *builder, 
+        const axis2_env_t *env); 
+
+static axis2_status_t
+init_components(
+        void *builder,
+        const axis2_env_t *env,
+        void *desc);
+
+/*
+ * Extract from the collections of in-scope schemas
+ * the element declarations and type definitions.
+ */
+static axis2_status_t
+build_elements_and_types(
+        void *builder,
+        const axis2_env_t *env,
+        void *desc);
+
+/*
+ * Extract the element declarations from the given schema. 
+ */
+static axis2_status_t
+build_element_decls(
+        void *builder,
+        const axis2_env_t *env,
+        void *schema_def,
+        axis2_uri_t *type_system_uri);
+    
+/*
+ * Extract the type definitions from the given schema. 
+ */
+static axis2_status_t
+build_type_defs(
+        void *builder,
+        const axis2_env_t *env,
+        void *schema_def,
+        axis2_uri_t *type_system_uri);
+
+/* *******************************************************************************
+ *  INTERFACE
+ * ******************************************************************************/
+
+/*
+ * Initialize the Interface component and its child components from the
+ * Interface Element and its child elements.
+ */
+static axis2_status_t
+build_interfaces(
+        void *builder,
+        const axis2_env_t *env,
+        void *desc);
+
+static axis2_status_t
+build_interface_faults(
+        void *builder,
+        const axis2_env_t *env,
+        void *interface);
+
+static axis2_status_t
+build_interface_ops(
+        void *builder,
+        const axis2_env_t *env,
+        void *interface);
+
+static axis2_status_t
+build_interface_fault_refs(
+        void *builder,
+        const axis2_env_t *env,
+        void *op);
+
+static axis2_status_t
+build_interface_msg_refs(
+        void *builder,
+        const axis2_env_t *env,
+        void *op);
+
+/* *******************************************************************************
+ *  BINDING
+ * ******************************************************************************/
+
+/*
+ * Initialize the Binding component and its child components from the
+ * Binding Element and its child elements.
+ */
+static axis2_status_t
+build_bindings(
+        void *builder,
+        const axis2_env_t *env,
+        void *desc);
+
+static axis2_status_t
+build_binding_faults(
+        void *builder,
+        const axis2_env_t *env,
+        void *binding);
+
+static axis2_status_t
+build_binding_ops(
+        void *builder,
+        const axis2_env_t *env,
+        void *binding);
+
+static axis2_status_t
+build_binding_fault_refs(
+        void *builder,
+        const axis2_env_t *env,
+        void *op);
+
+static axis2_status_t
+build_binding_msg_refs(
+        void *builder,
+        const axis2_env_t *env,
+        void *op);
+
+static axis2_status_t
+build_binding_exts(
+        void *builder,
+        const axis2_env_t *env,
+        void *binding);
+
+static axis2_status_t
+build_binding_fault_exts(
+        void *builder,
+        const axis2_env_t *env,
+        void *bind_fault);
+
+static axis2_status_t
+build_binding_op_exts(
+        void *builder,
+        const axis2_env_t *env,
+        void *bind_op);
+
+static axis2_status_t
+build_binding_msg_ref_exts(
+        void *builder,
+        const axis2_env_t *env,
+        void *bind_msg_ref);
+    
+static axis2_status_t
+build_binding_fault_ref_exts(
+        void *builder,
+        const axis2_env_t *env,
+        void *bind_fault_ref);
+    
+/*
+ * This helper method factors out common code for creating Component Extensions registered
+ * in the Extension Registry. 
+ */
+static void *
+create_component_exts(
+        void *builder,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class,
+        void *parent_elem,
+        axis2_uri_t *ext_ns);
+
+/* *******************************************************************************
+ *  SERVICE
+ * ******************************************************************************/
+static axis2_status_t
+build_svcs(
+        void *builder,
+        const axis2_env_t *env,
+        void *desc);
+
+/* *******************************************************************************
+ *  PROPERTY
+ * ******************************************************************************/
+
+static axis2_status_t
+build_properties(
+        void *builder,
+        const axis2_env_t *env,
+        axis2_array_list_t *prop_els,
+        void *parent);
+
+/************************** End of function prototypes ************************/
+
+AXIS2_EXTERN woden_component_model_builder_t *AXIS2_CALL 
+woden_component_model_builder_create(
+        const axis2_env_t *env,
+        void *desc)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    
+   AXIS2_ENV_CHECK(env, NULL);
+   
+   builder_impl = (woden_component_model_builder_impl_t *) 
+        AXIS2_MALLOC(env->allocator, 
+        sizeof(woden_component_model_builder_impl_t));
+   
+   if(NULL == builder_impl)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return NULL;
+    }
+    builder_impl->f_desc= NULL;
+    builder_impl->f_schemas_done = NULL;
+    builder_impl->f_interfaces_done = NULL;
+    builder_impl->f_bindings_done = NULL;
+    builder_impl->f_svcs_done = NULL;
+    
+    builder_impl->builder.ops = 
+      AXIS2_MALLOC (env->allocator, 
+                sizeof(woden_component_model_builder_ops_t));
+   if(NULL == builder_impl->builder.ops)
+    {
+        woden_component_model_builder_free(&(builder_impl->builder), env);
+      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+
+    builder_impl->builder.ops->free =  
+        woden_component_model_builder_free;
+    
+    builder_impl->f_desc = desc;
+    init_components(&(builder_impl->builder), env, builder_impl->f_desc);
+   return &(builder_impl->builder);
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL 
+woden_component_model_builder_free (
+        void *builder, 
+        const axis2_env_t *env)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    if(builder_impl->builder.ops)
+    {
+        AXIS2_FREE(env->allocator, builder_impl->
+                builder.ops);
+        builder_impl->builder.ops = NULL;
+    }
+    
+    if(builder_impl)
+    {
+        AXIS2_FREE(env->allocator, builder_impl);
+        builder_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+init_components(
+        void *builder,
+        const axis2_env_t *env,
+        void *desc)
+{
+    axis2_array_list_t *includes = NULL;
+    axis2_array_list_t *imports = NULL;
+    int i = 0, size = 0;
+    
+    build_elements_and_types(builder, env, desc);
+    build_interfaces(builder, env, desc);
+    build_bindings(builder, env, desc);
+    build_svcs(builder, env, desc);
+    
+    desc = woden_desc_to_desc_element(desc, env);
+    includes = WODEN_DESC_ELEMENT_GET_INCLUDE_ELEMENTS(desc, env);
+    if (includes)
+    {
+        size = AXIS2_ARRAY_LIST_SIZE(includes, env);
+        for(i = 0; i < size; i++)
+        {
+            void *incl_desc = NULL;
+            void *incl_el = NULL;
+
+            incl_el = AXIS2_ARRAY_LIST_GET(includes, env, i);
+            incl_desc = WODEN_INCLUDE_ELEMENT_GET_DESC_ELEMENT(incl_el, env);
+            if(NULL != incl_desc)
+            {
+                init_components(builder, env, incl_desc);
+            }
+        }
+    }
+     
+    imports = WODEN_DESC_ELEMENT_GET_IMPORT_ELEMENTS(desc, env);
+    if (imports)
+    {
+        size = AXIS2_ARRAY_LIST_SIZE(imports, env);
+        for(i = 0; i < size; i++)
+        {
+            void *imp_desc = NULL;
+            void *imp_el = NULL;
+
+            imp_el = AXIS2_ARRAY_LIST_GET(imports, env, i);
+            imp_desc = WODEN_IMPORT_ELEMENT_GET_DESC_ELEMENT(imp_el, env);
+            if(NULL != imp_desc)
+            {
+                init_components(builder, env, imp_desc);
+            }
+        }
+    }
+    
+    return AXIS2_SUCCESS;
+}
+
+/* *******************************************************************************
+ *  TYPES
+ * ******************************************************************************/
+
+/*
+ * Extract from the collections of in-scope schemas
+ * the element declarations and type definitions.
+ */
+static axis2_status_t
+build_elements_and_types(
+        void *builder,
+        const axis2_env_t *env,
+        void *desc)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    void *types = NULL;
+    axis2_uri_t *type_system_uri = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, desc, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    desc = woden_desc_to_desc_element(desc, env);
+    types = WODEN_DESC_ELEMENT_GET_TYPES_ELEMENT(desc, env);
+    
+    type_system_uri = axis2_uri_parse_string(env, WODEN_TYPE_XSD_2001);
+    
+    if(NULL != types)
+    {
+        axis2_array_list_t *referenceable_schema_defs = NULL;
+        int i = 0, size = 0;
+
+        referenceable_schema_defs = 
+            WODEN_TYPES_GET_REFERENCEABLE_SCHEMA_DEFS(types, env);
+        if(referenceable_schema_defs)
+            size = AXIS2_ARRAY_LIST_SIZE(referenceable_schema_defs, env);
+        for(i = 0; i < size; i++)
+        {
+            void *schema_def = NULL;
+            int i = 0, size = 0;
+            axis2_bool_t new_schema = AXIS2_TRUE;
+            
+            schema_def = AXIS2_ARRAY_LIST_GET(referenceable_schema_defs, env, i);
+            if(builder_impl->f_schemas_done)
+                size = AXIS2_ARRAY_LIST_SIZE(builder_impl->f_schemas_done, env);
+            for(i = 0; i < size; i++)
+            {
+                void *schema_done = NULL;
+
+                schema_done = AXIS2_ARRAY_LIST_GET(builder_impl->f_schemas_done, 
+                        env, i);
+                /* TODO Check the logic here */
+                if(schema_def == schema_done)
+                {
+                    new_schema = AXIS2_FALSE;
+                    break;
+                }
+            }
+            /* if builder_impl->f_schemas_done does not contain schema_def */
+            if(new_schema)
+            {
+                build_element_decls(builder, env, schema_def, type_system_uri);
+                build_type_defs(builder, env, schema_def, type_system_uri);
+                if(!builder_impl->f_schemas_done)
+                {
+                    builder_impl->f_schemas_done = axis2_array_list_create(env, 0);
+                    if(!builder_impl->f_schemas_done)
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, 
+                                AXIS2_FAILURE);
+                }
+                AXIS2_ARRAY_LIST_ADD(builder_impl->f_schemas_done, env, schema_def);
+            }
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+/*
+ * Extract the element declarations from the given schema. 
+ */
+static axis2_status_t
+build_element_decls(
+        void *builder,
+        const axis2_env_t *env,
+        void *schema_def,
+        axis2_uri_t *type_system_uri)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_char_t *schema_tns = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, schema_def, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, type_system_uri, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    schema_tns = XML_SCHEMA_GET_TARGET_NAMESPACE(schema_def, env);
+    if(NULL != schema_tns)
+    {
+        xml_schema_obj_table_t *element_table = NULL;
+        axis2_array_list_t *qnames = NULL;
+        int i = 0, size = 0;
+
+        element_table = XML_SCHEMA_GET_ELEMENTS(schema_def, env);
+        qnames = XML_SCHEMA_OBJ_TABLE_GET_NAMES(element_table, env);
+        if(qnames)
+            size = AXIS2_ARRAY_LIST_SIZE(qnames, env);
+        for(i = 0; i < size; i++)
+        {
+            axis2_qname_t *qname = NULL;
+            axis2_char_t *namespc = NULL;
+
+            qname = (axis2_qname_t *) AXIS2_ARRAY_LIST_GET(qnames, env, i);
+            if(qname)
+                namespc = AXIS2_QNAME_GET_URI(qname, env);
+            if(0 == AXIS2_STRCMP(namespc, schema_tns))
+            {
+                void *ed = NULL;
+
+                ed = woden_element_decl_create(env);
+                WODEN_ELEMENT_DECL_SET_QNAME(ed, env, qname);
+                WODEN_ELEMENT_DECL_SET_SYSTEM(ed, env, type_system_uri);
+                WODEN_ELEMENT_DECL_SET_CONTENT_MODEL(ed, env, 
+                        WODEN_API_APACHE_WS_XS);
+                WODEN_ELEMENT_DECL_SET_CONTENT(ed, env, 
+                        XML_SCHEMA_OBJ_TABLE_GET_ITEM(element_table, env, 
+                            qname));
+                WODEN_DESC_ADD_TO_ALL_ELEMENT_DECLS(builder_impl->f_desc, 
+                        env, ed);
+            }
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+    
+/*
+ * Extract the type definitions from the given schema. 
+ */
+static axis2_status_t
+build_type_defs(
+        void *builder,
+        const axis2_env_t *env,
+        void *schema_def,
+        axis2_uri_t *type_system_uri)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_char_t *schema_tns = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, schema_def, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, type_system_uri, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    schema_tns = XML_SCHEMA_GET_TARGET_NAMESPACE(schema_def, env);
+    if(NULL != schema_tns)
+    {
+        xml_schema_obj_table_t *type_table = NULL;
+        axis2_array_list_t *qnames = NULL;
+        int i = 0, size = 0;
+
+        type_table = XML_SCHEMA_GET_SCHEMA_TYPES(schema_def, env);
+        qnames = XML_SCHEMA_OBJ_TABLE_GET_NAMES(type_table, env);
+        if(qnames)
+            size = AXIS2_ARRAY_LIST_SIZE(qnames, env);
+        for(i = 0; i < size; i++)
+        {
+            axis2_qname_t *qname = NULL;
+            axis2_char_t *namespc = NULL;
+
+            qname = (axis2_qname_t *) AXIS2_ARRAY_LIST_GET(qnames, env, i);
+            if(qname)
+                namespc = AXIS2_QNAME_GET_URI(qname, env);
+            if(0 == AXIS2_STRCMP(namespc, schema_tns))
+            {
+                void *td = NULL;
+
+                td = woden_type_def_create(env);
+                WODEN_TYPE_DEF_SET_QNAME(td, env, qname);
+                WODEN_TYPE_DEF_SET_SYSTEM(td, env, type_system_uri);
+                WODEN_TYPE_DEF_SET_CONTENT_MODEL(td, env, 
+                        WODEN_API_APACHE_WS_XS);
+                WODEN_TYPE_DEF_SET_CONTENT(td, env, 
+                        XML_SCHEMA_OBJ_TABLE_GET_ITEM(type_table, env, 
+                            qname));
+                WODEN_DESC_ADD_TO_ALL_TYPE_DEFS(builder_impl->f_desc, 
+                        env, td);
+            }
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+ 
+
+/* *******************************************************************************
+ *  INTERFACE
+ * ******************************************************************************/
+
+/*
+ * Initialize the Interface component and its child components from the
+ * Interface Element and its child elements.
+ */
+static axis2_status_t
+build_interfaces(
+        void *builder,
+        const axis2_env_t *env,
+        void *desc)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_array_list_t *interface_els = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, desc, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    desc = woden_desc_to_desc_element(desc, env);
+    interface_els = WODEN_DESC_ELEMENT_GET_INTERFACE_ELEMENTS(desc, env);
+    if(NULL != interface_els)
+    {
+        size = AXIS2_ARRAY_LIST_SIZE(interface_els, env);
+    }
+    for(i = 0; i < size; i++)
+    {
+        void *int_impl = NULL;
+
+        int_impl = AXIS2_ARRAY_LIST_GET(interface_els, env, i);
+        if(AXIS2_TRUE != AXIS2_ARRAY_LIST_CONTAINS(interface_els, env, int_impl))
+        {
+            axis2_array_list_t *property_els = NULL;
+            void *configurable = NULL;
+
+            WODEN_DESC_ADD_TO_ALL_INTERFACES(builder_impl->f_desc, 
+                    env, int_impl);
+            configurable = WODEN_INTERFACE_GET_BASE_IMPL(int_impl, env);
+            configurable = woden_configurable_to_configurable_element(configurable, 
+                    env);
+            property_els = WODEN_CONFIGURABLE_ELEMENT_GET_PROPERTY_ELEMENTS(
+                    configurable, env);
+            build_properties(builder, env, property_els, int_impl);
+            build_interface_faults(builder, env, int_impl);
+            build_interface_ops(builder, env, int_impl);
+            if(!builder_impl->f_interfaces_done)
+            {
+                builder_impl->f_interfaces_done = axis2_array_list_create(env, 0);
+                if(!builder_impl->f_interfaces_done)
+                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, 
+                            AXIS2_FAILURE);
+            }
+            AXIS2_ARRAY_LIST_ADD(builder_impl->f_interfaces_done, env, int_impl);
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+build_interface_faults(
+        void *builder,
+        const axis2_env_t *env,
+        void *interface)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_array_list_t *faults = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, interface, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    interface = woden_interface_to_interface_element(interface, env);
+    faults = WODEN_INTERFACE_ELEMENT_GET_INTERFACE_FAULT_ELEMENTS(
+            interface, env);
+    if(faults)
+        size = AXIS2_ARRAY_LIST_SIZE(faults, env);
+    for(i = 0; i < size; i++)
+    {
+        void *fault = NULL;
+        axis2_array_list_t *property_elements = NULL;
+        axis2_qname_t *qname = NULL;
+        
+        fault = AXIS2_ARRAY_LIST_GET(faults, env, i);
+        fault = woden_interface_fault_to_configurable_element(fault, env);
+        property_elements = WODEN_CONFIGURABLE_ELEMENT_GET_PROPERTY_ELEMENTS(
+                fault, env);
+        build_properties(builder, env, property_elements, fault);
+        fault = woden_interface_fault_to_interface_fault_element(fault, env);
+        qname = WODEN_INTERFACE_FAULT_ELEMENT_GET_ELEMENT_QNAME(fault, env);
+        if(NULL != qname)
+        {
+            void *element_decl = NULL;
+            
+            element_decl = WODEN_DESC_GET_ELEMENT_DECL(
+                    builder_impl->f_desc, env, qname);
+            WODEN_INTERFACE_FAULT_SET_ELEMENT_DECL(fault, env, element_decl);
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+build_interface_ops(
+        void *builder,
+        const axis2_env_t *env,
+        void *interface)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_array_list_t *ops = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, interface, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    interface = woden_interface_to_interface_element(interface, env);
+    ops = WODEN_INTERFACE_ELEMENT_GET_INTERFACE_OP_ELEMENTS(
+            interface, env);
+    if(ops)
+        size = AXIS2_ARRAY_LIST_SIZE(ops, env);
+    for(i = 0; i < size; i++)
+    {
+        void *op = NULL;
+        axis2_array_list_t *property_elements = NULL;
+        
+        op = AXIS2_ARRAY_LIST_GET(ops, env, i);
+        op = woden_interface_op_to_configurable_element(op, env);
+        property_elements = WODEN_CONFIGURABLE_ELEMENT_GET_PROPERTY_ELEMENTS(
+                op, env);
+        build_properties(builder, env, property_elements, op);
+        build_interface_fault_refs(builder, env, op);
+        build_interface_msg_refs(builder, env, op);
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+build_interface_fault_refs(
+        void *builder,
+        const axis2_env_t *env,
+        void *op)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_array_list_t *fault_refs = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, op, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    op = woden_interface_op_to_interface_op_element(op, env);
+    fault_refs = WODEN_INTERFACE_OP_ELEMENT_GET_INTERFACE_FAULT_REF_ELEMENTS(
+            op, env);
+    if(fault_refs)
+        size = AXIS2_ARRAY_LIST_SIZE(fault_refs, env);
+    for(i = 0; i < size; i++)
+    {
+        void *fault_ref = NULL;
+        axis2_array_list_t *property_elements = NULL;
+        axis2_qname_t *qname = NULL;
+        
+        fault_ref = AXIS2_ARRAY_LIST_GET(fault_refs, env, i);
+        fault_ref = woden_interface_fault_ref_to_configurable_element(fault_ref, env);
+        property_elements = WODEN_CONFIGURABLE_ELEMENT_GET_PROPERTY_ELEMENTS(
+                fault_ref, env);
+        build_properties(builder, env, property_elements, fault_ref);
+        fault_ref = woden_interface_fault_ref_to_interface_fault_ref_element(
+                fault_ref, env);
+        qname = WODEN_INTERFACE_FAULT_REF_ELEMENT_GET_REF(fault_ref, env);
+        if(NULL != qname)
+        {
+            void *interface = NULL;
+            void *interface_fault = NULL;
+           
+            op = woden_interface_op_to_nested_component(op, env);
+            interface = WODEN_NESTED_COMPONENT_GET_PARENT(op, env);
+            interface_fault = WODEN_INTERFACE_GET_INTERFACE_FAULT(interface, env, qname);
+            WODEN_INTERFACE_FAULT_REF_SET_INTERFACE_FAULT(fault_ref, env, interface_fault);
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+build_interface_msg_refs(
+        void *builder,
+        const axis2_env_t *env,
+        void *op)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_array_list_t *msgs = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, op, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    op = woden_interface_op_to_interface_op_element(op, env);
+    msgs = WODEN_INTERFACE_OP_ELEMENT_GET_INTERFACE_MSG_REF_ELEMENTS(
+            op, env);
+    if(msgs)
+        size = AXIS2_ARRAY_LIST_SIZE(msgs, env);
+    for(i = 0; i < size; i++)
+    {
+        void *msg = NULL;
+        axis2_array_list_t *property_elements = NULL;
+        axis2_char_t *msg_content_model = NULL;
+        
+        msg = AXIS2_ARRAY_LIST_GET(msgs, env, i);
+        msg = woden_interface_msg_ref_to_configurable_element(msg, env);
+        property_elements = WODEN_CONFIGURABLE_ELEMENT_GET_PROPERTY_ELEMENTS(
+                msg, env);
+        build_properties(builder, env, property_elements, msg);
+        msg_content_model = WODEN_INTERFACE_MSG_REF_GET_MSG_CONTENT_MODEL(
+                msg, env);
+        if(0 == AXIS2_STRCMP(WODEN_NMTOKEN_ELEMENT, msg_content_model))
+        {
+            axis2_qname_t *qname = NULL;
+            msg = woden_interface_msg_ref_to_interface_msg_ref_element(msg, env);
+            qname = WODEN_INTERFACE_MSG_REF_ELEMENT_GET_ELEMENT_QNAME(msg, env);
+            if(qname)
+            {
+                void *element_decl = WODEN_DESC_GET_ELEMENT_DECL(
+                        builder_impl->f_desc, env, qname);
+                WODEN_INTERFACE_MSG_REF_SET_ELEMENT_DECLARATION(msg, env, 
+                        element_decl); 
+            }
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+/* *******************************************************************************
+ *  BINDING
+ * ******************************************************************************/
+
+/*
+ * Initialize the Binding component and its child components from the
+ * Binding Element and its child elements.
+ */
+static axis2_status_t
+build_bindings(
+        void *builder,
+        const axis2_env_t *env,
+        void *desc)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_array_list_t *binding_els = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, desc, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    desc = woden_desc_to_desc_element(desc, env);
+    binding_els = WODEN_DESC_ELEMENT_GET_BINDING_ELEMENTS(desc, env);
+    if(binding_els)
+        size = AXIS2_ARRAY_LIST_SIZE(binding_els, env);
+    for(i = 0; i < size; i++)
+    {
+        void *bind_impl = NULL;
+
+        bind_impl = AXIS2_ARRAY_LIST_GET(binding_els, env, i);
+        if(builder_impl->f_bindings_done && AXIS2_TRUE != 
+                AXIS2_ARRAY_LIST_CONTAINS(builder_impl->f_bindings_done, 
+                    env, bind_impl))
+        {
+            axis2_array_list_t *property_elements = NULL;
+
+            WODEN_DESC_ADD_TO_ALL_BINDINGS(builder_impl->f_desc, 
+                    env, bind_impl);
+            bind_impl = woden_binding_to_configurable_element(bind_impl, env);
+            property_elements = WODEN_CONFIGURABLE_ELEMENT_GET_PROPERTY_ELEMENTS(
+                    bind_impl, env);
+            build_properties(builder, env, property_elements, bind_impl);
+            build_binding_faults(builder, env, bind_impl);
+            build_binding_ops(builder, env, bind_impl);
+            build_binding_exts(builder, env, bind_impl);
+            if(!builder_impl->f_bindings_done)
+            {
+                builder_impl->f_bindings_done = axis2_array_list_create(env, 0);
+                if(!builder_impl->f_bindings_done)
+                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, 
+                            AXIS2_FAILURE);
+            }
+            AXIS2_ARRAY_LIST_ADD(builder_impl->f_bindings_done, env, bind_impl);
+
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+build_binding_faults(
+        void *builder,
+        const axis2_env_t *env,
+        void *binding)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_array_list_t *faults = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, binding, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    binding = woden_binding_to_binding_element(binding, env);
+    faults = WODEN_BINDING_ELEMENT_GET_BINDING_FAULT_ELEMENTS(
+            binding, env);
+    if(faults)
+        size = AXIS2_ARRAY_LIST_SIZE(faults, env);
+    for(i = 0; i < size; i++)
+    {
+        void *fault = NULL;
+        axis2_array_list_t *property_elements = NULL;
+        
+        fault = AXIS2_ARRAY_LIST_GET(faults, env, i);
+        fault = woden_binding_fault_to_configurable_element(fault, env);
+        property_elements = WODEN_CONFIGURABLE_ELEMENT_GET_PROPERTY_ELEMENTS(
+                fault, env);
+        build_properties(builder, env, property_elements, fault);
+        build_binding_fault_exts(builder, env, fault);
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+build_binding_ops(
+        void *builder,
+        const axis2_env_t *env,
+        void *binding)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_array_list_t *ops = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, binding, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    binding = woden_binding_to_binding_element(binding, env);
+    ops = WODEN_BINDING_ELEMENT_GET_BINDING_OP_ELEMENTS(
+            binding, env);
+    if(ops)
+        size = AXIS2_ARRAY_LIST_SIZE(ops, env);
+    for(i = 0; i < size; i++)
+    {
+        void *op = NULL;
+        axis2_array_list_t *property_elements = NULL;
+        
+        op = AXIS2_ARRAY_LIST_GET(ops, env, i);
+        op = woden_binding_op_to_configurable_element(op, env);
+        property_elements = WODEN_CONFIGURABLE_ELEMENT_GET_PROPERTY_ELEMENTS(
+                op, env);
+        build_properties(builder, env, property_elements, op);
+        build_binding_fault_refs(builder, env, op);
+        build_binding_msg_refs(builder, env, op);
+        build_binding_op_exts(builder, env, op);
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+build_binding_fault_refs(
+        void *builder,
+        const axis2_env_t *env,
+        void *op)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_array_list_t *fault_refs = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, op, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    op = woden_binding_op_to_binding_op_element(op, env);
+    op = woden_binding_op_to_binding_op_element(op, env);
+    fault_refs = WODEN_BINDING_OP_ELEMENT_GET_BINDING_FAULT_REF_ELEMENTS(
+            op, env);
+    if(fault_refs)
+        size = AXIS2_ARRAY_LIST_SIZE(fault_refs, env);
+    for(i = 0; i < size; i++)
+    {
+        void *fault_ref = NULL;
+        axis2_array_list_t *property_elements = NULL;
+        
+        fault_ref = AXIS2_ARRAY_LIST_GET(fault_refs, env, i);
+        fault_ref = woden_binding_fault_ref_to_configurable_element(fault_ref, env); 
+        property_elements = WODEN_CONFIGURABLE_ELEMENT_GET_PROPERTY_ELEMENTS(
+                fault_ref, env);
+        build_properties(builder, env, property_elements, fault_ref);
+        build_binding_fault_ref_exts(builder, env, fault_ref);
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+build_binding_msg_refs(
+        void *builder,
+        const axis2_env_t *env,
+        void *op)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_array_list_t *msgs = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, op, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    op = woden_binding_op_to_binding_op_element(op, env);
+    msgs = WODEN_BINDING_OP_ELEMENT_GET_BINDING_MSG_REF_ELEMENTS(
+            op, env);
+    if(msgs)
+        size = AXIS2_ARRAY_LIST_SIZE(msgs, env);
+    for(i = 0; i < size; i++)
+    {
+        void *msg = NULL;
+        axis2_array_list_t *property_elements = NULL;
+        
+        msg = AXIS2_ARRAY_LIST_GET(msgs, env, i);
+        msg = woden_binding_msg_ref_to_configurable_element(msg, env);
+        property_elements = WODEN_CONFIGURABLE_ELEMENT_GET_PROPERTY_ELEMENTS(
+                msg, env);
+        build_properties(builder, env, property_elements, msg);
+        build_binding_msg_ref_exts(builder, env, msg);
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+build_binding_exts(
+        void *builder,
+        const axis2_env_t *env,
+        void *binding)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    woden_ext_registry_t *er = NULL;
+    axis2_array_list_t *ext_namespcs = NULL;
+    int i = 0, size = 0;
+    axis2_uri_t *binding_type = NULL;
+    axis2_char_t *binding_type_str = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, binding, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    builder_impl->f_desc = woden_desc_to_desc_element(builder_impl->f_desc, env);
+    er = WODEN_DESC_ELEMENT_GET_EXT_REGISTRY(builder_impl->f_desc, env);
+    ext_namespcs = WODEN_EXT_REGISTRY_QUERY_COMPONENT_EXT_NAMESPACES(er, 
+            env, "binding");
+    
+    /*
+     * First, create a Component Extensions object for each registered extension namespace 
+     * used with this binding. 
+     */
+    size = AXIS2_ARRAY_LIST_SIZE(ext_namespcs, env);
+    for(i = 0; i < size; i++)
+    {
+        axis2_uri_t *ext_ns = NULL;
+        axis2_bool_t temp1 = AXIS2_FALSE;
+        axis2_bool_t temp2 = AXIS2_FALSE;
+        
+        ext_ns = AXIS2_ARRAY_LIST_GET(ext_namespcs, env, i);
+        binding = woden_binding_to_attr_extensible(
+                binding, env);
+        temp1 = WODEN_ATTR_EXTENSIBLE_HAS_EXT_ATTRS_FOR_NAMESPACE(
+                binding, env, ext_ns);
+        binding = woden_binding_to_element_extensible(
+                binding, env);
+        temp2 = WODEN_ELEMENT_EXTENSIBLE_HAS_EXT_ELEMENTS_FOR_NAMESPACE(
+                binding, env, ext_ns);
+        if(AXIS2_TRUE == temp1 || AXIS2_TRUE == temp2)
+        {
+            void *comp_ext = NULL;
+
+            comp_ext = create_component_exts(builder, env, "binding", 
+                    binding, ext_ns);
+            binding = woden_binding_to_wsdl_obj(binding, env);
+            WODEN_WSDL_OBJ_SET_COMPONENT_EXTS(binding, env, ext_ns, comp_ext);
+        }
+    }
+    
+    /*
+     * Second, apply the rules from WSDL 2.0 Part 2 Adjuncts spec for default values for SOAP and HTTP 
+     * extension properties to create ComponentExtension objects even if the related extension attributes
+     * or elements do not exist in the WSDL. 
+     * 
+     * TODO chg this hardcoded behaviour so that any default rules for SOAP, HTTP or user-defined
+     * extensions can be registered in some way and interpreted here at run time.
+     */
+    binding_type = WODEN_BINDING_GET_TYPE(binding, env);
+    binding_type_str = AXIS2_URI_TO_STRING(binding_type, env, AXIS2_URI_UNP_OMITUSERINFO);
+    if(0 == AXIS2_STRCMP(WODEN_URI_NS_SOAP, binding_type_str))
+    {
+        void *sbe = NULL;
+        axis2_uri_t *uri_ns_soap = NULL;
+
+        /* If the binding type is SOAP, the {soap version} property defaults to "1.2" so if a
+         * a SOAP Binding Extensions object has not already been created, create one now to handle
+         * this default value.
+         */
+        binding = woden_binding_to_wsdl_component(binding, env);
+        uri_ns_soap = axis2_uri_parse_string(env, WODEN_URI_NS_SOAP);
+        if(NULL == WODEN_WSDL_COMPONENT_GET_COMPONENT_EXTS_FOR_NAMESPACE(binding, 
+                    env, uri_ns_soap))
+        {
+            void *comp_ext = NULL;
+
+            comp_ext = create_component_exts(builder, env, "binding", 
+                    binding, uri_ns_soap);
+            binding = woden_binding_to_wsdl_obj(binding, env);
+            WODEN_WSDL_OBJ_SET_COMPONENT_EXTS(binding, env, 
+                    uri_ns_soap, comp_ext);
+        }
+        sbe = WODEN_WSDL_COMPONENT_GET_COMPONENT_EXTS_FOR_NAMESPACE(binding, 
+                    env, uri_ns_soap);
+        /* TODO Complete this */
+    }
+    return AXIS2_SUCCESS;
+}
+
+
+static axis2_status_t
+build_binding_fault_exts(
+        void *builder,
+        const axis2_env_t *env,
+        void *bind_fault)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    woden_ext_registry_t *er = NULL;
+    axis2_array_list_t *ext_namespcs = NULL;
+    int i = 0, size = 0;
+    void *parent_element = NULL;
+    axis2_uri_t *binding_type = NULL;
+    axis2_char_t *binding_type_str = NULL;
+
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, bind_fault, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    builder_impl->f_desc = woden_desc_to_desc_element(builder_impl->f_desc, env);
+    er = WODEN_DESC_ELEMENT_GET_EXT_REGISTRY(builder_impl->f_desc, env);
+    ext_namespcs = WODEN_EXT_REGISTRY_QUERY_COMPONENT_EXT_NAMESPACES(er, 
+            env, "binding_fault");
+    
+    /*
+     * First, create a Component Extensions object for each registered extension namespace 
+     * used with this binding fault. 
+     */
+    size = AXIS2_ARRAY_LIST_SIZE(ext_namespcs, env);
+    for(i = 0; i < size; i++)
+    {
+        axis2_uri_t *ext_ns = NULL;
+        axis2_bool_t temp1 = AXIS2_FALSE;
+        axis2_bool_t temp2 = AXIS2_FALSE;
+        
+        ext_ns = AXIS2_ARRAY_LIST_GET(ext_namespcs, env, i);
+        bind_fault = woden_binding_fault_to_attr_extensible(
+                bind_fault, env);
+        temp1 = WODEN_ATTR_EXTENSIBLE_HAS_EXT_ATTRS_FOR_NAMESPACE(
+                bind_fault, env, ext_ns);
+        bind_fault = woden_binding_fault_to_element_extensible(
+                bind_fault, env);
+        temp2 = WODEN_ELEMENT_EXTENSIBLE_HAS_EXT_ELEMENTS_FOR_NAMESPACE(
+                bind_fault, env, ext_ns);
+        if(AXIS2_TRUE == temp1 || AXIS2_TRUE == temp2)
+        {
+            void *comp_ext = NULL;
+
+            comp_ext = create_component_exts(builder, env, "binding_fault", 
+                    bind_fault, ext_ns);
+            bind_fault = woden_binding_fault_to_wsdl_obj(bind_fault, env);
+            WODEN_WSDL_OBJ_SET_COMPONENT_EXTS(bind_fault, env, ext_ns, comp_ext);
+        }
+    }
+    
+    /*
+     * Second, apply the rules from WSDL 2.0 Part 2 Adjuncts spec for default values for SOAP and HTTP 
+     * extension properties to create ComponentExtension objects even if the related extension attributes
+     * or elements do not exist in the WSDL. 
+     * 
+     * TODO chg this hardcoded behaviour so that any default rules for SOAP, HTTP or user-defined
+     * extensions can be registered in some way and interpreted here at run time.
+     */
+    bind_fault = woden_binding_fault_to_nested_element(bind_fault, env);
+    parent_element = WODEN_NESTED_ELEMENT_GET_PARENT_ELEMENT(bind_fault, env);
+    parent_element = woden_binding_to_binding_element(parent_element, env);
+    binding_type = WODEN_BINDING_ELEMENT_GET_TYPE(parent_element, env);
+    binding_type_str = AXIS2_URI_TO_STRING(binding_type, env, AXIS2_URI_UNP_OMITUSERINFO);
+    if(0 == AXIS2_STRCMP(WODEN_URI_NS_SOAP, binding_type_str))
+    {
+        axis2_uri_t *uri_ns_soap = axis2_uri_parse_string(env, WODEN_URI_NS_SOAP);
+
+        /* If the binding type is SOAP, the {soap fault code} and {soap fault subcodes} properties
+         * default to xs:token "#any", so if a SOAP Binding Fault Extensions object has not already 
+         * been created, create one now to handle these default values.
+         */
+        bind_fault = woden_binding_fault_to_wsdl_component(bind_fault, env);
+        if(NULL == WODEN_WSDL_COMPONENT_GET_COMPONENT_EXTS_FOR_NAMESPACE(bind_fault, 
+                    env, uri_ns_soap))
+        {
+            void *comp_ext = NULL;
+
+            comp_ext = create_component_exts(builder, env, "binding_fault", 
+                    bind_fault, uri_ns_soap);
+            bind_fault = woden_binding_fault_to_wsdl_obj(bind_fault, env);
+            WODEN_WSDL_OBJ_SET_COMPONENT_EXTS(bind_fault, env, 
+                    uri_ns_soap, comp_ext);
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+static axis2_status_t
+build_binding_op_exts(
+        void *builder,
+        const axis2_env_t *env,
+        void *bind_op)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    woden_ext_registry_t *er = NULL;
+    axis2_array_list_t *ext_namespcs = NULL;
+    int i = 0, size = 0;
+    void *parent_element = NULL;
+    axis2_uri_t *binding_type = NULL;
+    axis2_char_t *binding_type_str = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, bind_op, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    builder_impl->f_desc = woden_desc_to_desc_element(builder_impl->f_desc, env);
+    er = WODEN_DESC_ELEMENT_GET_EXT_REGISTRY(builder_impl->f_desc, env);
+    ext_namespcs = WODEN_EXT_REGISTRY_QUERY_COMPONENT_EXT_NAMESPACES(er, env, "binding_op");
+    if(ext_namespcs)
+        size = AXIS2_ARRAY_LIST_SIZE(ext_namespcs, env);
+    /*
+     * First, create a Component Extensions object for each registered extension 
+     * namespace used with this binding operation. 
+     */
+    for(i = 0; i < size; i++)
+    {
+        axis2_uri_t *ext_ns = NULL;
+        axis2_bool_t temp1 = AXIS2_FALSE;
+        axis2_bool_t temp2 = AXIS2_FALSE;
+
+        ext_ns = AXIS2_ARRAY_LIST_GET(ext_namespcs, env, i);
+        bind_op = woden_binding_op_to_attr_extensible(
+                bind_op, env);
+        temp1 = WODEN_ATTR_EXTENSIBLE_HAS_EXT_ATTRS_FOR_NAMESPACE(
+                bind_op, env, ext_ns);
+        bind_op = woden_binding_op_to_element_extensible(
+                bind_op, env);
+        temp2 = WODEN_ELEMENT_EXTENSIBLE_HAS_EXT_ELEMENTS_FOR_NAMESPACE(
+                bind_op, env, ext_ns);
+        if(AXIS2_TRUE == temp1 || AXIS2_TRUE == temp2)
+        {
+            void *comp_ext = NULL;
+
+            comp_ext = create_component_exts(builder, env, "binding_op", 
+                    bind_op, ext_ns);
+            bind_op = woden_binding_op_to_wsdl_obj(bind_op, env);
+            WODEN_WSDL_OBJ_SET_COMPONENT_EXTS(bind_op, env, 
+                    ext_ns, comp_ext);
+        }
+    }
+    /*
+     * Second, apply the rules from WSDL 2.0 Part 2 Adjuncts spec for default values for SOAP and HTTP 
+     * extension properties to create Component Extension objects even if the related extension attributes
+     * or elements do not exist in the WSDL. 
+     * 
+     * TODO chg this hardcoded behaviour so that any default rules for SOAP, HTTP or user-defined
+     * extensions can be registered in some way and interpreted here at run time.
+     */
+    bind_op = woden_binding_op_to_nested_element(bind_op, env);
+    parent_element = WODEN_NESTED_ELEMENT_GET_PARENT_ELEMENT(bind_op, env);
+    parent_element = woden_binding_to_binding_element(parent_element, env);
+    binding_type = WODEN_BINDING_ELEMENT_GET_TYPE(parent_element, env);
+    binding_type_str = AXIS2_URI_TO_STRING(binding_type, env, AXIS2_URI_UNP_OMITUSERINFO);
+    if(0 == AXIS2_STRCMP(WODEN_URI_NS_SOAP, binding_type_str))
+    {
+        axis2_uri_t *uri_ns_soap = axis2_uri_parse_string(env, WODEN_URI_NS_SOAP);
+        /*
+         * If the binding type is HTTP then the {http input serialization} and {http output serialization} 
+         * properties have default values defined by the HTTP Binding rules in the WSDL 2.0 Part 2 Adjuncts
+         * spec, the {http fault serialization} property has the default "application/xml" and the 
+         * {http query parameter separator default} property has the default "&". So if an 
+         * HTTP Binding Operation Extensions object has not already been created, create one now to handle 
+         * these default values.
+         */
+        bind_op = woden_binding_op_to_wsdl_component(bind_op, env);
+        if(NULL == WODEN_WSDL_COMPONENT_GET_COMPONENT_EXTS_FOR_NAMESPACE(bind_op, 
+                    env, uri_ns_soap))
+        {
+            /*void *comp_ext = NULL;
+
+            comp_ext = create_component_exts(builder, env, "binding_op", 
+                    bind_op, WODEN_URI_NS_SOAP);
+            bind_op = woden_binding_op_to_wsdl_obj(bind_op, env);
+            WODEN_WSDL_OBJ_SET_COMPONENT_EXTS(bind_op, env, 
+                    WODEN_URI_NS_SOAP, comp_ext);*/
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+    
+
+static axis2_status_t
+build_binding_msg_ref_exts(
+        void *builder,
+        const axis2_env_t *env,
+        void *bind_msg_ref)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    woden_ext_registry_t *er = NULL;
+    axis2_array_list_t *ext_namespcs = NULL;
+    int i = 0, size = 0;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, bind_msg_ref, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    builder_impl->f_desc = woden_desc_to_desc_element(builder_impl->f_desc, env);
+    er = WODEN_DESC_ELEMENT_GET_EXT_REGISTRY(builder_impl->f_desc, env);
+    ext_namespcs = WODEN_EXT_REGISTRY_QUERY_COMPONENT_EXT_NAMESPACES(er, env, "binding_msg_ref");
+    if(ext_namespcs)
+        size = AXIS2_ARRAY_LIST_SIZE(ext_namespcs, env);
+    for(i = 0; i < size; i++)
+    {
+        axis2_uri_t *ext_ns = NULL;
+        axis2_bool_t temp1 = AXIS2_FALSE;
+        axis2_bool_t temp2 = AXIS2_FALSE;
+
+        ext_ns = AXIS2_ARRAY_LIST_GET(ext_namespcs, env, i);
+        bind_msg_ref = woden_binding_msg_ref_to_attr_extensible(
+                bind_msg_ref, env);
+        temp1 = WODEN_ATTR_EXTENSIBLE_HAS_EXT_ATTRS_FOR_NAMESPACE(
+                bind_msg_ref, env, ext_ns);
+        bind_msg_ref = woden_binding_msg_ref_to_element_extensible(
+                bind_msg_ref, env);
+        temp2 = WODEN_ELEMENT_EXTENSIBLE_HAS_EXT_ELEMENTS_FOR_NAMESPACE(
+                bind_msg_ref, env, ext_ns);
+        if(AXIS2_TRUE == temp1 || AXIS2_TRUE == temp2)
+        {
+            void *comp_ext = NULL;
+
+            comp_ext = create_component_exts(builder, env, "binding_msg_ref", 
+                    bind_msg_ref, ext_ns);
+            bind_msg_ref = woden_binding_msg_ref_to_wsdl_obj(bind_msg_ref, env);
+            WODEN_WSDL_OBJ_SET_COMPONENT_EXTS(bind_msg_ref, env, 
+                    ext_ns, comp_ext);
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+    
+static axis2_status_t
+build_binding_fault_ref_exts(
+        void *builder,
+        const axis2_env_t *env,
+        void *bind_fault_ref)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    woden_ext_registry_t *er = NULL;
+    axis2_array_list_t *ext_namespcs = NULL;
+    int i = 0, size = 0;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, bind_fault_ref, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    builder_impl->f_desc = woden_desc_to_desc_element(builder_impl->f_desc, env);
+    er = WODEN_DESC_ELEMENT_GET_EXT_REGISTRY(builder_impl->f_desc, env);
+    ext_namespcs = WODEN_EXT_REGISTRY_QUERY_COMPONENT_EXT_NAMESPACES(er, env, "binding_fault_ref");
+    if(ext_namespcs)
+        size = AXIS2_ARRAY_LIST_SIZE(ext_namespcs, env);
+    for(i = 0; i < size; i++)
+    {
+        axis2_uri_t *ext_ns = NULL;
+        axis2_bool_t temp1 = AXIS2_FALSE;
+        axis2_bool_t temp2 = AXIS2_FALSE;
+
+        ext_ns = AXIS2_ARRAY_LIST_GET(ext_namespcs, env, i);
+        bind_fault_ref = woden_binding_fault_ref_to_attr_extensible(
+                bind_fault_ref, env);
+        temp1 = WODEN_ATTR_EXTENSIBLE_HAS_EXT_ATTRS_FOR_NAMESPACE(
+                bind_fault_ref, env, ext_ns);
+        bind_fault_ref = woden_binding_fault_ref_to_element_extensible(
+                bind_fault_ref, env);
+        temp2 = WODEN_ELEMENT_EXTENSIBLE_HAS_EXT_ELEMENTS_FOR_NAMESPACE(
+                bind_fault_ref, env, ext_ns);
+        if(AXIS2_TRUE == temp1 || AXIS2_TRUE == temp2)
+        {
+            void *comp_ext = NULL;
+
+            comp_ext = create_component_exts(builder, env, "binding_fault_ref", 
+                    bind_fault_ref, ext_ns);
+            bind_fault_ref = woden_binding_fault_ref_to_wsdl_obj(bind_fault_ref, env);
+            WODEN_WSDL_OBJ_SET_COMPONENT_EXTS(bind_fault_ref, env, 
+                    ext_ns, comp_ext);
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+    
+/*
+ * This helper method factors out common code for creating Component Extensions registered
+ * in the Extension Registry. 
+ */
+static void *
+create_component_exts(
+        void *builder,
+        const axis2_env_t *env,
+        axis2_char_t *parent_class,
+        void *parent_elem,
+        axis2_uri_t *ext_ns)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    woden_ext_registry_t *er = NULL;
+    void *comp_ext = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, parent_class, NULL);
+    AXIS2_PARAM_CHECK(env->error, parent_elem, NULL);
+    AXIS2_PARAM_CHECK(env->error, ext_ns, NULL);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+        
+    builder_impl->f_desc = woden_desc_to_desc_element(builder_impl->f_desc, env);
+    er = WODEN_DESC_ELEMENT_GET_EXT_REGISTRY(builder_impl->f_desc, env);
+    comp_ext = WODEN_EXT_REGISTRY_QUERY_COMPONENT_EXT(er, env, 
+            parent_class, ext_ns);
+    WODEN_COMPONENT_EXTS_INIT(comp_ext, env, parent_elem, ext_ns);
+    
+    return comp_ext;
+}
+
+
+/* *******************************************************************************
+ *  SERVICE
+ * ******************************************************************************/
+static axis2_status_t
+build_svcs(
+        void *builder,
+        const axis2_env_t *env,
+        void *desc)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    axis2_array_list_t *svcs = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, desc, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    desc = woden_desc_to_desc_element(desc, env);
+    svcs = WODEN_DESC_ELEMENT_GET_SVC_ELEMENTS(desc, env);
+    if(svcs)
+        size = AXIS2_ARRAY_LIST_SIZE(svcs, env);
+    for(i = 0; i < size; i++)
+    {
+        void *svc = NULL;
+
+        svc = AXIS2_ARRAY_LIST_GET(svcs, env, i);
+        if( builder_impl->f_svcs_done && 
+            (AXIS2_TRUE != AXIS2_ARRAY_LIST_CONTAINS(builder_impl->f_svcs_done, 
+                    env, svc)))
+        {
+            WODEN_DESC_ADD_TO_ALL_SVCS(builder_impl->f_desc, env, svc);
+            if(!builder_impl->f_svcs_done)
+            {
+                builder_impl->f_svcs_done = axis2_array_list_create(env, 0);
+                if(!builder_impl->f_svcs_done)
+                {
+                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, 
+                            AXIS2_FAILURE);
+                    return AXIS2_FAILURE;
+                }
+            }
+            AXIS2_ARRAY_LIST_ADD(builder_impl->f_svcs_done, env, svc);
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+
+/* *******************************************************************************
+ *  PROPERTY
+ * ******************************************************************************/
+
+static axis2_status_t
+build_properties(
+        void *builder,
+        const axis2_env_t *env,
+        axis2_array_list_t *prop_els,
+        void *parent)
+{
+    woden_component_model_builder_impl_t *builder_impl = NULL;
+    int i = 0, size = 0;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, prop_els, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, parent, AXIS2_FAILURE);
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+
+    size = AXIS2_ARRAY_LIST_SIZE(prop_els, env);
+    for(i = 0; i < size; i++)
+    {
+        void *prop = NULL;
+        axis2_qname_t *qname = NULL;
+
+        prop = AXIS2_ARRAY_LIST_GET(prop_els, env, i);
+        prop = woden_property_to_property_element(prop, env);
+        qname = WODEN_PROPERTY_ELEMENT_GET_CONSTRAINT_QNAME(prop, env);
+        if(NULL != qname)
+        {
+            void *value = NULL;
+
+            value = WODEN_DESC_GET_TYPE_DEF(builder_impl->f_desc, env, qname);
+            WODEN_PROPERTY_SET_VALUE_CONSTRAINT(prop, env, value);
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+

Added: webservices/axis2/trunk/c/woden/src/util/generic_obj.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/util/generic_obj.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/util/generic_obj.c (added)
+++ webservices/axis2/trunk/c/woden/src/util/generic_obj.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,195 @@
+/*
+ * 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_generic_obj.h>
+
+typedef struct axis2_generic_obj_impl
+{
+    axis2_generic_obj_t generic_obj;
+    axis2_scope_t scope;
+    AXIS2_FREE_VOID_ARG free_func;
+    void *value;
+    
+}axis2_generic_obj_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(generic_obj) \
+    ((axis2_generic_obj_impl_t *) generic_obj)
+
+axis2_status_t AXIS2_CALL
+axis2_generic_obj_free (
+        axis2_generic_obj_t *generic_obj, 
+        const axis2_env_t *env); 
+
+axis2_status_t AXIS2_CALL
+axis2_generic_obj_set_scope(
+        axis2_generic_obj_t *generic_obj,
+        const axis2_env_t *env,
+        axis2_scope_t scope);
+
+axis2_status_t AXIS2_CALL
+axis2_generic_obj_set_free_func(
+        axis2_generic_obj_t *generic_obj,
+        const axis2_env_t *env,
+        AXIS2_FREE_VOID_ARG free_func);
+
+axis2_status_t AXIS2_CALL
+axis2_generic_obj_set_value(
+        axis2_generic_obj_t *generic_obj,
+        const axis2_env_t *env,
+        void *value);
+
+void *AXIS2_CALL
+axis2_generic_obj_get_value(
+        axis2_generic_obj_t *generic_obj,
+        const axis2_env_t *env);
+
+/************************** End of function prototypes ************************/
+
+axis2_generic_obj_t *AXIS2_CALL 
+axis2_generic_obj_create(
+        const axis2_env_t *env)
+{
+    axis2_generic_obj_impl_t *generic_obj_impl = NULL;
+    
+   AXIS2_ENV_CHECK(env, NULL);
+   
+   generic_obj_impl = (axis2_generic_obj_impl_t *) AXIS2_MALLOC(env->allocator, 
+        sizeof(axis2_generic_obj_impl_t));
+   
+   if(NULL == generic_obj_impl)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
+        return NULL;
+    }
+    generic_obj_impl->value= NULL;
+    generic_obj_impl->scope = AXIS2_SCOPE_REQUEST;
+    generic_obj_impl->free_func = 0;
+    
+    generic_obj_impl->generic_obj.ops = 
+      AXIS2_MALLOC (env->allocator, sizeof(axis2_generic_obj_ops_t));
+   if(NULL == generic_obj_impl->generic_obj.ops)
+    {
+        axis2_generic_obj_free(&(generic_obj_impl->generic_obj), env);
+      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    
+    generic_obj_impl->generic_obj.ops->free =  axis2_generic_obj_free;
+    generic_obj_impl->generic_obj.ops->set_free_func = axis2_generic_obj_set_free_func;
+    generic_obj_impl->generic_obj.ops->set_scope = axis2_generic_obj_set_scope;
+    generic_obj_impl->generic_obj.ops->set_value = axis2_generic_obj_set_value;
+   generic_obj_impl->generic_obj.ops->get_value = axis2_generic_obj_get_value;
+   return &(generic_obj_impl->generic_obj);
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_generic_obj_free (
+        axis2_generic_obj_t *generic_obj, 
+        const axis2_env_t *env)
+{
+    axis2_generic_obj_impl_t *generic_obj_impl = NULL;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    generic_obj_impl = AXIS2_INTF_TO_IMPL(generic_obj);
+    
+    if(generic_obj_impl->value)
+    {
+        if(generic_obj_impl->scope != AXIS2_SCOPE_APPLICATION)
+        {
+            if(generic_obj_impl->free_func)
+            {
+                generic_obj_impl->free_func(generic_obj_impl->value, env);
+            }
+            else
+            {
+                AXIS2_FREE(env->allocator, generic_obj_impl->value);
+            }
+            generic_obj_impl->value = NULL;
+        }
+    }
+    
+    if(generic_obj_impl->generic_obj.ops)
+    {
+        AXIS2_FREE(env->allocator, generic_obj_impl->generic_obj.ops);
+        generic_obj_impl->generic_obj.ops = NULL;
+    }
+    
+    if(generic_obj_impl)
+    {
+        AXIS2_FREE(env->allocator, generic_obj_impl);
+        generic_obj_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_generic_obj_set_scope(
+        axis2_generic_obj_t *generic_obj,
+        const axis2_env_t *env,
+        axis2_scope_t scope)
+{
+    axis2_generic_obj_impl_t *generic_obj_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    generic_obj_impl = AXIS2_INTF_TO_IMPL(generic_obj);
+   
+    generic_obj_impl->scope = scope;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_generic_obj_set_free_func(
+        axis2_generic_obj_t *generic_obj,
+        const axis2_env_t *env,
+        AXIS2_FREE_VOID_ARG free_func)
+{
+    axis2_generic_obj_impl_t *generic_obj_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    generic_obj_impl = AXIS2_INTF_TO_IMPL(generic_obj);
+   
+    generic_obj_impl->free_func = free_func;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_generic_obj_set_value(
+        axis2_generic_obj_t *generic_obj,
+        const axis2_env_t *env,
+        void *value)
+{
+    axis2_generic_obj_impl_t *generic_obj_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    generic_obj_impl = AXIS2_INTF_TO_IMPL(generic_obj);
+   
+    generic_obj_impl->value = value;
+    return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL
+axis2_generic_obj_get_value(
+        axis2_generic_obj_t *generic_obj,
+        const axis2_env_t *env)
+{
+    axis2_generic_obj_impl_t *generic_obj_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    generic_obj_impl = AXIS2_INTF_TO_IMPL(generic_obj);
+
+    return generic_obj_impl->value;
+}

Added: webservices/axis2/trunk/c/woden/src/util/qname_util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/util/qname_util.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/util/qname_util.c (added)
+++ webservices/axis2/trunk/c/woden/src/util/qname_util.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,63 @@
+/*
+ * 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 <axiom_node.h>
+#include <axiom_element.h>
+#include <woden_qname_util.h>
+
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_qname_util_matches(
+        const axis2_env_t *env,
+        axis2_qname_t *qname,
+        axiom_node_t *node)
+{
+    axis2_qname_t *qname_l = NULL;
+    axis2_bool_t ret = AXIS2_FALSE;
+
+    qname_l = axis2_qname_util_new_qname(env, node);
+    if(NULL != node && AXIS2_TRUE == AXIS2_QNAME_EQUALS(qname, env, qname_l))
+        ret = AXIS2_TRUE;
+    AXIS2_QNAME_FREE(qname_l, env);
+
+    return ret;
+}        
+        
+AXIS2_EXTERN axis2_qname_t * AXIS2_CALL
+axis2_qname_util_new_qname(
+        const axis2_env_t *env,
+        axiom_node_t *node)
+{
+    axiom_element_t *element = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+
+    if(NULL != node)
+    {
+        axiom_namespace_t *namespc = NULL;
+        axis2_char_t *uri_str = NULL;
+        axis2_char_t *localname = NULL;
+
+        element = AXIOM_NODE_GET_DATA_ELEMENT(node, env);
+        namespc = AXIOM_ELEMENT_GET_NAMESPACE(element, env, node);
+        uri_str = AXIOM_NAMESPACE_GET_URI(namespc, env);
+        localname = AXIOM_ELEMENT_GET_LOCALNAME(element, env);
+        return axis2_qname_create(env, localname, uri_str, NULL);
+    }
+        
+    return NULL;    
+}                                     
+

Added: webservices/axis2/trunk/c/woden/src/util/woden_om_util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/util/woden_om_util.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/util/woden_om_util.c (added)
+++ webservices/axis2/trunk/c/woden/src/util/woden_om_util.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,97 @@
+/*
+ * 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_om_util.h>
+#include <axis2_qname.h>
+#include <axiom_element.h>
+#include <axis2_uri.h>
+
+
+AXIS2_EXTERN axis2_qname_t * AXIS2_CALL
+woden_om_util_get_qname(
+        const axis2_env_t *env,
+        axiom_node_t *context_el_node,
+        axis2_char_t *prefixed_value,
+        axis2_hash_t *namespcs)
+{
+    axis2_char_t *index = NULL;
+    axis2_char_t *prefix = NULL;
+    axis2_char_t *localpart = NULL;
+    axis2_char_t *namespc_uri_str = NULL;
+    axiom_element_t *context_el = NULL;
+    axiom_namespace_t *namespc_uri = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, context_el_node, NULL);
+    AXIS2_PARAM_CHECK(env->error, prefixed_value, NULL);
+    AXIS2_PARAM_CHECK(env->error, namespcs, NULL);
+
+    index = axis2_rindex(prefixed_value, ':');
+    localpart = index + 1;
+    index[0] = '\0';
+    prefix = prefixed_value;
+
+    context_el = AXIOM_NODE_GET_DATA_ELEMENT(context_el_node, env);
+
+    namespc_uri = AXIOM_ELEMENT_FIND_NAMESPACE_URI(context_el,
+            env, prefix, context_el_node);
+    namespc_uri_str = AXIOM_NAMESPACE_GET_URI(namespc_uri, env);
+    if(NULL != namespc_uri_str)
+    {
+        woden_om_util_register_unique_prefix(env, prefix, namespc_uri_str, namespcs);
+        return axis2_qname_create(env, localpart, namespc_uri_str, prefix);
+    }
+    return NULL; 
+}        
+ 
+AXIS2_EXTERN axis2_status_t  AXIS2_CALL
+woden_om_util_register_unique_prefix(
+        const axis2_env_t *env,
+        axis2_char_t *prefix,
+        axis2_char_t *namespc_uri_str,
+        axis2_hash_t *namespcs)
+{
+    axis2_uri_t *ns_uri = NULL;
+    axis2_uri_t *uri = NULL;
+    axis2_char_t *ns_uri_str = NULL;
+    axis2_char_t *tmp_prefix = NULL;
+
+    ns_uri = axis2_hash_get(namespcs, prefix, AXIS2_HASH_KEY_STRING);
+    if(ns_uri)
+        ns_uri_str = AXIS2_URI_TO_STRING(ns_uri, env, AXIS2_URI_UNP_OMITUSERINFO);
+    if(NULL != ns_uri_str && 0 == AXIS2_STRCMP(ns_uri_str, namespc_uri_str))
+    {
+        /* Namespace already registerd */
+        return AXIS2_SUCCESS; 
+    }
+    tmp_prefix = AXIS2_STRDUP(prefix, env);
+    while(NULL != ns_uri_str && 0 != AXIS2_STRCMP(ns_uri_str, namespc_uri_str))
+    {
+        axis2_char_t *temp = NULL;
+
+        temp = AXIS2_STRACAT(tmp_prefix, "_", env); 
+        ns_uri = axis2_hash_get(namespcs, temp, AXIS2_HASH_KEY_STRING);
+        ns_uri_str = AXIS2_URI_TO_STRING(ns_uri, env, AXIS2_URI_UNP_OMITUSERINFO);
+        AXIS2_FREE(env->allocator, tmp_prefix);
+        tmp_prefix = AXIS2_STRDUP(temp, env);
+        AXIS2_FREE(env->allocator, temp);
+    }
+    uri = axis2_uri_parse_string(env, namespc_uri_str);
+    axis2_hash_set(namespcs, prefix, AXIS2_HASH_KEY_STRING, uri);
+    
+    return AXIS2_SUCCESS;
+}
+ 

Added: webservices/axis2/trunk/c/woden/src/util/woden_om_util.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/util/woden_om_util.h?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/util/woden_om_util.h (added)
+++ webservices/axis2/trunk/c/woden/src/util/woden_om_util.h Wed Jul  5 23:02:19 2006
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+#ifndef WODEN_OM_UTIL_H
+#define WODEN_OM_UTIL_H
+
+/**
+ * @file woden_om_util.h
+ * @brief Axis2 Woden OM Util Interface
+ *          This is an abstract superclass for all classes representing different
+ *          types of XML attribute information items.
+ */
+
+#include <axis2_allocator.h>
+#include <axis2_env.h>
+#include <axis2_error.h>
+#include <axis2_string.h>
+#include <axis2_utils.h>
+#include <axis2_hash.h>
+#include <axis2_qname.h>
+#include <woden.h>
+#include <axiom_node.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/** @defgroup woden_om_util Woden OM Util
+  * @ingroup axis2_wsdl
+  * @{
+  */
+
+AXIS2_EXTERN axis2_qname_t * AXIS2_CALL
+woden_om_util_get_qname(
+        const axis2_env_t *env,
+        axiom_node_t *context_el_node,
+        axis2_char_t *prefixed_value,
+        axis2_hash_t *namespcs);
+ 
+AXIS2_EXTERN axis2_status_t  AXIS2_CALL
+woden_om_util_register_unique_prefix(
+        const axis2_env_t *env,
+        axis2_char_t *prefix,
+        axis2_char_t *namespc_uri_str,
+        axis2_hash_t *namespcs);
+ 
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* WODEN_OM_UTIL_H */
+

Added: webservices/axis2/trunk/c/woden/src/wsdl/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl/Makefile.am?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl/Makefile.am (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl/Makefile.am Wed Jul  5 23:02:19 2006
@@ -0,0 +1,61 @@
+lib_LTLIBRARIES = libwoden_wsdl.la
+
+libwoden_wsdl_la_SOURCES = \
+							wsdl_element.c \
+							wsdl_obj.c \
+							documentable.c \
+							documentation.c \
+							wsdl_component.c \
+							nested_component.c \
+							configurable_component.c \
+							feature.c \
+							property.c \
+							woden_types.c \
+							type_def.c \
+							configurable.c \
+							nested_configurable.c \
+							wsdl_ref.c \
+							element_decl.c \
+							import.c \
+							include.c \
+							documentable_element.c \
+							documentation_element.c \
+							configurable_element.c \
+							feature_element.c \
+							import_element.c \
+							include_element.c \
+							nested_element.c \
+							property_element.c \
+							types_element.c \
+							binding.c \
+							binding_element.c \
+							binding_fault_ref.c \
+							binding_fault_ref_element.c \
+							interface.c \
+							interface_element.c \
+							interface_op.c \
+							interface_op_element.c \
+							msg_label.c \
+							direction.c \
+							soap_fault_code.c \
+							soap_fault_subcodes.c \
+							component_exts.c \
+							ext_element.c \
+							element_extensible.c \
+							attr_extensible.c
+							
+
+
+libwoden_wsdl_la_LIBADD =  \
+                    $(top_builddir)/src/xml/libwoden_xml.la \
+                    $(top_builddir)/src/util/libwoden_util.la \
+                    $(top_builddir)/src/types/libwoden_types.la \
+                    $(top_builddir)/src/schema/libwoden_schema.la
+
+INCLUDES = -I$(top_builddir)/include \
+			@AXIOMINC@ \
+			@UTILINC@ \
+			@XMLSCHEMAINC@
+
+EXTRA_DIST = woden_constants.h
+

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



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