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 [1/2] - in /webservices/axis2/trunk/c: include/
include/woden/ modules/wsdl/woden/
Author: damitha
Date: Fri Apr 21 02:03:45 2006
New Revision: 395820
URL: http://svn.apache.org/viewcvs?rev=395820&view=rev
Log:
More files added in related to Axis2 C woden project
Added:
webservices/axis2/trunk/c/include/woden/axis2_woden_bool_attr.h
webservices/axis2/trunk/c/include/woden/axis2_woden_inlined_schema.h
webservices/axis2/trunk/c/include/woden/axis2_woden_qname_attr.h
webservices/axis2/trunk/c/include/woden/axis2_woden_qname_list_attr.h
webservices/axis2/trunk/c/include/woden/axis2_woden_qname_list_or_token_any_attr.h
webservices/axis2/trunk/c/include/woden/axis2_woden_qname_or_token_any_attr.h
webservices/axis2/trunk/c/include/woden/axis2_woden_schema_constants.h
webservices/axis2/trunk/c/include/woden/axis2_woden_string_attr.h
webservices/axis2/trunk/c/include/woden/axis2_woden_uri_attr.h
webservices/axis2/trunk/c/include/woden/axis2_woden_xml_attr.h
webservices/axis2/trunk/c/modules/wsdl/woden/bool_attr.c
webservices/axis2/trunk/c/modules/wsdl/woden/inlined_schema.c
webservices/axis2/trunk/c/modules/wsdl/woden/qname_attr.c
webservices/axis2/trunk/c/modules/wsdl/woden/qname_list_attr.c
webservices/axis2/trunk/c/modules/wsdl/woden/qname_list_or_token_any_attr.c
webservices/axis2/trunk/c/modules/wsdl/woden/qname_or_token_any_attr.c
webservices/axis2/trunk/c/modules/wsdl/woden/string_attr.c
webservices/axis2/trunk/c/modules/wsdl/woden/uri_attr.c
webservices/axis2/trunk/c/modules/wsdl/woden/xml_attr.c
Modified:
webservices/axis2/trunk/c/include/axis2_qname.h
webservices/axis2/trunk/c/include/woden/axis2_woden_imported_schema.h
webservices/axis2/trunk/c/include/woden/axis2_woden_schema.h
webservices/axis2/trunk/c/modules/wsdl/woden/Makefile.am
webservices/axis2/trunk/c/modules/wsdl/woden/imported_schema.c
webservices/axis2/trunk/c/modules/wsdl/woden/schema.c
Modified: webservices/axis2/trunk/c/include/axis2_qname.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_qname.h?rev=395820&r1=395819&r2=395820&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_qname.h (original)
+++ webservices/axis2/trunk/c/include/axis2_qname.h Fri Apr 21 02:03:45 2006
@@ -97,6 +97,7 @@
/**
* returns a unique string created by concatanting namespace uri
* and localpart .
+ * The string is of the form localpart|url
* The returned char* is freed when qname free function is called.
*/
axis2_char_t* (AXIS2_CALL *
Added: webservices/axis2/trunk/c/include/woden/axis2_woden_bool_attr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_bool_attr.h?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_bool_attr.h (added)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_bool_attr.h Fri Apr 21 02:03:45 2006
@@ -0,0 +1,139 @@
+/*
+ * 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_BOOL_ATTR_H
+#define AXIS2_WODEN_BOOL_ATTR_H
+
+/**
+ * @file axis2_woden_bool_attr.h
+ * @brief Axis2 Boolean Attribute Interface
+ * This class represents XML attribute information items of type
+ * xs:boolean. If the attribute value is not "true" or "false"
+ * the Boolean content will be initialized to "false" by default,
+ * but the isValid() method will return "false".
+ */
+
+#include <woden/axis2_woden_xml_attr.h>
+
+/** @defgroup axis2_woden_bool_attr Boolean Attribute
+ * @ingroup axis2_wsdl
+ * @{
+ */
+
+typedef struct axis2_woden_bool_attr axis2_woden_bool_attr_t;
+typedef struct axis2_woden_bool_attr_ops axis2_woden_bool_attr_ops_t;
+struct axis2_om_element;
+struct axis2_om_node;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct axis2_woden_bool_attr_ops
+{
+ /**
+ * Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *
+ free) (void *bool_attr,
+ axis2_env_t **env);
+
+ /**
+ * @return the base implementation class
+ */
+ axis2_woden_xml_attr_t *(AXIS2_CALL *
+ get_base_impl) (void *bool_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * QNameAttr interface declared methods
+ * ************************************************************/
+
+ axis2_bool_t (AXIS2_CALL *
+ get_boolean) (void *bool_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * Non-API implementation methods
+ * ************************************************************/
+
+ /*
+ * Convert a string of type xs:QName to a axis2_bool_t.
+ * A a null argument will return a null value.
+ * Any conversion error will be reported and a null value will be returned.
+ */
+ void *(AXIS2_CALL *
+ convert) (void *bool_attr,
+ axis2_env_t **env,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_char_t *attr_value);
+
+
+};
+
+struct axis2_woden_bool_attr
+{
+ axis2_woden_xml_attr_t base;
+ axis2_woden_bool_attr_ops_t *ops;
+};
+
+/*
+ * TODO This constructor is not used for extension attributes, but may be useful if
+ * parsing of native WSDL attributes is changed to use the axis2_xml_attr interface.
+ */
+AXIS2_DECLARE(axis2_woden_bool_attr_t *)
+axis2_woden_bool_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);
+
+
+/**
+ * Convert a string of type xs:boolean to a java.lang.Boolean.
+ * An empty string or a null argument will initialize the Boolean to false.
+ * Any conversion error will be reported and will initialize the Boolean to false.
+ * If the attrValue does not match the Boolean value the Attr is marked invalid.
+ */
+AXIS2_DECLARE(axis2_status_t)
+axis2_woden_bool_attr_resolve_methods(axis2_woden_bool_attr_t *bool_attr,
+ axis2_env_t **env,
+ axis2_woden_bool_attr_t *bool_attr_impl,
+ axis2_hash_t *methods);
+
+#define AXIS2_WODEN_BOOL_ATTR_FREE(bool_attr, env) \
+ (((axis2_woden_bool_attr_t *) bool_attr)->ops->free(bool_attr, env))
+
+#define AXIS2_WODEN_BOOL_ATTR_GET_BASE_IMPL(bool_attr, env) \
+ (((axis2_woden_bool_attr_t *) bool_attr)->ops->get_base_impl(bool_attr, \
+ env))
+
+#define AXIS2_WODEN_BOOL_ATTR_GET_BOOL(bool_attr, env) \
+ (((axis2_woden_bool_attr_t *) bool_attr)->ops->get_boolean(bool_attr, \
+ env))
+
+#define AXIS2_WODEN_BOOL_ATTR_CONVERT(bool_attr, env) \
+ (((axis2_woden_bool_attr_t *) bool_attr)->ops->convert(bool_attr, \
+ env))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_BOOL_ATTR_H */
Modified: webservices/axis2/trunk/c/include/woden/axis2_woden_imported_schema.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_imported_schema.h?rev=395820&r1=395819&r2=395820&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_imported_schema.h (original)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_imported_schema.h Fri Apr 21 02:03:45 2006
@@ -25,7 +25,7 @@
* <code>schemaLocation</code> attribute.
*/
-#include "axis2_wsdl_ext.h"
+#include <woden/axis2_woden_schema.h>
/** @defgroup axis2_woden_imported_schema Imported Schema
* @ingroup axis2_wsdl
@@ -53,7 +53,7 @@
/**
* @return the base implementation class
*/
- axis2_wsdl_ext_t *(AXIS2_CALL *
+ axis2_woden_schema_t *(AXIS2_CALL *
get_base_impl) (void *schema,
axis2_env_t **env);
@@ -71,7 +71,7 @@
struct axis2_woden_imported_schema
{
- axis2_wsdl_ext_t base;
+ axis2_woden_schema_t base;
axis2_woden_imported_schema_ops_t *ops;
};
Added: webservices/axis2/trunk/c/include/woden/axis2_woden_inlined_schema.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_inlined_schema.h?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_inlined_schema.h (added)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_inlined_schema.h Fri Apr 21 02:03:45 2006
@@ -0,0 +1,110 @@
+/*
+ * 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_INLINED_SCHEMA_H
+#define AXIS2_WODEN_INLINED_SCHEMA_H
+
+/**
+ * @file axis2_woden_inlined_schema.h
+ * @brief Axis2 Inlined Schema Interface
+ * This class represents an inlined schema, <xs:schema>.
+ * It extends the abstract class SchemaImpl, adding support for the
+ * <code>id</code> attribute.
+ */
+
+#include <woden/axis2_woden_schema.h>
+
+/** @defgroup axis2_woden_inlined_schema Inlined Schema
+ * @ingroup axis2_wsdl
+ * @{
+ */
+
+typedef struct axis2_woden_inlined_schema axis2_woden_inlined_schema_t;
+typedef struct axis2_woden_inlined_schema_ops axis2_woden_inlined_schema_ops_t;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct axis2_woden_inlined_schema_ops
+{
+ /**
+ * Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *
+ free) (void *schema,
+ axis2_env_t **env);
+
+ /**
+ * @return the base implementation class
+ */
+ axis2_woden_schema_t *(AXIS2_CALL *
+ get_base_impl) (void *schema,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *
+ set_id) (void *schema,
+ axis2_env_t **env,
+ axis2_char_t *id);
+
+ axis2_char_t *(AXIS2_CALL *
+ get_id) (void *schema,
+ axis2_env_t **env);
+
+
+};
+
+struct axis2_woden_inlined_schema
+{
+ axis2_woden_schema_t base;
+ axis2_woden_inlined_schema_ops_t *ops;
+};
+
+AXIS2_DECLARE(axis2_woden_inlined_schema_t *)
+axis2_woden_inlined_schema_create(axis2_env_t **env);
+
+/**
+ * This is an Axis2 C internal method. This is used only from constructor
+ * of the child class
+ */
+AXIS2_DECLARE(axis2_status_t)
+axis2_woden_inlined_schema_resolve_methods(axis2_woden_inlined_schema_t *schema,
+ axis2_env_t **env,
+ axis2_woden_inlined_schema_t *schema_impl,
+ axis2_hash_t *methods);
+
+#define AXIS2_WODEN_INLINED_SCHEMA_FREE(schema, env) \
+ (((axis2_woden_inlined_schema_t *) schema)->ops->free(schema, env))
+
+#define AXIS2_WODEN_INLINED_SCHEMA_GET_BASE_IMPL(schema, env) \
+ (((axis2_woden_inlined_schema_t *) schema)->ops->get_base_impl(schema, \
+ env))
+
+#define AXIS2_WODEN_INLINED_SCHEMA_SET_ID(schema, env, id) \
+ (((axis2_woden_inlined_schema_t *) schema)->ops->set_id(schema, \
+ env, id))
+
+#define AXIS2_WODEN_INLINED_SCHEMA_GET_ID(schema, env) \
+ (((axis2_woden_inlined_schema_t *) schema)->ops->get_id(schema, \
+ env))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_INLINED_SCHEMA_H */
Added: webservices/axis2/trunk/c/include/woden/axis2_woden_qname_attr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_qname_attr.h?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_qname_attr.h (added)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_qname_attr.h Fri Apr 21 02:03:45 2006
@@ -0,0 +1,134 @@
+/*
+ * 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_QNAME_ATTR_H
+#define AXIS2_WODEN_QNAME_ATTR_H
+
+/**
+ * @file axis2_woden_qname_attr.h
+ * @brief Axis2 Qname Attribute Interface
+ * This class represents XML attribute information items of type xs:QName.
+ */
+
+#include <woden/axis2_woden_xml_attr.h>
+
+/** @defgroup axis2_woden_qname_attr Qname Attribute
+ * @ingroup axis2_wsdl
+ * @{
+ */
+
+typedef struct axis2_woden_qname_attr axis2_woden_qname_attr_t;
+typedef struct axis2_woden_qname_attr_ops axis2_woden_qname_attr_ops_t;
+struct axis2_om_element;
+struct axis2_om_node;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct axis2_woden_qname_attr_ops
+{
+ /**
+ * Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *
+ free) (void *qname_attr,
+ axis2_env_t **env);
+
+ /**
+ * @return the base implementation class
+ */
+ axis2_woden_xml_attr_t *(AXIS2_CALL *
+ get_base_impl) (void *qname_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * QNameAttr interface declared methods
+ * ************************************************************/
+
+ axis2_qname_t *(AXIS2_CALL *
+ get_qname) (void *qname_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * Non-API implementation methods
+ * ************************************************************/
+
+ /*
+ * Convert a string of type xs:QName to a axis2_qname_t.
+ * A a null argument will return a null value.
+ * Any conversion error will be reported and a null value will be returned.
+ */
+ void *(AXIS2_CALL *
+ convert) (void *qname_attr,
+ axis2_env_t **env,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_char_t *attr_value);
+
+
+};
+
+struct axis2_woden_qname_attr
+{
+ axis2_woden_xml_attr_t base;
+ axis2_woden_qname_attr_ops_t *ops;
+};
+
+/*
+ * 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_attr_t *)
+axis2_woden_qname_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);
+
+
+/**
+ * This is an Axis2 C internal method. This is used only from constructor
+ * of the child class
+ */
+AXIS2_DECLARE(axis2_status_t)
+axis2_woden_qname_attr_resolve_methods(axis2_woden_qname_attr_t *qname_attr,
+ axis2_env_t **env,
+ axis2_woden_qname_attr_t *qname_attr_impl,
+ axis2_hash_t *methods);
+
+#define AXIS2_WODEN_QNAME_ATTR_FREE(qname_attr, env) \
+ (((axis2_woden_qname_attr_t *) qname_attr)->ops->free(qname_attr, env))
+
+#define AXIS2_WODEN_QNAME_ATTR_GET_BASE_IMPL(qname_attr, env) \
+ (((axis2_woden_qname_attr_t *) qname_attr)->ops->get_base_impl(qname_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_ATTR_GET_QNAME(qname_attr, env) \
+ (((axis2_woden_qname_attr_t *) qname_attr)->ops->get_qname(qname_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_ATTR_CONVERT(qname_attr, env) \
+ (((axis2_woden_qname_attr_t *) qname_attr)->ops->convert(qname_attr, \
+ env))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_QNAME_ATTR_H */
Added: webservices/axis2/trunk/c/include/woden/axis2_woden_qname_list_attr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_qname_list_attr.h?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_qname_list_attr.h (added)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_qname_list_attr.h Fri Apr 21 02:03:45 2006
@@ -0,0 +1,139 @@
+/*
+ * 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_QNAME_LIST_ATTR_H
+#define AXIS2_WODEN_QNAME_LIST_ATTR_H
+
+/**
+ * @file axis2_woden_qname_list_attr.h
+ * @brief Axis2 QName List Attribute Interface
+ * This class represents XML attribute information items of type
+ * xs:list of QNames.
+ */
+
+#include <woden/axis2_woden_xml_attr.h>
+#include <axis2_array_list.h>
+
+/** @defgroup axis2_woden_qname_list_attr QName List Attribute
+ * @ingroup axis2_wsdl
+ * @{
+ */
+
+typedef struct axis2_woden_qname_list_attr axis2_woden_qname_list_attr_t;
+typedef struct axis2_woden_qname_list_attr_ops axis2_woden_qname_list_attr_ops_t;
+struct axis2_om_element;
+struct axis2_om_node;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct axis2_woden_qname_list_attr_ops
+{
+ /**
+ * Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *
+ free) (void *qname_list_attr,
+ axis2_env_t **env);
+
+ /**
+ * @return the base implementation class
+ */
+ axis2_woden_xml_attr_t *(AXIS2_CALL *
+ get_base_impl) (void *qname_list_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * QNameAttr interface declared methods
+ * ************************************************************/
+
+ axis2_array_list_t *(AXIS2_CALL *
+ get_qnames) (void *qname_list_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * Non-API implementation methods
+ * ************************************************************/
+
+ /*
+ * Convert a string of type 'xs:list of QNames' to a java.xml.namespace.QName[].
+ * A a null argument will return a null value.
+ * If a QName string in the list causes a conversion error, it will be reported
+ * and that QName will not appear in the array. Valid QName strings will still
+ * be converted, but the object will be marked invalid. If no QName strings can
+ * be converted, a null value will be returned.
+ */
+ void *(AXIS2_CALL *
+ convert) (void *qname_list_attr,
+ axis2_env_t **env,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_char_t *attr_value);
+
+
+};
+
+struct axis2_woden_qname_list_attr
+{
+ axis2_woden_xml_attr_t base;
+ axis2_woden_qname_list_attr_ops_t *ops;
+};
+
+/*
+ * 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,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_qname_t *attr_type,
+ axis2_char_t *attr_value);
+
+
+/**
+ * This is an Axis2 C internal method. This is used only from constructor
+ * of the child class
+ */
+AXIS2_DECLARE(axis2_status_t)
+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);
+
+#define AXIS2_WODEN_QNAME_LIST_ATTR_FREE(qname_list_attr, env) \
+ (((axis2_woden_qname_list_attr_t *) qname_list_attr)->ops->free(qname_list_attr, env))
+
+#define AXIS2_WODEN_QNAME_LIST_ATTR_GET_BASE_IMPL(qname_list_attr, env) \
+ (((axis2_woden_qname_list_attr_t *) qname_list_attr)->ops->get_base_impl(qname_list_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_LIST_ATTR_GET_QNAMES(qname_list_attr, env) \
+ (((axis2_woden_qname_list_attr_t *) qname_list_attr)->ops->get_qnames(qname_list_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_LIST_ATTR_CONVERT(qname_list_attr, env) \
+ (((axis2_woden_qname_list_attr_t *) qname_list_attr)->ops->convert(qname_list_attr, \
+ env))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_QNAME_LIST_ATTR_H */
Added: webservices/axis2/trunk/c/include/woden/axis2_woden_qname_list_or_token_any_attr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_qname_list_or_token_any_attr.h?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_qname_list_or_token_any_attr.h (added)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_qname_list_or_token_any_attr.h Fri Apr 21 02:03:45 2006
@@ -0,0 +1,173 @@
+/*
+ * 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_QNAME_LIST_OR_TOKEN_ANY_ATTR_H
+#define AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_H
+
+/**
+ * @file axis2_woden_qname_list_or_token_any_attr.h
+ * @brief Axis2 QName List or Token Any Attribute Interface
+ * This class represents XML attribute information items of type
+ * " Union of list of QName or xs:token #any"
+ * (e.g. the wsoap:subcodes extension attribute of binding fault).
+ */
+
+#include <woden/axis2_woden_xml_attr.h>
+#include <axis2_array_list.h>
+
+/** @defgroup axis2_woden_qname_list_or_token_any_attr QName List or Token Any Attribute
+ * @ingroup axis2_wsdl
+ * @{
+ */
+
+typedef struct axis2_woden_qname_list_or_token_any_attr axis2_woden_qname_list_or_token_any_attr_t;
+typedef struct axis2_woden_qname_list_or_token_any_attr_ops axis2_woden_qname_list_or_token_any_attr_ops_t;
+struct axis2_om_element;
+struct axis2_om_node;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct axis2_woden_qname_list_or_token_any_attr_ops
+{
+ /**
+ * Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *
+ free) (void *list_token_attr,
+ axis2_env_t **env);
+
+ /**
+ * @return the base implementation class
+ */
+ axis2_woden_xml_attr_t *(AXIS2_CALL *
+ get_base_impl) (void *list_token_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * QNameAttr interface declared methods
+ * ************************************************************/
+
+ axis2_bool_t (AXIS2_CALL *
+ is_qname_list) (void *list_token_attr,
+ axis2_env_t **env);
+
+ axis2_bool_t (AXIS2_CALL *
+ is_token) (void *list_token_attr,
+ axis2_env_t **env);
+
+
+ axis2_array_list_t *(AXIS2_CALL *
+ get_qnames) (void *list_token_attr,
+ axis2_env_t **env);
+
+ axis2_char_t *(AXIS2_CALL *
+ get_token) (void *list_token_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * Non-API implementation methods
+ * ************************************************************/
+
+ /*
+ * Convert a string of type "Union of list of xs:QName or xs:token #any" to a
+ * axis2_qname_t or array or a String.
+ * A null argument will return a null value.
+ * Any conversion error will be reported and a null value will be returned.
+ */
+ void *(AXIS2_CALL *
+ convert) (void *list_token_attr,
+ axis2_env_t **env,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_char_t *attr_value);
+
+};
+
+struct axis2_woden_qname_list_or_token_any_attr
+{
+ axis2_woden_xml_attr_t base;
+ axis2_woden_qname_list_or_token_any_attr_ops_t *ops;
+};
+
+/*
+ * 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,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_qname_t *attr_type,
+ axis2_char_t *attr_value);
+
+
+/**
+ * This is an Axis2 C internal method. This is used only from constructor
+ * of the child class
+ */
+AXIS2_DECLARE(axis2_status_t)
+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);
+
+#define AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_FREE(list_token_attr, env) \
+ (((axis2_woden_qname_list_or_token_any_attr_t *) \
+ list_token_attr)->ops->free(list_token_attr, env))
+
+#define AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_GET_BASE_IMPL(list_token_attr, \
+ env) \
+ (((axis2_woden_qname_list_or_token_any_attr_t *) \
+ list_token_attr)->ops->get_base_impl(list_token_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_IS_QNAME_LIST(list_token_attr, \
+ env) \
+ (((axis2_woden_qname_list_or_token_any_attr_t *) \
+ list_token_attr)->ops->is_qname_list(list_token_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_IS_TOKEN(list_token_attr, env) \
+ (((axis2_woden_qname_list_or_token_any_attr_t *) \
+ list_token_attr)->ops->is_token(list_token_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_GET_QNAMES(list_token_attr, \
+ env) \
+ (((axis2_woden_qname_list_or_token_any_attr_t *) \
+ list_token_attr)->ops->get_qnames(list_token_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_GET_TOKEN(list_token_attr, \
+ env) \
+ (((axis2_woden_qname_list_or_token_any_attr_t *) \
+ list_token_attr)->ops->get_token(list_token_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_CONVERT(list_token_attr, env) \
+ (((axis2_woden_qname_list_or_token_any_attr_t *) \
+ list_token_attr)->ops->convert(list_token_attr, \
+ env))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR_H */
Added: webservices/axis2/trunk/c/include/woden/axis2_woden_qname_or_token_any_attr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_qname_or_token_any_attr.h?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_qname_or_token_any_attr.h (added)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_qname_or_token_any_attr.h Fri Apr 21 02:03:45 2006
@@ -0,0 +1,175 @@
+/*
+ * 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_QNAME_OR_TOKEN_ANY_ATTR_H
+#define AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_H
+
+/**
+ * @file axis2_woden_qname_or_token_any_attr.h
+ * @brief Axis2 QName or Token Any Attribute Interface
+ * This class represents XML attribute information items of type
+ * "Union of QName or xs:token #any"
+ * (e.g. the wsoap:code extension attribute of binding fault).
+ */
+
+#include <woden/axis2_woden_xml_attr.h>
+#include <axis2_array_list.h>
+
+/** @defgroup axis2_woden_qname_or_token_any_attr QName or Token Any Attribute
+ * @ingroup axis2_wsdl
+ * @{
+ */
+
+typedef struct axis2_woden_qname_or_token_any_attr
+ axis2_woden_qname_or_token_any_attr_t;
+typedef struct axis2_woden_qname_or_token_any_attr_ops
+ axis2_woden_qname_or_token_any_attr_ops_t;
+struct axis2_om_element;
+struct axis2_om_node;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct axis2_woden_qname_or_token_any_attr_ops
+{
+ /**
+ * Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *
+ free) (void *list_token_attr,
+ axis2_env_t **env);
+
+ /**
+ * @return the base implementation class
+ */
+ axis2_woden_xml_attr_t *(AXIS2_CALL *
+ get_base_impl) (void *list_token_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * QNameAttr interface declared methods
+ * ************************************************************/
+
+ axis2_bool_t (AXIS2_CALL *
+ is_qname) (void *list_token_attr,
+ axis2_env_t **env);
+
+ axis2_bool_t (AXIS2_CALL *
+ is_token) (void *list_token_attr,
+ axis2_env_t **env);
+
+
+ axis2_array_list_t *(AXIS2_CALL *
+ get_qnames) (void *list_token_attr,
+ axis2_env_t **env);
+
+ axis2_char_t *(AXIS2_CALL *
+ get_token) (void *list_token_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * Non-API implementation methods
+ * ************************************************************/
+
+ /*
+ * Convert a string of type "Union of xs:QName or xs:token #any" to a
+ * axis2_qname_t or a axis2_char_t.
+ * A null argument will return a null value.
+ * Any conversion error will be reported and a null value will be returned.
+ */
+ void *(AXIS2_CALL *
+ convert) (void *list_token_attr,
+ axis2_env_t **env,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_char_t *attr_value);
+
+};
+
+struct axis2_woden_qname_or_token_any_attr
+{
+ axis2_woden_xml_attr_t base;
+ axis2_woden_qname_or_token_any_attr_ops_t *ops;
+};
+
+/*
+ * 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,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_qname_t *attr_type,
+ axis2_char_t *attr_value);
+
+
+/**
+ * This is an Axis2 C internal method. This is used only from constructor
+ * of the child class
+ */
+AXIS2_DECLARE(axis2_status_t)
+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);
+
+#define AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_FREE(list_token_attr, env) \
+ (((axis2_woden_qname_or_token_any_attr_t *) \
+ list_token_attr)->ops->free(list_token_attr, env))
+
+#define AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_GET_BASE_IMPL(list_token_attr, \
+ env) \
+ (((axis2_woden_qname_or_token_any_attr_t *) \
+ list_token_attr)->ops->get_base_impl(list_token_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_IS_QNAME(list_token_attr, \
+ env) \
+ (((axis2_woden_qname_or_token_any_attr_t *) \
+ list_token_attr)->ops->is_qname(list_token_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_IS_TOKEN(list_token_attr, env) \
+ (((axis2_woden_qname_or_token_any_attr_t *) \
+ list_token_attr)->ops->is_token(list_token_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_GET_QNAMES(list_token_attr, \
+ env) \
+ (((axis2_woden_qname_or_token_any_attr_t *) \
+ list_token_attr)->ops->get_qnames(list_token_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_GET_TOKEN(list_token_attr, \
+ env) \
+ (((axis2_woden_qname_or_token_any_attr_t *) \
+ list_token_attr)->ops->get_token(list_token_attr, \
+ env))
+
+#define AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_CONVERT(list_token_attr, env) \
+ (((axis2_woden_qname_or_token_any_attr_t *) \
+ list_token_attr)->ops->convert(list_token_attr, \
+ env))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR_H */
Modified: webservices/axis2/trunk/c/include/woden/axis2_woden_schema.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_schema.h?rev=395820&r1=395819&r2=395820&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_schema.h (original)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_schema.h Fri Apr 21 02:03:45 2006
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef AXIS2_SCHEMA_H
-#define AXIS2_SCHEMA_H
+#ifndef AXIS2_WODEN_SCHEMA_H
+#define AXIS2_WODEN_SCHEMA_H
/**
* @file axis2_woden_schema.h
@@ -93,7 +93,7 @@
axis2_status_t (AXIS2_CALL *
set_referenceable) (void *schema,
axis2_env_t **env,
- axis2_bool_t *referenceable);
+ axis2_bool_t referenceable);
axis2_bool_t (AXIS2_CALL *
is_referenceable) (void *schema,
@@ -124,7 +124,7 @@
axis2_woden_schema_t *schema_impl,
axis2_hash_t *methods);
-#define AXIS2_SCHEMA_FREE(schema, env) \
+#define AXIS2_WODEN_SCHEMA_FREE(schema, env) \
(((axis2_woden_schema_t *) schema)->ops->free (schema, env))
#define AXIS2_WODEN_SCHEMA_SET_NAMESPACE(schema, env, namespc) \
@@ -156,4 +156,4 @@
#ifdef __cplusplus
}
#endif
-#endif /* AXIS2_SCHEMA_H */
+#endif /* AXIS2_WODEN_SCHEMA_H */
Added: webservices/axis2/trunk/c/include/woden/axis2_woden_schema_constants.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_schema_constants.h?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_schema_constants.h (added)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_schema_constants.h Fri Apr 21 02:03:45 2006
@@ -0,0 +1,87 @@
+/*
+ * 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_SCHEMA_CONSTANTS_H
+#define AXIS2_WODEN_SCHEMA_CONSTANTS_H
+
+/**
+ * @file axis2_schema_constants.h
+ * @brief Axis2 Xml Schema Constants
+ * Constants for XML Schema elements, attributes and URIs.
+ */
+
+#include <axis2.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/** @defgroup axis2_woden_schema_constants
+ * @ingroup axis2_woden_schema
+ * @{
+ */
+/*********************************** Constansts********************************/
+
+
+/* Schema attribute names */
+#define AXIS2_ATTR_ID "id"
+#define AXIS2_ATTR_SCHEMA_LOCATION "schemaLocation"
+
+/* Schema element names */
+#define AXIS2_ELEM_SCHEMA "schema"
+#define AXIS2_ELEM_SCHEMA_IMPORT "import"
+#define AXIS2_ELEM_SCHEMA_INCLUDE "include"
+#define AXIS2_ELEM_SCHEMA_REDEFINE "redefine"
+
+/* Schema uri */
+#define AXIS2_NS_URI_XSD_1999 "http://www.w3.org/1999/XMLSchema"
+#define AXIS2_NS_URI_XSD_2000 "http://www.w3.org/2000/10/XMLSchema"
+#define AXIS2_NS_URI_XSD_2001 "http://www.w3.org/2001/XMLSchema"
+
+/* <xs:schema> qnames */
+#define AXIS2_Q_ELEM_XSD_1999 "schema|http://www.w3.org/1999/XMLSchema"
+#define AXIS2_Q_ELEM_XSD_2000 "schema|http://www.w3.org/2000/10/XMLSchema"
+#define AXIS2_Q_ELEM_XSD_2001 "schema|http://www.w3.org/2001/XMLSchema"
+
+/* <xs:import> qnames */
+#define AXIS2_Q_ELEM_IMPORT_XSD_1999 "import|http://www.w3.org/1999/XMLSchema"
+#define AXIS2_Q_ELEM_IMPORT_XSD_2000 "import|http://www.w3.org/2000/10/XMLSchema"
+#define AXIS2_Q_ELEM_IMPORT_XSD_2001 "import|http://www.w3.org/2001/XMLSchema"
+
+/* TODO remove <include> if not used in Woden */
+/* <xs:include> qnames */
+#define AXIS2_Q_ELEM_INCLUDE_XSD_1999 "include|http://www.w3.org/1999/XMLSchema"
+#define AXIS2_Q_ELEM_INCLUDE_XSD_2000 "include|http://www.w3.org/2000/10/XMLSchema"
+#define AXIS2_Q_ELEM_INCLUDE_XSD_2001 "include|http://www.w3.org/2001/XMLSchema"
+
+/* TODO remove <redefine> if not used in Woden */
+/* <xs:redefine> qnames */
+#define AXIS2_Q_ELEM_REDEFINE_XSD_1999 "redefine|http://www.w3.org/1999/XMLSchema"
+#define AXIS2_Q_ELEM_REDEFINE_XSD_2000 "redefine|http://www.w3.org/2000/10/XMLSchema"
+#define AXIS2_Q_ELEM_REDEFINE_XSD_2001 "redefine|http://www.w3.org/2001/XMLSchema"
+
+
+/*********************************** Constants*********************************/
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* AXIS2_WODEN_SCHEMA_CONSTANTS_H */
+
+
Added: webservices/axis2/trunk/c/include/woden/axis2_woden_string_attr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_string_attr.h?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_string_attr.h (added)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_string_attr.h Fri Apr 21 02:03:45 2006
@@ -0,0 +1,135 @@
+/*
+ * 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_STRING_ATTR_H
+#define AXIS2_WODEN_STRING_ATTR_H
+
+/**
+ * @file axis2_woden_string_attr.h
+ * @brief Axis2 String Attribute Interface
+ * This class represents XML attribute information items of type xs:string.
+ */
+
+#include <woden/axis2_woden_xml_attr.h>
+
+/** @defgroup axis2_woden_string_attr String Attribute
+ * @ingroup axis2_wsdl
+ * @{
+ */
+
+typedef struct axis2_woden_string_attr axis2_woden_string_attr_t;
+typedef struct axis2_woden_string_attr_ops axis2_woden_string_attr_ops_t;
+struct axis2_om_element;
+struct axis2_om_node;
+struct axis2_url;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct axis2_woden_string_attr_ops
+{
+ /**
+ * Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *
+ free) (void *string_attr,
+ axis2_env_t **env);
+
+ /**
+ * @return the base implementation class
+ */
+ axis2_woden_xml_attr_t *(AXIS2_CALL *
+ get_base_impl) (void *string_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * QNameAttr interface declared methods
+ * ************************************************************/
+
+ axis2_char_t *(AXIS2_CALL *
+ get_string) (void *string_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * Non-API implementation methods
+ * ************************************************************/
+
+ /*
+ * Convert a string of type xs:string to a axis2_char_t.
+ * A null argument will return a null value.
+ * Any conversion error will be reported and a null value will be returned.
+ */
+ void *(AXIS2_CALL *
+ convert) (void *string_attr,
+ axis2_env_t **env,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_char_t *attr_value);
+
+
+};
+
+struct axis2_woden_string_attr
+{
+ axis2_woden_xml_attr_t base;
+ axis2_woden_string_attr_ops_t *ops;
+};
+
+/*
+ * 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,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_qname_t *attr_type,
+ axis2_char_t *attr_value);
+
+
+/**
+ * This is an Axis2 C internal method. This is used only from constructor
+ * of the child class
+ */
+AXIS2_DECLARE(axis2_status_t)
+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);
+
+#define AXIS2_WODEN_STRING_ATTR_FREE(string_attr, env) \
+ (((axis2_woden_string_attr_t *) string_attr)->ops->free(string_attr, env))
+
+#define AXIS2_WODEN_STRING_ATTR_GET_BASE_IMPL(string_attr, env) \
+ (((axis2_woden_string_attr_t *) string_attr)->ops->get_base_impl(string_attr, \
+ env))
+
+#define AXIS2_WODEN_STRING_ATTR_GET_URI(string_attr, env) \
+ (((axis2_woden_string_attr_t *) string_attr)->ops->get_string(string_attr, \
+ env))
+
+#define AXIS2_WODEN_STRING_ATTR_CONVERT(string_attr, env) \
+ (((axis2_woden_string_attr_t *) string_attr)->ops->convert(string_attr, \
+ env))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_STRING_ATTR_H */
Added: webservices/axis2/trunk/c/include/woden/axis2_woden_uri_attr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_uri_attr.h?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_uri_attr.h (added)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_uri_attr.h Fri Apr 21 02:03:45 2006
@@ -0,0 +1,136 @@
+/*
+ * 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_URI_ATTR_H
+#define AXIS2_WODEN_URI_ATTR_H
+
+/**
+ * @file axis2_woden_uri_attr.h
+ * @brief Axis2 URI Attribute Interface
+ * This class represents XML attribute information items of type xs:anyURI.
+ */
+
+#include <woden/axis2_woden_xml_attr.h>
+
+/** @defgroup axis2_woden_uri_attr URI Attribute
+ * @ingroup axis2_wsdl
+ * @{
+ */
+
+typedef struct axis2_woden_uri_attr axis2_woden_uri_attr_t;
+typedef struct axis2_woden_uri_attr_ops axis2_woden_uri_attr_ops_t;
+struct axis2_om_element;
+struct axis2_om_node;
+struct axis2_url;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct axis2_woden_uri_attr_ops
+{
+ /**
+ * Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *
+ free) (void *uri_attr,
+ axis2_env_t **env);
+
+ /**
+ * @return the base implementation class
+ */
+ axis2_woden_xml_attr_t *(AXIS2_CALL *
+ get_base_impl) (void *uri_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * QNameAttr interface declared methods
+ * ************************************************************/
+
+ struct axis2_url *(AXIS2_CALL *
+ get_uri) (void *uri_attr,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * Non-API implementation methods
+ * ************************************************************/
+
+ /*
+ * Convert a string of type xs:anyURI to a axis2_url_t.
+ * An empty string argument will return an empty string URI.
+ * A null argument will return a null value.
+ * Any conversion error will be reported and a null value will be returned.
+ */
+ void *(AXIS2_CALL *
+ convert) (void *uri_attr,
+ axis2_env_t **env,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_char_t *attr_value);
+
+
+};
+
+struct axis2_woden_uri_attr
+{
+ axis2_woden_xml_attr_t base;
+ axis2_woden_uri_attr_ops_t *ops;
+};
+
+/*
+ * 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,
+ struct axis2_om_element *owner_el,
+ struct axis2_om_node *owner_node,
+ axis2_qname_t *attr_type,
+ axis2_char_t *attr_value);
+
+
+/**
+ * This is an Axis2 C internal method. This is used only from constructor
+ * of the child class
+ */
+AXIS2_DECLARE(axis2_status_t)
+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);
+
+#define AXIS2_WODEN_URI_ATTR_FREE(uri_attr, env) \
+ (((axis2_woden_uri_attr_t *) uri_attr)->ops->free(uri_attr, env))
+
+#define AXIS2_WODEN_URI_ATTR_GET_BASE_IMPL(uri_attr, env) \
+ (((axis2_woden_uri_attr_t *) uri_attr)->ops->get_base_impl(uri_attr, \
+ env))
+
+#define AXIS2_WODEN_URI_ATTR_GET_URI(uri_attr, env) \
+ (((axis2_woden_uri_attr_t *) uri_attr)->ops->get_uri(uri_attr, \
+ env))
+
+#define AXIS2_WODEN_URI_ATTR_CONVERT(uri_attr, env) \
+ (((axis2_woden_uri_attr_t *) uri_attr)->ops->convert(uri_attr, \
+ env))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_URI_ATTR_H */
Added: webservices/axis2/trunk/c/include/woden/axis2_woden_xml_attr.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/woden/axis2_woden_xml_attr.h?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/woden/axis2_woden_xml_attr.h (added)
+++ webservices/axis2/trunk/c/include/woden/axis2_woden_xml_attr.h Fri Apr 21 02:03:45 2006
@@ -0,0 +1,165 @@
+/*
+ * 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.h>
+#include <axis2_hash.h>
+#include <axis2_qname.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_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);
+
+ void *(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);
+
+/**
+ * This is an Axis2 C internal method. This is used only from constructor
+ * of the child class
+ */
+AXIS2_DECLARE(axis2_status_t)
+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);
+
+#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_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 */
Modified: webservices/axis2/trunk/c/modules/wsdl/woden/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/Makefile.am?rev=395820&r1=395819&r2=395820&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/Makefile.am Fri Apr 21 02:03:45 2006
@@ -2,7 +2,16 @@
lib_LTLIBRARIES = libaxis2_woden.la
libaxis2_woden_la_SOURCES = \
schema.c \
- imported_schema.c
+ imported_schema.c \
+ inlined_schema.c \
+ xml_attr.c \
+ qname_attr.c \
+ uri_attr.c \
+ qname_list_attr.c \
+ string_attr.c \
+ qname_list_or_token_any_attr.c \
+ qname_or_token_any_attr.c \
+ bool_attr.c
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/modules/util \
Added: webservices/axis2/trunk/c/modules/wsdl/woden/bool_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/bool_attr.c?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/bool_attr.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/bool_attr.c Fri Apr 21 02:03:45 2006
@@ -0,0 +1,227 @@
+/*
+ * 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_bool_attr.h>
+#include <axis2_om_element.h>
+#include <axis2_om_node.h>
+
+typedef struct axis2_woden_bool_attr_impl axis2_woden_bool_attr_impl_t;
+
+/**
+ * @brief Bool Attribute Struct Impl
+ * Axis2 Bool Attribute
+ */
+struct axis2_woden_bool_attr_impl
+{
+ axis2_woden_bool_attr_t bool_attr;
+ axis2_woden_xml_attr_t *xml_attr;
+ axis2_hash_t *methods;
+};
+
+#define INTF_TO_IMPL(bool_attr) \
+ ((axis2_woden_bool_attr_impl_t *) bool_attr)
+
+axis2_status_t AXIS2_CALL
+axis2_woden_bool_attr_free(void *bool_attr,
+ axis2_env_t **env);
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_bool_attr_get_base_impl(void *bool_attr,
+ axis2_env_t **env);
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_bool_attr_get_boolean(void *bool_attr,
+ axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_bool_attr_convert(void *bool_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_bool_attr_t *)
+axis2_woden_bool_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_bool_attr_impl_t *bool_attr_impl = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ bool_attr_impl = AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_bool_attr_impl_t));
+
+ bool_attr_impl->xml_attr = NULL;
+ bool_attr_impl->methods = NULL;
+ bool_attr_impl->bool_attr.ops =
+ AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_bool_attr_ops_t));
+
+ bool_attr_impl->bool_attr.ops->free =
+ axis2_woden_bool_attr_free;
+ bool_attr_impl->bool_attr.ops->get_base_impl =
+ axis2_woden_bool_attr_get_base_impl;
+ bool_attr_impl->bool_attr.ops->get_boolean =
+ axis2_woden_bool_attr_get_boolean;
+ bool_attr_impl->bool_attr.ops->convert =
+ axis2_woden_bool_attr_convert;
+
+
+ bool_attr_impl->methods = axis2_hash_make(env);
+ if(!bool_attr_impl->methods)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ axis2_hash_set(bool_attr_impl->methods, "free",
+ AXIS2_HASH_KEY_STRING, axis2_woden_bool_attr_free);
+ axis2_hash_set(bool_attr_impl->methods, "get_boolean",
+ AXIS2_HASH_KEY_STRING, axis2_woden_bool_attr_get_boolean);
+ axis2_hash_set(bool_attr_impl->methods, "convert",
+ AXIS2_HASH_KEY_STRING, axis2_woden_bool_attr_convert);
+
+ bool_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(&(bool_attr_impl->
+ bool_attr.base), env, bool_attr_impl->
+ xml_attr, bool_attr_impl->methods);
+ if(AXIS2_SUCCESS != status) return NULL;
+ return &(bool_attr_impl->bool_attr);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_bool_attr_free(void *bool_attr,
+ axis2_env_t **env)
+{
+ axis2_woden_bool_attr_impl_t *bool_attr_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ bool_attr_impl = INTF_TO_IMPL(bool_attr);
+
+ if(bool_attr_impl->methods)
+ {
+ axis2_hash_free(bool_attr_impl->methods, env);
+ bool_attr_impl->methods = NULL;
+ }
+
+ if(bool_attr_impl->xml_attr)
+ {
+ AXIS2_WODEN_XML_ATTR_FREE(bool_attr_impl->xml_attr, env);
+ bool_attr_impl->xml_attr = NULL;
+ }
+
+ if((&(bool_attr_impl->bool_attr))->ops)
+ {
+ AXIS2_FREE((*env)->allocator, (&(bool_attr_impl->bool_attr))->ops);
+ (&(bool_attr_impl->bool_attr))->ops = NULL;
+ }
+
+ if(bool_attr_impl)
+ {
+ AXIS2_FREE((*env)->allocator, bool_attr_impl);
+ bool_attr_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_bool_attr_get_base_impl(void *bool_attr,
+ axis2_env_t **env)
+{
+ axis2_woden_bool_attr_impl_t *bool_attr_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ bool_attr_impl = INTF_TO_IMPL(bool_attr);
+
+ return bool_attr_impl->xml_attr;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_bool_attr_resolve_methods(
+ axis2_woden_bool_attr_t *bool_attr,
+ axis2_env_t **env,
+ axis2_woden_bool_attr_t *bool_attr_impl,
+ axis2_hash_t *methods)
+{
+ axis2_woden_bool_attr_impl_t *bool_attr_impl_l = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, bool_attr_impl, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+
+ bool_attr_impl_l = (axis2_woden_bool_attr_impl_t *) bool_attr_impl;
+
+ bool_attr->ops = AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_bool_attr_ops_t));
+ bool_attr->ops->free =
+ axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
+ bool_attr->ops->get_base_impl =
+ bool_attr_impl_l->bool_attr.ops->get_base_impl;
+ bool_attr->ops->get_boolean = bool_attr_impl_l->bool_attr.ops->get_boolean;
+ bool_attr->ops->convert = bool_attr_impl_l->bool_attr.ops->convert;
+
+ return axis2_woden_xml_attr_resolve_methods(&(bool_attr->base),
+ env, bool_attr_impl_l->xml_attr, methods);
+}
+
+axis2_bool_t AXIS2_CALL
+axis2_woden_bool_attr_get_boolean(void *bool_attr,
+ axis2_env_t **env)
+{
+ axis2_woden_bool_attr_impl_t *bool_attr_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ bool_attr_impl = INTF_TO_IMPL(bool_attr);
+ /* TODO return AXIS2_WODEN_XML_ATTR_GET_CONTENT(
+ bool_attr_impl->xml_attr, env);
+ */
+ return AXIS2_FALSE;
+}
+
+void *AXIS2_CALL
+axis2_woden_bool_attr_convert(void *bool_attr,
+ axis2_env_t **env,
+ axis2_om_element_t *owner_el,
+ axis2_om_node_t *owner_node,
+ axis2_char_t *attr_value)
+{
+ axis2_woden_bool_attr_impl_t *bool_attr_impl = NULL;
+ axis2_qname_t *qn = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ bool_attr_impl = INTF_TO_IMPL(bool_attr);
+
+ if(attr_value)
+ {
+ /* TODO */
+ }
+
+ if(!qn)
+ {
+ AXIS2_WODEN_XML_ATTR_SET_VALID(bool_attr_impl->xml_attr, env, AXIS2_FALSE);
+ /* TODO handler error */
+ }
+
+ return qn;
+}
+
Modified: webservices/axis2/trunk/c/modules/wsdl/woden/imported_schema.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/imported_schema.c?rev=395820&r1=395819&r2=395820&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/imported_schema.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/imported_schema.c Fri Apr 21 02:03:45 2006
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <axis2_woden_imported_schema.h>
+#include <woden/axis2_woden_imported_schema.h>
#include <axis2_url.h>
typedef struct axis2_woden_imported_schema_impl axis2_woden_imported_schema_impl_t;
@@ -25,9 +25,9 @@
*/
struct axis2_woden_imported_schema_impl
{
- axis2_woden_imported_schema_t schema;
- axis2_hash_t *methods;
+ axis2_woden_imported_schema_t imported_schema;
axis2_woden_schema_t *schema;
+ axis2_hash_t *methods;
axis2_url_t *f_schema_location;
};
@@ -38,7 +38,7 @@
axis2_woden_imported_schema_free(void *schema,
axis2_env_t **env);
-axis2_wsdl_ext_t *AXIS2_CALL
+axis2_woden_schema_t *AXIS2_CALL
axis2_woden_imported_schema_get_base_impl(void *schema,
axis2_env_t **env);
@@ -64,17 +64,17 @@
schema_impl->schema = NULL;
schema_impl->methods = NULL;
schema_impl->f_schema_location = NULL;
- schema_impl->schema.ops =
+ schema_impl->imported_schema.ops =
AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_woden_imported_schema_ops_t));
- schema_impl->schema.ops->free =
+ schema_impl->imported_schema.ops->free =
axis2_woden_imported_schema_free;
- schema_impl->schema.ops->get_base_impl =
+ schema_impl->imported_schema.ops->get_base_impl =
axis2_woden_imported_schema_get_base_impl;
- schema_impl->schema.ops->set_location =
+ schema_impl->imported_schema.ops->set_location =
axis2_woden_imported_schema_set_location;
- schema_impl->schema.ops->get_location =
+ schema_impl->imported_schema.ops->get_location =
axis2_woden_imported_schema_get_location;
@@ -93,10 +93,10 @@
schema_impl->schema = axis2_woden_schema_create(env);
status = axis2_woden_schema_resolve_methods(&(schema_impl->
- schema.base), env, schema_impl->
+ imported_schema.base), env, schema_impl->
schema, schema_impl->methods);
if(AXIS2_SUCCESS != status) return NULL;
- return &(schema_impl->schema);
+ return &(schema_impl->imported_schema);
}
axis2_status_t AXIS2_CALL
@@ -126,10 +126,10 @@
schema_impl->schema = NULL;
}
- if((&(schema_impl->schema))->ops)
+ if((&(schema_impl->imported_schema))->ops)
{
- AXIS2_FREE((*env)->allocator, (&(schema_impl->schema))->ops);
- (&(schema_impl->schema))->ops = NULL;
+ AXIS2_FREE((*env)->allocator, (&(schema_impl->imported_schema))->ops);
+ (&(schema_impl->imported_schema))->ops = NULL;
}
if(schema_impl)
@@ -172,25 +172,25 @@
schema->ops->free =
axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
schema->ops->get_base_impl =
- schema_impl_l->schema.ops->get_base_impl;
- schema->ops->set_location = schema_impl_l->schema.ops->set_location;
- schema->ops->get_location = schema_impl_l->schema.ops->get_location;
+ schema_impl_l->imported_schema.ops->get_base_impl;
+ schema->ops->set_location = schema_impl_l->imported_schema.ops->set_location;
+ schema->ops->get_location = schema_impl_l->imported_schema.ops->get_location;
return axis2_wsdl_ext_resolve_methods(&(schema->base),
- env, schema_impl_l->wsdl_ext, methods);
+ env, schema_impl_l->schema, methods);
}
axis2_status_t AXIS2_CALL
axis2_woden_imported_schema_set_location(void *schema,
axis2_env_t **env,
- axis2_utl_t *location)
+ axis2_url_t *location)
{
axis2_woden_imported_schema_impl_t *schema_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
schema_impl = INTF_TO_IMPL(schema);
- schema_impl->f_schema_location = location
+ schema_impl->f_schema_location = location;
return AXIS2_SUCCESS;
}
@@ -203,6 +203,6 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
schema_impl = INTF_TO_IMPL(schema);
- return schema_impl->f_schema_location
+ return schema_impl->f_schema_location;
}
Added: webservices/axis2/trunk/c/modules/wsdl/woden/inlined_schema.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/inlined_schema.c?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/inlined_schema.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/inlined_schema.c Fri Apr 21 02:03:45 2006
@@ -0,0 +1,207 @@
+/*
+ * 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_inlined_schema.h>
+
+typedef struct axis2_woden_inlined_schema_impl axis2_woden_inlined_schema_impl_t;
+
+/**
+ * @brief Inlined Schema Struct Impl
+ * Axis2 Inlined Schema
+ */
+struct axis2_woden_inlined_schema_impl
+{
+ axis2_woden_inlined_schema_t inlined_schema;
+ axis2_woden_schema_t *schema;
+ axis2_hash_t *methods;
+ axis2_char_t *f_id;
+};
+
+#define INTF_TO_IMPL(schema) \
+ ((axis2_woden_inlined_schema_impl_t *) schema)
+
+axis2_status_t AXIS2_CALL
+axis2_woden_inlined_schema_free(void *schema,
+ axis2_env_t **env);
+
+axis2_woden_schema_t *AXIS2_CALL
+axis2_woden_inlined_schema_get_base_impl(void *schema,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_inlined_schema_set_id(void *schema,
+ axis2_env_t **env,
+ axis2_char_t *id);
+
+axis2_char_t *AXIS2_CALL
+axis2_woden_inlined_schema_get_id(void *schema,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_inlined_schema_t *)
+axis2_woden_inlined_schema_create(axis2_env_t **env)
+{
+ axis2_woden_inlined_schema_impl_t *schema_impl = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ schema_impl = AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_inlined_schema_impl_t));
+
+ schema_impl->schema = NULL;
+ schema_impl->methods = NULL;
+ schema_impl->f_id = NULL;
+ schema_impl->inlined_schema.ops =
+ AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_inlined_schema_ops_t));
+
+ schema_impl->inlined_schema.ops->free =
+ axis2_woden_inlined_schema_free;
+ schema_impl->inlined_schema.ops->get_base_impl =
+ axis2_woden_inlined_schema_get_base_impl;
+ schema_impl->inlined_schema.ops->set_id =
+ axis2_woden_inlined_schema_set_id;
+ schema_impl->inlined_schema.ops->get_id =
+ axis2_woden_inlined_schema_get_id;
+
+
+ schema_impl->methods = axis2_hash_make(env);
+ if(!schema_impl->methods)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ axis2_hash_set(schema_impl->methods, "free",
+ AXIS2_HASH_KEY_STRING, axis2_woden_inlined_schema_free);
+ axis2_hash_set(schema_impl->methods, "set_id",
+ AXIS2_HASH_KEY_STRING, axis2_woden_inlined_schema_set_id);
+ axis2_hash_set(schema_impl->methods, "get_id",
+ AXIS2_HASH_KEY_STRING, axis2_woden_inlined_schema_get_id);
+
+ schema_impl->schema = axis2_woden_schema_create(env);
+ status = axis2_woden_schema_resolve_methods(&(schema_impl->
+ inlined_schema.base), env, schema_impl->
+ schema, schema_impl->methods);
+ if(AXIS2_SUCCESS != status) return NULL;
+ return &(schema_impl->inlined_schema);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_inlined_schema_free(void *schema,
+ axis2_env_t **env)
+{
+ axis2_woden_inlined_schema_impl_t *schema_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ schema_impl = INTF_TO_IMPL(schema);
+
+ if(schema_impl->f_id)
+ {
+ AXIS2_URL_FREE(schema_impl->f_id, env);
+ schema_impl->f_id = NULL;
+ }
+
+ if(schema_impl->methods)
+ {
+ axis2_hash_free(schema_impl->methods, env);
+ schema_impl->methods = NULL;
+ }
+
+ if(schema_impl->schema)
+ {
+ AXIS2_WODEN_SCHEMA_FREE(schema_impl->schema, env);
+ schema_impl->schema = NULL;
+ }
+
+ if((&(schema_impl->inlined_schema))->ops)
+ {
+ AXIS2_FREE((*env)->allocator, (&(schema_impl->inlined_schema))->ops);
+ (&(schema_impl->inlined_schema))->ops = NULL;
+ }
+
+ if(schema_impl)
+ {
+ AXIS2_FREE((*env)->allocator, schema_impl);
+ schema_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_woden_schema_t *AXIS2_CALL
+axis2_woden_inlined_schema_get_base_impl(void *schema,
+ axis2_env_t **env)
+{
+ axis2_woden_inlined_schema_impl_t *schema_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ schema_impl = INTF_TO_IMPL(schema);
+
+ return schema_impl->schema;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_inlined_schema_resolve_methods(
+ axis2_woden_inlined_schema_t *schema,
+ axis2_env_t **env,
+ axis2_woden_inlined_schema_t *schema_impl,
+ axis2_hash_t *methods)
+{
+ axis2_woden_inlined_schema_impl_t *schema_impl_l = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, schema_impl, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+
+ schema_impl_l = (axis2_woden_inlined_schema_impl_t *) schema_impl;
+
+ schema->ops = AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_inlined_schema_ops_t));
+ schema->ops->free =
+ axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
+ schema->ops->get_base_impl =
+ schema_impl_l->inlined_schema.ops->get_base_impl;
+ schema->ops->set_id = schema_impl_l->inlined_schema.ops->set_id;
+ schema->ops->get_id = schema_impl_l->inlined_schema.ops->get_id;
+
+ return axis2_wsdl_ext_resolve_methods(&(schema->base),
+ env, schema_impl_l->schema, methods);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_inlined_schema_set_id(void *schema,
+ axis2_env_t **env,
+ axis2_char_t *id)
+{
+ axis2_woden_inlined_schema_impl_t *schema_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ schema_impl = INTF_TO_IMPL(schema);
+
+ schema_impl->f_id = id;
+ return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+axis2_woden_inlined_schema_get_id(void *schema,
+ axis2_env_t **env)
+{
+ axis2_woden_inlined_schema_impl_t *schema_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ schema_impl = INTF_TO_IMPL(schema);
+
+ return schema_impl->f_id;
+}
+
Added: webservices/axis2/trunk/c/modules/wsdl/woden/qname_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/qname_attr.c?rev=395820&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/qname_attr.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/qname_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_attr.h>
+#include <axis2_om_element.h>
+#include <axis2_om_node.h>
+
+typedef struct axis2_woden_qname_attr_impl axis2_woden_qname_attr_impl_t;
+
+/**
+ * @brief Qname Attribute Struct Impl
+ * Axis2 Qname Attribute
+ */
+struct axis2_woden_qname_attr_impl
+{
+ axis2_woden_qname_attr_t qname_attr;
+ axis2_woden_xml_attr_t *xml_attr;
+ axis2_hash_t *methods;
+};
+
+#define INTF_TO_IMPL(qname_attr) \
+ ((axis2_woden_qname_attr_impl_t *) qname_attr)
+
+axis2_status_t AXIS2_CALL
+axis2_woden_qname_attr_free(void *qname_attr,
+ axis2_env_t **env);
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_qname_attr_get_base_impl(void *qname_attr,
+ axis2_env_t **env);
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_qname_attr_get_qname(void *qname_attr,
+ axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_qname_attr_convert(void *qname_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_attr_t *)
+axis2_woden_qname_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_attr_impl_t *qname_attr_impl = NULL;
+ axis2_status_t status = AXIS2_FAILURE;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ qname_attr_impl = AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_qname_attr_impl_t));
+
+ qname_attr_impl->xml_attr = NULL;
+ qname_attr_impl->methods = NULL;
+ qname_attr_impl->qname_attr.ops =
+ AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_qname_attr_ops_t));
+
+ qname_attr_impl->qname_attr.ops->free =
+ axis2_woden_qname_attr_free;
+ qname_attr_impl->qname_attr.ops->get_base_impl =
+ axis2_woden_qname_attr_get_base_impl;
+ qname_attr_impl->qname_attr.ops->get_qname =
+ axis2_woden_qname_attr_get_qname;
+ qname_attr_impl->qname_attr.ops->convert =
+ axis2_woden_qname_attr_convert;
+
+
+ qname_attr_impl->methods = axis2_hash_make(env);
+ if(!qname_attr_impl->methods)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ axis2_hash_set(qname_attr_impl->methods, "free",
+ AXIS2_HASH_KEY_STRING, axis2_woden_qname_attr_free);
+ axis2_hash_set(qname_attr_impl->methods, "get_qname",
+ AXIS2_HASH_KEY_STRING, axis2_woden_qname_attr_get_qname);
+ axis2_hash_set(qname_attr_impl->methods, "convert",
+ AXIS2_HASH_KEY_STRING, axis2_woden_qname_attr_convert);
+
+ qname_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_attr_impl->
+ qname_attr.base), env, qname_attr_impl->
+ xml_attr, qname_attr_impl->methods);
+ if(AXIS2_SUCCESS != status) return NULL;
+ return &(qname_attr_impl->qname_attr);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_qname_attr_free(void *qname_attr,
+ axis2_env_t **env)
+{
+ axis2_woden_qname_attr_impl_t *qname_attr_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ qname_attr_impl = INTF_TO_IMPL(qname_attr);
+
+ if(qname_attr_impl->methods)
+ {
+ axis2_hash_free(qname_attr_impl->methods, env);
+ qname_attr_impl->methods = NULL;
+ }
+
+ if(qname_attr_impl->xml_attr)
+ {
+ AXIS2_WODEN_XML_ATTR_FREE(qname_attr_impl->xml_attr, env);
+ qname_attr_impl->xml_attr = NULL;
+ }
+
+ if((&(qname_attr_impl->qname_attr))->ops)
+ {
+ AXIS2_FREE((*env)->allocator, (&(qname_attr_impl->qname_attr))->ops);
+ (&(qname_attr_impl->qname_attr))->ops = NULL;
+ }
+
+ if(qname_attr_impl)
+ {
+ AXIS2_FREE((*env)->allocator, qname_attr_impl);
+ qname_attr_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_woden_xml_attr_t *AXIS2_CALL
+axis2_woden_qname_attr_get_base_impl(void *qname_attr,
+ axis2_env_t **env)
+{
+ axis2_woden_qname_attr_impl_t *qname_attr_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ qname_attr_impl = INTF_TO_IMPL(qname_attr);
+
+ return qname_attr_impl->xml_attr;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_qname_attr_resolve_methods(
+ axis2_woden_qname_attr_t *qname_attr,
+ axis2_env_t **env,
+ axis2_woden_qname_attr_t *qname_attr_impl,
+ axis2_hash_t *methods)
+{
+ axis2_woden_qname_attr_impl_t *qname_attr_impl_l = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, qname_attr_impl, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+
+ qname_attr_impl_l = (axis2_woden_qname_attr_impl_t *) qname_attr_impl;
+
+ qname_attr->ops = AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_qname_attr_ops_t));
+ qname_attr->ops->free =
+ axis2_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
+ qname_attr->ops->get_base_impl =
+ qname_attr_impl_l->qname_attr.ops->get_base_impl;
+ qname_attr->ops->get_qname = qname_attr_impl_l->qname_attr.ops->get_qname;
+ qname_attr->ops->convert = qname_attr_impl_l->qname_attr.ops->convert;
+
+ return axis2_woden_xml_attr_resolve_methods(&(qname_attr->base),
+ env, qname_attr_impl_l->xml_attr, methods);
+}
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_qname_attr_get_qname(void *qname_attr,
+ axis2_env_t **env)
+{
+ axis2_woden_qname_attr_impl_t *qname_attr_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ qname_attr_impl = INTF_TO_IMPL(qname_attr);
+ return (axis2_qname_t *) AXIS2_WODEN_XML_ATTR_GET_CONTENT(
+ qname_attr_impl->xml_attr, env);
+}
+
+void *AXIS2_CALL
+axis2_woden_qname_attr_convert(void *qname_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_attr_impl_t *qname_attr_impl = NULL;
+ axis2_qname_t *qn = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ qname_attr_impl = INTF_TO_IMPL(qname_attr);
+
+ if(attr_value)
+ {
+ /* TODO qn = axis2_dom_utils_get_qname(attr_value, owner_el, owner_node); */
+ }
+
+ if(!qn)
+ {
+ AXIS2_WODEN_XML_ATTR_SET_VALID(qname_attr_impl->xml_attr, env, AXIS2_FALSE);
+ /* TODO handler error */
+ }
+
+ return qn;
+}
+