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/06/01 07:49:29 UTC

svn commit: r410764 - /webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/

Author: damitha
Date: Wed May 31 22:49:28 2006
New Revision: 410764

URL: http://svn.apache.org/viewvc?rev=410764&view=rev
Log:
Added new folder

Added:
    webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/
    webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/Makefile.am
    webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/axis2_woden_soap_constants.h
    webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_exts.c
    webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_fault_exts.c
    webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_fault_ref_exts.c
    webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_msg_ref_exts.c
    webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_op_exts.c

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/Makefile.am?rev=410764&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/Makefile.am (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/Makefile.am Wed May 31 22:49:28 2006
@@ -0,0 +1,13 @@
+noinst_LTLIBRARIES = libaxis2_woden_extensions_soap.la
+
+libaxis2_woden_extensions_soap_la_SOURCES = \
+											soap_binding_exts.c \
+											soap_binding_fault_exts.c \
+											soap_binding_fault_ref_exts.c \
+											soap_binding_msg_ref_exts.c \
+											soap_binding_op_exts.c
+
+INCLUDES = -I$(top_builddir)/include \
+			@AXIOMINC@ \
+			@UTILINC@ \
+			@XMLSCHEMAINC@

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/axis2_woden_soap_constants.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/axis2_woden_soap_constants.h?rev=410764&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/axis2_woden_soap_constants.h (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/axis2_woden_soap_constants.h Wed May 31 22:49:28 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 AXIS2_WODEN_SOAP_CONSTANTS_H
+#define AXIS2_WODEN_SOAP_CONSTANTS_H
+
+/**
+ * @file axis2_soap_constants.h
+ * @brief Axis2 Xml Soap Constants
+ *          Constants for XML Soap elements, attributes and URIs.
+ */
+ 
+#include <axis2_const.h>
+
+#ifdef __cplusplus
+extern "C" 
+{
+#endif
+    
+/** @defgroup axis2_woden_soap_constants 
+  * @ingroup axis2_woden_soap
+  * @{
+  */
+/*********************************** Constansts********************************/
+
+/* Namespace URIs.*/
+#define WODEN_NS_URI_SOAP "http://www.w3.org/2006/01/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://www.w3.org/2006/01/wsdl/soap|wsoap"
+
+#define WODEN_Q_ELEM_SOAP_HEADER "header|http://www.w3.org/2006/01/wsdl/soap|wsoap"
+
+/* Qualified attribute names.*/
+
+#define WODEN_Q_ATTR_SOAP_VERSION "version|http://www.w3.org/2006/01/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_PROTOCOL "protocol|http://www.w3.org/2006/01/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_MEPDEFAULT "mepDefault|http://www.w3.org/2006/01/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_CODE "ATTR_CODE|http://www.w3.org/2006/01/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_SUBCODES "subcodes|http://www.w3.org/2006/01/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_MEP "mep|http://www.w3.org/2006/01/wsdl/soap|wsoap"
+
+#define WODEN_Q_ATTR_SOAP_ACTION "action|http://www.w3.org/2006/01/wsdl/soap|wsoap"
+
+
+
+/*********************************** Constants*********************************/	
+	
+	
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_WODEN_SOAP_CONSTANTS_H */
+
+

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_exts.c?rev=410764&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_exts.c Wed May 31 22:49:28 2006
@@ -0,0 +1,455 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/extensions/soap/axis2_woden_soap_binding_exts.h>
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
+#include <woden/wsdl20/xml/axis2_woden_wsdl_element.h>
+#include <woden/xml/axis2_woden_string_attr.h>
+#include <woden/xml/axis2_woden_uri_attr.h>
+#include "axis2_woden_soap_constants.h"
+
+typedef struct axis2_woden_soap_binding_exts_impl axis2_woden_soap_binding_exts_impl_t;
+
+/** 
+ * @brief Soap Binding Extensions Struct Impl
+ *	Axis2 Soap Binding Extensions  
+ */ 
+struct axis2_woden_soap_binding_exts_impl
+{
+    axis2_woden_soap_binding_exts_t binding_exts;
+    axis2_woden_component_exts_t *component_exts;
+    axis2_hash_t *methods;
+    axis2_hash_t *super;
+    axis2_woden_obj_types_t obj_type;
+    
+    axis2_qname_t *qname;
+};
+
+#define INTF_TO_IMPL(binding_exts) ((axis2_woden_soap_binding_exts_impl_t *) binding_exts)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_soap_binding_exts_free(
+        void *binding_exts,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_soap_binding_exts_super_objs(
+        void *binding_exts,
+        axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL 
+axis2_woden_soap_binding_exts_type(
+        void *binding_exts,
+        axis2_env_t **env);
+
+axis2_woden_component_exts_t *AXIS2_CALL
+axis2_woden_soap_binding_exts_get_base_impl(
+        void *binding_exts,
+        axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL 
+axis2_woden_soap_binding_exts_get_soap_version(
+        void *binding_exts,
+        axis2_env_t **env);
+
+axis2_url_t *AXIS2_CALL 
+axis2_woden_soap_binding_exts_get_soap_underlying_protocol(
+        void *binding_exts,
+        axis2_env_t **env);
+
+axis2_url_t *AXIS2_CALL 
+axis2_woden_soap_binding_exts_get_soap_mep_default(
+        void *binding_exts,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_soap_binding_exts_get_soap_modules(
+        void *binding_exts,
+        axis2_env_t **env); 
+
+
+static axis2_woden_soap_binding_exts_t *
+create(axis2_env_t **env);
+
+static axis2_status_t
+axis2_woden_soap_binding_exts_free_ops(
+        void *binding_exts,
+        axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_soap_binding_exts_t *)
+axis2_woden_soap_binding_exts_to_component_exts(
+        void *binding_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!binding_exts)
+    {
+        binding_exts_impl = (axis2_woden_soap_binding_exts_impl_t *) create(env);
+    }
+    else
+        binding_exts_impl = (axis2_woden_soap_binding_exts_impl_t *) binding_exts;
+    axis2_woden_soap_binding_exts_free_ops(binding_exts, env);
+
+    binding_exts_impl->binding_exts.component_exts.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_component_exts_ops_t));
+    axis2_woden_component_exts_resolve_methods(&(binding_exts_impl->binding_exts.
+            component_exts), env, binding_exts_impl->methods);
+    return binding_exts;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_soap_binding_exts_t *
+create(axis2_env_t **env)
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_exts_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_soap_binding_exts_impl_t));
+
+    binding_exts_impl->obj_type= AXIS2_WODEN_SOAP_BINDING_EXTS;
+    binding_exts_impl->super = NULL;
+    binding_exts_impl->methods = NULL;
+
+    binding_exts_impl->component_exts = NULL;
+    binding_exts_impl->qname = NULL;
+    
+    binding_exts_impl->binding_exts.component_exts.ops = NULL;
+    
+    binding_exts_impl->binding_exts.ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_soap_binding_exts_ops_t));
+
+    binding_exts_impl->binding_exts.ops->free = axis2_woden_soap_binding_exts_free;
+    binding_exts_impl->binding_exts.ops->super_objs = 
+        axis2_woden_soap_binding_exts_super_objs;
+    binding_exts_impl->binding_exts.ops->type = 
+        axis2_woden_soap_binding_exts_type;
+    binding_exts_impl->binding_exts.ops->get_base_impl = 
+        axis2_woden_soap_binding_exts_get_base_impl;
+    
+    binding_exts_impl->binding_exts.ops->get_soap_version = 
+        axis2_woden_soap_binding_exts_get_soap_version;
+    binding_exts_impl->binding_exts.ops->get_soap_underlying_protocol = 
+        axis2_woden_soap_binding_exts_get_soap_underlying_protocol;
+    binding_exts_impl->binding_exts.ops->get_soap_mep_default = 
+        axis2_woden_soap_binding_exts_get_soap_mep_default;
+    binding_exts_impl->binding_exts.ops->get_soap_modules = 
+        axis2_woden_soap_binding_exts_get_soap_modules;
+ 
+    binding_exts_impl->methods = axis2_hash_make(env);
+    if(!binding_exts_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_exts_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_exts_free);
+    axis2_hash_set(binding_exts_impl->methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_soap_binding_exts_super_objs);
+    axis2_hash_set(binding_exts_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_soap_binding_exts_type);
+
+    axis2_hash_set(binding_exts_impl->methods, "get_soap_version", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_exts_get_soap_version);
+    axis2_hash_set(binding_exts_impl->methods, "get_soap_underlying_protocol", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_exts_get_soap_underlying_protocol);
+    axis2_hash_set(binding_exts_impl->methods, "get_soap_mep_default", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_exts_get_soap_mep_default);
+    axis2_hash_set(binding_exts_impl->methods, "get_soap_modules", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_exts_get_soap_modules);
+
+    return &(binding_exts_impl->binding_exts);
+}
+
+AXIS2_DECLARE(axis2_woden_soap_binding_exts_t *)
+axis2_woden_soap_binding_exts_create(axis2_env_t **env)
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_exts_impl = (axis2_woden_soap_binding_exts_impl_t *) create(env);
+
+    binding_exts_impl->component_exts = axis2_woden_component_exts_create(env);
+
+    binding_exts_impl->super = axis2_hash_make(env);
+    if(!binding_exts_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_exts_impl->super, "AXIS2_WODEN_SOAP_BINDING_EXTS", AXIS2_HASH_KEY_STRING, 
+            &(binding_exts_impl->binding_exts));
+    axis2_hash_set(binding_exts_impl->super, "AXIS2_WODEN_COMPONENT_EXTS", AXIS2_HASH_KEY_STRING, 
+            binding_exts_impl->component_exts);
+ 
+    return &(binding_exts_impl->binding_exts);
+}
+
+static axis2_status_t
+axis2_woden_soap_binding_exts_free_ops(
+        void *binding_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+    if(binding_exts_impl->binding_exts.component_exts.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_exts_impl->binding_exts.
+                component_exts.ops);
+        binding_exts_impl->binding_exts.component_exts.ops = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_woden_soap_binding_exts_free(void *binding_exts,
+                        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+    if(binding_exts_impl->super)
+    {
+        axis2_hash_free(binding_exts_impl->super, env);
+        binding_exts_impl->super = NULL;
+    }
+    
+    if(binding_exts_impl->methods)
+    {
+        axis2_hash_free(binding_exts_impl->methods, env);
+        binding_exts_impl->methods = NULL;
+    }
+
+    if(binding_exts_impl->component_exts)
+    {
+        AXIS2_WODEN_COMPONENT_EXTS_FREE(binding_exts_impl->component_exts, env);
+        binding_exts_impl->component_exts = NULL;
+    }
+
+    if(binding_exts_impl->qname)
+    {
+        AXIS2_QNAME_FREE(binding_exts_impl->qname, env);
+        binding_exts_impl->qname = NULL;
+    }
+    axis2_woden_soap_binding_exts_free_ops(binding_exts, env);
+
+    if((&(binding_exts_impl->binding_exts))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(binding_exts_impl->binding_exts))->ops);
+        (&(binding_exts_impl->binding_exts))->ops = NULL;
+    }
+    
+    if(binding_exts_impl)
+    {
+        AXIS2_FREE((*env)->allocator, binding_exts_impl);
+        binding_exts_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_soap_binding_exts_super_objs(
+        void *binding_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+    return binding_exts_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_soap_binding_exts_type(
+        void *binding_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+    return binding_exts_impl->obj_type;
+}
+
+axis2_woden_component_exts_t *AXIS2_CALL
+axis2_woden_soap_binding_exts_get_base_impl(
+        void *binding_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+    return binding_exts_impl->component_exts;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_soap_binding_exts_resolve_methods(
+        axis2_woden_soap_binding_exts_t *binding_exts,
+        axis2_env_t **env,
+        axis2_woden_soap_binding_exts_t *binding_exts_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    binding_exts_impl_l = INTF_TO_IMPL(binding_exts_impl);
+    
+    binding_exts->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    binding_exts->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    binding_exts->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    binding_exts->ops->get_soap_version = axis2_hash_get(methods, 
+            "get_soap_version", AXIS2_HASH_KEY_STRING);
+    if(!binding_exts->ops->get_soap_version && binding_exts_impl_l)
+            binding_exts->ops->get_soap_version = 
+            binding_exts_impl_l->binding_exts.ops->get_soap_version;
+    
+    binding_exts->ops->get_soap_underlying_protocol = axis2_hash_get(methods, 
+            "get_soap_underlying_protocol", AXIS2_HASH_KEY_STRING);
+    if(!binding_exts->ops->get_soap_underlying_protocol && binding_exts_impl_l)
+            binding_exts->ops->get_soap_underlying_protocol = 
+            binding_exts_impl_l->binding_exts.ops->get_soap_underlying_protocol;
+    
+    binding_exts->ops->get_soap_mep_default = axis2_hash_get(methods, 
+            "get_soap_mep_default", AXIS2_HASH_KEY_STRING);
+    if(!binding_exts->ops->get_soap_mep_default && binding_exts_impl_l)
+            binding_exts->ops->get_soap_mep_default = 
+            binding_exts_impl_l->binding_exts.ops->get_soap_mep_default;
+    
+    binding_exts->ops->get_soap_modules = axis2_hash_get(methods, 
+            "get_soap_modules", AXIS2_HASH_KEY_STRING);
+    if(!binding_exts->ops->get_soap_modules && binding_exts_impl_l)
+            binding_exts->ops->get_soap_modules = 
+            binding_exts_impl_l->binding_exts.ops->get_soap_modules;
+    
+    return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL 
+axis2_woden_soap_binding_exts_get_soap_version(
+        void *binding_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+    axis2_woden_string_attr_t *version = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_attr_extensible(parent_element, 
+            env);
+    binding_exts_impl->qname = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_VERSION);
+    version = (axis2_woden_string_attr_t *) 
+        AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(parent_element, env, binding_exts_impl->qname); 
+    return version != NULL ? AXIS2_WODEN_STRING_ATTR_GET_STRING(version, env) : 
+        NULL;
+}
+
+axis2_url_t *AXIS2_CALL 
+axis2_woden_soap_binding_exts_get_soap_underlying_protocol(
+        void *binding_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+    axis2_woden_uri_attr_t *protocol = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_exts_impl->component_exts, env);
+
+    parent_element = axis2_woden_wsdl_element_to_attr_extensible(parent_element, 
+            env);
+    binding_exts_impl->qname = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_PROTOCOL);
+    protocol = (axis2_woden_uri_attr_t *) AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(
+            parent_element, env, binding_exts_impl->qname);
+    return protocol != NULL ? AXIS2_WODEN_URI_ATTR_GET_URI(protocol, env) : NULL;
+}
+
+axis2_url_t *AXIS2_CALL 
+axis2_woden_soap_binding_exts_get_soap_mep_default(
+        void *binding_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+    axis2_woden_uri_attr_t *mep_default = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_exts_impl->component_exts, env);
+
+    parent_element = axis2_woden_wsdl_element_to_attr_extensible(parent_element, 
+            env);
+    binding_exts_impl->qname = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_MEPDEFAULT);
+    mep_default = (axis2_woden_uri_attr_t *) 
+        AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(parent_element, env, binding_exts_impl->qname);
+    return mep_default != NULL ? AXIS2_WODEN_URI_ATTR_GET_URI(mep_default, env) : 
+        NULL;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_soap_binding_exts_get_soap_modules(
+        void *binding_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+    axis2_array_list_t *ext_els = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_attr_extensible(parent_element, 
+            env);
+    binding_exts_impl->qname = axis2_qname_create_from_string(env, WODEN_Q_ELEM_SOAP_MODULE);
+    ext_els = AXIS2_WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS_OF_TYPE(
+            parent_element, env, binding_exts_impl->qname);
+    return ext_els;
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_fault_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_fault_exts.c?rev=410764&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_fault_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_fault_exts.c Wed May 31 22:49:28 2006
@@ -0,0 +1,509 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/extensions/soap/axis2_woden_soap_binding_fault_exts.h>
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
+#include <woden/wsdl20/xml/axis2_woden_wsdl_element.h>
+#include <woden/xml/axis2_woden_string_attr.h>
+#include <woden/xml/axis2_woden_qname_or_token_any_attr.h>
+#include <woden/xml/axis2_woden_qname_list_or_token_any_attr.h>
+#include "axis2_woden_soap_constants.h"
+
+typedef struct axis2_woden_soap_binding_fault_exts_impl axis2_woden_soap_binding_fault_exts_impl_t;
+
+/** 
+ * @brief Soap Binding Fault Extensions Struct Impl
+ *	Axis2 Soap Binding Fault Extensions  
+ */ 
+struct axis2_woden_soap_binding_fault_exts_impl
+{
+    axis2_woden_soap_binding_fault_exts_t binding_fault_exts;
+    axis2_woden_component_exts_t *component_exts;
+    axis2_hash_t *methods;
+    axis2_hash_t *super;
+    axis2_woden_obj_types_t obj_type;
+    
+    axis2_qname_t *qname;
+};
+
+#define INTF_TO_IMPL(binding_fault_exts) ((axis2_woden_soap_binding_fault_exts_impl_t *) binding_fault_exts)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_soap_binding_fault_exts_free(
+        void *binding_fault_exts,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_soap_binding_fault_exts_super_objs(
+        void *binding_fault_exts,
+        axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL 
+axis2_woden_soap_binding_fault_exts_type(
+        void *binding_fault_exts,
+        axis2_env_t **env);
+
+axis2_woden_component_exts_t *AXIS2_CALL
+axis2_woden_soap_binding_fault_exts_get_base_impl(
+        void *binding_fault_exts,
+        axis2_env_t **env);
+
+void *AXIS2_CALL 
+axis2_woden_soap_binding_fault_exts_get_soap_fault_code(
+        void *binding_fault_exts,
+        axis2_env_t **env);
+
+void *AXIS2_CALL 
+axis2_woden_soap_binding_fault_exts_get_soap_fault_subcodes(
+        void *binding_fault_exts,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_fault_exts_get_soap_modules(
+        void *binding_fault_exts,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_fault_exts_get_soap_headers(
+        void *binding_fault_exts,
+        axis2_env_t **env);
+
+static axis2_woden_soap_binding_fault_exts_t *
+create(
+        axis2_env_t **env);
+
+static axis2_status_t
+axis2_woden_soap_binding_fault_exts_free_ops(
+        void *binding_fault_exts,
+        axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_soap_binding_fault_exts_t *)
+axis2_woden_soap_binding_fault_exts_to_component_exts(
+        void *binding_fault_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!binding_fault_exts)
+    {
+        binding_fault_exts_impl = (axis2_woden_soap_binding_fault_exts_impl_t *) create(env);
+    }
+    else
+        binding_fault_exts_impl = (axis2_woden_soap_binding_fault_exts_impl_t *) binding_fault_exts;
+    axis2_woden_soap_binding_fault_exts_free_ops(binding_fault_exts, env);
+
+    binding_fault_exts_impl->binding_fault_exts.component_exts.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_component_exts_ops_t));
+    axis2_woden_component_exts_resolve_methods(&(binding_fault_exts_impl->binding_fault_exts.
+            component_exts), env, binding_fault_exts_impl->methods);
+    return binding_fault_exts;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_soap_binding_fault_exts_t *
+create(axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_exts_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_soap_binding_fault_exts_impl_t));
+
+    binding_fault_exts_impl->obj_type= AXIS2_WODEN_SOAP_BINDING_FAULT_EXTS;
+    binding_fault_exts_impl->super = NULL;
+    binding_fault_exts_impl->methods = NULL;
+
+    binding_fault_exts_impl->component_exts = NULL;
+    binding_fault_exts_impl->qname = NULL;
+    
+    binding_fault_exts_impl->binding_fault_exts.component_exts.ops = NULL;
+    
+    binding_fault_exts_impl->binding_fault_exts.ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_soap_binding_fault_exts_ops_t));
+
+    binding_fault_exts_impl->binding_fault_exts.ops->free = axis2_woden_soap_binding_fault_exts_free;
+    binding_fault_exts_impl->binding_fault_exts.ops->super_objs = 
+        axis2_woden_soap_binding_fault_exts_super_objs;
+    binding_fault_exts_impl->binding_fault_exts.ops->type = 
+        axis2_woden_soap_binding_fault_exts_type;
+    binding_fault_exts_impl->binding_fault_exts.ops->get_base_impl = 
+        axis2_woden_soap_binding_fault_exts_get_base_impl;
+    
+    binding_fault_exts_impl->binding_fault_exts.ops->get_soap_fault_code = 
+        axis2_woden_soap_binding_fault_exts_get_soap_fault_code;
+    binding_fault_exts_impl->binding_fault_exts.ops->get_soap_fault_subcodes = 
+        axis2_woden_soap_binding_fault_exts_get_soap_fault_subcodes;
+    binding_fault_exts_impl->binding_fault_exts.ops->get_soap_modules = 
+        axis2_woden_soap_binding_fault_exts_get_soap_modules;
+    binding_fault_exts_impl->binding_fault_exts.ops->get_soap_headers = 
+        axis2_woden_soap_binding_fault_exts_get_soap_headers;
+ 
+    binding_fault_exts_impl->methods = axis2_hash_make(env);
+    if(!binding_fault_exts_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_fault_exts_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_fault_exts_free);
+    axis2_hash_set(binding_fault_exts_impl->methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_soap_binding_fault_exts_super_objs);
+    axis2_hash_set(binding_fault_exts_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_soap_binding_fault_exts_type);
+
+    axis2_hash_set(binding_fault_exts_impl->methods, "get_soap_fault_code", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_fault_exts_get_soap_fault_code);
+    axis2_hash_set(binding_fault_exts_impl->methods, "get_soap_fault_subcodes", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_fault_exts_get_soap_fault_subcodes);
+    axis2_hash_set(binding_fault_exts_impl->methods, "get_modules", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_fault_exts_get_soap_modules);
+    axis2_hash_set(binding_fault_exts_impl->methods, "get_soap_headers", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_fault_exts_get_soap_headers);
+
+    return &(binding_fault_exts_impl->binding_fault_exts);
+}
+
+AXIS2_DECLARE(axis2_woden_soap_binding_fault_exts_t *)
+axis2_woden_soap_binding_fault_exts_create(axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_exts_impl = (axis2_woden_soap_binding_fault_exts_impl_t *) create(env);
+
+    binding_fault_exts_impl->component_exts = axis2_woden_component_exts_create(env);
+
+    binding_fault_exts_impl->super = axis2_hash_make(env);
+    if(!binding_fault_exts_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_fault_exts_impl->super, "AXIS2_WODEN_SOAP_BINDING_FAULT_EXTS", AXIS2_HASH_KEY_STRING, 
+            &(binding_fault_exts_impl->binding_fault_exts));
+    axis2_hash_set(binding_fault_exts_impl->super, "AXIS2_WODEN_COMPONENT_EXTS", AXIS2_HASH_KEY_STRING, 
+            binding_fault_exts_impl->component_exts);
+ 
+    return &(binding_fault_exts_impl->binding_fault_exts);
+}
+
+static axis2_status_t
+axis2_woden_soap_binding_fault_exts_free_ops(
+        void *binding_fault_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_exts_impl = INTF_TO_IMPL(binding_fault_exts);
+
+    if(binding_fault_exts_impl->binding_fault_exts.component_exts.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_fault_exts_impl->binding_fault_exts.
+                component_exts.ops);
+        binding_fault_exts_impl->binding_fault_exts.component_exts.ops = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_woden_soap_binding_fault_exts_free(void *binding_fault_exts,
+                        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_exts_impl = INTF_TO_IMPL(binding_fault_exts);
+
+    if(binding_fault_exts_impl->super)
+    {
+        axis2_hash_free(binding_fault_exts_impl->super, env);
+        binding_fault_exts_impl->super = NULL;
+    }
+    
+    if(binding_fault_exts_impl->methods)
+    {
+        axis2_hash_free(binding_fault_exts_impl->methods, env);
+        binding_fault_exts_impl->methods = NULL;
+    }
+
+    if(binding_fault_exts_impl->component_exts)
+    {
+        AXIS2_WODEN_COMPONENT_EXTS_FREE(binding_fault_exts_impl->component_exts, env);
+        binding_fault_exts_impl->component_exts = NULL;
+    }
+
+    if(binding_fault_exts_impl->qname)
+    {
+        AXIS2_QNAME_FREE(binding_fault_exts_impl->qname, env);
+        binding_fault_exts_impl->qname = NULL;
+    }
+    axis2_woden_soap_binding_fault_exts_free_ops(binding_fault_exts, env);
+
+    if((&(binding_fault_exts_impl->binding_fault_exts))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(binding_fault_exts_impl->binding_fault_exts))->ops);
+        (&(binding_fault_exts_impl->binding_fault_exts))->ops = NULL;
+    }
+    
+    if(binding_fault_exts_impl)
+    {
+        AXIS2_FREE((*env)->allocator, binding_fault_exts_impl);
+        binding_fault_exts_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_soap_binding_fault_exts_super_objs(
+        void *binding_fault_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_exts_impl = INTF_TO_IMPL(binding_fault_exts);
+
+    return binding_fault_exts_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_soap_binding_fault_exts_type(
+        void *binding_fault_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_exts_impl = INTF_TO_IMPL(binding_fault_exts);
+
+    return binding_fault_exts_impl->obj_type;
+}
+
+axis2_woden_component_exts_t *AXIS2_CALL
+axis2_woden_soap_binding_fault_exts_get_base_impl(
+        void *binding_fault_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    binding_fault_exts_impl = INTF_TO_IMPL(binding_fault_exts);
+
+    return binding_fault_exts_impl->component_exts;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_soap_binding_fault_exts_resolve_methods(
+        axis2_woden_soap_binding_fault_exts_t *binding_fault_exts,
+        axis2_env_t **env,
+        axis2_woden_soap_binding_fault_exts_t *binding_fault_exts_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    binding_fault_exts_impl_l = INTF_TO_IMPL(binding_fault_exts_impl);
+    
+    binding_fault_exts->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    binding_fault_exts->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    binding_fault_exts->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    binding_fault_exts->ops->get_soap_fault_code = axis2_hash_get(methods, 
+            "get_soap_fault_code", AXIS2_HASH_KEY_STRING);
+    if(!binding_fault_exts->ops->get_soap_fault_code && binding_fault_exts_impl_l)
+            binding_fault_exts->ops->get_soap_fault_code = 
+            binding_fault_exts_impl_l->binding_fault_exts.ops->get_soap_fault_code;
+    
+    binding_fault_exts->ops->get_soap_fault_subcodes = axis2_hash_get(methods, 
+            "get_soap_fault_subcodes", AXIS2_HASH_KEY_STRING);
+    if(!binding_fault_exts->ops->get_soap_fault_subcodes && binding_fault_exts_impl_l)
+            binding_fault_exts->ops->get_soap_fault_subcodes = 
+            binding_fault_exts_impl_l->binding_fault_exts.ops->get_soap_fault_subcodes;
+    
+    binding_fault_exts->ops->get_soap_modules = axis2_hash_get(methods, 
+            "get_soap_modules", AXIS2_HASH_KEY_STRING);
+    if(!binding_fault_exts->ops->get_soap_modules && binding_fault_exts_impl_l)
+            binding_fault_exts->ops->get_soap_modules = 
+            binding_fault_exts_impl_l->binding_fault_exts.ops->get_soap_modules;
+    
+    binding_fault_exts->ops->get_soap_headers = axis2_hash_get(methods, 
+            "get_soap_headers", AXIS2_HASH_KEY_STRING);
+    if(!binding_fault_exts->ops->get_soap_headers && binding_fault_exts_impl_l)
+            binding_fault_exts->ops->get_soap_headers = 
+            binding_fault_exts_impl_l->binding_fault_exts.ops->get_soap_headers;
+    
+    return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL 
+axis2_woden_soap_binding_fault_exts_get_soap_fault_code(
+        void *binding_fault_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+    axis2_woden_qname_or_token_any_attr_t *code = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_exts_impl = INTF_TO_IMPL(binding_fault_exts);
+
+    /* qname_or_token_any_attr is the class registered for this extension attribute. Use this type 
+     * here, to gaurantee that if the code contains an 
+     * xs:token it is of type #any.
+     */
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_fault_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_attr_extensible(parent_element, 
+            env);
+    binding_fault_exts_impl->qname = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_CODE);
+    code = (axis2_woden_qname_or_token_any_attr_t *) 
+        AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(parent_element, env, binding_fault_exts_impl->qname); 
+    if(NULL == code)
+    {
+        /* defaults to xs:token #any if the attribute is omitted from the WSDL.*/
+        return axis2_woden_soap_fault_code_get_soap_fault_code_any(env);
+    }
+    if(AXIS2_TRUE == AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_IS_TOKEN(code, env))
+    {
+        return axis2_woden_soap_fault_code_get_soap_fault_code_any(env);
+    }
+    if(AXIS2_TRUE == AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_IS_QNAME(code, env))
+    {
+        return axis2_woden_soap_fault_code_create(env, NULL, 
+                AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_GET_QNAME(code, env));
+    }
+    else
+    {
+        /* the wsoap:code attribute contains an invalid value (i.e. not an 
+         * xs:QName or the xs:token #any)
+         * TODO confirm if this should be represented in the Component model 
+         * as a NULL
+         */
+        return NULL;
+    }
+}
+
+void *AXIS2_CALL 
+axis2_woden_soap_binding_fault_exts_get_soap_fault_subcodes(
+        void *binding_fault_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+    axis2_woden_qname_list_or_token_any_attr_t *subcodes = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_exts_impl = INTF_TO_IMPL(binding_fault_exts);
+
+    /* qname_or_token_any_attr is the class registered for this extension attribute. Use this type 
+     * here, to gaurantee that if the code contains an 
+     * xs:token it is of type #any.
+     */
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_fault_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_attr_extensible(parent_element, 
+            env);
+    binding_fault_exts_impl->qname = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_SUBCODES);
+    subcodes = (axis2_woden_qname_list_or_token_any_attr_t *) 
+        AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(parent_element, env, binding_fault_exts_impl->qname); 
+    if(NULL == subcodes)
+    {
+        /* defaults to xs:token #any if the attribute is omitted from the WSDL.*/
+        return axis2_woden_soap_fault_subcodes_get_soap_fault_subcodes_any(env);
+    }
+    if(AXIS2_TRUE == AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_IS_TOKEN(subcodes, env))
+    {
+        return axis2_woden_soap_fault_subcodes_get_soap_fault_subcodes_any(env);
+    }
+    if(AXIS2_TRUE == AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_IS_QNAME_LIST(subcodes, 
+                env))
+    {
+        return axis2_woden_soap_fault_subcodes_create(env, NULL, 
+                AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_GET_QNAMES(subcodes, env));
+    }
+    else
+    {
+        /* the wsoap:subcodes attribute contains an invalid value (i.e. not an 
+         * list of xs:QName or the xs:token #any)
+         * TODO confirm if this should be represented in the Component model 
+         * as a NULL
+         */
+        return NULL;
+    }
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_fault_exts_get_soap_modules(
+        void *binding_fault_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+    axis2_array_list_t *soap_mods = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_exts_impl = INTF_TO_IMPL(binding_fault_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_fault_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_element_extensible(parent_element, 
+            env);
+    binding_fault_exts_impl->qname = axis2_qname_create_from_string(env, 
+            WODEN_Q_ELEM_SOAP_MODULE);
+    soap_mods = AXIS2_WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS_OF_TYPE(
+            parent_element, env, binding_fault_exts_impl->qname); 
+
+    return soap_mods;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_fault_exts_get_soap_headers(
+        void *binding_fault_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+    axis2_array_list_t *soap_headers = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_exts_impl = INTF_TO_IMPL(binding_fault_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_fault_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_element_extensible(parent_element, 
+            env);
+    binding_fault_exts_impl->qname = axis2_qname_create_from_string(env, 
+            WODEN_Q_ELEM_SOAP_HEADER);
+    soap_headers = AXIS2_WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS_OF_TYPE(
+            parent_element, env, binding_fault_exts_impl->qname); 
+
+    return soap_headers;
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_fault_ref_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_fault_ref_exts.c?rev=410764&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_fault_ref_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_fault_ref_exts.c Wed May 31 22:49:28 2006
@@ -0,0 +1,340 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/extensions/soap/axis2_woden_soap_binding_fault_ref_exts.h>
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
+#include <woden/wsdl20/xml/axis2_woden_wsdl_element.h>
+#include <woden/xml/axis2_woden_string_attr.h>
+#include <woden/xml/axis2_woden_qname_or_token_any_attr.h>
+#include <woden/xml/axis2_woden_qname_list_or_token_any_attr.h>
+#include "axis2_woden_soap_constants.h"
+
+typedef struct axis2_woden_soap_binding_fault_ref_exts_impl axis2_woden_soap_binding_fault_ref_exts_impl_t;
+
+/** 
+ * @brief Soap Binding Fault Reference Extensions Struct Impl
+ *	Axis2 Soap Binding Fault Reference Extensions  
+ */ 
+struct axis2_woden_soap_binding_fault_ref_exts_impl
+{
+    axis2_woden_soap_binding_fault_ref_exts_t binding_fault_ref_exts;
+    axis2_woden_component_exts_t *component_exts;
+    axis2_hash_t *methods;
+    axis2_hash_t *super;
+    axis2_woden_obj_types_t obj_type;
+    
+    axis2_qname_t *qname;
+};
+
+#define INTF_TO_IMPL(binding_fault_ref_exts) ((axis2_woden_soap_binding_fault_ref_exts_impl_t *) binding_fault_ref_exts)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_soap_binding_fault_ref_exts_free(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_soap_binding_fault_ref_exts_super_objs(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL 
+axis2_woden_soap_binding_fault_ref_exts_type(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env);
+
+axis2_woden_component_exts_t *AXIS2_CALL
+axis2_woden_soap_binding_fault_ref_exts_get_base_impl(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_fault_ref_exts_get_soap_modules(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env);
+
+static axis2_woden_soap_binding_fault_ref_exts_t *
+create(
+        axis2_env_t **env);
+
+static axis2_status_t
+axis2_woden_soap_binding_fault_ref_exts_free_ops(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_soap_binding_fault_ref_exts_t *)
+axis2_woden_soap_binding_fault_ref_exts_to_component_exts(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!binding_fault_ref_exts)
+    {
+        binding_fault_ref_exts_impl = (axis2_woden_soap_binding_fault_ref_exts_impl_t *) create(env);
+    }
+    else
+        binding_fault_ref_exts_impl = (axis2_woden_soap_binding_fault_ref_exts_impl_t *) binding_fault_ref_exts;
+    axis2_woden_soap_binding_fault_ref_exts_free_ops(binding_fault_ref_exts, env);
+
+    binding_fault_ref_exts_impl->binding_fault_ref_exts.component_exts.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_component_exts_ops_t));
+    axis2_woden_component_exts_resolve_methods(&(binding_fault_ref_exts_impl->binding_fault_ref_exts.
+            component_exts), env, binding_fault_ref_exts_impl->methods);
+    return binding_fault_ref_exts;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_soap_binding_fault_ref_exts_t *
+create(axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_ref_exts_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_soap_binding_fault_ref_exts_impl_t));
+
+    binding_fault_ref_exts_impl->obj_type= AXIS2_WODEN_SOAP_BINDING_FAULT_REF_EXTS;
+    binding_fault_ref_exts_impl->super = NULL;
+    binding_fault_ref_exts_impl->methods = NULL;
+
+    binding_fault_ref_exts_impl->component_exts = NULL;
+    binding_fault_ref_exts_impl->qname = NULL;
+    
+    binding_fault_ref_exts_impl->binding_fault_ref_exts.component_exts.ops = NULL;
+    
+    binding_fault_ref_exts_impl->binding_fault_ref_exts.ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_soap_binding_fault_ref_exts_ops_t));
+
+    binding_fault_ref_exts_impl->binding_fault_ref_exts.ops->free = axis2_woden_soap_binding_fault_ref_exts_free;
+    binding_fault_ref_exts_impl->binding_fault_ref_exts.ops->super_objs = 
+        axis2_woden_soap_binding_fault_ref_exts_super_objs;
+    binding_fault_ref_exts_impl->binding_fault_ref_exts.ops->type = 
+        axis2_woden_soap_binding_fault_ref_exts_type;
+    binding_fault_ref_exts_impl->binding_fault_ref_exts.ops->get_base_impl = 
+        axis2_woden_soap_binding_fault_ref_exts_get_base_impl;
+    
+    binding_fault_ref_exts_impl->binding_fault_ref_exts.ops->get_soap_modules = 
+        axis2_woden_soap_binding_fault_ref_exts_get_soap_modules;
+ 
+    binding_fault_ref_exts_impl->methods = axis2_hash_make(env);
+    if(!binding_fault_ref_exts_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_fault_ref_exts_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_fault_ref_exts_free);
+    axis2_hash_set(binding_fault_ref_exts_impl->methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_soap_binding_fault_ref_exts_super_objs);
+    axis2_hash_set(binding_fault_ref_exts_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_soap_binding_fault_ref_exts_type);
+
+    axis2_hash_set(binding_fault_ref_exts_impl->methods, "get_modules", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_fault_ref_exts_get_soap_modules);
+
+    return &(binding_fault_ref_exts_impl->binding_fault_ref_exts);
+}
+
+AXIS2_DECLARE(axis2_woden_soap_binding_fault_ref_exts_t *)
+axis2_woden_soap_binding_fault_ref_exts_create(axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_ref_exts_impl = (axis2_woden_soap_binding_fault_ref_exts_impl_t *) create(env);
+
+    binding_fault_ref_exts_impl->component_exts = axis2_woden_component_exts_create(env);
+
+    binding_fault_ref_exts_impl->super = axis2_hash_make(env);
+    if(!binding_fault_ref_exts_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_fault_ref_exts_impl->super, "AXIS2_WODEN_SOAP_BINDING_FAULT_REF_EXTS", AXIS2_HASH_KEY_STRING, 
+            &(binding_fault_ref_exts_impl->binding_fault_ref_exts));
+    axis2_hash_set(binding_fault_ref_exts_impl->super, "AXIS2_WODEN_COMPONENT_EXTS", AXIS2_HASH_KEY_STRING, 
+            binding_fault_ref_exts_impl->component_exts);
+ 
+    return &(binding_fault_ref_exts_impl->binding_fault_ref_exts);
+}
+
+static axis2_status_t
+axis2_woden_soap_binding_fault_ref_exts_free_ops(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_ref_exts_impl = INTF_TO_IMPL(binding_fault_ref_exts);
+
+    if(binding_fault_ref_exts_impl->binding_fault_ref_exts.component_exts.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_fault_ref_exts_impl->binding_fault_ref_exts.
+                component_exts.ops);
+        binding_fault_ref_exts_impl->binding_fault_ref_exts.component_exts.ops = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_woden_soap_binding_fault_ref_exts_free(void *binding_fault_ref_exts,
+                        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_ref_exts_impl = INTF_TO_IMPL(binding_fault_ref_exts);
+
+    if(binding_fault_ref_exts_impl->super)
+    {
+        axis2_hash_free(binding_fault_ref_exts_impl->super, env);
+        binding_fault_ref_exts_impl->super = NULL;
+    }
+    
+    if(binding_fault_ref_exts_impl->methods)
+    {
+        axis2_hash_free(binding_fault_ref_exts_impl->methods, env);
+        binding_fault_ref_exts_impl->methods = NULL;
+    }
+
+    if(binding_fault_ref_exts_impl->component_exts)
+    {
+        AXIS2_WODEN_COMPONENT_EXTS_FREE(binding_fault_ref_exts_impl->component_exts, env);
+        binding_fault_ref_exts_impl->component_exts = NULL;
+    }
+
+    if(binding_fault_ref_exts_impl->qname)
+    {
+        AXIS2_QNAME_FREE(binding_fault_ref_exts_impl->qname, env);
+        binding_fault_ref_exts_impl->qname = NULL;
+    }
+    axis2_woden_soap_binding_fault_ref_exts_free_ops(binding_fault_ref_exts, env);
+
+    if((&(binding_fault_ref_exts_impl->binding_fault_ref_exts))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(binding_fault_ref_exts_impl->binding_fault_ref_exts))->ops);
+        (&(binding_fault_ref_exts_impl->binding_fault_ref_exts))->ops = NULL;
+    }
+    
+    if(binding_fault_ref_exts_impl)
+    {
+        AXIS2_FREE((*env)->allocator, binding_fault_ref_exts_impl);
+        binding_fault_ref_exts_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_soap_binding_fault_ref_exts_super_objs(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_ref_exts_impl = INTF_TO_IMPL(binding_fault_ref_exts);
+
+    return binding_fault_ref_exts_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_soap_binding_fault_ref_exts_type(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_ref_exts_impl = INTF_TO_IMPL(binding_fault_ref_exts);
+
+    return binding_fault_ref_exts_impl->obj_type;
+}
+
+axis2_woden_component_exts_t *AXIS2_CALL
+axis2_woden_soap_binding_fault_ref_exts_get_base_impl(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    binding_fault_ref_exts_impl = INTF_TO_IMPL(binding_fault_ref_exts);
+
+    return binding_fault_ref_exts_impl->component_exts;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_soap_binding_fault_ref_exts_resolve_methods(
+        axis2_woden_soap_binding_fault_ref_exts_t *binding_fault_ref_exts,
+        axis2_env_t **env,
+        axis2_woden_soap_binding_fault_ref_exts_t *binding_fault_ref_exts_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    binding_fault_ref_exts_impl_l = INTF_TO_IMPL(binding_fault_ref_exts_impl);
+    
+    binding_fault_ref_exts->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    binding_fault_ref_exts->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    binding_fault_ref_exts->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    binding_fault_ref_exts->ops->get_soap_modules = axis2_hash_get(methods, 
+            "get_soap_modules", AXIS2_HASH_KEY_STRING);
+    if(!binding_fault_ref_exts->ops->get_soap_modules && binding_fault_ref_exts_impl_l)
+            binding_fault_ref_exts->ops->get_soap_modules = 
+            binding_fault_ref_exts_impl_l->binding_fault_ref_exts.ops->get_soap_modules;
+    
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_fault_ref_exts_get_soap_modules(
+        void *binding_fault_ref_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+    axis2_array_list_t *soap_mods = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_fault_ref_exts_impl = INTF_TO_IMPL(binding_fault_ref_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_fault_ref_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_element_extensible(parent_element, 
+            env);
+    binding_fault_ref_exts_impl->qname = axis2_qname_create_from_string(env, 
+            WODEN_Q_ELEM_SOAP_MODULE);
+    soap_mods = AXIS2_WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS_OF_TYPE(
+            parent_element, env, binding_fault_ref_exts_impl->qname); 
+
+    return soap_mods;
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_msg_ref_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_msg_ref_exts.c?rev=410764&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_msg_ref_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_msg_ref_exts.c Wed May 31 22:49:28 2006
@@ -0,0 +1,380 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/extensions/soap/axis2_woden_soap_binding_msg_ref_exts.h>
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
+#include <woden/wsdl20/xml/axis2_woden_wsdl_element.h>
+#include <woden/xml/axis2_woden_string_attr.h>
+#include <woden/xml/axis2_woden_qname_or_token_any_attr.h>
+#include <woden/xml/axis2_woden_qname_list_or_token_any_attr.h>
+#include "axis2_woden_soap_constants.h"
+
+typedef struct axis2_woden_soap_binding_msg_ref_exts_impl axis2_woden_soap_binding_msg_ref_exts_impl_t;
+
+/** 
+ * @brief Soap Binding Message Reference Extensions Struct Impl
+ *	Axis2 Soap Binding Message Reference Extensions  
+ */ 
+struct axis2_woden_soap_binding_msg_ref_exts_impl
+{
+    axis2_woden_soap_binding_msg_ref_exts_t binding_msg_ref_exts;
+    axis2_woden_component_exts_t *component_exts;
+    axis2_hash_t *methods;
+    axis2_hash_t *super;
+    axis2_woden_obj_types_t obj_type;
+    
+    axis2_qname_t *qname;
+};
+
+#define INTF_TO_IMPL(binding_msg_ref_exts) ((axis2_woden_soap_binding_msg_ref_exts_impl_t *) binding_msg_ref_exts)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_soap_binding_msg_ref_exts_free(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_soap_binding_msg_ref_exts_super_objs(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL 
+axis2_woden_soap_binding_msg_ref_exts_type(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env);
+
+axis2_woden_component_exts_t *AXIS2_CALL
+axis2_woden_soap_binding_msg_ref_exts_get_base_impl(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_msg_ref_exts_get_soap_modules(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_msg_ref_exts_get_soap_headers(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env);
+
+static axis2_woden_soap_binding_msg_ref_exts_t *
+create(
+        axis2_env_t **env);
+
+static axis2_status_t
+axis2_woden_soap_binding_msg_ref_exts_free_ops(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_soap_binding_msg_ref_exts_t *)
+axis2_woden_soap_binding_msg_ref_exts_to_component_exts(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_msg_ref_exts_impl_t *binding_msg_ref_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!binding_msg_ref_exts)
+    {
+        binding_msg_ref_exts_impl = (axis2_woden_soap_binding_msg_ref_exts_impl_t *) create(env);
+    }
+    else
+        binding_msg_ref_exts_impl = (axis2_woden_soap_binding_msg_ref_exts_impl_t *) binding_msg_ref_exts;
+    axis2_woden_soap_binding_msg_ref_exts_free_ops(binding_msg_ref_exts, env);
+
+    binding_msg_ref_exts_impl->binding_msg_ref_exts.component_exts.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_component_exts_ops_t));
+    axis2_woden_component_exts_resolve_methods(&(binding_msg_ref_exts_impl->binding_msg_ref_exts.
+            component_exts), env, binding_msg_ref_exts_impl->methods);
+    return binding_msg_ref_exts;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_soap_binding_msg_ref_exts_t *
+create(axis2_env_t **env)
+{
+    axis2_woden_soap_binding_msg_ref_exts_impl_t *binding_msg_ref_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_msg_ref_exts_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_soap_binding_msg_ref_exts_impl_t));
+
+    binding_msg_ref_exts_impl->obj_type= AXIS2_WODEN_SOAP_BINDING_MSG_REF_EXTS;
+    binding_msg_ref_exts_impl->super = NULL;
+    binding_msg_ref_exts_impl->methods = NULL;
+
+    binding_msg_ref_exts_impl->component_exts = NULL;
+    binding_msg_ref_exts_impl->qname = NULL;
+    
+    binding_msg_ref_exts_impl->binding_msg_ref_exts.component_exts.ops = NULL;
+    
+    binding_msg_ref_exts_impl->binding_msg_ref_exts.ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_soap_binding_msg_ref_exts_ops_t));
+
+    binding_msg_ref_exts_impl->binding_msg_ref_exts.ops->free = axis2_woden_soap_binding_msg_ref_exts_free;
+    binding_msg_ref_exts_impl->binding_msg_ref_exts.ops->super_objs = 
+        axis2_woden_soap_binding_msg_ref_exts_super_objs;
+    binding_msg_ref_exts_impl->binding_msg_ref_exts.ops->type = 
+        axis2_woden_soap_binding_msg_ref_exts_type;
+    binding_msg_ref_exts_impl->binding_msg_ref_exts.ops->get_base_impl = 
+        axis2_woden_soap_binding_msg_ref_exts_get_base_impl;
+    
+    binding_msg_ref_exts_impl->binding_msg_ref_exts.ops->get_soap_modules = 
+        axis2_woden_soap_binding_msg_ref_exts_get_soap_modules;
+    binding_msg_ref_exts_impl->binding_msg_ref_exts.ops->get_soap_headers = 
+        axis2_woden_soap_binding_msg_ref_exts_get_soap_headers;
+ 
+    binding_msg_ref_exts_impl->methods = axis2_hash_make(env);
+    if(!binding_msg_ref_exts_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_msg_ref_exts_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_msg_ref_exts_free);
+    axis2_hash_set(binding_msg_ref_exts_impl->methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_soap_binding_msg_ref_exts_super_objs);
+    axis2_hash_set(binding_msg_ref_exts_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_soap_binding_msg_ref_exts_type);
+
+    axis2_hash_set(binding_msg_ref_exts_impl->methods, "get_modules", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_msg_ref_exts_get_soap_modules);
+    axis2_hash_set(binding_msg_ref_exts_impl->methods, "get_soap_headers", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_msg_ref_exts_get_soap_headers);
+
+    return &(binding_msg_ref_exts_impl->binding_msg_ref_exts);
+}
+
+AXIS2_DECLARE(axis2_woden_soap_binding_msg_ref_exts_t *)
+axis2_woden_soap_binding_msg_ref_exts_create(axis2_env_t **env)
+{
+    axis2_woden_soap_binding_msg_ref_exts_impl_t *binding_msg_ref_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_msg_ref_exts_impl = (axis2_woden_soap_binding_msg_ref_exts_impl_t *) create(env);
+
+    binding_msg_ref_exts_impl->component_exts = axis2_woden_component_exts_create(env);
+
+    binding_msg_ref_exts_impl->super = axis2_hash_make(env);
+    if(!binding_msg_ref_exts_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_msg_ref_exts_impl->super, "AXIS2_WODEN_SOAP_BINDING_MSG_REF_EXTS", AXIS2_HASH_KEY_STRING, 
+            &(binding_msg_ref_exts_impl->binding_msg_ref_exts));
+    axis2_hash_set(binding_msg_ref_exts_impl->super, "AXIS2_WODEN_COMPONENT_EXTS", AXIS2_HASH_KEY_STRING, 
+            binding_msg_ref_exts_impl->component_exts);
+ 
+    return &(binding_msg_ref_exts_impl->binding_msg_ref_exts);
+}
+
+static axis2_status_t
+axis2_woden_soap_binding_msg_ref_exts_free_ops(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_msg_ref_exts_impl_t *binding_msg_ref_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_msg_ref_exts_impl = INTF_TO_IMPL(binding_msg_ref_exts);
+
+    if(binding_msg_ref_exts_impl->binding_msg_ref_exts.component_exts.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_msg_ref_exts_impl->binding_msg_ref_exts.
+                component_exts.ops);
+        binding_msg_ref_exts_impl->binding_msg_ref_exts.component_exts.ops = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_woden_soap_binding_msg_ref_exts_free(void *binding_msg_ref_exts,
+                        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_msg_ref_exts_impl_t *binding_msg_ref_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_msg_ref_exts_impl = INTF_TO_IMPL(binding_msg_ref_exts);
+
+    if(binding_msg_ref_exts_impl->super)
+    {
+        axis2_hash_free(binding_msg_ref_exts_impl->super, env);
+        binding_msg_ref_exts_impl->super = NULL;
+    }
+    
+    if(binding_msg_ref_exts_impl->methods)
+    {
+        axis2_hash_free(binding_msg_ref_exts_impl->methods, env);
+        binding_msg_ref_exts_impl->methods = NULL;
+    }
+
+    if(binding_msg_ref_exts_impl->component_exts)
+    {
+        AXIS2_WODEN_COMPONENT_EXTS_FREE(binding_msg_ref_exts_impl->component_exts, env);
+        binding_msg_ref_exts_impl->component_exts = NULL;
+    }
+
+    if(binding_msg_ref_exts_impl->qname)
+    {
+        AXIS2_QNAME_FREE(binding_msg_ref_exts_impl->qname, env);
+        binding_msg_ref_exts_impl->qname = NULL;
+    }
+    axis2_woden_soap_binding_msg_ref_exts_free_ops(binding_msg_ref_exts, env);
+
+    if((&(binding_msg_ref_exts_impl->binding_msg_ref_exts))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(binding_msg_ref_exts_impl->binding_msg_ref_exts))->ops);
+        (&(binding_msg_ref_exts_impl->binding_msg_ref_exts))->ops = NULL;
+    }
+    
+    if(binding_msg_ref_exts_impl)
+    {
+        AXIS2_FREE((*env)->allocator, binding_msg_ref_exts_impl);
+        binding_msg_ref_exts_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_soap_binding_msg_ref_exts_super_objs(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_msg_ref_exts_impl_t *binding_msg_ref_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_msg_ref_exts_impl = INTF_TO_IMPL(binding_msg_ref_exts);
+
+    return binding_msg_ref_exts_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_soap_binding_msg_ref_exts_type(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_msg_ref_exts_impl_t *binding_msg_ref_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_msg_ref_exts_impl = INTF_TO_IMPL(binding_msg_ref_exts);
+
+    return binding_msg_ref_exts_impl->obj_type;
+}
+
+axis2_woden_component_exts_t *AXIS2_CALL
+axis2_woden_soap_binding_msg_ref_exts_get_base_impl(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_msg_ref_exts_impl_t *binding_msg_ref_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    binding_msg_ref_exts_impl = INTF_TO_IMPL(binding_msg_ref_exts);
+
+    return binding_msg_ref_exts_impl->component_exts;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_soap_binding_msg_ref_exts_resolve_methods(
+        axis2_woden_soap_binding_msg_ref_exts_t *binding_msg_ref_exts,
+        axis2_env_t **env,
+        axis2_woden_soap_binding_msg_ref_exts_t *binding_msg_ref_exts_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_soap_binding_msg_ref_exts_impl_t *binding_msg_ref_exts_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    binding_msg_ref_exts_impl_l = INTF_TO_IMPL(binding_msg_ref_exts_impl);
+    
+    binding_msg_ref_exts->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    binding_msg_ref_exts->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    binding_msg_ref_exts->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    binding_msg_ref_exts->ops->get_soap_modules = axis2_hash_get(methods, 
+            "get_soap_modules", AXIS2_HASH_KEY_STRING);
+    if(!binding_msg_ref_exts->ops->get_soap_modules && binding_msg_ref_exts_impl_l)
+            binding_msg_ref_exts->ops->get_soap_modules = 
+            binding_msg_ref_exts_impl_l->binding_msg_ref_exts.ops->get_soap_modules;
+    
+    binding_msg_ref_exts->ops->get_soap_headers = axis2_hash_get(methods, 
+            "get_soap_headers", AXIS2_HASH_KEY_STRING);
+    if(!binding_msg_ref_exts->ops->get_soap_headers && binding_msg_ref_exts_impl_l)
+            binding_msg_ref_exts->ops->get_soap_headers = 
+            binding_msg_ref_exts_impl_l->binding_msg_ref_exts.ops->get_soap_headers;
+    
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_msg_ref_exts_get_soap_modules(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_msg_ref_exts_impl_t *binding_msg_ref_exts_impl = NULL;
+    axis2_array_list_t *soap_mods = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_msg_ref_exts_impl = INTF_TO_IMPL(binding_msg_ref_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_msg_ref_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_element_extensible(parent_element, 
+            env);
+    binding_msg_ref_exts_impl->qname = axis2_qname_create_from_string(env, 
+            WODEN_Q_ELEM_SOAP_MODULE);
+    soap_mods = AXIS2_WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS_OF_TYPE(
+            parent_element, env, binding_msg_ref_exts_impl->qname); 
+
+    return soap_mods;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_msg_ref_exts_get_soap_headers(
+        void *binding_msg_ref_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_msg_ref_exts_impl_t *binding_msg_ref_exts_impl = NULL;
+    axis2_array_list_t *soap_headers = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_msg_ref_exts_impl = INTF_TO_IMPL(binding_msg_ref_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_msg_ref_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_element_extensible(parent_element, 
+            env);
+    binding_msg_ref_exts_impl->qname = axis2_qname_create_from_string(env, 
+            WODEN_Q_ELEM_SOAP_HEADER);
+    soap_headers = AXIS2_WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS_OF_TYPE(
+            parent_element, env, binding_msg_ref_exts_impl->qname); 
+
+    return soap_headers;
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_op_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_op_exts.c?rev=410764&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_op_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/soap/soap_binding_op_exts.c Wed May 31 22:49:28 2006
@@ -0,0 +1,399 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/extensions/soap/axis2_woden_soap_binding_op_exts.h>
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
+#include <woden/wsdl20/xml/axis2_woden_wsdl_element.h>
+#include <woden/xml/axis2_woden_string_attr.h>
+#include <woden/xml/axis2_woden_qname_or_token_any_attr.h>
+#include <woden/xml/axis2_woden_qname_list_or_token_any_attr.h>
+#include <woden/xml/axis2_woden_uri_attr.h>
+#include "axis2_woden_soap_constants.h"
+
+typedef struct axis2_woden_soap_binding_op_exts_impl axis2_woden_soap_binding_op_exts_impl_t;
+
+/** 
+ * @brief Soap Binding Operation Extensions Struct Impl
+ *	Axis2 Soap Binding Operation Extensions  
+ */ 
+struct axis2_woden_soap_binding_op_exts_impl
+{
+    axis2_woden_soap_binding_op_exts_t binding_op_exts;
+    axis2_woden_component_exts_t *component_exts;
+    axis2_hash_t *methods;
+    axis2_hash_t *super;
+    axis2_woden_obj_types_t obj_type;
+    
+    axis2_qname_t *qname;
+};
+
+#define INTF_TO_IMPL(binding_op_exts) ((axis2_woden_soap_binding_op_exts_impl_t *) binding_op_exts)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_soap_binding_op_exts_free(
+        void *binding_op_exts,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_soap_binding_op_exts_super_objs(
+        void *binding_op_exts,
+        axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL 
+axis2_woden_soap_binding_op_exts_type(
+        void *binding_op_exts,
+        axis2_env_t **env);
+
+axis2_woden_component_exts_t *AXIS2_CALL
+axis2_woden_soap_binding_op_exts_get_base_impl(
+        void *binding_op_exts,
+        axis2_env_t **env);
+
+axis2_url_t *AXIS2_CALL 
+axis2_woden_soap_binding_op_exts_get_soap_mep(
+        void *binding_op_exts,
+        axis2_env_t **env);
+
+axis2_url_t *AXIS2_CALL 
+axis2_woden_soap_binding_op_exts_get_soap_action(
+        void *binding_op_exts,
+        axis2_env_t **env); 
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_op_exts_get_soap_modules(
+        void *binding_op_exts,
+        axis2_env_t **env);
+
+static axis2_woden_soap_binding_op_exts_t *
+create(
+        axis2_env_t **env);
+
+static axis2_status_t
+axis2_woden_soap_binding_op_exts_free_ops(
+        void *binding_op_exts,
+        axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_soap_binding_op_exts_t *)
+axis2_woden_soap_binding_op_exts_to_component_exts(
+        void *binding_op_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!binding_op_exts)
+    {
+        binding_op_exts_impl = (axis2_woden_soap_binding_op_exts_impl_t *) create(env);
+    }
+    else
+        binding_op_exts_impl = (axis2_woden_soap_binding_op_exts_impl_t *) binding_op_exts;
+    axis2_woden_soap_binding_op_exts_free_ops(binding_op_exts, env);
+
+    binding_op_exts_impl->binding_op_exts.component_exts.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_component_exts_ops_t));
+    axis2_woden_component_exts_resolve_methods(&(binding_op_exts_impl->binding_op_exts.
+            component_exts), env, binding_op_exts_impl->methods);
+    return binding_op_exts;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_soap_binding_op_exts_t *
+create(axis2_env_t **env)
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_op_exts_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_soap_binding_op_exts_impl_t));
+
+    binding_op_exts_impl->obj_type= AXIS2_WODEN_SOAP_BINDING_OP_EXTS;
+    binding_op_exts_impl->super = NULL;
+    binding_op_exts_impl->methods = NULL;
+
+    binding_op_exts_impl->component_exts = NULL;
+    binding_op_exts_impl->qname = NULL;
+    
+    binding_op_exts_impl->binding_op_exts.component_exts.ops = NULL;
+    
+    binding_op_exts_impl->binding_op_exts.ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_soap_binding_op_exts_ops_t));
+
+    binding_op_exts_impl->binding_op_exts.ops->free = axis2_woden_soap_binding_op_exts_free;
+    binding_op_exts_impl->binding_op_exts.ops->super_objs = 
+        axis2_woden_soap_binding_op_exts_super_objs;
+    binding_op_exts_impl->binding_op_exts.ops->type = 
+        axis2_woden_soap_binding_op_exts_type;
+    binding_op_exts_impl->binding_op_exts.ops->get_base_impl = 
+        axis2_woden_soap_binding_op_exts_get_base_impl;
+    
+    binding_op_exts_impl->binding_op_exts.ops->get_soap_modules = 
+        axis2_woden_soap_binding_op_exts_get_soap_modules;
+ 
+    binding_op_exts_impl->methods = axis2_hash_make(env);
+    if(!binding_op_exts_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_op_exts_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_op_exts_free);
+    axis2_hash_set(binding_op_exts_impl->methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_soap_binding_op_exts_super_objs);
+    axis2_hash_set(binding_op_exts_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_soap_binding_op_exts_type);
+
+    axis2_hash_set(binding_op_exts_impl->methods, "get_modules", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_soap_binding_op_exts_get_soap_modules);
+
+    return &(binding_op_exts_impl->binding_op_exts);
+}
+
+AXIS2_DECLARE(axis2_woden_soap_binding_op_exts_t *)
+axis2_woden_soap_binding_op_exts_create(axis2_env_t **env)
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_op_exts_impl = (axis2_woden_soap_binding_op_exts_impl_t *) create(env);
+
+    binding_op_exts_impl->component_exts = axis2_woden_component_exts_create(env);
+
+    binding_op_exts_impl->super = axis2_hash_make(env);
+    if(!binding_op_exts_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(binding_op_exts_impl->super, "AXIS2_WODEN_SOAP_BINDING_OP_EXTS", AXIS2_HASH_KEY_STRING, 
+            &(binding_op_exts_impl->binding_op_exts));
+    axis2_hash_set(binding_op_exts_impl->super, "AXIS2_WODEN_COMPONENT_EXTS", AXIS2_HASH_KEY_STRING, 
+            binding_op_exts_impl->component_exts);
+ 
+    return &(binding_op_exts_impl->binding_op_exts);
+}
+
+static axis2_status_t
+axis2_woden_soap_binding_op_exts_free_ops(
+        void *binding_op_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_op_exts_impl = INTF_TO_IMPL(binding_op_exts);
+
+    if(binding_op_exts_impl->binding_op_exts.component_exts.ops)
+    {
+        AXIS2_FREE((*env)->allocator, binding_op_exts_impl->binding_op_exts.
+                component_exts.ops);
+        binding_op_exts_impl->binding_op_exts.component_exts.ops = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_woden_soap_binding_op_exts_free(void *binding_op_exts,
+                        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_op_exts_impl = INTF_TO_IMPL(binding_op_exts);
+
+    if(binding_op_exts_impl->super)
+    {
+        axis2_hash_free(binding_op_exts_impl->super, env);
+        binding_op_exts_impl->super = NULL;
+    }
+    
+    if(binding_op_exts_impl->methods)
+    {
+        axis2_hash_free(binding_op_exts_impl->methods, env);
+        binding_op_exts_impl->methods = NULL;
+    }
+
+    if(binding_op_exts_impl->component_exts)
+    {
+        AXIS2_WODEN_COMPONENT_EXTS_FREE(binding_op_exts_impl->component_exts, env);
+        binding_op_exts_impl->component_exts = NULL;
+    }
+
+    if(binding_op_exts_impl->qname)
+    {
+        AXIS2_QNAME_FREE(binding_op_exts_impl->qname, env);
+        binding_op_exts_impl->qname = NULL;
+    }
+    axis2_woden_soap_binding_op_exts_free_ops(binding_op_exts, env);
+
+    if((&(binding_op_exts_impl->binding_op_exts))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(binding_op_exts_impl->binding_op_exts))->ops);
+        (&(binding_op_exts_impl->binding_op_exts))->ops = NULL;
+    }
+    
+    if(binding_op_exts_impl)
+    {
+        AXIS2_FREE((*env)->allocator, binding_op_exts_impl);
+        binding_op_exts_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_soap_binding_op_exts_super_objs(
+        void *binding_op_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_op_exts_impl = INTF_TO_IMPL(binding_op_exts);
+
+    return binding_op_exts_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_soap_binding_op_exts_type(
+        void *binding_op_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_op_exts_impl = INTF_TO_IMPL(binding_op_exts);
+
+    return binding_op_exts_impl->obj_type;
+}
+
+axis2_woden_component_exts_t *AXIS2_CALL
+axis2_woden_soap_binding_op_exts_get_base_impl(
+        void *binding_op_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    binding_op_exts_impl = INTF_TO_IMPL(binding_op_exts);
+
+    return binding_op_exts_impl->component_exts;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_soap_binding_op_exts_resolve_methods(
+        axis2_woden_soap_binding_op_exts_t *binding_op_exts,
+        axis2_env_t **env,
+        axis2_woden_soap_binding_op_exts_t *binding_op_exts_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    binding_op_exts_impl_l = INTF_TO_IMPL(binding_op_exts_impl);
+    
+    binding_op_exts->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    binding_op_exts->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    binding_op_exts->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    binding_op_exts->ops->get_soap_modules = axis2_hash_get(methods, 
+            "get_soap_modules", AXIS2_HASH_KEY_STRING);
+    if(!binding_op_exts->ops->get_soap_modules && binding_op_exts_impl_l)
+            binding_op_exts->ops->get_soap_modules = 
+            binding_op_exts_impl_l->binding_op_exts.ops->get_soap_modules;
+    
+    return AXIS2_SUCCESS;
+}
+
+axis2_url_t *AXIS2_CALL 
+axis2_woden_soap_binding_op_exts_get_soap_mep(
+        void *binding_op_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl = NULL;
+    axis2_woden_uri_attr_t *mep = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_op_exts_impl = INTF_TO_IMPL(binding_op_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_op_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_attr_extensible(parent_element, 
+            env);
+    binding_op_exts_impl->qname = axis2_qname_create_from_string(env, 
+            WODEN_Q_ATTR_SOAP_MEP);
+    mep = AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(
+            parent_element, env, binding_op_exts_impl->qname); 
+
+    return mep != NULL ? AXIS2_WODEN_URI_ATTR_GET_URI(mep, env) : NULL;
+}
+
+axis2_url_t *AXIS2_CALL 
+axis2_woden_soap_binding_op_exts_get_soap_action(
+        void *binding_op_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl = NULL;
+    axis2_woden_uri_attr_t *action = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_op_exts_impl = INTF_TO_IMPL(binding_op_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_op_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_attr_extensible(parent_element, 
+            env);
+    binding_op_exts_impl->qname = axis2_qname_create_from_string(env, 
+            WODEN_Q_ATTR_SOAP_MEP);
+    action = AXIS2_WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(
+            parent_element, env, binding_op_exts_impl->qname); 
+
+    return action != NULL ? AXIS2_WODEN_URI_ATTR_GET_URI(action, env) : NULL;
+}
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_soap_binding_op_exts_get_soap_modules(
+        void *binding_op_exts,
+        axis2_env_t **env) 
+{
+    axis2_woden_soap_binding_op_exts_impl_t *binding_op_exts_impl = NULL;
+    axis2_array_list_t *soap_mods = NULL;
+    void *parent_element = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    binding_op_exts_impl = INTF_TO_IMPL(binding_op_exts);
+
+    parent_element = AXIS2_WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+            binding_op_exts_impl->component_exts, env);
+    parent_element = axis2_woden_wsdl_element_to_element_extensible(parent_element, 
+            env);
+    binding_op_exts_impl->qname = axis2_qname_create_from_string(env, 
+            WODEN_Q_ELEM_SOAP_MODULE);
+    soap_mods = AXIS2_WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS_OF_TYPE(
+            parent_element, env, binding_op_exts_impl->qname); 
+
+    return soap_mods;
+}
+



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