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/04/21 11:03:48 UTC

svn commit: r395820 [2/2] - in /webservices/axis2/trunk/c: include/ include/woden/ modules/wsdl/woden/

Added: webservices/axis2/trunk/c/modules/wsdl/woden/qname_list_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/qname_list_attr.c?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/qname_list_attr.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/qname_list_attr.c Fri Apr 21 02:03:45 2006
@@ -0,0 +1,225 @@
+/*
+ * 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_qname_list_attr.h>
+#include <axis2_om_element.h>
+#include <axis2_om_node.h>
+
+typedef struct axis2_woden_qname_list_attr_impl axis2_woden_qname_list_attr_impl_t;
+
+/** 
+ * @brief QName List Attribute Struct Impl
+ *	Axis2 QName List Attribute  
+ */ 
+struct axis2_woden_qname_list_attr_impl
+{
+    axis2_woden_qname_list_attr_t qname_list_attr;
+    axis2_woden_xml_attr_t *xml_attr;
+    axis2_hash_t *methods;
+};
+
+#define INTF_TO_IMPL(qname_list_attr) \
+    ((axis2_woden_qname_list_attr_impl_t *) qname_list_attr)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_qname_list_attr_free(void *qname_list_attr,
+                        axis2_env_t **env);
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_qname_list_attr_get_base_impl(void *qname_list_attr,
+                                axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_qname_list_attr_get_qnames(void *qname_list_attr,
+                                    axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_qname_list_attr_convert(void *qname_list_attr,
+                                axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_char_t *attr_value);
+
+/*
+ * TODO This constructor is not used for extension attributes, but may be useful if
+ * parsing of native WSDL attributes is changed to use the XMLAttr interface.
+ */
+AXIS2_DECLARE(axis2_woden_qname_list_attr_t *)
+axis2_woden_qname_list_attr_create(axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_qname_t *attr_type,
+                                axis2_char_t *attr_value)
+{
+    axis2_woden_qname_list_attr_impl_t *qname_list_attr_impl = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+     
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    qname_list_attr_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_qname_list_attr_impl_t));
+
+    qname_list_attr_impl->xml_attr = NULL;
+    qname_list_attr_impl->methods = NULL;
+    qname_list_attr_impl->qname_list_attr.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_qname_list_attr_ops_t));
+
+    qname_list_attr_impl->qname_list_attr.ops->free = 
+        axis2_woden_qname_list_attr_free;
+    qname_list_attr_impl->qname_list_attr.ops->get_base_impl = 
+        axis2_woden_qname_list_attr_get_base_impl;
+    qname_list_attr_impl->qname_list_attr.ops->get_qnames = 
+        axis2_woden_qname_list_attr_get_qnames;
+    qname_list_attr_impl->qname_list_attr.ops->convert = 
+        axis2_woden_qname_list_attr_convert;
+    
+    
+    qname_list_attr_impl->methods = axis2_hash_make(env);
+    if(!qname_list_attr_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(qname_list_attr_impl->methods, "free", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_qname_list_attr_free);
+    axis2_hash_set(qname_list_attr_impl->methods, "get_qnames", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_qname_list_attr_get_qnames);
+    axis2_hash_set(qname_list_attr_impl->methods, "convert", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_qname_list_attr_convert);
+
+    qname_list_attr_impl->xml_attr = axis2_woden_xml_attr_create(env, owner_el, 
+            owner_node, attr_type, attr_value);
+    status = axis2_woden_xml_attr_resolve_methods(&(qname_list_attr_impl->
+                qname_list_attr.base), env, qname_list_attr_impl->
+                xml_attr, qname_list_attr_impl->methods);
+    if(AXIS2_SUCCESS != status) return NULL;
+    return &(qname_list_attr_impl->qname_list_attr);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_qname_list_attr_free(void *qname_list_attr,
+                        axis2_env_t **env)
+{
+    axis2_woden_qname_list_attr_impl_t *qname_list_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    qname_list_attr_impl = INTF_TO_IMPL(qname_list_attr);
+
+    if(qname_list_attr_impl->methods)
+    {
+        axis2_hash_free(qname_list_attr_impl->methods, env);
+        qname_list_attr_impl->methods = NULL;
+    }  
+
+    if(qname_list_attr_impl->xml_attr)
+    {
+        AXIS2_WODEN_XML_ATTR_FREE(qname_list_attr_impl->xml_attr, env);
+        qname_list_attr_impl->xml_attr = NULL;
+    }
+    
+    if((&(qname_list_attr_impl->qname_list_attr))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(qname_list_attr_impl->qname_list_attr))->ops);
+        (&(qname_list_attr_impl->qname_list_attr))->ops = NULL;
+    }
+
+    if(qname_list_attr_impl)
+    {
+        AXIS2_FREE((*env)->allocator, qname_list_attr_impl);
+        qname_list_attr_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_qname_list_attr_get_base_impl(void *qname_list_attr,
+                                axis2_env_t **env)
+{
+    axis2_woden_qname_list_attr_impl_t *qname_list_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    qname_list_attr_impl = INTF_TO_IMPL(qname_list_attr);
+
+    return qname_list_attr_impl->xml_attr;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_qname_list_attr_resolve_methods(
+                    axis2_woden_qname_list_attr_t *qname_list_attr,
+                    axis2_env_t **env,
+                    axis2_woden_qname_list_attr_t *qname_list_attr_impl,
+                    axis2_hash_t *methods)
+{
+    axis2_woden_qname_list_attr_impl_t *qname_list_attr_impl_l = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, qname_list_attr_impl, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    
+    qname_list_attr_impl_l = (axis2_woden_qname_list_attr_impl_t *) qname_list_attr_impl;
+    
+    qname_list_attr->ops = AXIS2_MALLOC((*env)->allocator, 
+                            sizeof(axis2_woden_qname_list_attr_ops_t));
+    qname_list_attr->ops->free = 
+                axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
+    qname_list_attr->ops->get_base_impl = 
+                qname_list_attr_impl_l->qname_list_attr.ops->get_base_impl;
+    qname_list_attr->ops->get_qnames = qname_list_attr_impl_l->qname_list_attr.ops->get_qnames;
+    qname_list_attr->ops->convert = qname_list_attr_impl_l->qname_list_attr.ops->convert;
+    
+    return axis2_woden_xml_attr_resolve_methods(&(qname_list_attr->base), 
+            env, qname_list_attr_impl_l->xml_attr, methods);
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_qname_list_attr_get_qnames(void *qname_list_attr,
+                                    axis2_env_t **env)
+{
+    axis2_woden_qname_list_attr_impl_t *qname_list_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    qname_list_attr_impl = INTF_TO_IMPL(qname_list_attr);
+    return (axis2_array_list_t *) AXIS2_WODEN_XML_ATTR_GET_CONTENT(
+            qname_list_attr_impl->xml_attr, env);
+}
+
+void *AXIS2_CALL
+axis2_woden_qname_list_attr_convert(void *qname_list_attr,
+                                axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_char_t *attr_value)
+{
+    axis2_woden_qname_list_attr_impl_t *qname_list_attr_impl = NULL;
+    axis2_qname_t *qn = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    qname_list_attr_impl = INTF_TO_IMPL(qname_list_attr);
+
+    if(attr_value)
+    {
+        /* TODO */
+    }
+    
+    if(!qn)
+    {
+        AXIS2_WODEN_XML_ATTR_SET_VALID(qname_list_attr_impl->xml_attr, env, AXIS2_FALSE);
+        /* TODO handler error */
+    }
+    
+    return qn;
+}
+

Added: webservices/axis2/trunk/c/modules/wsdl/woden/qname_list_or_token_any_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/qname_list_or_token_any_attr.c?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/qname_list_or_token_any_attr.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/qname_list_or_token_any_attr.c Fri Apr 21 02:03:45 2006
@@ -0,0 +1,356 @@
+/*
+ * 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_qname_list_or_token_any_attr.h>
+#include <axis2_om_element.h>
+#include <axis2_om_node.h>
+
+typedef struct axis2_woden_qname_list_or_token_any_attr_impl 
+        axis2_woden_qname_list_or_token_any_attr_impl_t;
+
+/** 
+ * @brief QName List or Token Any Attribute Struct Impl
+ *	Axis2 QName List or Token Any Attribute  
+ */ 
+struct axis2_woden_qname_list_or_token_any_attr_impl
+{
+    axis2_woden_qname_list_or_token_any_attr_t list_token_attr;
+    axis2_woden_xml_attr_t *xml_attr;
+    axis2_hash_t *methods;
+    axis2_bool_t is_token;
+};
+
+#define INTF_TO_IMPL(list_token_attr) \
+    ((axis2_woden_qname_list_or_token_any_attr_impl_t *) \
+     list_token_attr)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_qname_list_or_token_any_attr_free(
+                        void *list_token_attr,
+                        axis2_env_t **env);
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_get_base_impl(
+                                void *list_token_attr,
+                                axis2_env_t **env);
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_is_qname_list(
+                                    void *list_token_attr,
+                                    axis2_env_t **env); 
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_is_token(
+                                    void *list_token_attr,
+                                    axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_get_qnames(
+                                    void *list_token_attr,
+                                    axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_get_token(
+                                    void *list_token_attr,
+                                    axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_convert(
+                                void *list_token_attr,
+                                axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_char_t *attr_value);
+
+/*
+ * TODO This constructor is not used for extension attributes, but may be useful if
+ * parsing of native WSDL attributes is changed to use the XMLAttr interface.
+ */
+AXIS2_DECLARE(axis2_woden_qname_list_or_token_any_attr_t *)
+axis2_woden_qname_list_or_token_any_attr_create(axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_qname_t *attr_type,
+                                axis2_char_t *attr_value)
+{
+    axis2_woden_qname_list_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+     
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_qname_list_or_token_any_attr_impl_t));
+
+    list_token_attr_impl->xml_attr = NULL;
+    list_token_attr_impl->methods = NULL;
+    list_token_attr_impl->list_token_attr.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_qname_list_or_token_any_attr_ops_t));
+
+    list_token_attr_impl->list_token_attr.ops->free = 
+        axis2_woden_qname_list_or_token_any_attr_free;
+    list_token_attr_impl->list_token_attr.ops->get_base_impl = 
+        axis2_woden_qname_list_or_token_any_attr_get_base_impl;
+    list_token_attr_impl->list_token_attr.ops->is_qname_list = 
+        axis2_woden_qname_list_or_token_any_attr_is_qname_list;
+    list_token_attr_impl->list_token_attr.ops->is_token = 
+        axis2_woden_qname_list_or_token_any_attr_is_token;
+    list_token_attr_impl->list_token_attr.ops->get_qnames = 
+        axis2_woden_qname_list_or_token_any_attr_get_qnames;
+    list_token_attr_impl->list_token_attr.ops->get_token = 
+        axis2_woden_qname_list_or_token_any_attr_get_token;
+    list_token_attr_impl->list_token_attr.ops->convert = 
+        axis2_woden_qname_list_or_token_any_attr_convert;
+    
+    
+    list_token_attr_impl->methods = axis2_hash_make(env);
+    if(!list_token_attr_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(list_token_attr_impl->methods, "free", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_qname_list_or_token_any_attr_free);
+    axis2_hash_set(list_token_attr_impl->methods, "is_qname_list", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_qname_list_or_token_any_attr_is_qname_list);
+    axis2_hash_set(list_token_attr_impl->methods, "is_token", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_qname_list_or_token_any_attr_is_token);
+    axis2_hash_set(list_token_attr_impl->methods, "get_qnames", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_qname_list_or_token_any_attr_get_qnames);
+    axis2_hash_set(list_token_attr_impl->methods, "get_token", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_qname_list_or_token_any_attr_get_token);
+    axis2_hash_set(list_token_attr_impl->methods, "convert", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_qname_list_or_token_any_attr_convert);
+
+    list_token_attr_impl->xml_attr = axis2_woden_xml_attr_create(
+            env, owner_el, owner_node, attr_type, attr_value);
+    status = axis2_woden_xml_attr_resolve_methods(&(list_token_attr_impl->
+                list_token_attr.base), env, 
+                list_token_attr_impl->xml_attr, 
+                list_token_attr_impl->methods);
+    if(AXIS2_SUCCESS != status) return NULL;
+    return &(list_token_attr_impl->list_token_attr);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_free(void *list_token_attr,
+                        axis2_env_t **env)
+{
+    axis2_woden_qname_list_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+
+    if(list_token_attr_impl->methods)
+    {
+        axis2_hash_free(list_token_attr_impl->methods, env);
+        list_token_attr_impl->methods = NULL;
+    }  
+
+    if(list_token_attr_impl->xml_attr)
+    {
+        AXIS2_WODEN_XML_ATTR_FREE(list_token_attr_impl->xml_attr, 
+                env);
+        list_token_attr_impl->xml_attr = NULL;
+    }
+    
+    if((&(list_token_attr_impl->list_token_attr))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(list_token_attr_impl->
+                        list_token_attr))->ops);
+        (&(list_token_attr_impl->list_token_attr))->ops = 
+                NULL;
+    }
+
+    if(list_token_attr_impl)
+    {
+        AXIS2_FREE((*env)->allocator, list_token_attr_impl);
+        list_token_attr_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_get_base_impl(
+                                void *list_token_attr,
+                                axis2_env_t **env)
+{
+    axis2_woden_qname_list_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    list_token_attr_impl = 
+        INTF_TO_IMPL(list_token_attr);
+
+    return list_token_attr_impl->xml_attr;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_resolve_methods(
+                    axis2_woden_qname_list_or_token_any_attr_t *
+                            list_token_attr,
+                    axis2_env_t **env,
+                    axis2_woden_qname_list_or_token_any_attr_t *
+                            list_token_attr_impl,
+                    axis2_hash_t *methods)
+{
+    axis2_woden_qname_list_or_token_any_attr_impl_t *
+            list_token_attr_impl_l = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, list_token_attr_impl, 
+            AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    
+    list_token_attr_impl_l = 
+            (axis2_woden_qname_list_or_token_any_attr_impl_t *) 
+                list_token_attr_impl;
+    
+    list_token_attr->ops = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_qname_list_or_token_any_attr_ops_t));
+    list_token_attr->ops->free = 
+                axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
+    list_token_attr->ops->get_base_impl = 
+                list_token_attr_impl_l->
+                list_token_attr.ops->get_base_impl;
+    list_token_attr->ops->is_qname_list = 
+        list_token_attr_impl_l->list_token_attr.ops->is_qname_list;
+    list_token_attr->ops->is_token = 
+        list_token_attr_impl_l->list_token_attr.ops->is_token;
+    list_token_attr->ops->get_qnames = 
+        list_token_attr_impl_l->list_token_attr.ops->get_qnames;
+    list_token_attr->ops->get_token = 
+        list_token_attr_impl_l->list_token_attr.ops->get_token;
+    list_token_attr->ops->convert = 
+        list_token_attr_impl_l->list_token_attr.ops->convert;
+    
+    return axis2_woden_xml_attr_resolve_methods(&(list_token_attr->
+                base), env, list_token_attr_impl_l->xml_attr, 
+                    methods);
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_is_qname_list(
+                                    void *list_token_attr,
+                                    axis2_env_t **env) 
+{
+    axis2_woden_qname_list_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+    if(AXIS2_FALSE == list_token_attr_impl->is_token)
+        return AXIS2_TRUE;
+    return AXIS2_FALSE;
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_is_token(
+                                    void *list_token_attr,
+                                    axis2_env_t **env) 
+{
+    axis2_woden_qname_list_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+
+    if(AXIS2_TRUE == AXIS2_WODEN_XML_ATTR_IS_VALID(list_token_attr_impl->xml_attr, env) && 
+            list_token_attr_impl->is_token)
+    {
+        return AXIS2_TRUE;
+    } else 
+    {
+        return AXIS2_FALSE;
+    }
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_get_qnames(
+                                    void *list_token_attr,
+                                    axis2_env_t **env)
+{
+    axis2_woden_qname_list_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+    return (axis2_array_list_t *) AXIS2_WODEN_XML_ATTR_GET_CONTENT(
+            list_token_attr_impl->xml_attr, env);
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_get_token(
+                                    void *list_token_attr,
+                                    axis2_env_t **env)
+{
+    axis2_woden_qname_list_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+    if(AXIS2_TRUE == 
+            axis2_woden_qname_list_or_token_any_attr_is_token(list_token_attr, 
+                env))
+    {
+        return (axis2_char_t *) AXIS2_WODEN_XML_ATTR_GET_CONTENT(
+                list_token_attr_impl->xml_attr, env);
+    } else 
+    {
+        return NULL;
+    }
+}
+
+void *AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_convert(
+                                void *list_token_attr,
+                                axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_char_t *attr_value)
+{
+    axis2_woden_qname_list_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    axis2_array_list_t *qn_array = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+
+    /* First, check if the attribute contains the xs:token '#any'.*/
+    if(0 == AXIS2_STRCMP("#any", attr_value)) return attr_value;
+
+    /* Second, assume the attribute contains a list of xs:QName. */
+    if(attr_value)
+    {
+        /* TODO */
+    }
+    
+    if(!qn_array)
+    {
+        AXIS2_WODEN_XML_ATTR_SET_VALID(list_token_attr_impl->
+                xml_attr, env, AXIS2_FALSE);
+        /* TODO handler error */
+    }
+    
+    return qn_array;
+}
+

Added: webservices/axis2/trunk/c/modules/wsdl/woden/qname_or_token_any_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/qname_or_token_any_attr.c?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/qname_or_token_any_attr.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/qname_or_token_any_attr.c Fri Apr 21 02:03:45 2006
@@ -0,0 +1,357 @@
+/*
+ * 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_qname_or_token_any_attr.h>
+#include <axis2_om_element.h>
+#include <axis2_om_node.h>
+
+typedef struct axis2_woden_qname_or_token_any_attr_impl 
+        axis2_woden_qname_or_token_any_attr_impl_t;
+
+/** 
+ * @brief QName or Token Any Attribute Struct Impl
+ *	Axis2 QName or Token Any Attribute  
+ */ 
+struct axis2_woden_qname_or_token_any_attr_impl
+{
+    axis2_woden_qname_or_token_any_attr_t list_token_attr;
+    axis2_woden_xml_attr_t *xml_attr;
+    axis2_hash_t *methods;
+    axis2_bool_t is_token;
+};
+
+#define INTF_TO_IMPL(list_token_attr) \
+    ((axis2_woden_qname_or_token_any_attr_impl_t *) \
+     list_token_attr)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_qname_or_token_any_attr_free(
+                        void *list_token_attr,
+                        axis2_env_t **env);
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_get_base_impl(
+                                void *list_token_attr,
+                                axis2_env_t **env);
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_is_qname(
+                                    void *list_token_attr,
+                                    axis2_env_t **env); 
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_is_token(
+                                    void *list_token_attr,
+                                    axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_get_qnames(
+                                    void *list_token_attr,
+                                    axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_get_token(
+                                    void *list_token_attr,
+                                    axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_convert(
+                                void *list_token_attr,
+                                axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_char_t *attr_value);
+
+/*
+ * TODO This constructor is not used for extension attributes, but may be useful if
+ * parsing of native WSDL attributes is changed to use the XMLAttr interface.
+ */
+AXIS2_DECLARE(axis2_woden_qname_or_token_any_attr_t *)
+axis2_woden_qname_or_token_any_attr_create(axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_qname_t *attr_type,
+                                axis2_char_t *attr_value)
+{
+    axis2_woden_qname_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+     
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_qname_or_token_any_attr_impl_t));
+
+    list_token_attr_impl->xml_attr = NULL;
+    list_token_attr_impl->methods = NULL;
+    list_token_attr_impl->list_token_attr.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_qname_or_token_any_attr_ops_t));
+
+    list_token_attr_impl->list_token_attr.ops->free = 
+        axis2_woden_qname_or_token_any_attr_free;
+    list_token_attr_impl->list_token_attr.ops->get_base_impl = 
+        axis2_woden_qname_or_token_any_attr_get_base_impl;
+    list_token_attr_impl->list_token_attr.ops->is_qname = 
+        axis2_woden_qname_or_token_any_attr_is_qname;
+    list_token_attr_impl->list_token_attr.ops->is_token = 
+        axis2_woden_qname_or_token_any_attr_is_token;
+    list_token_attr_impl->list_token_attr.ops->get_qnames = 
+        axis2_woden_qname_or_token_any_attr_get_qnames;
+    list_token_attr_impl->list_token_attr.ops->get_token = 
+        axis2_woden_qname_or_token_any_attr_get_token;
+    list_token_attr_impl->list_token_attr.ops->convert = 
+        axis2_woden_qname_or_token_any_attr_convert;
+    
+    
+    list_token_attr_impl->methods = axis2_hash_make(env);
+    if(!list_token_attr_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(list_token_attr_impl->methods, "free", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_qname_or_token_any_attr_free);
+    axis2_hash_set(list_token_attr_impl->methods, "is_qname", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_qname_or_token_any_attr_is_qname);
+    axis2_hash_set(list_token_attr_impl->methods, "is_token", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_qname_or_token_any_attr_is_token);
+    axis2_hash_set(list_token_attr_impl->methods, "get_qnames", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_qname_or_token_any_attr_get_qnames);
+    axis2_hash_set(list_token_attr_impl->methods, "get_token", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_qname_or_token_any_attr_get_token);
+    axis2_hash_set(list_token_attr_impl->methods, "convert", 
+            AXIS2_HASH_KEY_STRING, 
+            axis2_woden_qname_or_token_any_attr_convert);
+
+    list_token_attr_impl->xml_attr = axis2_woden_xml_attr_create(
+            env, owner_el, owner_node, attr_type, attr_value);
+    status = axis2_woden_xml_attr_resolve_methods(&(list_token_attr_impl->
+                list_token_attr.base), env, 
+                list_token_attr_impl->xml_attr, 
+                list_token_attr_impl->methods);
+    if(AXIS2_SUCCESS != status) return NULL;
+    return &(list_token_attr_impl->list_token_attr);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_free(void *list_token_attr,
+                        axis2_env_t **env)
+{
+    axis2_woden_qname_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+
+    if(list_token_attr_impl->methods)
+    {
+        axis2_hash_free(list_token_attr_impl->methods, env);
+        list_token_attr_impl->methods = NULL;
+    }  
+
+    if(list_token_attr_impl->xml_attr)
+    {
+        AXIS2_WODEN_XML_ATTR_FREE(list_token_attr_impl->xml_attr, 
+                env);
+        list_token_attr_impl->xml_attr = NULL;
+    }
+    
+    if((&(list_token_attr_impl->list_token_attr))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(list_token_attr_impl->
+                        list_token_attr))->ops);
+        (&(list_token_attr_impl->list_token_attr))->ops = 
+                NULL;
+    }
+
+    if(list_token_attr_impl)
+    {
+        AXIS2_FREE((*env)->allocator, list_token_attr_impl);
+        list_token_attr_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_get_base_impl(
+                                void *list_token_attr,
+                                axis2_env_t **env)
+{
+    axis2_woden_qname_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    list_token_attr_impl = 
+        INTF_TO_IMPL(list_token_attr);
+
+    return list_token_attr_impl->xml_attr;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_resolve_methods(
+                    axis2_woden_qname_or_token_any_attr_t *
+                            list_token_attr,
+                    axis2_env_t **env,
+                    axis2_woden_qname_or_token_any_attr_t *
+                            list_token_attr_impl,
+                    axis2_hash_t *methods)
+{
+    axis2_woden_qname_or_token_any_attr_impl_t *
+            list_token_attr_impl_l = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, list_token_attr_impl, 
+            AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    
+    list_token_attr_impl_l = 
+            (axis2_woden_qname_or_token_any_attr_impl_t *) 
+                list_token_attr_impl;
+    
+    list_token_attr->ops = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_qname_or_token_any_attr_ops_t));
+    list_token_attr->ops->free = 
+                axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
+    list_token_attr->ops->get_base_impl = 
+                list_token_attr_impl_l->
+                list_token_attr.ops->get_base_impl;
+    list_token_attr->ops->is_qname = 
+        list_token_attr_impl_l->list_token_attr.ops->is_qname;
+    list_token_attr->ops->is_token = 
+        list_token_attr_impl_l->list_token_attr.ops->is_token;
+    list_token_attr->ops->get_qnames = 
+        list_token_attr_impl_l->list_token_attr.ops->get_qnames;
+    list_token_attr->ops->get_token = 
+        list_token_attr_impl_l->list_token_attr.ops->get_token;
+    list_token_attr->ops->convert = 
+        list_token_attr_impl_l->list_token_attr.ops->convert;
+    
+    return axis2_woden_xml_attr_resolve_methods(&(list_token_attr->
+                base), env, list_token_attr_impl_l->xml_attr, 
+                    methods);
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_is_qname(
+                                    void *list_token_attr,
+                                    axis2_env_t **env) 
+{
+    axis2_woden_qname_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+    if(AXIS2_FALSE == list_token_attr_impl->is_token)
+        return AXIS2_TRUE;
+    return AXIS2_FALSE;
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_is_token(
+                                    void *list_token_attr,
+                                    axis2_env_t **env) 
+{
+    axis2_woden_qname_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+
+    if(AXIS2_TRUE == 
+            AXIS2_WODEN_XML_ATTR_IS_VALID(list_token_attr_impl->xml_attr, env) && 
+            list_token_attr_impl->is_token)
+    {
+        return AXIS2_TRUE;
+    } else 
+    {
+        return AXIS2_FALSE;
+    }
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_get_qnames(
+                                    void *list_token_attr,
+                                    axis2_env_t **env)
+{
+    axis2_woden_qname_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+    return (axis2_array_list_t *) AXIS2_WODEN_XML_ATTR_GET_CONTENT(
+            list_token_attr_impl->xml_attr, env);
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_get_token(
+                                    void *list_token_attr,
+                                    axis2_env_t **env)
+{
+    axis2_woden_qname_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+    if(AXIS2_TRUE == 
+            axis2_woden_qname_or_token_any_attr_is_token(list_token_attr, 
+                env))
+    {
+        return (axis2_char_t *) AXIS2_WODEN_XML_ATTR_GET_CONTENT(
+                list_token_attr_impl->xml_attr, env);
+    } else 
+    {
+        return NULL;
+    }
+}
+
+void *AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_convert(
+                                void *list_token_attr,
+                                axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_char_t *attr_value)
+{
+    axis2_woden_qname_or_token_any_attr_impl_t *
+            list_token_attr_impl = NULL;
+    axis2_array_list_t *qn_array = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    list_token_attr_impl = INTF_TO_IMPL(list_token_attr);
+
+    /* First, check if the attribute contains the xs:token '#any'.*/
+    if(0 == AXIS2_STRCMP("#any", attr_value)) return attr_value;
+
+    /* Second, assume the attribute contains a list of xs:QName. */
+    if(attr_value)
+    {
+        /* TODO */
+    }
+    
+    if(!qn_array)
+    {
+        AXIS2_WODEN_XML_ATTR_SET_VALID(list_token_attr_impl->
+                xml_attr, env, AXIS2_FALSE);
+        /* TODO handler error */
+    }
+    
+    return qn_array;
+}
+

Modified: webservices/axis2/trunk/c/modules/wsdl/woden/schema.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/schema.c?rev=395820&r1=395819&r2=395820&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/schema.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/schema.c Fri Apr 21 02:03:45 2006
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
  
-#include <axis2_woden_schema.h>
+#include <woden/axis2_woden_schema.h>
 #include <xml_schema/axis2_xml_schema.h>
 #include <axis2_url.h>
 #include <axis2_hash.h>
@@ -59,7 +59,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_woden_schema_set_referenceable(void *schema,
                             axis2_env_t **env,
-                            axis2_bool_t *referenceable);
+                            axis2_bool_t referenceable);
 
 axis2_bool_t AXIS2_CALL 
 axis2_woden_schema_is_referenceable(void *schema,
@@ -88,7 +88,7 @@
     schema_impl->schema.ops->free = axis2_woden_schema_free;
     schema_impl->schema.ops->set_namespace = axis2_woden_schema_set_namespace;
     schema_impl->schema.ops->get_namespace = axis2_woden_schema_get_namespace;
-    schema_impl->schema.ops->set_schema_def = axis2_woden_schema_set_schema-def;
+    schema_impl->schema.ops->set_schema_def = axis2_woden_schema_set_schema_def;
     schema_impl->schema.ops->get_schema_def = axis2_woden_schema_get_schema_def;
     schema_impl->schema.ops->set_referenceable = 
         axis2_woden_schema_set_referenceable;
@@ -172,7 +172,7 @@
     axis2_woden_schema_impl_t *schema_impl = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->allocator, namespc, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, namespc, AXIS2_FAILURE);
     schema_impl = INTF_TO_IMPL(schema);
 
     schema_impl->f_namespc = namespc;
@@ -200,7 +200,7 @@
     axis2_woden_schema_impl_t *schema_impl = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->allocator, schema_def, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, schema_def, AXIS2_FAILURE);
     schema_impl = INTF_TO_IMPL(schema);
 
     schema_impl->f_schema_def = schema_def;
@@ -208,7 +208,7 @@
     return AXIS2_SUCCESS;
 }
 
-axis2_xml_schema *AXIS2_CALL 
+axis2_xml_schema_t *AXIS2_CALL 
 axis2_woden_schema_get_schema_def(void *schema,
                             axis2_env_t **env)
 {
@@ -223,12 +223,11 @@
 axis2_status_t AXIS2_CALL 
 axis2_woden_schema_set_referenceable(void *schema,
                             axis2_env_t **env,
-                            axis2_bool_t *referenceable)
+                            axis2_bool_t referenceable)
 {
     axis2_woden_schema_impl_t *schema_impl = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->allocator, schema_def, AXIS2_FAILURE);
     schema_impl = INTF_TO_IMPL(schema);
 
     schema_impl->f_is_referenceable = referenceable;
@@ -245,7 +244,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     schema_impl = INTF_TO_IMPL(schema);
 
-    return schema_impl->f_is_refereceable;
+    return schema_impl->f_is_referenceable;
 }
 
 axis2_char_t *AXIS2_CALL 
@@ -257,6 +256,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     schema_impl = INTF_TO_IMPL(schema);
 
-    return f_namespace != NULL ? AXIS2_URI_TO_STRING(f_namespc, env) : NULL;
+    return schema_impl->f_namespc != NULL ? 
+        AXIS2_URL_TO_EXTERNAL_FORM(schema_impl->f_namespc, env) : NULL;
 }
 

Added: webservices/axis2/trunk/c/modules/wsdl/woden/string_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/string_attr.c?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/string_attr.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/string_attr.c Fri Apr 21 02:03:45 2006
@@ -0,0 +1,231 @@
+/*
+ * 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_string_attr.h>
+#include <axis2_url.h>
+#include <axis2_om_element.h>
+#include <axis2_om_node.h>
+
+typedef struct axis2_woden_string_attr_impl axis2_woden_string_attr_impl_t;
+
+/** 
+ * @brief String Attribute Struct Impl
+ *	Axis2 String Attribute  
+ */ 
+struct axis2_woden_string_attr_impl
+{
+    axis2_woden_string_attr_t string_attr;
+    axis2_woden_xml_attr_t *xml_attr;
+    axis2_hash_t *methods;
+};
+
+#define INTF_TO_IMPL(string_attr) \
+    ((axis2_woden_string_attr_impl_t *) string_attr)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_string_attr_free(void *string_attr,
+                        axis2_env_t **env);
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_string_attr_get_base_impl(void *string_attr,
+                                axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_woden_string_attr_get_string(void *string_attr,
+                                    axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_string_attr_convert(void *string_attr,
+                                axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_char_t *attr_value);
+
+/*
+ * TODO This constructor is not used for extension attributes, but may be useful if
+ * parsing of native WSDL attributes is changed to use the XMLAttr interface.
+ */
+AXIS2_DECLARE(axis2_woden_string_attr_t *)
+axis2_woden_string_attr_create(axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_qname_t *attr_type,
+                                axis2_char_t *attr_value)
+{
+    axis2_woden_string_attr_impl_t *string_attr_impl = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+     
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    string_attr_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_string_attr_impl_t));
+
+    string_attr_impl->xml_attr = NULL;
+    string_attr_impl->methods = NULL;
+    string_attr_impl->string_attr.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_string_attr_ops_t));
+
+    string_attr_impl->string_attr.ops->free = 
+        axis2_woden_string_attr_free;
+    string_attr_impl->string_attr.ops->get_base_impl = 
+        axis2_woden_string_attr_get_base_impl;
+    string_attr_impl->string_attr.ops->get_string = 
+        axis2_woden_string_attr_get_string;
+    string_attr_impl->string_attr.ops->convert = 
+        axis2_woden_string_attr_convert;
+    
+    
+    string_attr_impl->methods = axis2_hash_make(env);
+    if(!string_attr_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(string_attr_impl->methods, "free", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_string_attr_free);
+    axis2_hash_set(string_attr_impl->methods, "get_string", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_string_attr_get_string);
+    axis2_hash_set(string_attr_impl->methods, "convert", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_string_attr_convert);
+
+    string_attr_impl->xml_attr = axis2_woden_xml_attr_create(env, owner_el, 
+            owner_node, attr_type, attr_value);
+    status = axis2_woden_xml_attr_resolve_methods(&(string_attr_impl->
+                string_attr.base), env, string_attr_impl->
+                xml_attr, string_attr_impl->methods);
+    if(AXIS2_SUCCESS != status) return NULL;
+    return &(string_attr_impl->string_attr);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_string_attr_free(void *string_attr,
+                        axis2_env_t **env)
+{
+    axis2_woden_string_attr_impl_t *string_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    string_attr_impl = INTF_TO_IMPL(string_attr);
+
+    if(string_attr_impl->methods)
+    {
+        axis2_hash_free(string_attr_impl->methods, env);
+        string_attr_impl->methods = NULL;
+    }  
+
+    if(string_attr_impl->xml_attr)
+    {
+        AXIS2_WODEN_XML_ATTR_FREE(string_attr_impl->xml_attr, env);
+        string_attr_impl->xml_attr = NULL;
+    }
+    
+    if((&(string_attr_impl->string_attr))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(string_attr_impl->string_attr))->ops);
+        (&(string_attr_impl->string_attr))->ops = NULL;
+    }
+
+    if(string_attr_impl)
+    {
+        AXIS2_FREE((*env)->allocator, string_attr_impl);
+        string_attr_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_string_attr_get_base_impl(void *string_attr,
+                                axis2_env_t **env)
+{
+    axis2_woden_string_attr_impl_t *string_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    string_attr_impl = INTF_TO_IMPL(string_attr);
+
+    return string_attr_impl->xml_attr;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_string_attr_resolve_methods(
+                    axis2_woden_string_attr_t *string_attr,
+                    axis2_env_t **env,
+                    axis2_woden_string_attr_t *string_attr_impl,
+                    axis2_hash_t *methods)
+{
+    axis2_woden_string_attr_impl_t *string_attr_impl_l = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, string_attr_impl, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    
+    string_attr_impl_l = (axis2_woden_string_attr_impl_t *) string_attr_impl;
+    
+    string_attr->ops = AXIS2_MALLOC((*env)->allocator, 
+                            sizeof(axis2_woden_string_attr_ops_t));
+    string_attr->ops->free = 
+                axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
+    string_attr->ops->get_base_impl = 
+                string_attr_impl_l->string_attr.ops->get_base_impl;
+    string_attr->ops->get_string = string_attr_impl_l->string_attr.ops->get_string;
+    string_attr->ops->convert = string_attr_impl_l->string_attr.ops->convert;
+    
+    return axis2_woden_xml_attr_resolve_methods(&(string_attr->base), 
+            env, string_attr_impl_l->xml_attr, methods);
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_woden_string_attr_get_string(void *string_attr,
+                                    axis2_env_t **env)
+{
+    axis2_woden_string_attr_impl_t *string_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    string_attr_impl = INTF_TO_IMPL(string_attr);
+    return (axis2_char_t *) AXIS2_WODEN_XML_ATTR_GET_CONTENT(
+            string_attr_impl->xml_attr, env);
+}
+
+void *AXIS2_CALL
+axis2_woden_string_attr_convert(void *string_attr,
+                                axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_char_t *attr_value)
+{
+    axis2_woden_string_attr_impl_t *string_attr_impl = NULL;
+    axis2_char_t *str = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    string_attr_impl = INTF_TO_IMPL(string_attr);
+
+    if(attr_value)
+    {
+         str = AXIS2_STRDUP(attr_value, env);
+         if(!str)
+         {
+             AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+             return NULL;
+         }
+    }
+    
+    if(!str)
+    {
+        AXIS2_WODEN_XML_ATTR_SET_VALID(string_attr_impl->xml_attr, env, AXIS2_FALSE);
+        /* TODO handler error */
+    }
+    
+    return str;
+}
+

Added: webservices/axis2/trunk/c/modules/wsdl/woden/uri_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/uri_attr.c?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/uri_attr.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/uri_attr.c Fri Apr 21 02:03:45 2006
@@ -0,0 +1,226 @@
+/*
+ * 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_uri_attr.h>
+#include <axis2_url.h>
+#include <axis2_om_element.h>
+#include <axis2_om_node.h>
+
+typedef struct axis2_woden_uri_attr_impl axis2_woden_uri_attr_impl_t;
+
+/** 
+ * @brief URI Attribute Struct Impl
+ *	Axis2 URI Attribute  
+ */ 
+struct axis2_woden_uri_attr_impl
+{
+    axis2_woden_uri_attr_t uri_attr;
+    axis2_woden_xml_attr_t *xml_attr;
+    axis2_hash_t *methods;
+};
+
+#define INTF_TO_IMPL(uri_attr) \
+    ((axis2_woden_uri_attr_impl_t *) uri_attr)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_uri_attr_free(void *uri_attr,
+                        axis2_env_t **env);
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_uri_attr_get_base_impl(void *uri_attr,
+                                axis2_env_t **env);
+
+axis2_url_t *AXIS2_CALL
+axis2_woden_uri_attr_get_uri(void *uri_attr,
+                                    axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_uri_attr_convert(void *uri_attr,
+                                axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_char_t *attr_value);
+
+/*
+ * TODO This constructor is not used for extension attributes, but may be useful if
+ * parsing of native WSDL attributes is changed to use the XMLAttr interface.
+ */
+AXIS2_DECLARE(axis2_woden_uri_attr_t *)
+axis2_woden_uri_attr_create(axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_qname_t *attr_type,
+                                axis2_char_t *attr_value)
+{
+    axis2_woden_uri_attr_impl_t *uri_attr_impl = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+     
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    uri_attr_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_uri_attr_impl_t));
+
+    uri_attr_impl->xml_attr = NULL;
+    uri_attr_impl->methods = NULL;
+    uri_attr_impl->uri_attr.ops = 
+        AXIS2_MALLOC((*env)->allocator, 
+                sizeof(axis2_woden_uri_attr_ops_t));
+
+    uri_attr_impl->uri_attr.ops->free = 
+        axis2_woden_uri_attr_free;
+    uri_attr_impl->uri_attr.ops->get_base_impl = 
+        axis2_woden_uri_attr_get_base_impl;
+    uri_attr_impl->uri_attr.ops->get_uri = 
+        axis2_woden_uri_attr_get_uri;
+    uri_attr_impl->uri_attr.ops->convert = 
+        axis2_woden_uri_attr_convert;
+    
+    
+    uri_attr_impl->methods = axis2_hash_make(env);
+    if(!uri_attr_impl->methods) 
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    axis2_hash_set(uri_attr_impl->methods, "free", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_uri_attr_free);
+    axis2_hash_set(uri_attr_impl->methods, "get_uri", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_uri_attr_get_uri);
+    axis2_hash_set(uri_attr_impl->methods, "convert", 
+            AXIS2_HASH_KEY_STRING, axis2_woden_uri_attr_convert);
+
+    uri_attr_impl->xml_attr = axis2_woden_xml_attr_create(env, owner_el, 
+            owner_node, attr_type, attr_value);
+    status = axis2_woden_xml_attr_resolve_methods(&(uri_attr_impl->
+                uri_attr.base), env, uri_attr_impl->
+                xml_attr, uri_attr_impl->methods);
+    if(AXIS2_SUCCESS != status) return NULL;
+    return &(uri_attr_impl->uri_attr);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_uri_attr_free(void *uri_attr,
+                        axis2_env_t **env)
+{
+    axis2_woden_uri_attr_impl_t *uri_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    uri_attr_impl = INTF_TO_IMPL(uri_attr);
+
+    if(uri_attr_impl->methods)
+    {
+        axis2_hash_free(uri_attr_impl->methods, env);
+        uri_attr_impl->methods = NULL;
+    }  
+
+    if(uri_attr_impl->xml_attr)
+    {
+        AXIS2_WODEN_XML_ATTR_FREE(uri_attr_impl->xml_attr, env);
+        uri_attr_impl->xml_attr = NULL;
+    }
+    
+    if((&(uri_attr_impl->uri_attr))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(uri_attr_impl->uri_attr))->ops);
+        (&(uri_attr_impl->uri_attr))->ops = NULL;
+    }
+
+    if(uri_attr_impl)
+    {
+        AXIS2_FREE((*env)->allocator, uri_attr_impl);
+        uri_attr_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_uri_attr_get_base_impl(void *uri_attr,
+                                axis2_env_t **env)
+{
+    axis2_woden_uri_attr_impl_t *uri_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    uri_attr_impl = INTF_TO_IMPL(uri_attr);
+
+    return uri_attr_impl->xml_attr;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_uri_attr_resolve_methods(
+                    axis2_woden_uri_attr_t *uri_attr,
+                    axis2_env_t **env,
+                    axis2_woden_uri_attr_t *uri_attr_impl,
+                    axis2_hash_t *methods)
+{
+    axis2_woden_uri_attr_impl_t *uri_attr_impl_l = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, uri_attr_impl, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    
+    uri_attr_impl_l = (axis2_woden_uri_attr_impl_t *) uri_attr_impl;
+    
+    uri_attr->ops = AXIS2_MALLOC((*env)->allocator, 
+                            sizeof(axis2_woden_uri_attr_ops_t));
+    uri_attr->ops->free = 
+                axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
+    uri_attr->ops->get_base_impl = 
+                uri_attr_impl_l->uri_attr.ops->get_base_impl;
+    uri_attr->ops->get_uri = uri_attr_impl_l->uri_attr.ops->get_uri;
+    uri_attr->ops->convert = uri_attr_impl_l->uri_attr.ops->convert;
+    
+    return axis2_woden_xml_attr_resolve_methods(&(uri_attr->base), 
+            env, uri_attr_impl_l->xml_attr, methods);
+}
+
+axis2_url_t *AXIS2_CALL
+axis2_woden_uri_attr_get_uri(void *uri_attr,
+                                    axis2_env_t **env)
+{
+    axis2_woden_uri_attr_impl_t *uri_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    uri_attr_impl = INTF_TO_IMPL(uri_attr);
+    return (axis2_url_t *) AXIS2_WODEN_XML_ATTR_GET_CONTENT(
+            uri_attr_impl->xml_attr, env);
+}
+
+void *AXIS2_CALL
+axis2_woden_uri_attr_convert(void *uri_attr,
+                                axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *owner_node,
+                                axis2_char_t *attr_value)
+{
+    axis2_woden_uri_attr_impl_t *uri_attr_impl = NULL;
+    axis2_url_t *url = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    uri_attr_impl = INTF_TO_IMPL(uri_attr);
+
+    if(attr_value)
+    {
+         /* TODO url = axis2_url_create(env, attr_value);*/
+    }
+    
+    if(!url)
+    {
+        AXIS2_WODEN_XML_ATTR_SET_VALID(uri_attr_impl->xml_attr, env, AXIS2_FALSE);
+        /* TODO handler error */
+    }
+    
+    return url;
+}
+

Added: webservices/axis2/trunk/c/modules/wsdl/woden/xml_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/xml_attr.c?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/xml_attr.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/xml_attr.c Fri Apr 21 02:03:45 2006
@@ -0,0 +1,278 @@
+/*
+ * 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_xml_attr.h>
+#include <axis2_url.h>
+#include <axis2_hash.h>
+#include <axis2_om_element.h>
+#include <axis2_om_node.h>
+
+typedef struct axis2_woden_xml_attr_impl axis2_woden_xml_attr_impl_t;
+
+/** 
+ * @brief Xml Attribute Struct Impl
+ *	Axis2 Xml Attribute  
+ */ 
+struct axis2_woden_xml_attr_impl
+{
+    axis2_woden_xml_attr_t xml_attr;
+    axis2_qname_t *f_attr_type;
+    void *f_content;
+    axis2_char_t *f_external_form;
+    axis2_bool_t f_valid;
+};
+
+#define INTF_TO_IMPL(xml_attr) ((axis2_woden_xml_attr_impl_t *) xml_attr)
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_xml_attr_free(void *xml_attr,
+                axis2_env_t **envv);
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_xml_attr_init(void *xml_attr,
+                            axis2_env_t **env,
+                            axis2_om_element_t *owner_el,
+                            axis2_om_node_t *owner_node,
+                            axis2_qname_t *attr_type, 
+                            axis2_char_t *attr_value);
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_xml_attr_get_attribute_type(void *xml_attr,
+                                        axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_xml_attr_get_content(void *xml_attr,
+                                    axis2_env_t **env);
+
+axis2_char_t *AXIS2_CALL
+axis2_woden_xml_attr_to_external_form(void *xml_attr,
+                                        axis2_env_t **env);
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_xml_attr_is_valid(void *xml_attr,
+                                axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_xml_attr_convert(void *xml_attr,
+                                axis2_env_t **env,
+                                axis2_om_element_t *owner_el,
+                                axis2_om_node_t *ownder_node,
+                                axis2_char_t *attr_value);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_xml_attr_set_valid(void *xml_attr,
+                            axis2_env_t **env,
+                            axis2_bool_t validity);
+
+AXIS2_DECLARE(axis2_woden_xml_attr_t *)
+axis2_woden_xml_attr_create(axis2_env_t **env,
+                            axis2_om_element_t *owner_el,
+                            axis2_om_node_t *owner_node,
+                            axis2_qname_t *attr_type, 
+                            axis2_char_t *attr_value)
+{
+    axis2_woden_xml_attr_impl_t *xml_attr_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    xml_attr_impl = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_xml_attr_impl_t));
+
+    xml_attr_impl->f_attr_type = NULL;
+    xml_attr_impl->f_content = NULL;
+    xml_attr_impl->f_external_form = NULL;
+    xml_attr_impl->f_valid = AXIS2_TRUE;
+
+    xml_attr_impl->xml_attr.ops = AXIS2_MALLOC((*env)->allocator, 
+                    sizeof(axis2_woden_xml_attr_ops_t)); 
+    
+    axis2_woden_xml_attr_init(&(xml_attr_impl->xml_attr), env, owner_el, 
+            owner_node, attr_type, attr_value);
+    
+    xml_attr_impl->xml_attr.ops->free = axis2_woden_xml_attr_free;
+    xml_attr_impl->xml_attr.ops->init = axis2_woden_xml_attr_init;
+    xml_attr_impl->xml_attr.ops->get_attribute_type = 
+        axis2_woden_xml_attr_get_attribute_type;
+    xml_attr_impl->xml_attr.ops->get_content = axis2_woden_xml_attr_get_content;
+    xml_attr_impl->xml_attr.ops->to_external_form = 
+        axis2_woden_xml_attr_to_external_form;
+    xml_attr_impl->xml_attr.ops->is_valid = axis2_woden_xml_attr_is_valid;
+    xml_attr_impl->xml_attr.ops->convert = axis2_woden_xml_attr_convert;
+    xml_attr_impl->xml_attr.ops->set_valid = axis2_woden_xml_attr_set_valid;
+    
+    return &(xml_attr_impl->xml_attr);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_xml_attr_free(void *xml_attr,
+                axis2_env_t **env)
+{
+    axis2_woden_xml_attr_impl_t *xml_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    xml_attr_impl = INTF_TO_IMPL(xml_attr);
+
+    if(xml_attr_impl->f_attr_type)
+    {
+        AXIS2_QNAME_FREE(xml_attr_impl->f_attr_type, env);
+        xml_attr_impl->f_attr_type = NULL;
+    }
+    
+    if(xml_attr_impl->f_external_form)
+    {
+        AXIS2_FREE((*env)->allocator, xml_attr_impl->f_external_form);
+        xml_attr_impl->f_external_form = NULL;
+    }
+    
+    if((&(xml_attr_impl->xml_attr))->ops)
+    {
+        AXIS2_FREE((*env)->allocator, (&(xml_attr_impl->xml_attr))->ops);
+        (&(xml_attr_impl->xml_attr))->ops = NULL;
+    }
+
+    if(xml_attr_impl)
+    {
+        AXIS2_FREE((*env)->allocator, xml_attr_impl);
+        xml_attr_impl = NULL;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_xml_attr_resolve_methods(axis2_woden_xml_attr_t *xml_attr,
+                                axis2_env_t **env,
+                                axis2_woden_xml_attr_t *xml_attr_impl,
+                                axis2_hash_t *methods)
+{
+    axis2_woden_xml_attr_impl_t *xml_attr_impl_l = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, xml_attr_impl, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+    
+    xml_attr_impl_l = (axis2_woden_xml_attr_impl_t *) xml_attr_impl;
+    
+    xml_attr->ops = AXIS2_MALLOC((*env)->allocator, 
+            sizeof(axis2_woden_xml_attr_ops_t));
+    xml_attr->ops->free = axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
+    xml_attr->ops->init = xml_attr_impl_l->xml_attr.ops->init;
+    xml_attr->ops->get_attribute_type = 
+        xml_attr_impl_l->xml_attr.ops->get_attribute_type;
+    xml_attr->ops->get_content = xml_attr_impl_l->xml_attr.ops->get_content;
+    xml_attr->ops->to_external_form = 
+        xml_attr_impl_l->xml_attr.ops->to_external_form;
+    xml_attr->ops->is_valid = xml_attr_impl_l->xml_attr.ops->is_valid;
+    xml_attr->ops->convert = axis2_hash_get(methods, "convert", AXIS2_HASH_KEY_STRING);
+    xml_attr_impl_l->xml_attr.ops->convert = axis2_hash_get(methods, "convert", 
+            AXIS2_HASH_KEY_STRING);
+    xml_attr->ops->set_valid = xml_attr_impl_l->xml_attr.ops->set_valid;
+
+    return AXIS2_SUCCESS;    
+}
+
+axis2_status_t AXIS2_CALL 
+axis2_woden_xml_attr_init(void *xml_attr,
+                            axis2_env_t **env,
+                            axis2_om_element_t *owner_el,
+                            axis2_om_node_t *owner_node,
+                            axis2_qname_t *attr_type, 
+                            axis2_char_t *attr_value)
+{
+    axis2_woden_xml_attr_impl_t *xml_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, owner_el, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, owner_node, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, attr_type, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, attr_value, AXIS2_FAILURE);
+    xml_attr_impl = INTF_TO_IMPL(xml_attr);
+
+    if(xml_attr_impl->f_attr_type)
+    {
+        AXIS2_QNAME_FREE(xml_attr_impl->f_attr_type, env);
+        xml_attr_impl->f_attr_type = NULL;
+    }
+    xml_attr_impl->f_attr_type = AXIS2_QNAME_CLONE(attr_type, env);
+    if(xml_attr_impl->f_attr_type)
+    {
+        AXIS2_QNAME_FREE(xml_attr_impl->f_attr_type, env);
+        xml_attr_impl->f_attr_type = NULL;
+    }
+    xml_attr_impl->f_external_form = AXIS2_STRDUP(attr_value, env);
+    xml_attr_impl->f_content = xml_attr_impl->xml_attr.ops->
+        convert(&(xml_attr_impl->xml_attr), env, owner_el, owner_node, 
+                attr_value); 
+    if(!xml_attr_impl->f_content)
+        xml_attr_impl->f_valid = AXIS2_FALSE;
+    return AXIS2_SUCCESS;
+}
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_xml_attr_get_attribute_type(void *xml_attr,
+                                        axis2_env_t **env) 
+{
+    axis2_woden_xml_attr_impl_t *xml_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    xml_attr_impl = INTF_TO_IMPL(xml_attr);
+
+    return xml_attr_impl->f_attr_type;
+}
+
+void *AXIS2_CALL
+axis2_woden_xml_attr_get_content(void *xml_attr,
+                                    axis2_env_t **env) 
+{
+    axis2_woden_xml_attr_impl_t *xml_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    xml_attr_impl = INTF_TO_IMPL(xml_attr);
+    return xml_attr_impl->f_content;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_woden_xml_attr_to_external_form(void *xml_attr,
+                                        axis2_env_t **env) 
+{
+    axis2_woden_xml_attr_impl_t *xml_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    xml_attr_impl = INTF_TO_IMPL(xml_attr);
+    return xml_attr_impl->f_external_form;
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_xml_attr_is_valid(void *xml_attr,
+                                axis2_env_t **env)
+{
+    axis2_woden_xml_attr_impl_t *xml_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    xml_attr_impl = INTF_TO_IMPL(xml_attr);
+    return xml_attr_impl->f_valid;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_xml_attr_set_valid(void *xml_attr,
+                            axis2_env_t **env,
+                            axis2_bool_t validity) 
+{
+    axis2_woden_xml_attr_impl_t *xml_attr_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    xml_attr_impl = INTF_TO_IMPL(xml_attr);
+    xml_attr_impl->f_valid = validity;
+    return AXIS2_SUCCESS;
+}