axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r410740 [2/7] - in /webservices/axis2/trunk/c/woden: include/woden/wsdl20/ include/woden/wsdl20/extensions/ include/woden/wsdl20/xml/ include/woden/xml/ src/wsdl20/ src/wsdl20/extensions/ src/xml/
Date Thu, 01 Jun 2006 04:34:48 GMT
Added: webservices/axis2/trunk/c/woden/include/woden/wsdl20/xml/axis2_woden_wsdl_element.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden/wsdl20/xml/axis2_woden_wsdl_element.h?rev=410740&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden/wsdl20/xml/axis2_woden_wsdl_element.h (added)
+++ webservices/axis2/trunk/c/woden/include/woden/wsdl20/xml/axis2_woden_wsdl_element.h Wed May 31 21:34:47 2006
@@ -0,0 +1,132 @@
+/*
+ * 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_WSDL_ELEMENT_H
+#define AXIS2_WODEN_WSDL_ELEMENT_H
+
+/**
+ * @file axis2_woden_wsdl_element.h
+ * @brief Axis2 Wsdl Element Interface
+ * This abstract class defines the behaviour common to all WSDL elements.
+ * That is, it implements support for extension attributes and elements.
+ * This interface can be used as a common reference for all WSDL elements
+ * represented by the Element API.
+ */
+
+#include <axis2_allocator.h>
+#include <axis2_env.h>
+#include <axis2_error.h>
+#include <axis2_string.h>
+#include <axis2_const.h>
+#include <axis2_hash.h>
+#include <axis2_qname.h>
+#include <axis2_url.h>
+#include <axis2_array_list.h>
+#include <woden/axis2_woden.h>
+#include <woden/wsdl20/extensions/axis2_woden_attr_extensible.h>
+#include <woden/wsdl20/extensions/axis2_woden_element_extensible.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef struct axis2_woden_wsdl_element axis2_woden_wsdl_element_t;
+typedef struct axis2_woden_wsdl_element_ops axis2_woden_wsdl_element_ops_t;
+typedef union axis2_woden_wsdl_element_base axis2_woden_wsdl_element_base_t;
+struct axis2_woden_xml_attr;
+struct axis2_woden_ext_element;
+
+/** @defgroup axis2_woden_wsdl_element Wsdl Element
+  * @ingroup axis2_wsdl
+  * @{
+  */
+
+struct axis2_woden_wsdl_element_ops
+{
+	/** 
+     * Deallocate memory
+     * @return status code
+     */
+    axis2_status_t (AXIS2_CALL *
+    free) (
+            void *wsdl_element,
+            axis2_env_t **env);
+    
+    axis2_hash_t *(AXIS2_CALL *
+    super_objs) (
+            void *wsdl_element,
+            axis2_env_t **env);
+ 
+    axis2_woden_obj_types_t (AXIS2_CALL *
+    type) (
+            void *wsdl_element,
+            axis2_env_t **env);
+    
+};
+
+union axis2_woden_wsdl_element_base
+{
+    axis2_woden_attr_extensible_t attr_extensible;
+    axis2_woden_element_extensible_t element_extensible;
+};
+
+struct axis2_woden_wsdl_element
+{
+    axis2_woden_wsdl_element_base_t base;
+    axis2_woden_wsdl_element_ops_t *ops;
+};
+
+AXIS2_DECLARE(axis2_woden_wsdl_element_t *)
+axis2_woden_wsdl_element_create(
+        axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_wsdl_element_t *)
+axis2_woden_wsdl_element_to_attr_extensible(
+        void *wsdl_element,
+        axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_wsdl_element_t *)
+axis2_woden_wsdl_element_to_element_extensible(
+        void *wsdl_element,
+        axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_status_t)
+axis2_woden_wsdl_element_resolve_methods(
+        axis2_woden_wsdl_element_t *wsdl_element,
+        axis2_env_t **env,
+        axis2_woden_wsdl_element_t *wsdl_element_impl,
+        axis2_hash_t *methods);
+/************************End of Woden C Internal Methods***********************/
+
+#define AXIS2_WODEN_WSDL_ELEMENT_FREE(wsdl_element, env) \
+		(((axis2_woden_wsdl_element_t *) wsdl_element)->ops->\
+         free (wsdl_element, env))
+
+#define AXIS2_WODEN_WSDL_ELEMENT_SUPER_OBJS(wsdl_element, env) \
+		(((axis2_woden_wsdl_element_t *) wsdl_element)->ops->\
+         super_objs (wsdl_element, env))
+
+#define AXIS2_WODEN_WSDL_ELEMENT_TYPE(wsdl_element, env) \
+		(((axis2_woden_wsdl_element_t *) wsdl_element)->ops->\
+         type (wsdl_element, env))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_WSDL_ELEMENT_H */

