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 [30/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/wsdl10/extensions/soap/soap_header_block_deserializer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_header_block_deserializer.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_header_block_deserializer.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_header_block_deserializer.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,431 @@
+/*
+ * 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_wsdl10_soap_header_block_deserializer.h>
+#include <woden_wsdl10_soap_header_block.h>
+#include <woden_wsdl10_soap_header_block_element.h>
+#include <woden_wsdl10_desc.h>
+#include <woden_wsdl10_desc_element.h>
+#include <woden_documentation.h>
+#include <woden_documentation_element.h>
+#include "../../../util/woden_om_util.h"
+#include "../../woden_constants.h"
+#include "woden_wsdl10_soap_constants.h"
+#include <axiom_element.h>
+#include <axiom_util.h>
+#include <woden_qname_util.h>
+
+
+typedef struct woden_wsdl10_soap_header_block_deserializer_impl 
+        woden_wsdl10_soap_header_block_deserializer_impl_t;
+
+/** 
+ * @brief Soap Header Block Deserializer Struct Impl
+ *   Axis2 Soap Header Block Deserializer  
+ */ 
+struct woden_wsdl10_soap_header_block_deserializer_impl
+{
+    woden_wsdl10_soap_header_block_deserializer_t header_deser;
+    woden_obj_types_t obj_type;
+    axis2_hash_t *super;
+    axis2_hash_t *methods;
+};
+
+#define INTF_TO_IMPL(header_deser) \
+    ((woden_wsdl10_soap_header_block_deserializer_impl_t *) header_deser)
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_header_block_deserializer_free(
+        void *header_deser,
+        const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL 
+woden_wsdl10_soap_header_block_deserializer_type(
+        void *header_deser,
+        const axis2_env_t *env);
+
+axis2_hash_t *AXIS2_CALL 
+woden_wsdl10_soap_header_block_deserializer_super_objs(
+        void *header_deser,
+        const axis2_env_t *env);
+
+void *AXIS2_CALL
+woden_wsdl10_soap_header_block_deserializer_marshall(
+        void *header_deser,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type,
+        void *parent,
+        axis2_qname_t *ext_type,
+        axiom_node_t *ext_el_node,
+        void *desc,
+        woden_ext_registry_t *ext_reg);
+
+static void *
+parse_documentation(
+        void *reader,
+        const axis2_env_t *env,
+        axiom_node_t *doc_el_node,
+        void *desc);
+
+static woden_wsdl10_soap_header_block_deserializer_t *
+create(const axis2_env_t *env);
+
+static axis2_status_t
+woden_wsdl10_soap_header_block_deserializer_free_ops(
+        void *header_deser,
+        const axis2_env_t *env);
+
+/************************Woden C Internal Methods******************************/
+
+AXIS2_EXTERN woden_wsdl10_soap_header_block_deserializer_t * AXIS2_CALL
+woden_wsdl10_soap_header_block_deserializer_to_ext_deserializer(
+        void *header_deser,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_header_block_deserializer_impl_t *header_deser_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    if(!header_deser)
+    {
+        header_deser_impl = (woden_wsdl10_soap_header_block_deserializer_impl_t *) 
+            create(env);
+    }
+    else
+        header_deser_impl = (woden_wsdl10_soap_header_block_deserializer_impl_t *) 
+            header_deser;
+
+    woden_wsdl10_soap_header_block_deserializer_free_ops(header_deser, env);
+
+    header_deser_impl->header_deser.ext_deserializer.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_ext_deserializer_ops_t));
+    woden_wsdl10_ext_deserializer_resolve_methods(&(header_deser_impl->header_deser.
+            ext_deserializer), env, header_deser_impl->methods);
+    return header_deser;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static woden_wsdl10_soap_header_block_deserializer_t *
+create(const axis2_env_t *env)
+{
+    woden_wsdl10_soap_header_block_deserializer_impl_t *header_deser_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    header_deser_impl = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_wsdl10_soap_header_block_deserializer_impl_t));
+
+    header_deser_impl->obj_type= WODEN_WSDL10_SOAP_HEADER_BLOCK_DESERIALIZER;
+    header_deser_impl->super = NULL;
+    header_deser_impl->methods = NULL;
+    
+    header_deser_impl->header_deser.ext_deserializer.ops = NULL;
+    
+    header_deser_impl->header_deser.ops = AXIS2_MALLOC(env->allocator, 
+            sizeof(woden_wsdl10_soap_header_block_deserializer_ops_t));
+
+    header_deser_impl->header_deser.ops->free = 
+        woden_wsdl10_soap_header_block_deserializer_free;
+    header_deser_impl->header_deser.ops->super_objs = 
+        woden_wsdl10_soap_header_block_deserializer_super_objs;
+    header_deser_impl->header_deser.ops->type = 
+        woden_wsdl10_soap_header_block_deserializer_type;
+    
+    header_deser_impl->header_deser.ops->marshall = 
+        woden_wsdl10_soap_header_block_deserializer_marshall;
+ 
+    header_deser_impl->methods = axis2_hash_make(env);
+    if(!header_deser_impl->methods) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(header_deser_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_header_block_deserializer_free);
+    axis2_hash_set(header_deser_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_header_block_deserializer_super_objs);
+    axis2_hash_set(header_deser_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, woden_wsdl10_soap_header_block_deserializer_type);
+
+    axis2_hash_set(header_deser_impl->methods, "marshall", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_header_block_deserializer_marshall);
+
+    return &(header_deser_impl->header_deser);
+}
+
+AXIS2_EXTERN woden_wsdl10_soap_header_block_deserializer_t * AXIS2_CALL
+woden_wsdl10_soap_header_block_deserializer_create(const axis2_env_t *env)
+{
+    woden_wsdl10_soap_header_block_deserializer_impl_t *header_deser_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    header_deser_impl = (woden_wsdl10_soap_header_block_deserializer_impl_t *) create(env);
+
+    header_deser_impl->super = axis2_hash_make(env);
+    if(!header_deser_impl->super) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(header_deser_impl->super, "WODEN_WSDL10_SOAP_HEADER_BLOCK_DESERIALIZER", 
+            AXIS2_HASH_KEY_STRING, &(header_deser_impl->header_deser));
+ 
+    return &(header_deser_impl->header_deser);
+}
+
+static axis2_status_t
+woden_wsdl10_soap_header_block_deserializer_free_ops(
+        void *header_deser,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_header_block_deserializer_impl_t *header_deser_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    header_deser_impl = INTF_TO_IMPL(header_deser);
+
+    if(header_deser_impl->header_deser.ext_deserializer.ops)
+    {
+        AXIS2_FREE(env->allocator, header_deser_impl->header_deser.
+                ext_deserializer.ops);
+        header_deser_impl->header_deser.ext_deserializer.ops = 
+            NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_soap_header_block_deserializer_free(
+        void *header_deser,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_header_block_deserializer_impl_t *header_deser_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    header_deser_impl = INTF_TO_IMPL(header_deser);
+
+    if(header_deser_impl->super)
+    {
+        axis2_hash_free(header_deser_impl->super, env);
+        header_deser_impl->super = NULL;
+    }
+    
+    if(header_deser_impl->methods)
+    {
+        axis2_hash_free(header_deser_impl->methods, env);
+        header_deser_impl->methods = NULL;
+    }
+
+    woden_wsdl10_soap_header_block_deserializer_free_ops(header_deser, env);
+
+    if((&(header_deser_impl->header_deser))->ops)
+    {
+        AXIS2_FREE(env->allocator, (&(header_deser_impl->header_deser))->ops);
+        (&(header_deser_impl->header_deser))->ops = NULL;
+    }
+    
+    if(header_deser_impl)
+    {
+        AXIS2_FREE(env->allocator, header_deser_impl);
+        header_deser_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+woden_wsdl10_soap_header_block_deserializer_super_objs(
+        void *header_deser,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_header_block_deserializer_impl_t *header_deser_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    header_deser_impl = INTF_TO_IMPL(header_deser);
+
+    return header_deser_impl->super;
+}
+
+woden_obj_types_t AXIS2_CALL
+woden_wsdl10_soap_header_block_deserializer_type(
+        void *header_deser,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_header_block_deserializer_impl_t *header_deser_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    header_deser_impl = INTF_TO_IMPL(header_deser);
+
+    return header_deser_impl->obj_type;
+}
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_soap_header_block_deserializer_resolve_methods(
+        woden_wsdl10_soap_header_block_deserializer_t *header_deser,
+        const axis2_env_t *env,
+        woden_wsdl10_soap_header_block_deserializer_t *header_deser_impl,
+        axis2_hash_t *methods)
+{
+    woden_wsdl10_soap_header_block_deserializer_impl_t *header_deser_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    header_deser_impl_l = INTF_TO_IMPL(header_deser_impl);
+    
+    header_deser->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    header_deser->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    header_deser->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    header_deser->ops->marshall = axis2_hash_get(methods, 
+            "marshall", AXIS2_HASH_KEY_STRING);
+    if(!header_deser->ops->marshall && header_deser_impl_l)
+            header_deser->ops->marshall = 
+            header_deser_impl_l->header_deser.ops->marshall;
+    
+    return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL
+woden_wsdl10_soap_header_block_deserializer_marshall(
+        void *header_deser,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type,
+        void *parent,
+        axis2_qname_t *ext_type,
+        axiom_node_t *ext_el_node,
+        void *desc,
+        woden_ext_registry_t *ext_reg)
+{
+    woden_wsdl10_soap_header_block_deserializer_impl_t *header_deser_impl = NULL;
+    axis2_hash_t *super = NULL;
+    void *soap_hdr = NULL;
+    axis2_char_t *element_decl_qn = NULL;
+    axis2_char_t *must_understand = NULL;
+    axis2_char_t *req = NULL;
+    axiom_element_t *ext_el = NULL;
+    axiom_element_t *temp_el = NULL;
+    axiom_node_t *temp_el_node = NULL;
+    axis2_bool_t understood = AXIS2_FALSE;
+    axis2_bool_t required = AXIS2_FALSE;
+    void *types = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_WSDL10_SOAP_HEADER_BLOCK_DESERIALIZER_SUPER_OBJS(header_deser, env);
+    header_deser_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_HEADER_BLOCK_DESERIALIZER", AXIS2_HASH_KEY_STRING));
+   
+    soap_hdr = WODEN_EXT_REGISTRY_QUERY_EXT_ELEMENT_TYPE(ext_reg, env, 
+            parent_type, ext_type);
+
+    soap_hdr = woden_wsdl10_soap_header_block_to_ext_element(soap_hdr, env);
+    WODEN_EXT_ELEMENT_SET_EXT_TYPE(soap_hdr, env, ext_type);
+    soap_hdr = woden_wsdl10_soap_header_block_to_soap_header_block_element(soap_hdr, env);
+    WODEN_WSDL10_SOAP_HEADER_BLOCK_ELEMENT_SET_PARENT_ELEMENT(soap_hdr, env, parent);
+
+    element_decl_qn = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME(ext_el, env, 
+            WODEN_ATTR_ELEMENT); 
+    if(NULL != element_decl_qn)
+    {
+        axis2_qname_t *qname = NULL;
+        axis2_hash_t *namespcs = NULL;
+        
+        desc = woden_wsdl10_desc_to_desc_element(desc, env);
+        namespcs = WODEN_WSDL10_DESC_ELEMENT_GET_NAMESPACES(desc, env);
+        qname = woden_om_util_get_qname(env, ext_el_node, 
+                element_decl_qn, namespcs);
+        
+        soap_hdr = woden_wsdl10_soap_header_block_to_soap_header_block_element(soap_hdr, env);
+        WODEN_WSDL10_SOAP_HEADER_BLOCK_ELEMENT_SET_ELEMENT_QNAME(soap_hdr, env, qname);
+    }
+    must_understand = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME(ext_el, env, 
+            WODEN_ATTR_MUSTUNDERSTAND);
+    if(NULL != must_understand && 0 == AXIS2_STRCMP(WODEN_VALUE_TRUE, must_understand))
+            understood = AXIS2_TRUE;
+    else
+            understood = AXIS2_FALSE;
+    soap_hdr = woden_wsdl10_soap_header_block_to_soap_header_block_element(soap_hdr, env);
+    WODEN_WSDL10_SOAP_HEADER_BLOCK_ELEMENT_SET_MUST_UNDERSTAND(soap_hdr, env, understood);
+
+    req = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME(ext_el, env, 
+            WODEN_ATTR_REQUIRED);
+    if(NULL != req && 0 == AXIS2_STRCMP(WODEN_VALUE_TRUE, req))
+            required = AXIS2_TRUE;
+    else
+            required = AXIS2_FALSE;
+    soap_hdr = woden_wsdl10_soap_header_block_to_ext_element(soap_hdr, env);
+    WODEN_EXT_ELEMENT_SET_REQUIRED(soap_hdr, env, required);
+    
+    desc = woden_wsdl10_desc_to_desc_element(desc, env);
+    types = WODEN_WSDL10_DESC_ELEMENT_GET_TYPES_ELEMENT(desc, env);
+    WODEN_WSDL10_SOAP_HEADER_BLOCK_SET_TYPES(soap_hdr, env, types);
+
+    ext_el = AXIOM_NODE_GET_DATA_ELEMENT(ext_el_node, env);
+    temp_el = axiom_util_get_first_child_element(ext_el, env, ext_el_node, 
+            &temp_el_node);
+
+    while (NULL != temp_el && NULL != temp_el_node)
+    {
+        axis2_qname_t *q_elem_documentation = NULL;
+
+        q_elem_documentation = axis2_qname_create_from_string(env, 
+                WODEN_Q_ELEM_DOCUMENTATION);
+
+        if(AXIS2_TRUE == axis2_qname_util_matches(env, 
+                    q_elem_documentation, temp_el_node))
+        {
+            void *documentation = NULL;
+
+            documentation = parse_documentation(header_deser, env, temp_el_node, desc);
+            soap_hdr = woden_wsdl10_soap_header_block_to_soap_header_block_element(soap_hdr, env);
+            WODEN_WSDL10_SOAP_HEADER_BLOCK_ELEMENT_ADD_DOCUMENTATION_ELEMENT(soap_hdr, env, 
+                    documentation);
+        }
+        else
+        {
+            /* TODO Parse ext elements */
+        }
+
+        temp_el = axiom_util_get_next_sibling_element(temp_el, env, 
+                temp_el_node, &temp_el_node); 
+    }
+    
+    return soap_hdr;
+}
+
+static void *
+parse_documentation(
+        void *header_deser,
+        const axis2_env_t *env,
+        axiom_node_t *doc_el_node,
+        void *desc)
+{
+    void *documentation = NULL;
+    
+    desc = woden_wsdl10_desc_to_desc_element(desc, env);
+    documentation = WODEN_WSDL10_DESC_ELEMENT_CREATE_DOCUMENTATION_ELEMENT(desc, 
+            env);
+    
+    documentation = woden_documentation_to_documentation_element(
+            documentation, env);
+    WODEN_DOCUMENTATION_ELEMENT_SET_CONTENT(documentation, env, doc_el_node);
+    
+    return documentation;
+}
+
+

Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_header_block_element.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_header_block_element.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_header_block_element.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_header_block_element.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,71 @@
+/*
+ * 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_wsdl10_soap_header_block_element.h>
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_soap_header_block_element_resolve_methods(
+        woden_wsdl10_soap_header_block_element_t *soap_header_block_element,
+        const axis2_env_t *env,
+        axis2_hash_t *methods)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    
+    soap_header_block_element->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    soap_header_block_element->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_header_block_element->ops->set_element_qname = 
+            axis2_hash_get(methods, "set_element_qname", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_header_block_element->ops->get_element_qname = 
+            axis2_hash_get(methods, "get_element_qname", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_header_block_element->ops->get_element = 
+            axis2_hash_get(methods, "get_element", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_header_block_element->ops->set_must_understand = 
+            axis2_hash_get(methods, "set_must understand", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_header_block_element->ops->must_understand = 
+            axis2_hash_get(methods, "must_understand", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_header_block_element->ops->set_parent_element = 
+            axis2_hash_get(methods, "set_parent_element", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_header_block_element->ops->get_parent_element = 
+            axis2_hash_get(methods, "get_parent_element", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_header_block_element->ops->add_documentation_element = 
+            axis2_hash_get(methods, "add_documentation_element", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_header_block_element->ops->get_documentation_elements = 
+            axis2_hash_get(methods, "get_documentation_elements", 
+            AXIS2_HASH_KEY_STRING);
+
+    return AXIS2_SUCCESS;    
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,1102 @@
+/*
+ * 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_wsdl10_soap_module.h>
+#include <woden_wsdl_element.h>
+#include <woden_string_attr.h>
+#include <woden_uri_attr.h>
+#include <woden_types.h>
+#include "woden_wsdl10_soap_constants.h"
+
+typedef struct woden_wsdl10_soap_module_impl woden_wsdl10_soap_module_impl_t;
+
+/** 
+ * @brief Soap Modules Struct Impl
+ *   Axis2 Soap Modules  
+ */ 
+struct woden_wsdl10_soap_module_impl
+{
+    woden_wsdl10_soap_module_t module;
+    axis2_hash_t *methods;
+    axis2_hash_t *super;
+    woden_obj_types_t obj_type;
+    
+    void *f_parent;
+    axis2_array_list_t *f_documentation_elements;
+    axis2_qname_t *f_ext_element_type;
+    axis2_bool_t f_required;
+    void *f_attr_ext;
+    void *f_elem_ext;
+    axis2_uri_t *f_ref;
+};
+
+#define INTF_TO_IMPL(module) ((woden_wsdl10_soap_module_impl_t *) module)
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_free(
+        void *module,
+        const axis2_env_t *env);
+
+axis2_hash_t *AXIS2_CALL 
+woden_wsdl10_soap_module_super_objs(
+        void *module,
+        const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL 
+woden_wsdl10_soap_module_type(
+        void *module,
+        const axis2_env_t *env);
+
+/* ***********************************************************************
+ *  Component model methods (SOAPHeaderBlock interface), some shared with Element model
+ * ***********************************************************************/
+
+axis2_uri_t *AXIS2_CALL
+woden_wsdl10_soap_module_get_ref(
+        void *module,
+        axis2_env_t *env);
+
+axis2_bool_t AXIS2_CALL 
+woden_wsdl10_soap_module_is_required(
+        void *module,
+        axis2_env_t *env);
+
+void *AXIS2_CALL
+woden_wsdl10_soap_module_get_parent(
+        void *module,
+        axis2_env_t *env);
+
+void *AXIS2_CALL
+woden_wsdl10_soap_module_to_element(
+        void *module,
+        axis2_env_t *env);
+
+/* ***********************************************************************
+ *  Element model-only methods (SOAPHeaderBlockElement interface)
+ * ***********************************************************************/
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_set_ref(
+        void *module,
+        axis2_env_t *env,
+        axis2_uri_t *uri); 
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_set_parent_element(
+        void *module,
+        axis2_env_t *env,
+        void *wsdl_el);
+
+void *AXIS2_CALL
+woden_wsdl10_soap_module_get_parent_element(
+        void *module,
+        axis2_env_t *env); 
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_add_documentation_element(
+        void *module,
+        axis2_env_t *env,
+        void *doc_el);
+
+axis2_array_list_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_documentation_elements(
+        void *module,
+        axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_set_extension_type(
+        void *module,
+        axis2_env_t *env,
+        axis2_qname_t *qname); 
+
+axis2_qname_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_extension_type(
+        void *module,
+        axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_set_required(
+        void *module,
+        axis2_env_t *env,
+        axis2_bool_t required);
+
+/* ***********************************************************************
+ *  Extensibility methods
+ * ***********************************************************************/
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_set_ext_attr(
+        void *module,
+        axis2_env_t *env,
+        axis2_qname_t *attr_type, 
+        void *attr);
+
+void *AXIS2_CALL
+woden_wsdl10_soap_module_get_ext_attr(
+        void *module,
+        axis2_env_t *env,
+        axis2_qname_t *attr_type);
+
+axis2_array_list_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_ext_attrs_for_namespace(
+        void *module,
+        axis2_env_t *env,
+        axis2_uri_t *namespc);
+
+axis2_array_list_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_ext_attrs(
+        void *module,
+        axis2_env_t *env);
+
+axis2_bool_t AXIS2_CALL 
+woden_wsdl10_soap_module_has_ext_attrs_for_namespace(
+        void *module,
+        axis2_env_t *env,
+        axis2_uri_t *namespc);
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_add_ext_element(
+        void *module,
+        axis2_env_t *env,
+        void *ext_el);
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_remove_ext_element(
+        void *module,
+        axis2_env_t *env,
+        void *ext_el);
+
+axis2_array_list_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_ext_elements(
+        void *module,
+        axis2_env_t *env);
+
+axis2_array_list_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_ext_elements_of_type(
+        void *module,
+        axis2_env_t *env,
+        axis2_qname_t *ext_type); 
+
+axis2_bool_t AXIS2_CALL 
+woden_wsdl10_soap_module_has_ext_elements_for_namespace(
+        void *module,
+        axis2_env_t *env,
+        axis2_uri_t *namespc); 
+
+static woden_wsdl10_soap_module_t *
+create(const axis2_env_t *env);
+
+static axis2_status_t
+woden_wsdl10_soap_module_free_ops(
+        void *module,
+        const axis2_env_t *env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_EXTERN woden_wsdl10_soap_module_t * AXIS2_CALL
+woden_wsdl10_soap_module_to_soap_module_element(
+        void *module,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    if(!module)
+    {
+        module_impl = (woden_wsdl10_soap_module_impl_t *) create(env);
+    }
+    else
+        module_impl = (woden_wsdl10_soap_module_impl_t *) module;
+    woden_wsdl10_soap_module_free_ops(module, env);
+
+    module_impl->module.module_element.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_wsdl10_soap_module_element_ops_t));
+    woden_wsdl10_soap_module_element_resolve_methods(&(module_impl->module.
+            module_element), env, module_impl->methods);
+    return module;
+}
+
+AXIS2_EXTERN woden_wsdl10_soap_module_t * AXIS2_CALL
+woden_wsdl10_soap_module_to_ext_element(
+        void *module,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    if(!module)
+    {
+        module_impl = (woden_wsdl10_soap_module_impl_t *) create(env);
+    }
+    else
+        module_impl = (woden_wsdl10_soap_module_impl_t *) module;
+    woden_wsdl10_soap_module_free_ops(module, env);
+
+    module_impl->module.module_element.base.ext_element.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_ext_element_ops_t));
+    woden_ext_element_resolve_methods(&(module_impl->module.
+            module_element.base.ext_element), env, module_impl->methods);
+    return module;
+}
+
+AXIS2_EXTERN woden_wsdl10_soap_module_t * AXIS2_CALL
+woden_wsdl10_soap_module_to_attr_extensible(
+        void *module,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    if(!module)
+    {
+        module_impl = (woden_wsdl10_soap_module_impl_t *) create(env);
+    }
+    else
+        module_impl = (woden_wsdl10_soap_module_impl_t *) module;
+    woden_wsdl10_soap_module_free_ops(module, env);
+
+    module_impl->module.module_element.base.attr_extensible.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_attr_extensible_ops_t));
+    woden_attr_extensible_resolve_methods(&(module_impl->module.
+            module_element.base.attr_extensible), env, NULL, module_impl->methods);
+    return module;
+}
+
+AXIS2_EXTERN woden_wsdl10_soap_module_t * AXIS2_CALL
+woden_wsdl10_soap_module_to_element_extensible(
+        void *module,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    if(!module)
+    {
+        module_impl = (woden_wsdl10_soap_module_impl_t *) create(env);
+    }
+    else
+        module_impl = (woden_wsdl10_soap_module_impl_t *) module;
+    woden_wsdl10_soap_module_free_ops(module, env);
+
+    module_impl->module.module_element.base.element_extensible.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_element_extensible_ops_t));
+    woden_element_extensible_resolve_methods(&(module_impl->module.
+            module_element.base.element_extensible), env, NULL, module_impl->methods);
+    return module;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static woden_wsdl10_soap_module_t *
+create(const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    module_impl = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_wsdl10_soap_module_impl_t));
+
+    module_impl->obj_type= WODEN_WSDL10_SOAP_MODULE;
+    module_impl->super = NULL;
+    module_impl->methods = NULL;
+
+    module_impl->f_parent = NULL;
+    module_impl->f_documentation_elements = NULL;
+    module_impl->f_ext_element_type = NULL;
+    module_impl->f_required = AXIS2_FALSE;
+    module_impl->f_attr_ext = NULL;
+    module_impl->f_elem_ext = NULL;
+    module_impl->f_ref = NULL;
+    
+    module_impl->module.module_element.ops = NULL;
+    module_impl->module.module_element.base.ext_element.ops = NULL;
+    module_impl->module.module_element.base.attr_extensible.ops = NULL;
+    module_impl->module.module_element.base.element_extensible.ops = NULL;
+    
+    module_impl->module.ops = AXIS2_MALLOC(env->allocator, 
+            sizeof(woden_wsdl10_soap_module_ops_t));
+
+    module_impl->module.ops->free = woden_wsdl10_soap_module_free;
+    module_impl->module.ops->super_objs = 
+        woden_wsdl10_soap_module_super_objs;
+    module_impl->module.ops->type = 
+        woden_wsdl10_soap_module_type;
+    
+    module_impl->module.ops->get_ref = 
+        woden_wsdl10_soap_module_get_ref;
+    
+    module_impl->module.ops->is_required = 
+        woden_wsdl10_soap_module_is_required;
+    
+    module_impl->module.ops->get_parent = 
+        woden_wsdl10_soap_module_get_parent;
+    
+    module_impl->module.ops->to_element = 
+        woden_wsdl10_soap_module_to_element;
+    
+    module_impl->methods = axis2_hash_make(env);
+    if(!module_impl->methods) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(module_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_free);
+    axis2_hash_set(module_impl->methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING, woden_wsdl10_soap_module_super_objs);
+    axis2_hash_set(module_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, woden_wsdl10_soap_module_type);
+
+    axis2_hash_set(module_impl->methods, "get_ref", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_get_ref);
+
+    axis2_hash_set(module_impl->methods, "is_required", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_is_required);
+
+    axis2_hash_set(module_impl->methods, "get_parent", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_get_parent);
+
+    axis2_hash_set(module_impl->methods, "to_element", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_to_element);
+
+    axis2_hash_set(module_impl->methods, "set_ref", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_set_ref);
+
+    axis2_hash_set(module_impl->methods, "set_parent_element", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_set_parent_element);
+
+    axis2_hash_set(module_impl->methods, "get_parent_element", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_get_parent_element);
+
+    axis2_hash_set(module_impl->methods, "add_documentation_element", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_add_documentation_element);
+
+    axis2_hash_set(module_impl->methods, "get_documentation_elements", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_get_documentation_elements);
+
+    axis2_hash_set(module_impl->methods, "set_ext_type", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_set_extension_type);
+
+    axis2_hash_set(module_impl->methods, "get_ext_type", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_get_extension_type);
+
+    axis2_hash_set(module_impl->methods, "set_required", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_set_required);
+
+    axis2_hash_set(module_impl->methods, "set_ext_attr", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_set_ext_attr);
+
+    axis2_hash_set(module_impl->methods, "get_ext_attr", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_get_ext_attr);
+
+    axis2_hash_set(module_impl->methods, "get_ext_attrs_for_namespace", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_get_ext_attrs_for_namespace);
+
+    axis2_hash_set(module_impl->methods, "get_ext_attrs", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_get_ext_attrs);
+
+    axis2_hash_set(module_impl->methods, "has_ext_attrs_for_namespace", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_has_ext_attrs_for_namespace);
+
+    axis2_hash_set(module_impl->methods, "add_ext_element", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_add_ext_element);
+
+    axis2_hash_set(module_impl->methods, "remove_ext_element", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_remove_ext_element);
+
+    axis2_hash_set(module_impl->methods, "get_ext_elements", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_get_ext_elements);
+
+    axis2_hash_set(module_impl->methods, "get_ext_elements_of_type", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_get_ext_elements_of_type);
+
+    axis2_hash_set(module_impl->methods, "has_ext_elements_for_namespace", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_has_ext_elements_for_namespace);
+
+    return &(module_impl->module);
+}
+
+AXIS2_EXTERN woden_wsdl10_soap_module_t * AXIS2_CALL
+woden_wsdl10_soap_module_create(const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    module_impl = (woden_wsdl10_soap_module_impl_t *) create(env);
+
+    module_impl->super = axis2_hash_make(env);
+    if(!module_impl->super) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(module_impl->super, "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING, 
+            &(module_impl->module));
+ 
+    return &(module_impl->module);
+}
+
+static axis2_status_t
+woden_wsdl10_soap_module_free_ops(
+        void *module,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    module_impl = INTF_TO_IMPL(module);
+
+    if(module_impl->module.module_element.ops)
+    {
+        AXIS2_FREE(env->allocator, module_impl->module.
+                module_element.ops);
+        module_impl->module.module_element.ops = NULL;
+    }
+
+    if(module_impl->module.module_element.base.ext_element.ops)
+    {
+        AXIS2_FREE(env->allocator, module_impl->module.
+                module_element.base.ext_element.ops);
+        module_impl->module.module_element.base.ext_element.ops = NULL;
+    }
+
+    if(module_impl->module.module_element.base.attr_extensible.ops)
+    {
+        AXIS2_FREE(env->allocator, module_impl->module.
+                module_element.base.attr_extensible.ops);
+        module_impl->module.module_element.base.attr_extensible.ops = NULL;
+    }
+
+    if(module_impl->module.module_element.base.element_extensible.ops)
+    {
+        AXIS2_FREE(env->allocator, module_impl->module.
+                module_element.base.element_extensible.ops);
+        module_impl->module.module_element.base.element_extensible.ops = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_soap_module_free(void *module,
+                        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    module_impl = INTF_TO_IMPL(module);
+
+    if(module_impl->super)
+    {
+        axis2_hash_free(module_impl->super, env);
+        module_impl->super = NULL;
+    }
+    
+    if(module_impl->methods)
+    {
+        axis2_hash_free(module_impl->methods, env);
+        module_impl->methods = NULL;
+    }
+
+    if(module_impl->f_parent)
+    {
+        WODEN_WSDL_ELEMENT_FREE(module_impl->f_parent, env);
+        module_impl->f_parent = NULL;
+    }
+
+    if(module_impl->f_documentation_elements)
+    {
+        AXIS2_ARRAY_LIST_FREE(module_impl->f_documentation_elements, env);
+        module_impl->f_documentation_elements = NULL;
+    }
+
+    if(module_impl->f_ext_element_type)
+    {
+        AXIS2_QNAME_FREE(module_impl->f_ext_element_type, env);
+        module_impl->f_ext_element_type = NULL;
+    }
+
+    if(module_impl->f_attr_ext)
+    {
+        WODEN_ATTR_EXTENSIBLE_FREE(module_impl->f_attr_ext, env);
+        module_impl->f_attr_ext = NULL;
+    }
+
+    if(module_impl->f_elem_ext)
+    {
+        WODEN_ELEMENT_EXTENSIBLE_FREE(module_impl->f_elem_ext, env);
+        module_impl->f_elem_ext = NULL;
+    }
+
+    if(module_impl->f_ref)
+    {
+        AXIS2_URI_FREE(module_impl->f_ref, env);
+        module_impl->f_ref = NULL;
+    }
+
+    woden_wsdl10_soap_module_free_ops(module, env);
+
+    if((&(module_impl->module))->ops)
+    {
+        AXIS2_FREE(env->allocator, (&(module_impl->module))->ops);
+        (&(module_impl->module))->ops = NULL;
+    }
+    
+    if(module_impl)
+    {
+        AXIS2_FREE(env->allocator, module_impl);
+        module_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+woden_wsdl10_soap_module_super_objs(
+        void *module,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    module_impl = INTF_TO_IMPL(module);
+
+    return module_impl->super;
+}
+
+woden_obj_types_t AXIS2_CALL
+woden_wsdl10_soap_module_type(
+        void *module,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    module_impl = INTF_TO_IMPL(module);
+
+    return module_impl->obj_type;
+}
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_soap_module_resolve_methods(
+        woden_wsdl10_soap_module_t *module,
+        const axis2_env_t *env,
+        woden_wsdl10_soap_module_t *module_impl,
+        axis2_hash_t *methods)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    module_impl_l = INTF_TO_IMPL(module_impl);
+    
+    module->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    module->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    module->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    module->ops->get_ref = axis2_hash_get(methods, 
+            "get_ref", AXIS2_HASH_KEY_STRING);
+    if(!module->ops->get_ref && module_impl_l)
+            module->ops->get_ref = 
+            module_impl_l->module.ops->get_ref;
+    
+    module->ops->is_required = axis2_hash_get(methods, 
+            "is_required", AXIS2_HASH_KEY_STRING);
+    if(!module->ops->is_required && module_impl_l)
+            module->ops->is_required = 
+            module_impl_l->module.ops->is_required;
+    
+    module->ops->get_parent = axis2_hash_get(methods, 
+            "get_parent", AXIS2_HASH_KEY_STRING);
+    if(!module->ops->get_parent && module_impl_l)
+            module->ops->get_parent = 
+            module_impl_l->module.ops->get_parent;
+    
+    module->ops->to_element = axis2_hash_get(methods, 
+            "to_element", AXIS2_HASH_KEY_STRING);
+    if(!module->ops->to_element && module_impl_l)
+            module->ops->to_element = 
+            module_impl_l->module.ops->to_element;
+    
+    return AXIS2_SUCCESS;
+}
+
+/* ***********************************************************************
+ *  Component model methods (SOAPHeaderBlock interface), some shared with Element model
+ * ***********************************************************************/
+
+axis2_uri_t *AXIS2_CALL
+woden_wsdl10_soap_module_get_ref(
+        void *module,
+        axis2_env_t *env) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return module_impl->f_ref;
+}
+
+axis2_bool_t AXIS2_CALL 
+woden_wsdl10_soap_module_is_required(
+        void *module,
+        axis2_env_t *env) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return module_impl->f_required;
+}
+
+void *AXIS2_CALL
+woden_wsdl10_soap_module_get_parent(
+        void *module,
+        axis2_env_t *env) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return module_impl->f_parent;
+}
+
+void *AXIS2_CALL
+woden_wsdl10_soap_module_to_element(
+        void *module,
+        axis2_env_t *env) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return &(module_impl->module);
+}
+
+
+/* ***********************************************************************
+ *  Element model-only methods (SOAPHeaderBlockElement interface)
+ * ***********************************************************************/
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_set_ref(
+        void *module,
+        axis2_env_t *env,
+        axis2_uri_t *uri) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, uri, AXIS2_FAILURE);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    if(module_impl->f_ref)
+    {
+        AXIS2_URI_FREE(module_impl->f_ref, env);
+        module_impl->f_ref = NULL;
+    }
+
+    module_impl->f_ref = AXIS2_URI_CLONE(uri, env);
+
+    return AXIS2_SUCCESS;
+
+}
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_set_parent_element(
+        void *module,
+        axis2_env_t *env,
+        void *wsdl_el) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    if(module_impl->f_parent)
+    {
+        /* TODO */
+        module_impl->f_parent = NULL;
+    }
+    module_impl->f_parent = wsdl_el;
+
+    return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL
+woden_wsdl10_soap_module_get_parent_element(
+        void *module,
+        axis2_env_t *env) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return module_impl->f_parent;
+}
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_add_documentation_element(
+        void *module,
+        axis2_env_t *env,
+        void *doc_el) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, doc_el, AXIS2_FAILURE);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    if(!module_impl->f_documentation_elements)
+    {
+        module_impl->f_documentation_elements = 
+            axis2_array_list_create(env, 0);
+        if(!module_impl->f_documentation_elements)
+        {
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
+    AXIS2_ARRAY_LIST_ADD(module_impl->f_documentation_elements, env, doc_el);
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_documentation_elements(
+        void *module,
+        axis2_env_t *env) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return module_impl->f_documentation_elements;
+}
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_set_extension_type(
+        void *module,
+        axis2_env_t *env,
+        axis2_qname_t *qname) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    if(module_impl->f_ext_element_type)
+    {
+        AXIS2_QNAME_FREE(module_impl->f_ext_element_type, env);
+        module_impl->f_ext_element_type = NULL;
+    }
+
+    module_impl->f_ext_element_type = AXIS2_QNAME_CLONE(qname, env);
+
+    return AXIS2_SUCCESS;
+}
+
+axis2_qname_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_extension_type(
+        void *module,
+        axis2_env_t *env) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return module_impl->f_ext_element_type;
+}
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_set_required(
+        void *module,
+        axis2_env_t *env,
+        axis2_bool_t required) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    module_impl->f_required = required;
+
+    return AXIS2_SUCCESS;
+}
+
+/* ***********************************************************************
+ *  Extensibility methods
+ * ***********************************************************************/
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_set_ext_attr(
+        void *module,
+        axis2_env_t *env,
+        axis2_qname_t *attr_type, 
+        void *attr) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, attr_type, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, attr, AXIS2_FAILURE);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return WODEN_ATTR_EXTENSIBLE_SET_EXT_ATTR(
+            module_impl->f_attr_ext, env, attr_type, attr);
+}
+
+void *AXIS2_CALL
+woden_wsdl10_soap_module_get_ext_attr(
+        void *module,
+        axis2_env_t *env,
+        axis2_qname_t *attr_type) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, attr_type, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(
+            module_impl->f_attr_ext, env, attr_type);
+}
+
+axis2_array_list_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_ext_attrs_for_namespace(
+        void *module,
+        axis2_env_t *env,
+        axis2_uri_t *namespc) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, namespc, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTRS_FOR_NAMESPACE(
+            module_impl->f_attr_ext, env, namespc);
+}
+
+axis2_array_list_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_ext_attrs(
+        void *module,
+        axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTRS(
+            module_impl->f_attr_ext, env);
+}
+
+axis2_bool_t AXIS2_CALL 
+woden_wsdl10_soap_module_has_ext_attrs_for_namespace(
+        void *module,
+        axis2_env_t *env,
+        axis2_uri_t *namespc) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
+    AXIS2_PARAM_CHECK(env->error, namespc, AXIS2_FAILURE);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return WODEN_ATTR_EXTENSIBLE_HAS_EXT_ATTRS_FOR_NAMESPACE(
+            module_impl->f_attr_ext, env, namespc);
+}
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_add_ext_element(
+        void *module,
+        axis2_env_t *env,
+        void *ext_el) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, ext_el, AXIS2_FAILURE);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return WODEN_ELEMENT_EXTENSIBLE_ADD_EXT_ELEMENT(
+            module_impl->f_elem_ext, env, ext_el);
+}
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_remove_ext_element(
+        void *module,
+        axis2_env_t *env,
+        void *ext_el) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, ext_el, AXIS2_FAILURE);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return WODEN_ELEMENT_EXTENSIBLE_REMOVE_EXT_ELEMENT(
+            module_impl->f_elem_ext, env, ext_el);
+
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_ext_elements(
+        void *module,
+        axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS(
+            module_impl->f_elem_ext, env);
+}
+
+axis2_array_list_t *AXIS2_CALL 
+woden_wsdl10_soap_module_get_ext_elements_of_type(
+        void *module,
+        axis2_env_t *env,
+        axis2_qname_t *ext_type) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, ext_type, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS_OF_TYPE(
+            module_impl->f_elem_ext, env, ext_type);
+}
+
+axis2_bool_t AXIS2_CALL 
+woden_wsdl10_soap_module_has_ext_elements_for_namespace(
+        void *module,
+        axis2_env_t *env,
+        axis2_uri_t *namespc) 
+{
+    woden_wsdl10_soap_module_impl_t *module_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, namespc, AXIS2_FAILURE);
+    super = WODEN_WSDL10_SOAP_MODULE_SUPER_OBJS(module, env);
+    module_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE", AXIS2_HASH_KEY_STRING));
+
+    return WODEN_ELEMENT_EXTENSIBLE_HAS_EXT_ELEMENTS_FOR_NAMESPACE(
+            module_impl->f_elem_ext, env, namespc);
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module_deserializer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module_deserializer.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module_deserializer.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module_deserializer.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,408 @@
+/*
+ * 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_wsdl10_soap_module_deserializer.h>
+#include <woden_wsdl10_soap_module.h>
+#include <woden_wsdl10_soap_module_element.h>
+#include <woden_wsdl10_desc.h>
+#include <woden_wsdl10_desc_element.h>
+#include <woden_documentation.h>
+#include <woden_documentation_element.h>
+#include "../../woden_constants.h"
+#include <axiom_element.h>
+#include <axiom_util.h>
+#include <woden_qname_util.h>
+
+
+typedef struct woden_wsdl10_soap_module_deserializer_impl 
+        woden_wsdl10_soap_module_deserializer_impl_t;
+
+/** 
+ * @brief Soap Module Deserializer Struct Impl
+ *   Axis2 Soap Module Deserializer  
+ */ 
+struct woden_wsdl10_soap_module_deserializer_impl
+{
+    woden_wsdl10_soap_module_deserializer_t mod_deser;
+    woden_obj_types_t obj_type;
+    axis2_hash_t *super;
+    axis2_hash_t *methods;
+};
+
+#define INTF_TO_IMPL(mod_deser) \
+    ((woden_wsdl10_soap_module_deserializer_impl_t *) mod_deser)
+
+axis2_status_t AXIS2_CALL 
+woden_wsdl10_soap_module_deserializer_free(
+        void *mod_deser,
+        const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL 
+woden_wsdl10_soap_module_deserializer_type(
+        void *mod_deser,
+        const axis2_env_t *env);
+
+axis2_hash_t *AXIS2_CALL 
+woden_wsdl10_soap_module_deserializer_super_objs(
+        void *mod_deser,
+        const axis2_env_t *env);
+
+void *AXIS2_CALL
+woden_wsdl10_soap_module_deserializer_unmarshall(
+        void *mod_deser,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type,
+        void *parent,
+        axis2_qname_t *element_type,
+        axiom_node_t *el_node,
+        void *desc,
+        woden_ext_registry_t *ext_reg);
+
+static void *
+parse_documentation(
+        void *reader,
+        const axis2_env_t *env,
+        axiom_node_t *doc_el_node,
+        void *desc);
+
+static woden_wsdl10_soap_module_deserializer_t *
+create(const axis2_env_t *env);
+
+static axis2_status_t
+woden_wsdl10_soap_module_deserializer_free_ops(
+        void *mod_deser,
+        const axis2_env_t *env);
+
+/************************Woden C Internal Methods******************************/
+
+AXIS2_EXTERN woden_wsdl10_soap_module_deserializer_t * AXIS2_CALL
+woden_wsdl10_soap_module_deserializer_to_ext_deserializer(
+        void *mod_deser,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_deserializer_impl_t *mod_deser_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    if(!mod_deser)
+    {
+        mod_deser_impl = (woden_wsdl10_soap_module_deserializer_impl_t *) 
+            create(env);
+    }
+    else
+        mod_deser_impl = (woden_wsdl10_soap_module_deserializer_impl_t *) 
+            mod_deser;
+
+    woden_wsdl10_soap_module_deserializer_free_ops(mod_deser, env);
+
+    mod_deser_impl->mod_deser.ext_deserializer.ops = 
+        AXIS2_MALLOC(env->allocator, 
+                sizeof(woden_ext_deserializer_ops_t));
+    woden_wsdl10_ext_deserializer_resolve_methods(&(mod_deser_impl->mod_deser.
+            ext_deserializer), env, mod_deser_impl->methods);
+    return mod_deser;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static woden_wsdl10_soap_module_deserializer_t *
+create(const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_deserializer_impl_t *mod_deser_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    mod_deser_impl = AXIS2_MALLOC(env->allocator, 
+                    sizeof(woden_wsdl10_soap_module_deserializer_impl_t));
+
+    mod_deser_impl->obj_type= WODEN_WSDL10_SOAP_MODULE_DESERIALIZER;
+    mod_deser_impl->super = NULL;
+    mod_deser_impl->methods = NULL;
+    
+    mod_deser_impl->mod_deser.ext_deserializer.ops = NULL;
+    
+    mod_deser_impl->mod_deser.ops = AXIS2_MALLOC(env->allocator, 
+            sizeof(woden_wsdl10_soap_module_deserializer_ops_t));
+
+    mod_deser_impl->mod_deser.ops->free = 
+        woden_wsdl10_soap_module_deserializer_free;
+    mod_deser_impl->mod_deser.ops->super_objs = 
+        woden_wsdl10_soap_module_deserializer_super_objs;
+    mod_deser_impl->mod_deser.ops->type = 
+        woden_wsdl10_soap_module_deserializer_type;
+    
+    mod_deser_impl->mod_deser.ops->unmarshall = 
+        woden_wsdl10_soap_module_deserializer_unmarshall;
+ 
+    mod_deser_impl->methods = axis2_hash_make(env);
+    if(!mod_deser_impl->methods) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(mod_deser_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_deserializer_free);
+    axis2_hash_set(mod_deser_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_deserializer_super_objs);
+    axis2_hash_set(mod_deser_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, woden_wsdl10_soap_module_deserializer_type);
+
+    axis2_hash_set(mod_deser_impl->methods, "unmarshall", 
+            AXIS2_HASH_KEY_STRING, 
+            woden_wsdl10_soap_module_deserializer_unmarshall);
+
+    return &(mod_deser_impl->mod_deser);
+}
+
+AXIS2_EXTERN woden_wsdl10_soap_module_deserializer_t * AXIS2_CALL
+woden_wsdl10_soap_module_deserializer_create(const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_deserializer_impl_t *mod_deser_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, NULL);
+    mod_deser_impl = (woden_wsdl10_soap_module_deserializer_impl_t *) create(env);
+
+    mod_deser_impl->super = axis2_hash_make(env);
+    if(!mod_deser_impl->super) 
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(mod_deser_impl->super, "WODEN_WSDL10_SOAP_MODULE_DESERIALIZER", 
+            AXIS2_HASH_KEY_STRING, &(mod_deser_impl->mod_deser));
+ 
+    return &(mod_deser_impl->mod_deser);
+}
+
+static axis2_status_t
+woden_wsdl10_soap_module_deserializer_free_ops(
+        void *mod_deser,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_deserializer_impl_t *mod_deser_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    mod_deser_impl = INTF_TO_IMPL(mod_deser);
+
+    if(mod_deser_impl->mod_deser.ext_deserializer.ops)
+    {
+        AXIS2_FREE(env->allocator, mod_deser_impl->mod_deser.
+                ext_deserializer.ops);
+        mod_deser_impl->mod_deser.ext_deserializer.ops = 
+            NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_soap_module_deserializer_free(
+        void *mod_deser,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_deserializer_impl_t *mod_deser_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    mod_deser_impl = INTF_TO_IMPL(mod_deser);
+
+    if(mod_deser_impl->super)
+    {
+        axis2_hash_free(mod_deser_impl->super, env);
+        mod_deser_impl->super = NULL;
+    }
+    
+    if(mod_deser_impl->methods)
+    {
+        axis2_hash_free(mod_deser_impl->methods, env);
+        mod_deser_impl->methods = NULL;
+    }
+
+    woden_wsdl10_soap_module_deserializer_free_ops(mod_deser, env);
+
+    if((&(mod_deser_impl->mod_deser))->ops)
+    {
+        AXIS2_FREE(env->allocator, (&(mod_deser_impl->mod_deser))->ops);
+        (&(mod_deser_impl->mod_deser))->ops = NULL;
+    }
+    
+    if(mod_deser_impl)
+    {
+        AXIS2_FREE(env->allocator, mod_deser_impl);
+        mod_deser_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+woden_wsdl10_soap_module_deserializer_super_objs(
+        void *mod_deser,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_deserializer_impl_t *mod_deser_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    mod_deser_impl = INTF_TO_IMPL(mod_deser);
+
+    return mod_deser_impl->super;
+}
+
+woden_obj_types_t AXIS2_CALL
+woden_wsdl10_soap_module_deserializer_type(
+        void *mod_deser,
+        const axis2_env_t *env)
+{
+    woden_wsdl10_soap_module_deserializer_impl_t *mod_deser_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    mod_deser_impl = INTF_TO_IMPL(mod_deser);
+
+    return mod_deser_impl->obj_type;
+}
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_soap_module_deserializer_resolve_methods(
+        woden_wsdl10_soap_module_deserializer_t *mod_deser,
+        const axis2_env_t *env,
+        woden_wsdl10_soap_module_deserializer_t *mod_deser_impl,
+        axis2_hash_t *methods)
+{
+    woden_wsdl10_soap_module_deserializer_impl_t *mod_deser_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    mod_deser_impl_l = INTF_TO_IMPL(mod_deser_impl);
+    
+    mod_deser->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    mod_deser->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    mod_deser->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    mod_deser->ops->unmarshall = axis2_hash_get(methods, 
+            "unmarshall", AXIS2_HASH_KEY_STRING);
+    if(!mod_deser->ops->unmarshall && mod_deser_impl_l)
+            mod_deser->ops->unmarshall = 
+            mod_deser_impl_l->mod_deser.ops->unmarshall;
+    
+    return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL
+woden_wsdl10_soap_module_deserializer_unmarshall(
+        void *mod_deser,
+        const axis2_env_t *env,
+        axis2_char_t *parent_type,
+        void *parent,
+        axis2_qname_t *element_type,
+        axiom_node_t *el_node,
+        void *desc,
+        woden_ext_registry_t *ext_reg)
+{
+    woden_wsdl10_soap_module_deserializer_impl_t *mod_deser_impl = NULL;
+    axis2_hash_t *super = NULL;
+    void *soap_mod = NULL;
+    axis2_char_t *ref = NULL;
+    axis2_char_t *req = NULL;
+    axiom_element_t *el = NULL;
+    axiom_element_t *temp_el = NULL;
+    axiom_node_t *temp_el_node = NULL;
+    axis2_bool_t required = AXIS2_FALSE;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = WODEN_WSDL10_SOAP_MODULE_DESERIALIZER_SUPER_OBJS(mod_deser, env);
+    mod_deser_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "WODEN_WSDL10_SOAP_MODULE_DESERIALIZER", AXIS2_HASH_KEY_STRING));
+   
+    soap_mod = WODEN_EXT_REGISTRY_QUERY_EXT_ELEMENT_TYPE(ext_reg, env, 
+            parent_type, element_type);
+
+    soap_mod = woden_wsdl10_soap_module_to_ext_element(soap_mod, env);
+    WODEN_EXT_ELEMENT_SET_EXT_TYPE(soap_mod, env, element_type);
+    soap_mod = woden_wsdl10_soap_module_to_soap_module_element(soap_mod, env);
+    WODEN_WSDL10_SOAP_MODULE_ELEMENT_SET_PARENT_ELEMENT(soap_mod, env, parent);
+
+    el = AXIOM_NODE_GET_DATA_ELEMENT(el_node, env);
+
+    ref = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME(el, env, 
+            WODEN_ATTR_REF); 
+    if(NULL != ref)
+    {
+        axis2_uri_t *uri = axis2_uri_parse_string(env, ref);
+        
+        soap_mod = woden_wsdl10_soap_module_to_soap_module_element(soap_mod, env);
+        WODEN_WSDL10_SOAP_MODULE_ELEMENT_SET_REF(soap_mod, env, uri);
+    }
+    req = AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME(el, env, 
+            WODEN_ATTR_REQUIRED);
+    if(NULL != req && 0 == AXIS2_STRCMP(WODEN_VALUE_TRUE, req))
+            required = AXIS2_TRUE;
+    else
+            required = AXIS2_FALSE;
+    soap_mod = woden_wsdl10_soap_module_to_ext_element(soap_mod, env);
+    WODEN_EXT_ELEMENT_SET_REQUIRED(soap_mod, env, required);
+
+    temp_el = axiom_util_get_first_child_element(el, env, el_node, 
+            &temp_el_node);
+
+    while (NULL != temp_el && NULL != temp_el_node)
+    {
+        axis2_qname_t *q_elem_documentation = NULL;
+
+        q_elem_documentation = axis2_qname_create_from_string(env, 
+                WODEN_Q_ELEM_DOCUMENTATION);
+
+        if(AXIS2_TRUE == axis2_qname_util_matches(env, 
+                    q_elem_documentation, temp_el_node))
+        {
+            void *documentation = NULL;
+
+            documentation = parse_documentation(mod_deser, env, temp_el_node, desc);
+            soap_mod = woden_wsdl10_soap_module_to_soap_module_element(soap_mod, env);
+            WODEN_WSDL10_SOAP_MODULE_ELEMENT_ADD_DOCUMENTATION_ELEMENT(soap_mod, env, 
+                    documentation);
+        }
+        else
+        {
+            /* TODO Parse ext elements */
+        }
+
+        temp_el = axiom_util_get_next_sibling_element(temp_el, env, 
+                temp_el_node, &temp_el_node); 
+    }
+    
+    return soap_mod;
+}
+
+static void *
+parse_documentation(
+        void *mod_deser,
+        const axis2_env_t *env,
+        axiom_node_t *doc_el_node,
+        void *desc)
+{
+    void *documentation = NULL;
+    
+    desc = woden_wsdl10_desc_to_desc_element(desc, env);
+    documentation = WODEN_WSDL10_DESC_ELEMENT_CREATE_DOCUMENTATION_ELEMENT(desc, 
+            env);
+    
+    documentation = woden_documentation_to_documentation_element(
+            documentation, env);
+    WODEN_DOCUMENTATION_ELEMENT_SET_CONTENT(documentation, env, doc_el_node);
+    
+    return documentation;
+}
+
+

Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module_element.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module_element.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module_element.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_module_element.c Wed Jul  5 23:02:19 2006
@@ -0,0 +1,59 @@
+/*
+ * 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_wsdl10_soap_module_element.h>
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_soap_module_element_resolve_methods(
+        woden_wsdl10_soap_module_element_t *soap_module_element,
+        const axis2_env_t *env,
+        axis2_hash_t *methods)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+    
+    soap_module_element->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    soap_module_element->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_module_element->ops->set_ref = 
+            axis2_hash_get(methods, "set_ref", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_module_element->ops->get_ref = 
+            axis2_hash_get(methods, "get_ref", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_module_element->ops->set_parent_element = 
+            axis2_hash_get(methods, "set_parent_element", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_module_element->ops->get_parent_element = 
+            axis2_hash_get(methods, "get_parent_element", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_module_element->ops->add_documentation_element = 
+            axis2_hash_get(methods, "add_documentation_element", 
+            AXIS2_HASH_KEY_STRING);
+
+    soap_module_element->ops->get_documentation_elements = 
+            axis2_hash_get(methods, "get_documentation_elements", 
+            AXIS2_HASH_KEY_STRING);
+
+    return AXIS2_SUCCESS;    
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/woden_wsdl10_soap_constants.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/woden_wsdl10_soap_constants.h?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/woden_wsdl10_soap_constants.h (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/woden_wsdl10_soap_constants.h Wed Jul  5 23:02:19 2006
@@ -0,0 +1,96 @@
+/*
+ * 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_SOAP_CONSTANTS_H
+#define WODEN_SOAP_CONSTANTS_H
+
+/**
+ * @file axiom_soap_constants.h
+ * @brief Axis2 Xml Soap Constants
+ *          Constants for XML Soap elements, attributes and URIs.
+ */
+ 
+#include <axis2_utils.h>
+
+#ifdef __cplusplus
+extern "C" 
+{
+#endif
+    
+/** @defgroup woden_soap_constants 
+  * @ingroup woden_soap
+  * @{
+  */
+/*********************************** Constansts********************************/
+
+/* Namespace URIs.*/
+#define WODEN_NS_URI_SOAP "http://schemas.xmlsoap.org/wsdl/soap"
+
+/* Protocol URIs.*/
+#define WODEN_PROTOCOL_URI_HTTP "http://www.w3.org/2003/05/soap/bindings/HTTP/"
+
+/* Element names. */
+#define WODEN_ELEM_MODULE "module"
+#define WODEN_ELEM_HEADER "header"
+
+/* Attribute names. */
+#define WODEN_ATTR_VERSION "version"
+#define WODEN_ATTR_PROTOCOL "protocol"
+#define WODEN_ATTR_MEPDEFAULT "mepDefault"
+#define WODEN_ATTR_CODE "code"
+#define WODEN_ATTR_SUBCODES "subcodes"
+#define WODEN_ATTR_MEP "mep"
+#define WODEN_ATTR_ACTION "action"
+#define WODEN_ATTR_MUSTUNDERSTAND "mustUnderstand"
+
+/* Prefixes */
+#define WODEN_PFX_WSOAP "wsoap"
+#define WODEN_PFX_WHTTP "whttp"   /* TODO move to HTTPConstants? */
+
+/* Qualified element names.*/
+
+#define WODEN_Q_ELEM_SOAP_MODULE "module|http://schemas.xmlsoap.org/wsdl/soap|wsoap"
+
+#define WODEN_Q_ELEM_SOAP_HEADER "header|http://schemas.xmlsoap.org/wsdl/soap|wsoap"
+
+/* Qualified attribute names.*/
+
+#define WODEN_Q_ATTR_SOAP_VERSION "version|http://schemas.xmlsoap.org/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_PROTOCOL "protocol|http://schemas.xmlsoap.org/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_MEPDEFAULT "mepDefault|http://schemas.xmlsoap.org/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_CODE "ATTR_CODE|http://schemas.xmlsoap.org/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_SUBCODES "subcodes|http://schemas.xmlsoap.org/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_MEP "mep|http://schemas.xmlsoap.org/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_ACTION "action|http://schemas.xmlsoap.org/wsdl/soap|wsoap"
+
+
+
+/*********************************** Constants*********************************/   
+   
+   
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* 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