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 [28/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/ext_registry.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/ext_registry.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/ext_registry.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/ext_registry.c Wed Jul 5 23:02:19 2006
@@ -0,0 +1,880 @@
+/*
+ * 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_ext_registry.h>
+#include <woden_component_exts.h>
+
+#include <woden_wsdl_element.h>
+
+#include <woden_wsdl10_soap_module_deserializer.h>
+#include <woden_wsdl10_soap_header_block_deserializer.h>
+#include <woden_wsdl10_soap_module.h>
+#include <woden_wsdl10_soap_header_block.h>
+#include <woden_wsdl10_soap_binding_exts.h>
+#include <woden_wsdl10_soap_binding_fault_exts.h>
+#include <woden_wsdl10_soap_binding_op_exts.h>
+#include <woden_wsdl10_soap_binding_fault_ref_exts.h>
+#include <woden_wsdl10_soap_binding_msg_ref_exts.h>
+
+#include "soap/woden_wsdl10_soap_constants.h"
+
+#include <woden_string_attr.h>
+#include <woden_uri_attr.h>
+#include <woden_qname_or_token_any_attr.h>
+#include <woden_qname_list_or_token_any_attr.h>
+#include <axis2_uri.h>
+#include <axis2_hash.h>
+
+typedef struct woden_wsdl10_ext_registry_impl woden_wsdl10_ext_registry_impl_t;
+
+/**
+ * @brief Extension Registry Struct Impl
+ * Axis2 Extension Registry
+ */
+struct woden_wsdl10_ext_registry_impl
+{
+ woden_wsdl10_ext_registry_t registry;
+ /*
+ This is a Map of Maps. The top-level Map is keyed by parent type,
+ and the inner Maps are keyed by element QN.
+ */
+ axis2_hash_t *deserializer_reg;
+ /*
+ This is a Map of Maps. The top-level Map is keyed by parent type,
+ and the inner Maps are keyed by element QN.
+ */
+ axis2_hash_t *ext_element_reg;
+ /*
+ This is a Map of Maps. The top-level Map is keyed by parent type,
+ and the inner Maps are keyed by attr qname.
+ */
+ axis2_hash_t *ext_attr_reg;
+
+ /*
+ * This is a Map of Maps. The top-level Map is keyed by parent component
+ * and the inner Map is keyed by (URI)extension namespace with a value of
+ * component extensions.
+ */
+ axis2_hash_t *comp_ext_reg;
+
+ axis2_array_list_t *key_set;
+
+ woden_string_attr_t *string_attr;
+ woden_uri_attr_t *uri_attr;
+ woden_qname_or_token_any_attr_t *qname_or_token_any_attr;
+ woden_qname_list_or_token_any_attr_t *qname_list_or_token_any_attr;
+ woden_wsdl10_soap_module_deserializer_t *soap_module_deser;
+ woden_wsdl10_soap_module_t *soap_module;
+ woden_wsdl10_soap_header_block_deserializer_t *soap_header_block_deser;
+ woden_wsdl10_soap_header_block_t *soap_header_block;
+ woden_wsdl10_soap_binding_exts_t *soap_binding_ext;
+ woden_wsdl10_soap_binding_fault_exts_t *soap_binding_fault_ext;
+ woden_wsdl10_soap_binding_op_exts_t *soap_binding_op_ext;
+ woden_wsdl10_soap_binding_msg_ref_exts_t *soap_binding_msg_ref_ext;
+ woden_wsdl10_soap_binding_fault_ref_exts_t *soap_binding_fault_ref_ext;
+};
+
+#define INTF_TO_IMPL(registry) ((woden_wsdl10_ext_registry_impl_t *) registry)
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_ext_registry_free(
+ void *registry,
+ const axis2_env_t *envv);
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_ext_registry_register_deserializer(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_type,
+ axis2_qname_t *element_qtype,
+ void *ed);
+
+void *AXIS2_CALL
+woden_wsdl10_ext_registry_query_deserializer(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_type,
+ axis2_qname_t *element_type);
+
+void *AXIS2_CALL
+woden_wsdl10_ext_registry_query_ext_element_type(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_class,
+ axis2_qname_t *elem_qn);
+
+axis2_array_list_t *AXIS2_CALL
+woden_wsdl10_ext_registry_get_allowable_exts(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_type);
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_ext_registry_register_ext_element_type(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_type,
+ axis2_qname_t *element_qtype,
+ void *element);
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_ext_registry_register_ext_attr_type(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *owner_class,
+ axis2_qname_t *attr_qname,
+ void *attr);
+
+void *AXIS2_CALL
+woden_wsdl10_ext_registry_query_ext_attr_type(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_class,
+ axis2_qname_t *attr_qn);
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_ext_registry_register_component_ext(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_class,
+ axis2_uri_t *ext_namespc,
+ void *comp_ext);
+
+void *AXIS2_CALL
+woden_wsdl10_ext_registry_query_component_ext(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_class,
+ axis2_uri_t *ext_namespc);
+
+axis2_array_list_t *AXIS2_CALL
+woden_wsdl10_ext_registry_query_component_ext_namespaces(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_class);
+
+static axis2_status_t
+woden_wsdl10_ext_registry_populate(
+ void *registry,
+ const axis2_env_t *env);
+
+AXIS2_EXTERN woden_wsdl10_ext_registry_t * AXIS2_CALL
+woden_wsdl10_ext_registry_create(
+ const axis2_env_t *env)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ registry_impl = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_wsdl10_ext_registry_impl_t));
+
+ registry_impl->deserializer_reg = NULL;
+ registry_impl->ext_element_reg = NULL;
+ registry_impl->ext_attr_reg = NULL;
+ registry_impl->comp_ext_reg = NULL;
+ registry_impl->key_set = NULL;
+
+ registry_impl->string_attr = NULL;
+ registry_impl->uri_attr = NULL;
+ registry_impl->qname_or_token_any_attr = NULL;
+ registry_impl->qname_list_or_token_any_attr = NULL;
+ registry_impl->soap_module_deser = NULL;
+ registry_impl->soap_module = NULL;
+ registry_impl->soap_header_block_deser = NULL;
+ registry_impl->soap_header_block = NULL;
+ registry_impl->soap_binding_ext = NULL;
+ registry_impl->soap_binding_fault_ext = NULL;
+ registry_impl->soap_binding_op_ext = NULL;
+ registry_impl->soap_binding_msg_ref_ext = NULL;
+ registry_impl->soap_binding_fault_ref_ext = NULL;
+
+ registry_impl->registry.ops = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_wsdl10_ext_registry_ops_t));
+
+ registry_impl->registry.ops->free =
+ woden_wsdl10_ext_registry_free;
+ registry_impl->registry.ops->register_deserializer =
+ woden_wsdl10_ext_registry_register_deserializer;
+ registry_impl->registry.ops->query_deserializer =
+ woden_wsdl10_ext_registry_query_deserializer;
+ registry_impl->registry.ops->query_ext_element_type =
+ woden_wsdl10_ext_registry_query_ext_element_type;
+ registry_impl->registry.ops->get_allowable_exts =
+ woden_wsdl10_ext_registry_get_allowable_exts;
+ registry_impl->registry.ops->register_ext_element_type =
+ woden_wsdl10_ext_registry_register_ext_element_type;
+ registry_impl->registry.ops->register_ext_attr_type =
+ woden_wsdl10_ext_registry_register_ext_attr_type;
+ registry_impl->registry.ops->query_ext_attr_type =
+ woden_wsdl10_ext_registry_query_ext_attr_type;
+ registry_impl->registry.ops->register_component_ext =
+ woden_wsdl10_ext_registry_register_component_ext;
+ registry_impl->registry.ops->query_component_ext =
+ woden_wsdl10_ext_registry_query_component_ext;
+ registry_impl->registry.ops->query_component_ext_namespaces =
+ woden_wsdl10_ext_registry_query_component_ext_namespaces;
+
+ registry_impl->ext_attr_reg = axis2_hash_make(env);
+ if(!registry_impl->ext_attr_reg)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ registry_impl->deserializer_reg = axis2_hash_make(env);
+ if(!registry_impl->deserializer_reg)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ registry_impl->ext_element_reg = axis2_hash_make(env);
+ if(!registry_impl->ext_element_reg)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ registry_impl->comp_ext_reg = axis2_hash_make(env);
+ if(!registry_impl->comp_ext_reg)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ woden_wsdl10_ext_registry_populate(&(registry_impl->registry), env);
+
+ return &(registry_impl->registry);
+}
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_ext_registry_free(
+ void *registry,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ if(registry_impl->deserializer_reg)
+ {
+ /* TODO */
+ }
+
+ if(registry_impl->ext_element_reg)
+ {
+ /* TODO */
+ }
+
+ if(registry_impl->ext_attr_reg)
+ {
+ /* TODO */
+ }
+
+ if(registry_impl->comp_ext_reg)
+ {
+ /* TODO */
+ }
+
+ if((&(registry_impl->registry))->ops)
+ {
+ AXIS2_FREE(env->allocator, (&(registry_impl->registry))->ops);
+ (&(registry_impl->registry))->ops = NULL;
+ }
+
+ if(registry_impl)
+ {
+ AXIS2_FREE(env->allocator, registry_impl);
+ registry_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+/**
+* Declare that the specified deserializer should be used to deserialize
+* all extensibility elements with a qname matching elementQN, when
+* encountered as immediate children of the element represented by the
+* specified parentType.
+*
+* @param parent type a class object indicating where in the WSDL
+* document this extensibility element was encountered. For
+* example, woden_binding would be used to indicate
+* this element was encountered as an immediate child of
+* a <wsdl:binding> element.
+* @param element QN the qname of the extensibility element
+* @param ed the extension deserializer to use
+*
+*/
+axis2_status_t AXIS2_CALL
+woden_wsdl10_ext_registry_register_deserializer(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_type,
+ axis2_qname_t *element_qtype,
+ void *ed)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+ axis2_hash_t *inner_deserializer_reg = NULL;
+ axis2_char_t *element_type = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ inner_deserializer_reg = axis2_hash_get(registry_impl->deserializer_reg,
+ parent_type, AXIS2_HASH_KEY_STRING);
+ if(NULL == inner_deserializer_reg)
+ {
+ inner_deserializer_reg = axis2_hash_make(env);
+ axis2_hash_set(registry_impl->deserializer_reg, parent_type,
+ AXIS2_HASH_KEY_STRING, inner_deserializer_reg);
+ }
+ element_type = AXIS2_QNAME_TO_STRING(element_qtype, env);
+ axis2_hash_set(inner_deserializer_reg, element_type, AXIS2_HASH_KEY_STRING,
+ ed);
+ return AXIS2_SUCCESS;
+}
+
+/**
+* Look up the deserializer for the extensibility element with the
+* qname element QN, which was encountered as an immediate child
+* of the element represented by the specified parentType.
+*
+* @param parent type a class object indicating where in the WSDL
+* document this extensibility element was encountered. For
+* example, woden_binding would be used to indicate
+* this element was encountered as an immediate child of
+* a <wsdl:binding> element.
+* @param element QN the qname of the extensibility element
+*
+* @return the extension deserializer, if one was found. If none was
+* found. TODO Decide what to do if no deserializer found
+*
+*/
+void *AXIS2_CALL
+woden_wsdl10_ext_registry_query_deserializer(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_type,
+ axis2_qname_t *element_type)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+ axis2_hash_t *inner_deserializer_reg = NULL;
+ axis2_char_t *elem_name = NULL;
+ void *ed = NULL;
+ axis2_qname_t *element_qtype = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ inner_deserializer_reg = axis2_hash_get(registry_impl->deserializer_reg,
+ parent_type, AXIS2_HASH_KEY_STRING);
+ /*elem_name = AXIS2_QNAME_TO_STRING(element_type, env); */
+ if(NULL != inner_deserializer_reg)
+ {
+
+ element_qtype = axis2_qname_create_from_string(env,
+ WODEN_Q_ELEM_SOAP_MODULE);
+ elem_name = AXIS2_QNAME_TO_STRING(element_qtype, env);
+ ed = axis2_hash_get(inner_deserializer_reg, elem_name,
+ AXIS2_HASH_KEY_STRING);
+ }
+ ed = woden_wsdl10_soap_module_deserializer_to_ext_deserializer(ed, env);
+ return ed;
+}
+
+/**
+* Look up the type of the extensibility element with the specified qname, which
+* was defined as a child of the element represented by the specified parent class.
+*
+* @param parent type a class object indicating where in the WSDL
+* document this extensibility attribute was encountered. For
+* example, woden_binding would be used to indicate
+* this attribute was defined on a <wsdl:binding> element.
+* @param attr name the qname of the extensibility attribute
+*
+* @return one of the constants defined on the Attribute Extensible class
+*
+*/
+void *AXIS2_CALL
+woden_wsdl10_ext_registry_query_ext_element_type(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_class,
+ axis2_qname_t *elem_qn)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+ axis2_hash_t *inner_ext_element_reg = NULL;
+ /*axis2_char_t *elem_name = NULL;*/
+ void *element = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ inner_ext_element_reg = axis2_hash_get(registry_impl->ext_element_reg,
+ parent_class, AXIS2_HASH_KEY_STRING);
+ /*elem_name = AXIS2_QNAME_TO_STRING(elem_qn, env);*/
+ if(NULL != inner_ext_element_reg)
+ {
+ element = axis2_hash_get(inner_ext_element_reg,
+ WODEN_Q_ELEM_SOAP_MODULE, AXIS2_HASH_KEY_STRING);
+ }
+ return element;
+}
+
+/**
+* Returns a set of QNames representing the extensibility elements
+* that are allowed as children of the specified parent type.
+* Basically, this method returns the keys associated with the set
+* of extension deserializers registered for this parent type.
+* Returns null if no extension deserializers are registered for
+* this parent type.
+*/
+axis2_array_list_t *AXIS2_CALL
+woden_wsdl10_ext_registry_get_allowable_exts(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_type)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+ axis2_hash_t *inner_deserializer_reg = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ inner_deserializer_reg = axis2_hash_get(registry_impl->deserializer_reg,
+ parent_type, AXIS2_HASH_KEY_STRING);
+ if(NULL != inner_deserializer_reg)
+ {
+ axis2_hash_index_t *i = NULL;
+
+ registry_impl->key_set = axis2_array_list_create(env, 0);
+ for (i = axis2_hash_first (inner_deserializer_reg, env); i; i =
+ axis2_hash_next (env, i))
+ {
+ void *v = NULL;
+
+ axis2_hash_this (i, NULL, NULL, &v);
+ AXIS2_ARRAY_LIST_ADD(registry_impl->key_set, env, v);
+ }
+ }
+ return registry_impl->key_set;
+}
+
+/**
+* Declare that the specified extensionType is the concrete
+* class which should be used to represent extensibility elements
+* with qnames matching elementQN, that are intended to exist as
+* children of the specified parentType.
+*
+* @param parentType a class object indicating where in the WSDL
+* definition this extension would exist. For example,
+* woden_binding would be used to indicate
+* this extensibility element would be added to the list of
+* extensibility elements belonging to a javax.wsdl.Binding,
+* after being instantiated.
+* @param element QN the qname of the extensibility element
+* @param extension type the concrete class which should be instantiated
+*
+*/
+axis2_status_t AXIS2_CALL
+woden_wsdl10_ext_registry_register_ext_element_type(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_type,
+ axis2_qname_t *element_qtype,
+ void *element)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+ axis2_hash_t *inner_ext_type_reg = NULL;
+ axis2_char_t *element_type = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ inner_ext_type_reg = axis2_hash_get(registry_impl->ext_element_reg,
+ parent_type, AXIS2_HASH_KEY_STRING);
+ if(NULL == inner_ext_type_reg)
+ {
+ inner_ext_type_reg = axis2_hash_make(env);
+ axis2_hash_set(registry_impl->ext_element_reg, parent_type,
+ AXIS2_HASH_KEY_STRING, inner_ext_type_reg);
+ }
+ element_type = AXIS2_QNAME_TO_STRING(element_qtype, env);
+ axis2_hash_set(inner_ext_type_reg, element_type, AXIS2_HASH_KEY_STRING,
+ element);
+ return AXIS2_SUCCESS;
+}
+
+
+/**
+* Declare that the type of the specified extension attribute, when it occurs
+* as an attribute of the specified parent type, should be assumed to be
+* attrType.
+*
+* @param parent_type a class object indicating where in the WSDL
+* document this extensibility attribute was encountered. For
+* example, woden_bindin would be used to indicate
+* this attribute was defined on a <wsdl:binding> element.
+* @param attr_qname the qname of the extensibility attribute
+* @param attr_type one of the constants defined on the Attribute Extensible
+* class
+*/
+axis2_status_t AXIS2_CALL
+woden_wsdl10_ext_registry_register_ext_attr_type(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *owner_class,
+ axis2_qname_t *attr_qname,
+ void *attr)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+ axis2_hash_t *inner_ext_attr_reg = NULL;
+ axis2_char_t *attr_name = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ inner_ext_attr_reg = axis2_hash_get(registry_impl->ext_attr_reg,
+ owner_class, AXIS2_HASH_KEY_STRING);
+ if(NULL == inner_ext_attr_reg)
+ {
+ inner_ext_attr_reg = axis2_hash_make(env);
+ axis2_hash_set(registry_impl->ext_attr_reg, owner_class,
+ AXIS2_HASH_KEY_STRING, inner_ext_attr_reg);
+ }
+ attr_name = AXIS2_QNAME_TO_STRING(attr_qname, env);
+ axis2_hash_set(inner_ext_attr_reg, attr_name, AXIS2_HASH_KEY_STRING, attr);
+ return AXIS2_SUCCESS;
+}
+
+/**
+* Look up the type of the extensibility attribute with the specified qname,
+* which was defined on an element represented by the specified parent class.
+*
+* @param parentType a class object indicating where in the WSDL
+* document this extensibility attribute was encountered. For
+* example, woden_binding would be used to indicate
+* this attribute was defined on a <wsdl:binding> element.
+* @param attr_qname the qname of the extensibility attribute
+*
+* @return one of the constants defined on the Attribute Extensible class
+*/
+void *AXIS2_CALL
+woden_wsdl10_ext_registry_query_ext_attr_type(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_class,
+ axis2_qname_t *attr_qn)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+ axis2_hash_t *inner_ext_attr_reg = NULL;
+ void *attr = NULL;
+ axis2_char_t *attr_name = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ inner_ext_attr_reg = axis2_hash_get(registry_impl->ext_attr_reg,
+ parent_class, AXIS2_HASH_KEY_STRING);
+ attr_name = AXIS2_QNAME_TO_STRING(attr_qn, env);
+ if(NULL != inner_ext_attr_reg)
+ {
+ attr = axis2_hash_get(inner_ext_attr_reg, attr_name,
+ AXIS2_HASH_KEY_STRING);
+ }
+ return attr;
+}
+
+/**
+* Register the object that will represent extensions from a specified
+* namespace that will extend the specified WSDL component class.
+*
+* @param parent_class the WSDL component class
+* @param ext_namespace the extension namespace
+* @param comp_ext_class the obj representing these extensions
+*/
+axis2_status_t AXIS2_CALL
+woden_wsdl10_ext_registry_register_component_ext(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_class,
+ axis2_uri_t *ext_namespc,
+ void *comp_ext)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+ axis2_hash_t *inner_comp_ext_reg = NULL;
+ axis2_char_t *namespc = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ inner_comp_ext_reg = axis2_hash_get(registry_impl->comp_ext_reg,
+ parent_class, AXIS2_HASH_KEY_STRING);
+ if(NULL == inner_comp_ext_reg)
+ {
+ inner_comp_ext_reg = axis2_hash_make(env);
+ axis2_hash_set(registry_impl->comp_ext_reg, parent_class,
+ AXIS2_HASH_KEY_STRING, inner_comp_ext_reg);
+ }
+ namespc = AXIS2_URI_TO_STRING(ext_namespc, env, AXIS2_URI_UNP_OMITUSERINFO);
+ axis2_hash_set(inner_comp_ext_reg, namespc, AXIS2_HASH_KEY_STRING, comp_ext);
+ return AXIS2_SUCCESS;
+}
+
+/**
+* Return the object that represents the extensions from the specified
+* namespace that extend the specified WSDL component class.
+*
+* @param parent_class the WSDL component
+* @param ext_namespace the extension namespace
+* @return the object of the component extensions
+*/
+void *AXIS2_CALL
+woden_wsdl10_ext_registry_query_component_ext(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_class,
+ axis2_uri_t *ext_namespc)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+ axis2_hash_t *inner_comp_ext_reg = NULL;
+ void *comp_ext = NULL;
+ axis2_char_t *namespc = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ inner_comp_ext_reg = axis2_hash_get(registry_impl->comp_ext_reg,
+ parent_class, AXIS2_HASH_KEY_STRING);
+ namespc = AXIS2_URI_TO_STRING(ext_namespc, env, AXIS2_URI_UNP_OMITUSERINFO);
+ if(NULL != inner_comp_ext_reg)
+ {
+ comp_ext = axis2_hash_get(inner_comp_ext_reg, namespc,
+ AXIS2_HASH_KEY_STRING);
+ }
+ return comp_ext;
+}
+
+/**
+* Return the extension namespaces registered for the specified WSDL Component class.
+*
+* @param parentClass the class of WSDL component extended by these namespaces
+* @return an array of namespace URIs
+*/
+axis2_array_list_t *AXIS2_CALL
+woden_wsdl10_ext_registry_query_component_ext_namespaces(
+ void *registry,
+ const axis2_env_t *env,
+ axis2_char_t *parent_class)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+ axis2_hash_t *inner_comp_ext_reg = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ inner_comp_ext_reg = axis2_hash_get(registry_impl->comp_ext_reg,
+ parent_class, AXIS2_HASH_KEY_STRING);
+ registry_impl->key_set = axis2_array_list_create(env, 0);
+ if(NULL != inner_comp_ext_reg)
+ {
+ axis2_hash_index_t *i = NULL;
+
+ for (i = axis2_hash_first (inner_comp_ext_reg, env); i; i =
+ axis2_hash_next (env, i))
+ {
+ const void *key = NULL;
+
+ axis2_hash_this (i, &key, NULL, NULL);
+ AXIS2_ARRAY_LIST_ADD(registry_impl->key_set, env, key);
+ }
+ }
+ return registry_impl->key_set;
+}
+
+static axis2_status_t
+woden_wsdl10_ext_registry_populate(
+ void *registry,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_ext_registry_impl_t *registry_impl = NULL;
+ axis2_qname_t *q_attr_soap_version = NULL;
+ axis2_qname_t *q_attr_soap_protocol = NULL;
+ axis2_qname_t *q_attr_soap_mepdefault = NULL;
+ axis2_qname_t *q_attr_soap_code = NULL;
+ axis2_qname_t *q_attr_soap_subcodes = NULL;
+ axis2_qname_t *q_attr_soap_mep = NULL;
+ axis2_qname_t *q_attr_soap_action = NULL;
+ axis2_qname_t *q_elem_soap_module = NULL;
+ axis2_qname_t *q_elem_soap_header = NULL;
+ axis2_uri_t *uri_ns_soap = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ registry_impl = INTF_TO_IMPL(registry);
+
+ /*********************** SOAP extension attributes ************************/
+
+ registry_impl->string_attr = woden_string_attr_create(env, NULL, NULL,
+ NULL, NULL);
+ registry_impl->uri_attr = woden_uri_attr_create(env, NULL, NULL, NULL,
+ NULL);
+ registry_impl->qname_or_token_any_attr =
+ woden_qname_or_token_any_attr_create(env, NULL, NULL, NULL, NULL);
+ registry_impl->qname_list_or_token_any_attr =
+ woden_qname_list_or_token_any_attr_create(env, NULL, NULL, NULL,
+ NULL);
+
+ q_attr_soap_version = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_VERSION);
+ woden_wsdl10_ext_registry_register_ext_attr_type(registry, env,
+ "binding_element", q_attr_soap_version,
+ registry_impl->string_attr);
+
+ q_attr_soap_protocol = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_PROTOCOL);
+ woden_wsdl10_ext_registry_register_ext_attr_type(registry, env,
+ "binding_element", q_attr_soap_protocol,
+ registry_impl->uri_attr);
+
+ q_attr_soap_mepdefault = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_MEPDEFAULT);
+ woden_wsdl10_ext_registry_register_ext_attr_type(registry, env,
+ "binding_element", q_attr_soap_mepdefault,
+ registry_impl->uri_attr);
+
+ q_attr_soap_code = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_CODE);
+ woden_wsdl10_ext_registry_register_ext_attr_type(registry, env,
+ "binding_fault_element", q_attr_soap_code,
+ registry_impl->qname_or_token_any_attr);
+
+ q_attr_soap_subcodes = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_SUBCODES);
+ woden_wsdl10_ext_registry_register_ext_attr_type(registry, env,
+ "binding_fault_element", q_attr_soap_subcodes,
+ registry_impl->qname_list_or_token_any_attr);
+
+ q_attr_soap_mep = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_MEP);
+ woden_wsdl10_ext_registry_register_ext_attr_type(registry, env,
+ "binding_op_element", q_attr_soap_mep,
+ registry_impl->uri_attr);
+
+ q_attr_soap_action = axis2_qname_create_from_string(env, WODEN_Q_ATTR_SOAP_ACTION);
+ woden_wsdl10_ext_registry_register_ext_attr_type(registry, env,
+ "binding_op_element", q_attr_soap_action,
+ registry_impl->uri_attr);
+
+ /************** SOAPModule extension elements *****************************/
+
+ registry_impl->soap_module_deser =
+ woden_wsdl10_soap_module_deserializer_create(env);
+ registry_impl->soap_module =
+ woden_wsdl10_soap_module_create(env);
+
+ registry_impl->soap_module = woden_wsdl10_soap_module_create(env);
+
+ q_elem_soap_module = axis2_qname_create_from_string(env, WODEN_Q_ELEM_SOAP_MODULE);
+
+ woden_wsdl10_ext_registry_register_deserializer(registry, env, "binding_element",
+ q_elem_soap_module,
+ registry_impl->soap_module_deser);
+
+ woden_wsdl10_ext_registry_register_ext_element_type(registry, env, "binding_element",
+ q_elem_soap_module,
+ registry_impl->soap_module);
+
+ woden_wsdl10_ext_registry_register_deserializer(registry, env, "binding_fault_element",
+ q_elem_soap_module,
+ registry_impl->soap_module_deser);
+
+ woden_wsdl10_ext_registry_register_ext_element_type(registry, env, "binding_fault_element",
+ q_elem_soap_module,
+ registry_impl->soap_module);
+
+ woden_wsdl10_ext_registry_register_deserializer(registry, env, "binding_op_element",
+ q_elem_soap_module,
+ registry_impl->soap_module_deser);
+
+ woden_wsdl10_ext_registry_register_ext_element_type(registry, env, "binding_op_element",
+ q_elem_soap_module,
+ registry_impl->soap_module);
+
+ woden_wsdl10_ext_registry_register_deserializer(registry, env, "binding_msg_ref_element",
+ q_elem_soap_module,
+ registry_impl->soap_module_deser);
+
+ woden_wsdl10_ext_registry_register_ext_element_type(registry, env, "binding_msg_ref_element",
+ q_elem_soap_module,
+ registry_impl->soap_module);
+
+ woden_wsdl10_ext_registry_register_deserializer(registry, env, "binding_fault_ref_element",
+ q_elem_soap_module,
+ registry_impl->soap_module_deser);
+
+ woden_wsdl10_ext_registry_register_ext_element_type(registry, env, "binding_fault_ref_element",
+ q_elem_soap_module,
+ registry_impl->soap_module);
+
+ /**************** SOAPHeaderBlock extension elements **********************/
+ registry_impl->soap_header_block_deser =
+ woden_wsdl10_soap_header_block_deserializer_create(env);
+ registry_impl->soap_header_block = woden_wsdl10_soap_header_block_create(env);
+
+ q_elem_soap_header = axis2_qname_create_from_string(env, WODEN_Q_ELEM_SOAP_HEADER);
+
+ woden_wsdl10_ext_registry_register_deserializer(registry, env, "binding_fault_element",
+ q_elem_soap_header,
+ registry_impl->soap_header_block_deser);
+
+ woden_wsdl10_ext_registry_register_ext_element_type(registry, env, "binding_fault_element",
+ q_elem_soap_header,
+ registry_impl->soap_header_block);
+
+ woden_wsdl10_ext_registry_register_deserializer(registry, env, "binding_msg_ref_element",
+ q_elem_soap_header,
+ registry_impl->soap_header_block_deser);
+
+ woden_wsdl10_ext_registry_register_ext_element_type(registry, env, "binding_msg_ref_element",
+ q_elem_soap_header,
+ registry_impl->soap_header_block);
+
+ /*************** WSDL Component Extensions *******************************/
+ registry_impl->soap_binding_ext = woden_wsdl10_soap_binding_exts_create(env);
+ registry_impl->soap_binding_fault_ext =
+ woden_wsdl10_soap_binding_fault_exts_create(env);
+ registry_impl->soap_binding_op_ext =
+ woden_wsdl10_soap_binding_op_exts_create(env);
+ registry_impl->soap_binding_msg_ref_ext =
+ woden_wsdl10_soap_binding_msg_ref_exts_create(env);
+ registry_impl->soap_binding_fault_ref_ext =
+ woden_wsdl10_soap_binding_fault_ref_exts_create(env);
+
+ uri_ns_soap = axis2_uri_parse_string(env, WODEN_URI_NS_SOAP);
+
+ woden_wsdl10_ext_registry_register_component_ext(registry, env, "binding",
+ uri_ns_soap,
+ registry_impl->soap_binding_ext);
+
+ woden_wsdl10_ext_registry_register_component_ext(registry, env, "binding_fault",
+ uri_ns_soap,
+ registry_impl->soap_binding_fault_ext);
+
+ woden_wsdl10_ext_registry_register_component_ext(registry, env, "binding_op",
+ uri_ns_soap,
+ registry_impl->soap_binding_op_ext);
+
+ woden_wsdl10_ext_registry_register_component_ext(registry, env, "binding_msg_ref",
+ uri_ns_soap,
+ registry_impl->soap_binding_msg_ref_ext);
+
+ woden_wsdl10_ext_registry_register_component_ext(registry, env, "binding_fault_ref",
+ uri_ns_soap,
+ registry_impl->soap_binding_fault_ref_ext);
+
+ return AXIS2_SUCCESS;
+}
Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/Makefile.am?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/Makefile.am (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/Makefile.am Wed Jul 5 23:02:19 2006
@@ -0,0 +1,22 @@
+noinst_LTLIBRARIES = libwoden_wsdl10_extensions_soap.la
+
+libwoden_wsdl10_extensions_soap_la_SOURCES = \
+ soap_binding_exts.c \
+ soap_binding_fault_exts.c \
+ soap_binding_fault_ref_exts.c \
+ soap_binding_msg_ref_exts.c \
+ soap_binding_op_exts.c \
+ soap_header_block_element.c \
+ soap_module_element.c \
+ soap_header_block.c \
+ soap_module.c \
+ soap_module_deserializer.c \
+ soap_header_block_deserializer.c
+
+INCLUDES = -I$(top_builddir)/include \
+ @AXIOMINC@ \
+ @UTILINC@ \
+ @XMLSCHEMAINC@
+
+EXTRA_DIST = woden_soap_constants.h
+
Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_binding_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_binding_exts.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_binding_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_binding_exts.c Wed Jul 5 23:02:19 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_wsdl10_soap_binding_exts.h>
+#include <woden_component_exts.h>
+#include <woden_wsdl_element.h>
+#include <woden_string_attr.h>
+#include <woden_uri_attr.h>
+#include "woden_wsdl10_soap_constants.h"
+
+typedef struct woden_wsdl10_soap_binding_exts_impl woden_wsdl10_soap_binding_exts_impl_t;
+
+/**
+ * @brief Soap Binding Extensions Struct Impl
+ * Axis2 Soap Binding Extensions
+ */
+struct woden_wsdl10_soap_binding_exts_impl
+{
+ woden_wsdl10_soap_binding_exts_t binding_exts;
+ woden_component_exts_t *component_exts;
+ axis2_hash_t *methods;
+ axis2_hash_t *super;
+ woden_obj_types_t obj_type;
+
+ axis2_qname_t *qname;
+};
+
+#define INTF_TO_IMPL(binding_exts) ((woden_wsdl10_soap_binding_exts_impl_t *) binding_exts)
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_soap_binding_exts_free(
+ void *binding_exts,
+ const axis2_env_t *env);
+
+axis2_hash_t *AXIS2_CALL
+woden_wsdl10_soap_binding_exts_super_objs(
+ void *binding_exts,
+ const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL
+woden_wsdl10_soap_binding_exts_type(
+ void *binding_exts,
+ const axis2_env_t *env);
+
+woden_component_exts_t *AXIS2_CALL
+woden_wsdl10_soap_binding_exts_get_base_impl(
+ void *binding_exts,
+ const axis2_env_t *env);
+
+axis2_char_t *AXIS2_CALL
+woden_wsdl10_soap_binding_exts_get_soap_version(
+ void *binding_exts,
+ const axis2_env_t *env);
+
+axis2_uri_t *AXIS2_CALL
+woden_wsdl10_soap_binding_exts_get_soap_underlying_protocol(
+ void *binding_exts,
+ const axis2_env_t *env);
+
+axis2_uri_t *AXIS2_CALL
+woden_wsdl10_soap_binding_exts_get_soap_mep_default(
+ void *binding_exts,
+ const axis2_env_t *env);
+
+axis2_array_list_t *AXIS2_CALL
+woden_wsdl10_soap_binding_exts_get_soap_modules(
+ void *binding_exts,
+ const axis2_env_t *env);
+
+
+static woden_wsdl10_soap_binding_exts_t *
+create(const axis2_env_t *env);
+
+static axis2_status_t
+woden_wsdl10_soap_binding_exts_free_ops(
+ void *binding_exts,
+ const axis2_env_t *env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_EXTERN woden_wsdl10_soap_binding_exts_t * AXIS2_CALL
+woden_wsdl10_soap_binding_exts_to_component_exts(
+ void *binding_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ if(!binding_exts)
+ {
+ binding_exts_impl = (woden_wsdl10_soap_binding_exts_impl_t *) create(env);
+ }
+ else
+ binding_exts_impl = (woden_wsdl10_soap_binding_exts_impl_t *) binding_exts;
+ woden_wsdl10_soap_binding_exts_free_ops(binding_exts, env);
+
+ binding_exts_impl->binding_exts.component_exts.ops =
+ AXIS2_MALLOC(env->allocator,
+ sizeof(woden_component_exts_ops_t));
+ 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 woden_wsdl10_soap_binding_exts_t *
+create(const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ binding_exts_impl = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_wsdl10_soap_binding_exts_impl_t));
+
+ binding_exts_impl->obj_type= WODEN_WSDL10_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(woden_wsdl10_soap_binding_exts_ops_t));
+
+ binding_exts_impl->binding_exts.ops->free = woden_wsdl10_soap_binding_exts_free;
+ binding_exts_impl->binding_exts.ops->super_objs =
+ woden_wsdl10_soap_binding_exts_super_objs;
+ binding_exts_impl->binding_exts.ops->type =
+ woden_wsdl10_soap_binding_exts_type;
+ binding_exts_impl->binding_exts.ops->get_base_impl =
+ woden_wsdl10_soap_binding_exts_get_base_impl;
+
+ binding_exts_impl->binding_exts.ops->get_soap_version =
+ woden_wsdl10_soap_binding_exts_get_soap_version;
+ binding_exts_impl->binding_exts.ops->get_soap_underlying_protocol =
+ woden_wsdl10_soap_binding_exts_get_soap_underlying_protocol;
+ binding_exts_impl->binding_exts.ops->get_soap_mep_default =
+ woden_wsdl10_soap_binding_exts_get_soap_mep_default;
+ binding_exts_impl->binding_exts.ops->get_soap_modules =
+ woden_wsdl10_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,
+ woden_wsdl10_soap_binding_exts_free);
+ axis2_hash_set(binding_exts_impl->methods, "super_objs",
+ AXIS2_HASH_KEY_STRING, woden_wsdl10_soap_binding_exts_super_objs);
+ axis2_hash_set(binding_exts_impl->methods, "type",
+ AXIS2_HASH_KEY_STRING, woden_wsdl10_soap_binding_exts_type);
+
+ axis2_hash_set(binding_exts_impl->methods, "get_soap_version",
+ AXIS2_HASH_KEY_STRING,
+ woden_wsdl10_soap_binding_exts_get_soap_version);
+ axis2_hash_set(binding_exts_impl->methods, "get_soap_underlying_protocol",
+ AXIS2_HASH_KEY_STRING,
+ woden_wsdl10_soap_binding_exts_get_soap_underlying_protocol);
+ axis2_hash_set(binding_exts_impl->methods, "get_soap_mep_default",
+ AXIS2_HASH_KEY_STRING,
+ woden_wsdl10_soap_binding_exts_get_soap_mep_default);
+ axis2_hash_set(binding_exts_impl->methods, "get_soap_modules",
+ AXIS2_HASH_KEY_STRING,
+ woden_wsdl10_soap_binding_exts_get_soap_modules);
+
+ return &(binding_exts_impl->binding_exts);
+}
+
+AXIS2_EXTERN woden_wsdl10_soap_binding_exts_t * AXIS2_CALL
+woden_wsdl10_soap_binding_exts_create(const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ binding_exts_impl = (woden_wsdl10_soap_binding_exts_impl_t *) create(env);
+
+ binding_exts_impl->component_exts = 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, "WODEN_WSDL10_SOAP_BINDING_EXTS", AXIS2_HASH_KEY_STRING,
+ &(binding_exts_impl->binding_exts));
+ axis2_hash_set(binding_exts_impl->super, "WODEN_COMPONENT_EXTS", AXIS2_HASH_KEY_STRING,
+ binding_exts_impl->component_exts);
+
+ return &(binding_exts_impl->binding_exts);
+}
+
+static axis2_status_t
+woden_wsdl10_soap_binding_exts_free_ops(
+ void *binding_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_exts_free(void *binding_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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)
+ {
+ 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;
+ }
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_exts_super_objs(
+ void *binding_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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->super;
+}
+
+woden_obj_types_t AXIS2_CALL
+woden_wsdl10_soap_binding_exts_type(
+ void *binding_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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;
+}
+
+woden_component_exts_t *AXIS2_CALL
+woden_wsdl10_soap_binding_exts_get_base_impl(
+ void *binding_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_exts_resolve_methods(
+ woden_wsdl10_soap_binding_exts_t *binding_exts,
+ const axis2_env_t *env,
+ woden_wsdl10_soap_binding_exts_t *binding_exts_impl,
+ axis2_hash_t *methods)
+{
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_exts_get_soap_version(
+ void *binding_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+ woden_string_attr_t *version = NULL;
+ void *parent_element = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+ parent_element = WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+ binding_exts_impl->component_exts, env);
+ parent_element = 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 = (woden_string_attr_t *)
+ WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(parent_element, env, binding_exts_impl->qname);
+ return version != NULL ? WODEN_STRING_ATTR_GET_STRING(version, env) :
+ NULL;
+}
+
+axis2_uri_t *AXIS2_CALL
+woden_wsdl10_soap_binding_exts_get_soap_underlying_protocol(
+ void *binding_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+ woden_uri_attr_t *protocol = NULL;
+ void *parent_element = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+ parent_element = WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+ binding_exts_impl->component_exts, env);
+
+ parent_element = 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 = (woden_uri_attr_t *) WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(
+ parent_element, env, binding_exts_impl->qname);
+ return protocol != NULL ? WODEN_URI_ATTR_GET_URI(protocol, env) : NULL;
+}
+
+axis2_uri_t *AXIS2_CALL
+woden_wsdl10_soap_binding_exts_get_soap_mep_default(
+ void *binding_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+ woden_uri_attr_t *mep_default = NULL;
+ void *parent_element = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+ parent_element = WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+ binding_exts_impl->component_exts, env);
+
+ parent_element = 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 = (woden_uri_attr_t *)
+ WODEN_ATTR_EXTENSIBLE_GET_EXT_ATTR(parent_element, env, binding_exts_impl->qname);
+ return mep_default != NULL ? WODEN_URI_ATTR_GET_URI(mep_default, env) :
+ NULL;
+}
+
+axis2_array_list_t *AXIS2_CALL
+woden_wsdl10_soap_binding_exts_get_soap_modules(
+ void *binding_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_exts_impl_t *binding_exts_impl = NULL;
+ axis2_array_list_t *ext_els = NULL;
+ void *parent_element = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ binding_exts_impl = INTF_TO_IMPL(binding_exts);
+
+ parent_element = WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+ binding_exts_impl->component_exts, env);
+ parent_element = 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 = 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/wsdl10/extensions/soap/soap_binding_fault_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_binding_fault_exts.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_binding_fault_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_binding_fault_exts.c Wed Jul 5 23:02:19 2006
@@ -0,0 +1,511 @@
+/*
+ * 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_binding_fault_exts.h>
+#include <woden_component_exts.h>
+#include <woden_wsdl_element.h>
+#include <woden_string_attr.h>
+#include <woden_qname_or_token_any_attr.h>
+#include <woden_qname_list_or_token_any_attr.h>
+#include "woden_wsdl10_soap_constants.h"
+#include <woden_soap_fault_code.h>
+#include <woden_soap_fault_subcodes.h>
+
+typedef struct woden_wsdl10_soap_binding_fault_exts_impl woden_wsdl10_soap_binding_fault_exts_impl_t;
+
+/**
+ * @brief Soap Binding Fault Extensions Struct Impl
+ * Axis2 Soap Binding Fault Extensions
+ */
+struct woden_wsdl10_soap_binding_fault_exts_impl
+{
+ woden_wsdl10_soap_binding_fault_exts_t binding_fault_exts;
+ woden_component_exts_t *component_exts;
+ axis2_hash_t *methods;
+ axis2_hash_t *super;
+ woden_obj_types_t obj_type;
+
+ axis2_qname_t *qname;
+};
+
+#define INTF_TO_IMPL(binding_fault_exts) ((woden_wsdl10_soap_binding_fault_exts_impl_t *) binding_fault_exts)
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_free(
+ void *binding_fault_exts,
+ const axis2_env_t *env);
+
+axis2_hash_t *AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_super_objs(
+ void *binding_fault_exts,
+ const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_type(
+ void *binding_fault_exts,
+ const axis2_env_t *env);
+
+woden_component_exts_t *AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_get_base_impl(
+ void *binding_fault_exts,
+ const axis2_env_t *env);
+
+void *AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_get_soap_fault_code(
+ void *binding_fault_exts,
+ const axis2_env_t *env);
+
+void *AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_get_soap_fault_subcodes(
+ void *binding_fault_exts,
+ const axis2_env_t *env);
+
+axis2_array_list_t *AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_get_soap_modules(
+ void *binding_fault_exts,
+ const axis2_env_t *env);
+
+axis2_array_list_t *AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_get_soap_headers(
+ void *binding_fault_exts,
+ const axis2_env_t *env);
+
+static woden_wsdl10_soap_binding_fault_exts_t *
+create(
+ const axis2_env_t *env);
+
+static axis2_status_t
+woden_wsdl10_soap_binding_fault_exts_free_ops(
+ void *binding_fault_exts,
+ const axis2_env_t *env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_EXTERN woden_wsdl10_soap_binding_fault_exts_t * AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_to_component_exts(
+ void *binding_fault_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ if(!binding_fault_exts)
+ {
+ binding_fault_exts_impl = (woden_wsdl10_soap_binding_fault_exts_impl_t *) create(env);
+ }
+ else
+ binding_fault_exts_impl = (woden_wsdl10_soap_binding_fault_exts_impl_t *) binding_fault_exts;
+ woden_wsdl10_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(woden_component_exts_ops_t));
+ 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 woden_wsdl10_soap_binding_fault_exts_t *
+create(const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ binding_fault_exts_impl = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_wsdl10_soap_binding_fault_exts_impl_t));
+
+ binding_fault_exts_impl->obj_type= WODEN_WSDL10_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(woden_wsdl10_soap_binding_fault_exts_ops_t));
+
+ binding_fault_exts_impl->binding_fault_exts.ops->free = woden_wsdl10_soap_binding_fault_exts_free;
+ binding_fault_exts_impl->binding_fault_exts.ops->super_objs =
+ woden_wsdl10_soap_binding_fault_exts_super_objs;
+ binding_fault_exts_impl->binding_fault_exts.ops->type =
+ woden_wsdl10_soap_binding_fault_exts_type;
+ binding_fault_exts_impl->binding_fault_exts.ops->get_base_impl =
+ woden_wsdl10_soap_binding_fault_exts_get_base_impl;
+
+ binding_fault_exts_impl->binding_fault_exts.ops->get_soap_fault_code =
+ woden_wsdl10_soap_binding_fault_exts_get_soap_fault_code;
+ binding_fault_exts_impl->binding_fault_exts.ops->get_soap_fault_subcodes =
+ woden_wsdl10_soap_binding_fault_exts_get_soap_fault_subcodes;
+ binding_fault_exts_impl->binding_fault_exts.ops->get_soap_modules =
+ woden_wsdl10_soap_binding_fault_exts_get_soap_modules;
+ binding_fault_exts_impl->binding_fault_exts.ops->get_soap_headers =
+ woden_wsdl10_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,
+ woden_wsdl10_soap_binding_fault_exts_free);
+ axis2_hash_set(binding_fault_exts_impl->methods, "super_objs",
+ AXIS2_HASH_KEY_STRING, woden_wsdl10_soap_binding_fault_exts_super_objs);
+ axis2_hash_set(binding_fault_exts_impl->methods, "type",
+ AXIS2_HASH_KEY_STRING, woden_wsdl10_soap_binding_fault_exts_type);
+
+ axis2_hash_set(binding_fault_exts_impl->methods, "get_soap_fault_code",
+ AXIS2_HASH_KEY_STRING,
+ woden_wsdl10_soap_binding_fault_exts_get_soap_fault_code);
+ axis2_hash_set(binding_fault_exts_impl->methods, "get_soap_fault_subcodes",
+ AXIS2_HASH_KEY_STRING,
+ woden_wsdl10_soap_binding_fault_exts_get_soap_fault_subcodes);
+ axis2_hash_set(binding_fault_exts_impl->methods, "get_modules",
+ AXIS2_HASH_KEY_STRING,
+ woden_wsdl10_soap_binding_fault_exts_get_soap_modules);
+ axis2_hash_set(binding_fault_exts_impl->methods, "get_soap_headers",
+ AXIS2_HASH_KEY_STRING,
+ woden_wsdl10_soap_binding_fault_exts_get_soap_headers);
+
+ return &(binding_fault_exts_impl->binding_fault_exts);
+}
+
+AXIS2_EXTERN woden_wsdl10_soap_binding_fault_exts_t * AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_create(const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ binding_fault_exts_impl = (woden_wsdl10_soap_binding_fault_exts_impl_t *) create(env);
+
+ binding_fault_exts_impl->component_exts = 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, "WODEN_WSDL10_SOAP_BINDING_FAULT_EXTS", AXIS2_HASH_KEY_STRING,
+ &(binding_fault_exts_impl->binding_fault_exts));
+ axis2_hash_set(binding_fault_exts_impl->super, "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
+woden_wsdl10_soap_binding_fault_exts_free_ops(
+ void *binding_fault_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_fault_exts_free(void *binding_fault_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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)
+ {
+ 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;
+ }
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_fault_exts_super_objs(
+ void *binding_fault_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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->super;
+}
+
+woden_obj_types_t AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_type(
+ void *binding_fault_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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;
+}
+
+woden_component_exts_t *AXIS2_CALL
+woden_wsdl10_soap_binding_fault_exts_get_base_impl(
+ void *binding_fault_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_fault_exts_resolve_methods(
+ woden_wsdl10_soap_binding_fault_exts_t *binding_fault_exts,
+ const axis2_env_t *env,
+ woden_wsdl10_soap_binding_fault_exts_t *binding_fault_exts_impl,
+ axis2_hash_t *methods)
+{
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_fault_exts_get_soap_fault_code(
+ void *binding_fault_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+ woden_qname_or_token_any_attr_t *code = NULL;
+ void *parent_element = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ 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 = WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+ binding_fault_exts_impl->component_exts, env);
+ parent_element = 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 = (woden_qname_or_token_any_attr_t *)
+ 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 (void *) woden_soap_fault_code_get_soap_fault_code_any(env);
+ }
+ if(AXIS2_TRUE == WODEN_QNAME_OR_TOKEN_ANY_ATTR_IS_TOKEN(code, env))
+ {
+ return (void *) woden_soap_fault_code_get_soap_fault_code_any(env);
+ }
+ if(AXIS2_TRUE == WODEN_QNAME_OR_TOKEN_ANY_ATTR_IS_QNAME(code, env))
+ {
+ return (void *) woden_soap_fault_code_create(env, NULL,
+ 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
+woden_wsdl10_soap_binding_fault_exts_get_soap_fault_subcodes(
+ void *binding_fault_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_fault_exts_impl_t *binding_fault_exts_impl = NULL;
+ woden_qname_list_or_token_any_attr_t *subcodes = NULL;
+ void *parent_element = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ 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 = WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+ binding_fault_exts_impl->component_exts, env);
+ parent_element = 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 = (woden_qname_list_or_token_any_attr_t *)
+ 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 (void *) woden_soap_fault_subcodes_get_soap_fault_subcodes_any(env);
+ }
+ if(AXIS2_TRUE == WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_IS_TOKEN(subcodes, env))
+ {
+ return (void *) woden_soap_fault_subcodes_get_soap_fault_subcodes_any(env);
+ }
+ if(AXIS2_TRUE == WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_IS_QNAME_LIST(subcodes,
+ env))
+ {
+ return (void *) woden_soap_fault_subcodes_create(env, NULL,
+ 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
+woden_wsdl10_soap_binding_fault_exts_get_soap_modules(
+ void *binding_fault_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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, NULL);
+ binding_fault_exts_impl = INTF_TO_IMPL(binding_fault_exts);
+
+ parent_element = WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+ binding_fault_exts_impl->component_exts, env);
+ parent_element = 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 = 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
+woden_wsdl10_soap_binding_fault_exts_get_soap_headers(
+ void *binding_fault_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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, NULL);
+ binding_fault_exts_impl = INTF_TO_IMPL(binding_fault_exts);
+
+ parent_element = WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+ binding_fault_exts_impl->component_exts, env);
+ parent_element = 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 = 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/wsdl10/extensions/soap/soap_binding_fault_ref_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_binding_fault_ref_exts.c?rev=419452&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_binding_fault_ref_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/soap/soap_binding_fault_ref_exts.c Wed Jul 5 23:02:19 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_wsdl10_soap_binding_fault_ref_exts.h>
+#include <woden_component_exts.h>
+#include <woden_wsdl_element.h>
+#include <woden_string_attr.h>
+#include <woden_qname_or_token_any_attr.h>
+#include <woden_qname_list_or_token_any_attr.h>
+#include "woden_wsdl10_soap_constants.h"
+
+typedef struct woden_wsdl10_soap_binding_fault_ref_exts_impl woden_wsdl10_soap_binding_fault_ref_exts_impl_t;
+
+/**
+ * @brief Soap Binding Fault Reference Extensions Struct Impl
+ * Axis2 Soap Binding Fault Reference Extensions
+ */
+struct woden_wsdl10_soap_binding_fault_ref_exts_impl
+{
+ woden_wsdl10_soap_binding_fault_ref_exts_t binding_fault_ref_exts;
+ woden_component_exts_t *component_exts;
+ axis2_hash_t *methods;
+ axis2_hash_t *super;
+ woden_obj_types_t obj_type;
+
+ axis2_qname_t *qname;
+};
+
+#define INTF_TO_IMPL(binding_fault_ref_exts) ((woden_wsdl10_soap_binding_fault_ref_exts_impl_t *) binding_fault_ref_exts)
+
+axis2_status_t AXIS2_CALL
+woden_wsdl10_soap_binding_fault_ref_exts_free(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env);
+
+axis2_hash_t *AXIS2_CALL
+woden_wsdl10_soap_binding_fault_ref_exts_super_objs(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL
+woden_wsdl10_soap_binding_fault_ref_exts_type(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env);
+
+woden_component_exts_t *AXIS2_CALL
+woden_wsdl10_soap_binding_fault_ref_exts_get_base_impl(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env);
+
+axis2_array_list_t *AXIS2_CALL
+woden_wsdl10_soap_binding_fault_ref_exts_get_soap_modules(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env);
+
+static woden_wsdl10_soap_binding_fault_ref_exts_t *
+create(
+ const axis2_env_t *env);
+
+static axis2_status_t
+woden_wsdl10_soap_binding_fault_ref_exts_free_ops(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_EXTERN woden_wsdl10_soap_binding_fault_ref_exts_t * AXIS2_CALL
+woden_wsdl10_soap_binding_fault_ref_exts_to_component_exts(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ if(!binding_fault_ref_exts)
+ {
+ binding_fault_ref_exts_impl = (woden_wsdl10_soap_binding_fault_ref_exts_impl_t *) create(env);
+ }
+ else
+ binding_fault_ref_exts_impl = (woden_wsdl10_soap_binding_fault_ref_exts_impl_t *) binding_fault_ref_exts;
+ woden_wsdl10_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(woden_component_exts_ops_t));
+ 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 woden_wsdl10_soap_binding_fault_ref_exts_t *
+create(const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ binding_fault_ref_exts_impl = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_wsdl10_soap_binding_fault_ref_exts_impl_t));
+
+ binding_fault_ref_exts_impl->obj_type= WODEN_WSDL10_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(woden_wsdl10_soap_binding_fault_ref_exts_ops_t));
+
+ binding_fault_ref_exts_impl->binding_fault_ref_exts.ops->free = woden_wsdl10_soap_binding_fault_ref_exts_free;
+ binding_fault_ref_exts_impl->binding_fault_ref_exts.ops->super_objs =
+ woden_wsdl10_soap_binding_fault_ref_exts_super_objs;
+ binding_fault_ref_exts_impl->binding_fault_ref_exts.ops->type =
+ woden_wsdl10_soap_binding_fault_ref_exts_type;
+ binding_fault_ref_exts_impl->binding_fault_ref_exts.ops->get_base_impl =
+ woden_wsdl10_soap_binding_fault_ref_exts_get_base_impl;
+
+ binding_fault_ref_exts_impl->binding_fault_ref_exts.ops->get_soap_modules =
+ woden_wsdl10_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,
+ woden_wsdl10_soap_binding_fault_ref_exts_free);
+ axis2_hash_set(binding_fault_ref_exts_impl->methods, "super_objs",
+ AXIS2_HASH_KEY_STRING, woden_wsdl10_soap_binding_fault_ref_exts_super_objs);
+ axis2_hash_set(binding_fault_ref_exts_impl->methods, "type",
+ AXIS2_HASH_KEY_STRING, woden_wsdl10_soap_binding_fault_ref_exts_type);
+
+ axis2_hash_set(binding_fault_ref_exts_impl->methods, "get_modules",
+ AXIS2_HASH_KEY_STRING,
+ woden_wsdl10_soap_binding_fault_ref_exts_get_soap_modules);
+
+ return &(binding_fault_ref_exts_impl->binding_fault_ref_exts);
+}
+
+AXIS2_EXTERN woden_wsdl10_soap_binding_fault_ref_exts_t * AXIS2_CALL
+woden_wsdl10_soap_binding_fault_ref_exts_create(const axis2_env_t *env)
+{
+ woden_wsdl10_soap_binding_fault_ref_exts_impl_t *binding_fault_ref_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ binding_fault_ref_exts_impl = (woden_wsdl10_soap_binding_fault_ref_exts_impl_t *) create(env);
+
+ binding_fault_ref_exts_impl->component_exts = 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, "WODEN_WSDL10_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, "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
+woden_wsdl10_soap_binding_fault_ref_exts_free_ops(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_fault_ref_exts_free(void *binding_fault_ref_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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)
+ {
+ 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;
+ }
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_fault_ref_exts_super_objs(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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->super;
+}
+
+woden_obj_types_t AXIS2_CALL
+woden_wsdl10_soap_binding_fault_ref_exts_type(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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;
+}
+
+woden_component_exts_t *AXIS2_CALL
+woden_wsdl10_soap_binding_fault_ref_exts_get_base_impl(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_fault_ref_exts_resolve_methods(
+ woden_wsdl10_soap_binding_fault_ref_exts_t *binding_fault_ref_exts,
+ const axis2_env_t *env,
+ woden_wsdl10_soap_binding_fault_ref_exts_t *binding_fault_ref_exts_impl,
+ axis2_hash_t *methods)
+{
+ woden_wsdl10_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
+woden_wsdl10_soap_binding_fault_ref_exts_get_soap_modules(
+ void *binding_fault_ref_exts,
+ const axis2_env_t *env)
+{
+ woden_wsdl10_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, NULL);
+ binding_fault_ref_exts_impl = INTF_TO_IMPL(binding_fault_ref_exts);
+
+ parent_element = WODEN_COMPONENT_EXTS_GET_PARENT_ELEMENT(
+ binding_fault_ref_exts_impl->component_exts, env);
+ parent_element = 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 = WODEN_ELEMENT_EXTENSIBLE_GET_EXT_ELEMENTS_OF_TYPE(
+ parent_element, env, binding_fault_ref_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