Added: webservices/axis2/trunk/c/woden/include/woden/xml/axis2_woden_xml_attr.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden/xml/axis2_woden_xml_attr.h?rev=410740&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden/xml/axis2_woden_xml_attr.h (added)
+++ webservices/axis2/trunk/c/woden/include/woden/xml/axis2_woden_xml_attr.h Wed May 31 21:34:47 2006
@@ -0,0 +1,184 @@
+/*
+ * 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_XML_ATTR_H
+#define AXIS2_WODEN_XML_ATTR_H
+
+/**
+ * @file axis2_woden_xml_attr.h
+ * @brief Axis2 Xml Attribute Interface
+ *          This is an abstract superclass for all classes representing different
+ *          types of XML attribute information items.
+ */
+
+#include <axis2_allocator.h>
+#include <axis2_env.h>
+#include <axis2_error.h>
+#include <axis2_string.h>
+#include <axis2_const.h>
+#include <axis2_hash.h>
+#include <axis2_qname.h>
+#include <axis2_generic_obj.h>
+#include <woden/axis2_woden.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+typedef struct axis2_woden_xml_attr axis2_woden_xml_attr_t;
+typedef struct axis2_woden_xml_attr_ops axis2_woden_xml_attr_ops_t;
+struct axis2_om_node;
+struct axis2_om_element;
+
+/** @defgroup axis2_woden_xml_attr Xml Attribute
+  * @ingroup axis2_wsdl
+  * @{
+  */
+
+struct axis2_woden_xml_attr_ops
+{
+	/** 
+     * Deallocate memory
+     * @return status code
+     */
+    axis2_status_t (AXIS2_CALL *
+    free) (
+            void *xml_attr,
+            axis2_env_t **env);
+      
+    axis2_woden_obj_types_t (AXIS2_CALL *
+    type) (
+            void *xml_attr,
+            axis2_env_t **env);
+    
+    axis2_status_t (AXIS2_CALL *
+    init) (
+            void *xml_attr,
+            axis2_env_t **env,
+            struct axis2_om_element *owner_el,
+            struct axis2_om_node *owner_node,
+            axis2_qname_t *attr_type, 
+            axis2_char_t *attr_value);
+
+    axis2_qname_t *(AXIS2_CALL *
+    get_attribute_type) (
+            void *xml_attr,
+            axis2_env_t **env);
+
+    axis2_generic_obj_t *(AXIS2_CALL *
+    get_content) (
+            void *xml_attr,
+            axis2_env_t **env);
+
+    axis2_char_t *(AXIS2_CALL *
+    to_external_form) (
+            void *xml_attr,
+            axis2_env_t **env);
+
+    axis2_bool_t (AXIS2_CALL *
+    is_valid) (
+            void *xml_attr,
+            axis2_env_t **env);
+
+    /* ************************************************************
+     *  Non-API implementation methods 
+     * ************************************************************/
+
+    void *(AXIS2_CALL *
+    convert) (
+            void *xml_attr,
+            axis2_env_t **env,
+            struct axis2_om_element *owner_el,
+            struct axis2_om_node *ownder_node,
+            axis2_char_t *attr_value);
+
+    /*
+     * Validity is initialized to true, but set to false if the attribute's
+     * value is null or if it cannot be converted to an object of the 
+     * appropriate type). This method may be used to change the validity later
+     * (e.g. if Validation determines an error).
+     * 
+     * TODO confirm this method is needed, otherwise remove it.
+     */
+    axis2_status_t (AXIS2_CALL *
+    set_valid) (
+            void *xml_attr,
+            axis2_env_t **env,
+            axis2_bool_t validity);
+      
+};
+
+struct axis2_woden_xml_attr
+{
+    axis2_woden_xml_attr_ops_t *ops;
+};
+
+AXIS2_DECLARE(axis2_woden_xml_attr_t *)
+axis2_woden_xml_attr_create(
+        axis2_env_t **env,
+        struct axis2_om_element *owner_el,
+        struct axis2_om_node *owner_node,
+        axis2_qname_t *attr_type, 
+        axis2_char_t *attr_value);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_status_t)
+axis2_woden_xml_attr_resolve_methods(
+        axis2_woden_xml_attr_t *xml_attr,
+        axis2_env_t **env,
+        axis2_hash_t *methods);
+/************************End of Woden C Internal Methods***********************/
+
+#define AXIS2_WODEN_XML_ATTR_FREE(xml_attr, env) \
+		(((axis2_woden_xml_attr_t *) xml_attr)->ops->free (xml_attr, env))
+
+#define AXIS2_WODEN_XML_ATTR_TYPE(xml_attr, env) \
+		(((axis2_woden_xml_attr_t *) xml_attr)->ops->type (xml_attr, env))
+
+#define AXIS2_WODEN_XML_ATTR_INIT(xml_attr, env, owner_el, owner_node, \
+        attr_type, attr_value) \
+		(((axis2_woden_xml_attr_t *) xml_attr)->ops->init(xml_attr, env, \
+            owner_el, owner_node, attr_type, attr_value))
+
+#define AXIS2_WODEN_XML_ATTR_GET_ATTRIBUTE_TYPE(xml_attr, env) \
+		(((axis2_woden_xml_attr_t *) xml_attr)->ops->\
+         get_attribute_type(xml_attr, env))
+
+#define AXIS2_WODEN_XML_ATTR_GET_CONTENT(xml_attr, env) \
+		(((axis2_woden_xml_attr_t *) xml_attr)->ops->get_content(xml_attr, env))
+
+#define AXIS2_WODEN_XML_ATTR_TO_EXTERNAL_FORM(xml_attr, env) \
+		(((axis2_woden_xml_attr_t *) xml_attr)->ops->\
+         to_external_form(xml_attr, env))
+
+#define AXIS2_WODEN_XML_ATTR_IS_VALID(xml_attr, env) \
+		(((axis2_woden_xml_attr_t *) xml_attr)->ops->is_valid(xml_attr, env))
+
+#define AXIS2_WODEN_XML_ATTR_CONVERT(xml_attr, env, owner_el, owner_node, \
+        attr_type, attr_value) \
+		(((axis2_woden_xml_attr_t *) xml_attr)->ops->convert(xml_attr, env, \
+            owner_el, owner_node, attr_type, attr_value))
+
+#define AXIS2_WODEN_XML_ATTR_SET_VALID(xml_attr, env, validity) \
+		(((axis2_woden_xml_attr_t *) xml_attr)->ops->set_valid(xml_attr, \
+                                                  env, validity))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_XML_ATTR_H */

Added: webservices/axis2/trunk/c/woden/src/wsdl20/documentation.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/documentation.c?rev=410740&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/documentation.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/documentation.c Wed May 31 21:34:47 2006
@@ -0,0 +1,505 @@
+/*
+ * 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/axis2_woden_documentation.h>
+#include <woden/wsdl20/xml/axis2_woden_documentation_element.h>
+#include <woden/wsdl20/extensions/axis2_woden_ext_element.h>
+#include <woden/xml/axis2_woden_xml_attr.h>
+
+typedef struct axis2_woden_documentation_impl axis2_woden_documentation_impl_t;
+
+/** 
+ * @brief Documentation Struct Impl
+ *	Axis2 Documentation  
+ */ 
+struct axis2_woden_documentation_impl
+{
+    axis2_woden_documentation_t documentation;
+    axis2_woden_obj_types_t obj_type;
+    axis2_woden_wsdl_element_t *wsdl_element;
+    axis2_hash_t *super;
+    axis2_hash_t *methods;
+
+    void *f_content;
+};
+
+#define INTF_TO_IMPL(documentation) ((axis2_woden_documentation_impl_t *) documentation)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_documentation_free(
+        void *documentation,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_documentation_super_objs(
+        void *documentation,
+        axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_documentation_type(
+        void *documentation,
+        axis2_env_t **env);
+
+axis2_woden_wsdl_element_t *AXIS2_CALL
+axis2_woden_documentation_get_base_impl(
+        void *documentation,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_documentation_set_content(
+        void *documentation,
+        axis2_env_t **env,
+        void *doc_el);
+
+void *AXIS2_CALL
+axis2_woden_documentation_get_content(
+        void *documentation,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_documentation_set_ext_attr(
+        void *documentation,
+        axis2_env_t **env,
+        axis2_qname_t *attr_type,
+        axis2_woden_xml_attr_t *attr);
+
+axis2_woden_xml_attr_t *AXIS2_CALL 
+axis2_woden_documentation_get_ext_attr(
+        void *documentation,
+        axis2_env_t **env,
+        axis2_qname_t *attr_type);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_documentation_get_ext_attrs(
+        void *documentation,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_documentation_get_ext_attrs_for_namespace(
+        void *documentation,
+        axis2_env_t **env,
+        axis2_url_t *namespc);
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_documentation_has_ext_attrs_for_namespace(
+        void *documentation,
+        axis2_env_t **env,
+        axis2_url_t *namespc);
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_documentation_add_ext_element(
+        void *documentation,
+        axis2_env_t **env,
+        axis2_woden_ext_element_t *ext_el);
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_documentation_remove_ext_element(
+        void *documentation,
+        axis2_env_t **env,
+        axis2_woden_ext_element_t *ext_el);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_documentation_get_ext_elements(
+        void *documentation,
+        axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL 
+axis2_woden_documentation_get_ext_elements_of_type(
+        void *documentation,
+        axis2_env_t **env,
+        axis2_qname_t *ext_type);
+
+axis2_bool_t AXIS2_CALL 
+axis2_woden_documentation_has_ext_elements_for_namespace(
+        void *documentation,
+        axis2_env_t **env,
+        axis2_url_t *namespc);
+
+static axis2_woden_documentation_t *
+create(axis2_env_t **env);
+
+static axis2_status_t
+axis2_woden_documentation_free_ops(
+        void *documentation,
+        axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_documentation_t *)
+axis2_woden_documentation_to_documentation_element(
+        void *documentation,
+        axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!documentation)
+    {
+        documentation_impl = (axis2_woden_documentation_impl_t *) create(env);
+    }
+    else
+        documentation_impl = (axis2_woden_documentation_impl_t *) documentation;
+
+    axis2_woden_documentation_free_ops(documentation, env);
+
+    documentation_impl->documentation.base.documentation_element.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+        sizeof(axis2_woden_documentation_element_ops_t));
+    axis2_woden_documentation_element_resolve_methods(&(documentation_impl->
+            documentation.base.documentation_element), env, 
+            documentation_impl->methods);
+    return documentation;
+}
+
+AXIS2_DECLARE(axis2_woden_documentation_t *)
+axis2_woden_documentation_to_attr_extensible(
+        void *documentation,
+        axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if(!documentation)
+    {
+        documentation_impl = (axis2_woden_documentation_impl_t *) create(env);
+    }
+    else
+        documentation_impl = (axis2_woden_documentation_impl_t *) documentation;
+
+    axis2_woden_documentation_free_ops(documentation, env);
+
+    documentation_impl->documentation.base.wsdl_element.base.attr_extensible.
+            ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_attr_extensible_ops_t));
+    axis2_woden_attr_extensible_resolve_methods(&(documentation_impl->
+            documentation.base.wsdl_element.base.attr_extensible), env, 
+            NULL, documentation_impl->methods);
+    return documentation;
+
+}
+
+AXIS2_DECLARE(axis2_woden_documentation_t *)
+axis2_woden_documentation_to_element_extensible(
+        void *documentation,
+        axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if(!documentation)
+    {
+        documentation_impl = (axis2_woden_documentation_impl_t *) create(env);
+    }
+    else
+        documentation_impl = (axis2_woden_documentation_impl_t *) documentation;
+
+    axis2_woden_documentation_free_ops(documentation, env);
+
+    documentation_impl->documentation.base.wsdl_element.base.
+        element_extensible.ops = AXIS2_MALLOC((*env)->allocator, 
+        sizeof(axis2_woden_element_extensible_ops_t));
+    axis2_woden_element_extensible_resolve_methods(&(documentation_impl->
+            documentation.base.wsdl_element.base.element_extensible), 
+            env, NULL, documentation_impl->methods);
+    return documentation;
+
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_documentation_t *
+create(axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentation_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_documentation_impl_t));
+
+    documentation_impl->wsdl_element = NULL;
+    documentation_impl->super = NULL;
+    documentation_impl->obj_type = AXIS2_WODEN_DOCUMENTATION;
+    documentation_impl->f_content = NULL;
+    documentation_impl->methods = NULL;
+    
+    documentation_impl->documentation.ops = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_documentation_ops_t));
+
+    documentation_impl->documentation.ops->free = axis2_woden_documentation_free;
+    documentation_impl->documentation.ops->super_objs = 
+        axis2_woden_documentation_super_objs;
+    documentation_impl->documentation.ops->type = axis2_woden_documentation_type;
+    documentation_impl->documentation.ops->get_base_impl = 
+        axis2_woden_documentation_get_base_impl;
+
+    documentation_impl->methods = axis2_hash_make(env);
+    if(!documentation_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(documentation_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_documentation_free);
+    axis2_hash_set(documentation_impl->methods, "super_objs", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_documentation_super_objs);
+    axis2_hash_set(documentation_impl->methods, "type", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_documentation_type);
+    axis2_hash_set(documentation_impl->methods, "set_content", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_set_content);
+    axis2_hash_set(documentation_impl->methods, "get_content", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_get_content);
+    axis2_hash_set(documentation_impl->methods, "set_ext_attr", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_set_ext_attr);
+    axis2_hash_set(documentation_impl->methods, "get_ext_attr", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_get_ext_attr);
+    axis2_hash_set(documentation_impl->methods, "get_ext_attrs", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_get_ext_attrs);
+    axis2_hash_set(documentation_impl->methods, "get_ext_attrs_for_namespace", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_get_ext_attrs_for_namespace);
+    axis2_hash_set(documentation_impl->methods, "has_ext_attrs_for_namespace", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_has_ext_attrs_for_namespace);
+    axis2_hash_set(documentation_impl->methods, "add_ext_element", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_add_ext_element);
+    axis2_hash_set(documentation_impl->methods, "remove_ext_element", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_remove_ext_element);
+    axis2_hash_set(documentation_impl->methods, "get_ext_elements", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_get_ext_elements);
+    axis2_hash_set(documentation_impl->methods, "get_ext_elements_of_type", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_get_ext_elements_of_type);
+    axis2_hash_set(documentation_impl->methods, "has_ext_elements_for_namespace", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_documentation_has_ext_elements_for_namespace);
+    
+    return &(documentation_impl->documentation);
+}
+
+AXIS2_DECLARE(axis2_woden_documentation_t *)
+axis2_woden_documentation_create(
+        axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentation_impl = (axis2_woden_documentation_impl_t *) create(env);
+
+    documentation_impl->wsdl_element = axis2_woden_wsdl_element_create(env);
+
+    documentation_impl->super = axis2_hash_make(env);
+    if(!documentation_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(documentation_impl->super, "AXIS2_WODEN_DOCUMENTATION", 
+            AXIS2_HASH_KEY_STRING, &(documentation_impl->documentation));
+    axis2_hash_set(documentation_impl->super, "AXIS2_WODEN_WSDL_ELEMENT", 
+            AXIS2_HASH_KEY_STRING, documentation_impl->wsdl_element);
+
+    return &(documentation_impl->documentation);
+}
+
+static axis2_status_t
+axis2_woden_documentation_free_ops(
+        void *documentation,
+        axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentation_impl = INTF_TO_IMPL(documentation);
+
+    if(documentation_impl->documentation.base.documentation_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, documentation_impl->documentation.base.
+                documentation_element.ops);
+        documentation_impl->documentation.base.documentation_element.ops = 
+            NULL;
+    }
+
+    if(documentation_impl->documentation.base.wsdl_element.base.attr_extensible.
+            ops)
+    {
+        AXIS2_FREE((*env)->allocator, documentation_impl->documentation.
+                base.wsdl_element.base.attr_extensible.ops);
+        documentation_impl->documentation.base.wsdl_element.base.
+            attr_extensible.ops = NULL;
+    }
+    
+    if(documentation_impl->documentation.base.wsdl_element.base.
+            element_extensible.ops)
+    {
+        AXIS2_FREE((*env)->allocator, documentation_impl->documentation.base.
+                wsdl_element.base.element_extensible.ops);
+        documentation_impl->documentation.base.wsdl_element.base.
+            element_extensible.ops = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_woden_documentation_free(
+        void *documentation,
+        axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentation_impl = INTF_TO_IMPL(documentation);
+
+    if(documentation_impl->f_content)
+    {
+        /*AXIS2_FREE(documentation_impl->f_content, env);*/
+        documentation_impl->f_content = NULL;
+    }
+    
+    if(documentation_impl->super)
+    {
+        axis2_hash_free(documentation_impl->super, env);
+        documentation_impl->super = NULL;
+    }
+    
+    if(documentation_impl->methods)
+    {
+        axis2_hash_free(documentation_impl->methods, env);
+        documentation_impl->methods = NULL;
+    }
+
+    if(documentation_impl->wsdl_element)
+    {
+        AXIS2_WODEN_WSDL_OBJ_FREE(documentation_impl->wsdl_element, env);
+        documentation_impl->wsdl_element = NULL;
+    }
+
+    axis2_woden_documentation_free_ops(documentation, env);
+
+    if((&(documentation_impl->documentation))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, documentation_impl->documentation.ops);
+        (&(documentation_impl->documentation))->ops = NULL;
+    }
+    
+    if(documentation_impl)
+    {
+        AXIS2_FREE((*env)->allocator, documentation_impl);
+        documentation_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_documentation_super_objs(
+        void *documentation,
+        axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentation_impl = INTF_TO_IMPL(documentation);
+
+    return documentation_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_documentation_type(void *documentation,
+        axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    documentation_impl = INTF_TO_IMPL(documentation);
+
+    return documentation_impl->obj_type;
+}
+
+axis2_woden_wsdl_element_t *AXIS2_CALL
+axis2_woden_documentation_get_base_impl(
+        void *documentation,
+        axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    documentation_impl = INTF_TO_IMPL(documentation);
+
+    return documentation_impl->wsdl_element;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_documentation_resolve_methods(
+        axis2_woden_documentation_t *documentation,
+        axis2_env_t **env,
+        axis2_woden_documentation_t *documentation_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_documentation_impl_t *documentation_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    documentation_impl_l = INTF_TO_IMPL (documentation_impl);
+    
+    documentation->ops = AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_documentation_ops_t));
+    
+    documentation->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    documentation->ops->super_objs = axis2_hash_get(methods, 
+            "super_objs", AXIS2_HASH_KEY_STRING);
+    documentation->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_documentation_set_content(
+        void *documentation,
+        axis2_env_t **env,
+        void *doc_el)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, documentation, AXIS2_FAILURE);
+    super = AXIS2_WODEN_DOCUMENTATION_SUPER_OBJS(documentation, env);
+    documentation_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_DOCUMENTATION", AXIS2_HASH_KEY_STRING));
+   
+    if(documentation_impl->f_content)
+    {
+        /* Free f_content */
+    }
+    documentation_impl->f_content = doc_el;
+    return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL
+axis2_woden_documentation_get_content(
+        void *documentation,
+        axis2_env_t **env)
+{
+    axis2_woden_documentation_impl_t *documentation_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_DOCUMENTATION_SUPER_OBJS(documentation, env);
+    documentation_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_DOCUMENTATION", AXIS2_HASH_KEY_STRING));
+
+    return documentation_impl->f_content;
+}
+

Added: webservices/axis2/trunk/c/woden/src/wsdl20/endpoint.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/endpoint.c?rev=410740&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/endpoint.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/endpoint.c Wed May 31 21:34:47 2006
@@ -0,0 +1,862 @@
+/*
+ * 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/axis2_woden_wsdl_obj.h>
+#include <woden/wsdl20/axis2_woden_endpoint.h>
+#include <woden/wsdl20/extensions/axis2_woden_ext_element.h>
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
+#include <woden/xml/axis2_woden_xml_attr.h>
+#include <woden/wsdl20/xml/axis2_woden_documentation_element.h>
+
+typedef struct axis2_woden_endpoint_impl axis2_woden_endpoint_impl_t;
+
+/** 
+ * @brief Endpoint Struct Impl
+ *	Axis2 Endpoint  
+ */ 
+struct axis2_woden_endpoint_impl
+{
+    axis2_woden_endpoint_t endpoint;
+    axis2_woden_obj_types_t obj_type;
+    axis2_woden_nested_configurable_t *nested_configurable;
+    axis2_hash_t *super;
+    axis2_hash_t *methods;
+    woden_nc_name_t *f_name;
+    axis2_qname_t *f_binding_qname;
+    void *f_binding;
+    axis2_url_t *f_address;
+};
+
+#define INTF_TO_IMPL(endpoint) ((axis2_woden_endpoint_impl_t *) endpoint)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_endpoint_free(
+        void *endpoint,
+        axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL 
+axis2_woden_endpoint_super_objs(
+        void *endpoint,
+        axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL 
+axis2_woden_endpoint_type(
+        void *endpoint,
+        axis2_env_t **env);
+
+axis2_woden_nested_configurable_t *AXIS2_CALL
+axis2_woden_endpoint_get_base_impl(
+        void *endpoint,
+        axis2_env_t **env);
+
+/* ************************************************************
+ *  Endpoint interface methods (the WSDL Component model)
+ * ************************************************************/
+
+woden_nc_name_t *AXIS2_CALL
+axis2_woden_endpoint_get_name(
+        void *endpoint,
+        axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_endpoint_get_binding(
+        void *endpoint,
+        axis2_env_t **env);
+
+axis2_url_t *AXIS2_CALL
+axis2_woden_endpoint_get_address(
+        void *endpoint,
+        axis2_env_t **env);
+/* ************************************************************
+ *  Endpoint Element interface methods (the XML Element model)
+ * ************************************************************/
+
+axis2_status_t AXIS2_CALL
+axis2_woden_endpoint_set_name(
+        void *endpoint,
+        axis2_env_t **env,
+        woden_nc_name_t *name);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_endpoint_set_binding_qname(
+        void *endpoint,
+        axis2_env_t **env,
+        axis2_qname_t *binding_qname);
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_endpoint_get_binding_qname(
+        void *endpoint,
+        axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_endpoint_get_binding_element(
+        void *endpoint,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_endpoint_set_address(
+        void *endpoint,
+        axis2_env_t **env,
+        axis2_url_t *uri);
+
+/******************************************************************************
+ *  Non-API implementation methods
+ *****************************************************************************/  
+
+axis2_status_t AXIS2_CALL
+axis2_woden_endpoint_set_binding_element(
+        void *endpoint,
+        axis2_env_t **env,
+        void *binding);
+
+static axis2_woden_endpoint_t *
+create(axis2_env_t **env);
+
+static axis2_status_t
+axis2_woden_endpoint_free_ops(
+        void *endpoint,
+        axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_endpoint_element(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!endpoint)
+    {
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) create(env);
+    }
+    else
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) endpoint;
+
+    axis2_woden_endpoint_free_ops(endpoint, env);
+
+    endpoint_impl->endpoint.base.endpoint_element.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_endpoint_element_ops_t));
+    axis2_woden_endpoint_element_resolve_methods(&(endpoint_impl->endpoint.base.
+            endpoint_element), env, endpoint_impl->methods);
+    return endpoint;
+}
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_nested_element(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!endpoint)
+    {
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) create(env);
+    }
+    else
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) endpoint;
+
+    axis2_woden_endpoint_free_ops(endpoint, env);
+
+
+    endpoint_impl->endpoint.base.endpoint_element.base.nested_element.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_nested_element_ops_t));
+    axis2_woden_nested_element_resolve_methods(&(endpoint_impl->endpoint.base.
+            endpoint_element.base.nested_element), env, endpoint_impl->methods);
+    return endpoint;
+}
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_documentable_element(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!endpoint)
+    {
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) create(env);
+    }
+    else
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) endpoint;
+
+    axis2_woden_endpoint_free_ops(endpoint, env);
+
+
+    endpoint_impl->endpoint.base.endpoint_element.base.documentable_element.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_documentable_element_ops_t));
+    axis2_woden_documentable_element_resolve_methods(&(endpoint_impl->endpoint.base.
+            endpoint_element.base.documentable_element), env, 
+            endpoint_impl->methods);
+    return endpoint;
+}
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_nested_configurable(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!endpoint)
+    {
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) create(env);
+    }
+    else
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) endpoint;
+
+    axis2_woden_endpoint_free_ops(endpoint, env);
+
+    endpoint_impl->endpoint.base.nested_configurable.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_nested_configurable_ops_t));
+    axis2_woden_nested_configurable_resolve_methods(&(endpoint_impl->endpoint.base.
+            nested_configurable), env, endpoint_impl->nested_configurable, 
+            endpoint_impl->methods);
+    return endpoint;
+}
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_configurable(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    void *configurable = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!endpoint)
+    {
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) create(env);
+    }
+    else
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) endpoint;
+
+    axis2_woden_endpoint_free_ops(endpoint, env);
+
+    endpoint_impl->endpoint.base.nested_configurable.base.configurable.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_configurable_ops_t));
+    configurable = AXIS2_WODEN_NESTED_CONFIGURABLE_GET_BASE_IMPL(
+            endpoint_impl->nested_configurable, env);
+    axis2_woden_configurable_resolve_methods(&(endpoint_impl->endpoint.base.
+            nested_configurable.base.configurable), env, configurable, 
+            endpoint_impl->methods);
+    return endpoint;
+}
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_nested_component(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!endpoint)
+    {
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) create(env);
+    }
+    else
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) endpoint;
+
+    axis2_woden_endpoint_free_ops(endpoint, env);
+  
+    endpoint_impl->endpoint.base.nested_configurable.base.nested_component.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_nested_component_ops_t));
+    axis2_woden_nested_component_resolve_methods(&(endpoint_impl->endpoint.base.
+            nested_configurable.base.nested_component), env, endpoint_impl->methods);
+    return endpoint;
+}
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_configurable_component(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    if(!endpoint)
+    {
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) create(env);
+    }
+    else
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) endpoint;
+
+    axis2_woden_endpoint_free_ops(endpoint, env);
+  
+    endpoint_impl->endpoint.base.configurable_component.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_configurable_component_ops_t));
+    axis2_woden_configurable_component_resolve_methods(&(endpoint_impl->endpoint.base.
+            configurable_component), env, endpoint_impl->methods);
+    return endpoint;
+}
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_wsdl_component(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if(!endpoint)
+    {
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) create(env);
+    }
+    else
+        endpoint_impl = (axis2_woden_endpoint_impl_t *) endpoint;
+
+    axis2_woden_endpoint_free_ops(endpoint, env);
+
+    endpoint_impl->endpoint.base.configurable_component.wsdl_component.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+        sizeof(axis2_woden_wsdl_component_ops_t));
+    axis2_woden_wsdl_component_resolve_methods(&(endpoint_impl->endpoint.base.
+            configurable_component.wsdl_component), env, endpoint_impl->methods);
+    return endpoint;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_endpoint_t *
+create(axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    endpoint_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_endpoint_impl_t));
+
+    endpoint_impl->obj_type= AXIS2_WODEN_ENDPOINT;
+    endpoint_impl->super = NULL;
+    endpoint_impl->methods = NULL;
+    endpoint_impl->f_name = NULL;
+    endpoint_impl->f_binding_qname = NULL;
+    endpoint_impl->f_binding = NULL;
+    endpoint_impl->f_address = NULL;
+    
+    endpoint_impl->endpoint.base.endpoint_element.ops = NULL;
+    endpoint_impl->endpoint.base.endpoint_element.base.nested_element.ops = NULL;
+    endpoint_impl->endpoint.base.endpoint_element.base.documentable_element.ops = 
+            NULL;
+    endpoint_impl->endpoint.base.nested_configurable.ops = NULL;
+    endpoint_impl->endpoint.base.nested_configurable.base.configurable.ops = NULL;
+    endpoint_impl->endpoint.base.nested_configurable.base.nested_component.ops = NULL; 
+    endpoint_impl->endpoint.base.configurable_component.ops = NULL;
+    endpoint_impl->endpoint.base.configurable_component.wsdl_component.ops = NULL;
+    
+    endpoint_impl->endpoint.ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_endpoint_ops_t));
+
+    endpoint_impl->endpoint.ops->free = axis2_woden_endpoint_free;
+    endpoint_impl->endpoint.ops->super_objs = axis2_woden_endpoint_super_objs;
+    endpoint_impl->endpoint.ops->type = axis2_woden_endpoint_type;
+    endpoint_impl->endpoint.ops->get_base_impl = axis2_woden_endpoint_get_base_impl;
+
+    endpoint_impl->endpoint.ops->get_name = axis2_woden_endpoint_get_name;
+    endpoint_impl->endpoint.ops->get_binding = axis2_woden_endpoint_get_binding;
+    endpoint_impl->endpoint.ops->get_address = 
+        axis2_woden_endpoint_get_address;
+ 
+    endpoint_impl->methods = axis2_hash_make(env);
+    if(!endpoint_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(endpoint_impl->methods, "free", AXIS2_HASH_KEY_STRING, 
+            axis2_woden_endpoint_free);
+    axis2_hash_set(endpoint_impl->methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_endpoint_super_objs);
+    axis2_hash_set(endpoint_impl->methods, "type", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_endpoint_type);
+
+    axis2_hash_set(endpoint_impl->methods, "get_name", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_endpoint_get_name);
+    axis2_hash_set(endpoint_impl->methods, "get_binding", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_endpoint_get_binding);
+    axis2_hash_set(endpoint_impl->methods, "get_address", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_endpoint_get_address);
+    axis2_hash_set(endpoint_impl->methods, "set_name", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_endpoint_set_name);
+    axis2_hash_set(endpoint_impl->methods, "set_binding_qname", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_endpoint_set_binding_qname);
+    axis2_hash_set(endpoint_impl->methods, "get_binding_qname", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_endpoint_get_binding_qname);
+    axis2_hash_set(endpoint_impl->methods, "get_binding_element", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_endpoint_get_binding_element);
+    axis2_hash_set(endpoint_impl->methods, "set_address", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_endpoint_set_address);
+    axis2_hash_set(endpoint_impl->methods, "set_binding_element", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_endpoint_set_binding_element);
+
+    return &(endpoint_impl->endpoint);
+}
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_create(axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+   
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    endpoint_impl = (axis2_woden_endpoint_impl_t *) create(env);
+
+    endpoint_impl->nested_configurable = axis2_woden_nested_configurable_create(env);
+
+    endpoint_impl->super = axis2_hash_make(env);
+    if(!endpoint_impl->super) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(endpoint_impl->super, "AXIS2_WODEN_ENDPOINT", AXIS2_HASH_KEY_STRING, 
+            &(endpoint_impl->endpoint));
+    axis2_hash_set(endpoint_impl->super, "AXIS2_WODEN_NESTED_CONFIGURABLE", AXIS2_HASH_KEY_STRING, 
+            endpoint_impl->nested_configurable);
+ 
+    return &(endpoint_impl->endpoint);
+}
+
+static axis2_status_t
+axis2_woden_endpoint_free_ops(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    endpoint_impl = INTF_TO_IMPL(endpoint);
+
+    if(endpoint_impl->endpoint.base.endpoint_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, endpoint_impl->endpoint.base.
+                endpoint_element.ops);
+        endpoint_impl->endpoint.base.endpoint_element.ops = NULL;
+    }
+
+    if(endpoint_impl->endpoint.base.endpoint_element.base.nested_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, endpoint_impl->endpoint.base.
+                endpoint_element.base.nested_element.ops);
+        endpoint_impl->endpoint.base.endpoint_element.base.nested_element.ops = 
+            NULL;
+    }
+    
+    if(endpoint_impl->endpoint.base.endpoint_element.base.documentable_element.ops)
+    {
+        AXIS2_FREE((*env)->allocator, endpoint_impl->endpoint.base.
+                endpoint_element.base.documentable_element.ops);
+        endpoint_impl->endpoint.base.endpoint_element.base.documentable_element.ops = 
+            NULL;
+    }
+    
+    if(endpoint_impl->endpoint.base.nested_configurable.ops)
+    {
+        AXIS2_FREE((*env)->allocator, endpoint_impl->endpoint.base.
+                nested_configurable.ops);
+        endpoint_impl->endpoint.base.nested_configurable.ops = 
+            NULL;
+    }
+    
+    if(endpoint_impl->endpoint.base.nested_configurable.base.configurable.ops)
+    {
+        AXIS2_FREE((*env)->allocator, endpoint_impl->endpoint.base.
+                nested_configurable.base.configurable.ops);
+        endpoint_impl->endpoint.base.nested_configurable.base.configurable.ops = 
+            NULL;
+    }
+
+    if(endpoint_impl->endpoint.base.nested_configurable.base.nested_component.ops)
+    {
+        AXIS2_FREE((*env)->allocator, endpoint_impl->endpoint.base.
+                nested_configurable.base.nested_component.ops);
+        endpoint_impl->endpoint.base.nested_configurable.base.nested_component.ops = NULL;
+    }
+
+    if(endpoint_impl->endpoint.base.configurable_component.ops)
+    {
+        AXIS2_FREE((*env)->allocator, endpoint_impl->endpoint.base.
+                configurable_component.ops);
+        endpoint_impl->endpoint.base.configurable_component.ops = NULL;
+    }
+
+    if(endpoint_impl->endpoint.base.configurable_component.wsdl_component.ops)
+    {
+        AXIS2_FREE((*env)->allocator, endpoint_impl->endpoint.base.
+                configurable_component.wsdl_component.ops);
+        endpoint_impl->endpoint.base.configurable_component.wsdl_component.ops = NULL;
+    }
+
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_woden_endpoint_free(void *endpoint,
+                        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    endpoint_impl = INTF_TO_IMPL(endpoint);
+
+    if(endpoint_impl->f_name)
+    {
+        WODEN_NC_NAME_FREE(endpoint_impl->f_name, env);
+        endpoint_impl->f_name = NULL;
+    }
+
+    if(endpoint_impl->f_binding_qname)
+    {
+        WODEN_QNAME_FREE(endpoint_impl->f_binding_qname, env);
+        endpoint_impl->f_binding_qname = NULL;
+    }
+
+    if(endpoint_impl->f_binding)
+    {
+        AXIS2_WODEN_BINDING_FREE(endpoint_impl->f_binding, env);
+        endpoint_impl->f_binding = NULL;
+    }
+
+    if(endpoint_impl->f_address)
+    {
+        AXIS2_URL_FREE(endpoint_impl->f_address, env);
+        endpoint_impl->f_address = NULL;
+    }
+   
+    /* TODO free f_parent */
+    
+    if(endpoint_impl->super)
+    {
+        axis2_hash_free(endpoint_impl->super, env);
+        endpoint_impl->super = NULL;
+    }
+    
+    if(endpoint_impl->methods)
+    {
+        axis2_hash_free(endpoint_impl->methods, env);
+        endpoint_impl->methods = NULL;
+    }
+
+    if(endpoint_impl->nested_configurable)
+    {
+        AXIS2_WODEN_NESTED_CONFIGURABLE_FREE(endpoint_impl->nested_configurable, env);
+        endpoint_impl->nested_configurable = NULL;
+    }
+
+    axis2_woden_endpoint_free_ops(endpoint, env);
+
+    if((&(endpoint_impl->endpoint))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(endpoint_impl->endpoint))->ops);
+        (&(endpoint_impl->endpoint))->ops = NULL;
+    }
+    
+    if(endpoint_impl)
+    {
+        AXIS2_FREE((*env)->allocator, endpoint_impl);
+        endpoint_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_endpoint_super_objs(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    endpoint_impl = INTF_TO_IMPL(endpoint);
+
+    return endpoint_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_endpoint_type(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    endpoint_impl = INTF_TO_IMPL(endpoint);
+
+    return endpoint_impl->obj_type;
+}
+
+axis2_woden_nested_configurable_t *AXIS2_CALL
+axis2_woden_endpoint_get_base_impl(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    endpoint_impl = INTF_TO_IMPL(endpoint);
+
+    return endpoint_impl->nested_configurable;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_endpoint_resolve_methods(
+        axis2_woden_endpoint_t *endpoint,
+        axis2_env_t **env,
+        axis2_woden_endpoint_t *endpoint_impl,
+        axis2_hash_t *methods)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl_l = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    endpoint_impl_l = INTF_TO_IMPL(endpoint_impl);
+    
+    endpoint->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    endpoint->ops->super_objs = axis2_hash_get(methods, "super_objs", 
+            AXIS2_HASH_KEY_STRING);
+    endpoint->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    
+    endpoint->ops->get_name = axis2_hash_get(methods, 
+            "get_name", AXIS2_HASH_KEY_STRING);
+    if(!endpoint->ops->get_name && endpoint_impl_l)
+            endpoint->ops->get_name = 
+            endpoint_impl_l->endpoint.ops->get_name;
+    
+    endpoint->ops->get_binding = axis2_hash_get(methods, 
+            "get_binding", AXIS2_HASH_KEY_STRING);
+    if(!endpoint->ops->get_binding && endpoint_impl_l)
+            endpoint->ops->get_binding = 
+            endpoint_impl_l->endpoint.ops->get_binding;
+    
+    endpoint->ops->get_address = axis2_hash_get(methods, 
+            "get_address", AXIS2_HASH_KEY_STRING);
+    if(!endpoint->ops->get_address && endpoint_impl_l)
+            endpoint->ops->get_address = 
+            endpoint_impl_l->endpoint.ops->get_address;
+    
+    endpoint->ops->set_binding_element = axis2_hash_get(methods, 
+            "set_binding_element", AXIS2_HASH_KEY_STRING);
+    if(!endpoint->ops->set_binding_element && endpoint_impl_l)
+            endpoint->ops->set_binding_element = 
+            endpoint_impl_l->endpoint.ops->set_binding_element;
+
+    return AXIS2_SUCCESS;
+}
+/* ************************************************************
+ *  Endpoint interface methods (the WSDL Component model)
+ * ************************************************************/
+
+woden_nc_name_t *AXIS2_CALL
+axis2_woden_endpoint_get_name(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_WODEN_ENDPOINT_SUPER_OBJS(endpoint, env);
+    endpoint_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ENDPOINT", AXIS2_HASH_KEY_STRING));
+    
+    return endpoint_impl->f_name;
+}
+
+void *AXIS2_CALL
+axis2_woden_endpoint_get_binding(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_WODEN_ENDPOINT_SUPER_OBJS(endpoint, env);
+    endpoint_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ENDPOINT", AXIS2_HASH_KEY_STRING));
+    
+    return endpoint_impl->f_binding;
+}
+
+axis2_url_t *AXIS2_CALL
+axis2_woden_endpoint_get_address(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    super = AXIS2_WODEN_ENDPOINT_SUPER_OBJS(endpoint, env);
+    endpoint_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ENDPOINT", AXIS2_HASH_KEY_STRING));
+    
+    return endpoint_impl->f_address;
+}
+/* ************************************************************
+ *  Endpoint Element interface methods (the XML Element model)
+ * ************************************************************/
+
+axis2_status_t AXIS2_CALL
+axis2_woden_endpoint_set_name(
+        void *endpoint,
+        axis2_env_t **env,
+        woden_nc_name_t *name)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_ENDPOINT_SUPER_OBJS(endpoint, env);
+    endpoint_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ENDPOINT", AXIS2_HASH_KEY_STRING));
+
+    if(endpoint_impl->f_name)
+    {
+        AXIS2_NC_NAME_FREE(endpoint_impl->f_name, env);
+    }
+    endpoint_impl->f_name = name;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_endpoint_set_binding_qname(
+        void *endpoint,
+        axis2_env_t **env,
+        axis2_qname_t *binding_qname)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_ENDPOINT_SUPER_OBJS(endpoint, env);
+    endpoint_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ENDPOINT", AXIS2_HASH_KEY_STRING));
+
+    if(endpoint_impl->f_binding_qname)
+    {
+        AXIS2_QNAME_FREE(endpoint_impl->f_binding_qname, env);
+    }
+
+    endpoint_impl->f_binding_qname = AXIS2_QNAME_CLONE(binding_qname, env);
+    return AXIS2_SUCCESS;
+}
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_endpoint_get_binding_qname(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_ENDPOINT_SUPER_OBJS(endpoint, env);
+    endpoint_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ENDPOINT", AXIS2_HASH_KEY_STRING));
+
+    return endpoint_impl->f_binding_qname;
+}
+
+void *AXIS2_CALL
+axis2_woden_endpoint_get_binding_element(
+        void *endpoint,
+        axis2_env_t **env)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_ENDPOINT_SUPER_OBJS(endpoint, env);
+    endpoint_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ENDPOINT", AXIS2_HASH_KEY_STRING));
+
+    return endpoint_impl->f_binding;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_endpoint_set_address(
+        void *endpoint,
+        axis2_env_t **env,
+        axis2_url_t *uri)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_ENDPOINT_SUPER_OBJS(endpoint, env);
+    endpoint_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ENDPOINT", AXIS2_HASH_KEY_STRING));
+
+    if(endpoint_impl->f_binding_qname)
+    {
+        /* TODO */
+    }
+
+    endpoint_impl->f_address = uri;
+    return AXIS2_SUCCESS;
+}
+
+/******************************************************************************
+ *  Non-API implementation methods
+ *****************************************************************************/  
+
+axis2_status_t AXIS2_CALL
+axis2_woden_endpoint_set_binding_element(
+        void *endpoint,
+        axis2_env_t **env,
+        void *binding)
+{
+    axis2_woden_endpoint_impl_t *endpoint_impl = NULL;
+    axis2_hash_t *super = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    super = AXIS2_WODEN_ENDPOINT_SUPER_OBJS(endpoint, env);
+    endpoint_impl = INTF_TO_IMPL(axis2_hash_get(super, 
+                "AXIS2_WODEN_ENDPOINT", AXIS2_HASH_KEY_STRING));
+
+    if(endpoint_impl->f_binding)
+    {
+        /* TODO */
+    }
+
+    endpoint_impl->f_binding = binding;
+    return AXIS2_SUCCESS;
+}
+
+

Added: webservices/axis2/trunk/c/woden/src/wsdl20/extensions/component_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/extensions/component_exts.c?rev=410740&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/extensions/component_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/extensions/component_exts.c Wed May 31 21:34:47 2006
@@ -0,0 +1,188 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
+#include <woden/wsdl20/xml/axis2_woden_wsdl_element.h>
+#include <axis2_url.h>
+#include <axis2_hash.h>
+
+typedef struct axis2_woden_component_exts_impl axis2_woden_component_exts_impl_t;
+
+/** 
+ * @brief Component Extensions Struct Impl
+ *	Axis2 Component Extensions  
+ */ 
+struct axis2_woden_component_exts_impl
+{
+    axis2_woden_component_exts_t component_exts;
+    void *f_parent_element;
+    axis2_url_t *f_namespc;
+};
+
+#define INTF_TO_IMPL(component_exts) ((axis2_woden_component_exts_impl_t *) component_exts)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_component_exts_free(
+        void *component_exts,
+        axis2_env_t **envv);
+
+axis2_url_t *AXIS2_CALL
+axis2_woden_component_exts_get_namespace(
+        void *component_exts,
+        axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_component_exts_get_parent_element(
+        void *component_exts,
+        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_component_exts_init(
+        void *component_exts,
+        axis2_env_t **env,
+        axis2_woden_wsdl_element_t *parent_el,
+        axis2_url_t *namespc);
+ 
+AXIS2_DECLARE(axis2_woden_component_exts_t *)
+axis2_woden_component_exts_create(
+        axis2_env_t **env)
+{
+    axis2_woden_component_exts_impl_t *component_exts_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    component_exts_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_component_exts_impl_t));
+
+    component_exts_impl->f_parent_element = NULL;
+    component_exts_impl->f_namespc = NULL;
+
+    component_exts_impl->component_exts.ops = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_component_exts_ops_t)); 
+    
+    component_exts_impl->component_exts.ops->free = 
+            axis2_woden_component_exts_free;
+    component_exts_impl->component_exts.ops->init = 
+            axis2_woden_component_exts_init;
+    component_exts_impl->component_exts.ops->get_namespace = 
+            axis2_woden_component_exts_get_namespace;
+    component_exts_impl->component_exts.ops->get_parent_element = 
+            axis2_woden_component_exts_get_parent_element;
+    
+    return &(component_exts_impl->component_exts);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_component_exts_free(
+        void *component_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_component_exts_impl_t *component_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    component_exts_impl = INTF_TO_IMPL(component_exts);
+
+    if(component_exts_impl->f_parent_element)
+    {
+        AXIS2_WODEN_ELEMENT_FREE(component_exts_impl->f_parent_element, env);
+        component_exts_impl->f_parent_element = NULL;
+    }
+    
+    if(component_exts_impl->f_namespc)
+    {
+        AXIS2_URL_FREE(component_exts_impl->f_namespc, env);
+        component_exts_impl->f_namespc = NULL;
+    }
+    
+    if((&(component_exts_impl->component_exts))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(component_exts_impl->component_exts))->ops);
+        (&(component_exts_impl->component_exts))->ops = NULL;
+    }
+
+    if(component_exts_impl)
+    {
+        AXIS2_FREE((*env)->allocator, component_exts_impl);
+        component_exts_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_component_exts_resolve_methods(
+        axis2_woden_component_exts_t *component_exts,
+        axis2_env_t **env,
+        axis2_hash_t *methods)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    
+    component_exts->ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_component_exts_ops_t));
+    component_exts->ops->free = axis2_hash_get(methods, "free", 
+            AXIS2_HASH_KEY_STRING);
+    component_exts->ops->get_parent_element = axis2_hash_get(methods, 
+            "get_parent_element", AXIS2_HASH_KEY_STRING);
+    component_exts->ops->to_component_exts_free = axis2_hash_get(methods, 
+            "to_component_exts_free", AXIS2_HASH_KEY_STRING);
+    component_exts->ops->type = axis2_hash_get(methods, "type", 
+            AXIS2_HASH_KEY_STRING);
+    component_exts->ops->init = axis2_hash_get(methods, 
+            "init", AXIS2_HASH_KEY_STRING); ;
+    component_exts->ops->get_namespace = axis2_hash_get(methods, 
+            "get_namespace", AXIS2_HASH_KEY_STRING); 
+
+    return AXIS2_SUCCESS;    
+}
+
+axis2_url_t *AXIS2_CALL
+axis2_woden_component_exts_get_namespace(
+        void *component_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_component_exts_impl_t *component_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    component_exts_impl = INTF_TO_IMPL(component_exts);
+    return component_exts_impl->f_namespc;
+}
+
+void *AXIS2_CALL
+axis2_woden_component_exts_get_parent_element(
+        void *component_exts,
+        axis2_env_t **env)
+{
+    axis2_woden_component_exts_impl_t *component_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    component_exts_impl = INTF_TO_IMPL(component_exts);
+    return component_exts_impl->f_parent_element;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_component_exts_init(
+        void *component_exts,
+        axis2_env_t **env,
+        axis2_woden_wsdl_element_t *parent_el,
+        axis2_url_t *namespc) 
+{
+    axis2_woden_component_exts_impl_t *component_exts_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    component_exts_impl = INTF_TO_IMPL(component_exts);
+    component_exts_impl->f_parent_element = parent_el;
+    component_exts_impl->f_namespc = namespc;
+    return AXIS2_SUCCESS;
+}



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


Mime
View raw message