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/05/08 09:21:21 UTC
svn commit: r404947 [6/7] - in
/webservices/axis2/trunk/c/modules/wsdl/woden: ./ include/woden/
include/woden/schema/ include/woden/wsdl20/
include/woden/wsdl20/extensions/ include/woden/wsdl20/xml/
include/woden/xml/ src/schema/ src/util/ src/wsdl20/ ...
Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/wsdl_obj.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/wsdl_obj.c?rev=404947&r1=404946&r2=404947&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/wsdl_obj.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/wsdl_obj.c Mon May 8 00:21:09 2006
@@ -15,7 +15,7 @@
*/
#include <woden/axis2_woden_wsdl_obj.h>
-#include <woden/axis2_woden_component_exts.h>
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
typedef struct axis2_woden_wsdl_obj_impl axis2_woden_wsdl_obj_impl_t;
@@ -26,18 +26,17 @@
struct axis2_woden_wsdl_obj_impl
{
axis2_woden_wsdl_obj_t wsdl_obj;
- axis2_hash_t *methods;
axis2_woden_wsdl_element_t *wsdl_element;
- axis2_woden_wsdl_component_t *wsdl_component;
- axis2_bool_t is_interface;
+ axis2_woden_obj_types_t obj_type;
axis2_hash_t *f_comp_exts;
};
#define INTF_TO_IMPL(wsdl_obj) ((axis2_woden_wsdl_obj_impl_t *) wsdl_obj)
axis2_status_t AXIS2_CALL
-axis2_woden_wsdl_obj_free(void *wsdl_obj,
- axis2_env_t **env);
+axis2_woden_wsdl_obj_free(
+ void *wsdl_obj,
+ axis2_env_t **env);
axis2_woden_wsdl_element_t *AXIS2_CALL
axis2_woden_wsdl_obj_get_base_impl(void *wsdl_obj,
@@ -64,10 +63,8 @@
sizeof(axis2_woden_wsdl_obj_impl_t));
wsdl_obj_impl->wsdl_element = NULL;
- wsdl_obj_impl->wsdl_component = NULL;
wsdl_obj_impl->f_comp_exts = NULL;
- wsdl_obj_impl->methods = NULL;
-
+
wsdl_obj_impl->wsdl_obj.ops = AXIS2_MALLOC((*env)->allocator,
sizeof(axis2_woden_wsdl_obj_ops_t));
wsdl_obj_impl->f_comp_exts = axis2_hash_make(env);
@@ -83,18 +80,6 @@
wsdl_obj_impl->wsdl_obj.ops->set_component_exts =
axis2_woden_wsdl_obj_set_component_exts;
- wsdl_obj_impl->methods = axis2_hash_make(env);
- if(!wsdl_obj_impl->methods)
- {
- AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
- axis2_hash_set(wsdl_obj_impl->methods, "free", AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_obj_free);
- axis2_hash_set(wsdl_obj_impl->methods, "get_component_exts_for_namespace",
- AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_obj_get_component_exts_for_namespace);
- axis2_hash_set(wsdl_obj_impl->methods, "set_component_exts",
- AXIS2_HASH_KEY_STRING, axis2_woden_wsdl_obj_set_component_exts);
-
return &(wsdl_obj_impl->wsdl_obj);
}
@@ -102,38 +87,15 @@
axis2_woden_wsdl_obj_create(axis2_env_t **env)
{
axis2_woden_wsdl_obj_impl_t *wsdl_obj_impl = NULL;
- axis2_status_t status = AXIS2_FAILURE;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
wsdl_obj_impl = (axis2_woden_wsdl_obj_impl_t *) create(env);
wsdl_obj_impl->wsdl_element = axis2_woden_wsdl_element_create(env);
- status = axis2_woden_wsdl_element_resolve_methods(&(wsdl_obj_impl->wsdl_obj.
- base.element_base), env, wsdl_obj_impl->wsdl_element,
- wsdl_obj_impl->methods);
- if(AXIS2_SUCCESS != status) return NULL;
return &(wsdl_obj_impl->wsdl_obj);
}
-AXIS2_DECLARE(axis2_woden_wsdl_obj_t *)
-axis2_woden_wsdl_obj_create_for_wsdl_component(axis2_env_t **env)
-{
- axis2_woden_wsdl_obj_impl_t *wsdl_obj_impl = NULL;
- axis2_status_t status = AXIS2_FAILURE;
-
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- wsdl_obj_impl = (axis2_woden_wsdl_obj_impl_t *) create(env);
- wsdl_obj_impl->is_interface = AXIS2_TRUE;
-
- wsdl_obj_impl->wsdl_component = axis2_woden_wsdl_component_create(env);
- status = axis2_woden_wsdl_component_resolve_methods(&(wsdl_obj_impl->
- wsdl_obj.base.component_base), env,
- wsdl_obj_impl->wsdl_component, wsdl_obj_impl->methods);
- if(AXIS2_SUCCESS != status) return NULL;
- return &(wsdl_obj_impl->wsdl_obj);
-}
-
axis2_status_t AXIS2_CALL
axis2_woden_wsdl_obj_free(void *wsdl_obj,
axis2_env_t **env)
@@ -143,24 +105,12 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
wsdl_obj_impl = INTF_TO_IMPL(wsdl_obj);
- if(wsdl_obj_impl->methods)
- {
- axis2_hash_free(wsdl_obj_impl->methods, env);
- wsdl_obj_impl->methods = NULL;
- }
-
if(wsdl_obj_impl->wsdl_element)
{
AXIS2_WODEN_WSDL_ELEMENT_FREE(wsdl_obj_impl->wsdl_element, env);
wsdl_obj_impl->wsdl_element = NULL;
}
- if((AXIS2_TRUE == wsdl_obj_impl->is_interface) && wsdl_obj_impl->wsdl_component)
- {
- AXIS2_WODEN_WSDL_COMPONENT_FREE(wsdl_obj_impl->wsdl_component, env);
- wsdl_obj_impl->wsdl_component = NULL;
- }
-
if((&(wsdl_obj_impl->wsdl_obj))->ops)
{
AXIS2_FREE((*env)->allocator, (&(wsdl_obj_impl->wsdl_obj))->ops);
@@ -190,29 +140,21 @@
axis2_status_t AXIS2_CALL
axis2_woden_wsdl_obj_resolve_methods(axis2_woden_wsdl_obj_t *wsdl_obj,
axis2_env_t **env,
- axis2_woden_wsdl_obj_t *wsdl_obj_impl,
axis2_hash_t *methods)
{
- axis2_woden_wsdl_obj_impl_t *wsdl_obj_impl_l = NULL;
-
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- AXIS2_PARAM_CHECK((*env)->error, wsdl_obj_impl, AXIS2_FAILURE);
AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
- wsdl_obj_impl_l = (axis2_woden_wsdl_obj_impl_t *) wsdl_obj_impl;
- wsdl_obj->ops = AXIS2_MALLOC((*env)->allocator,
- sizeof(axis2_woden_wsdl_obj_ops_t));
wsdl_obj->ops->free = axis2_hash_get(methods, "free",
AXIS2_HASH_KEY_STRING);
- wsdl_obj->ops->get_base_impl = wsdl_obj_impl_l->wsdl_obj.ops->
- get_base_impl;
- wsdl_obj->ops->get_component_exts_for_namespace = wsdl_obj_impl_l->wsdl_obj.
- ops->get_component_exts_for_namespace;
- wsdl_obj->ops->set_component_exts = wsdl_obj_impl_l->wsdl_obj.ops->
- set_component_exts;
-
- return axis2_woden_wsdl_element_resolve_methods(&(wsdl_obj->base.
- element_base), env, wsdl_obj_impl_l->wsdl_element, methods);
+ wsdl_obj->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+ wsdl_obj->ops->get_component_exts_for_namespace = axis2_hash_get(methods,
+ "get_component_exts_for_namespace", AXIS2_HASH_KEY_STRING);
+ wsdl_obj->ops->set_component_exts = axis2_hash_get(methods,
+ "set_component_exts", AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
}
axis2_woden_component_exts_t *AXIS2_CALL
Added: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/Makefile.am?rev=404947&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/Makefile.am (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/Makefile.am Mon May 8 00:21:09 2006
@@ -0,0 +1,13 @@
+noinst_LTLIBRARIES = libaxis2_woden_xml.la
+
+libaxis2_woden_xml_la_SOURCES = \
+ feature_element.c \
+ property_element.c \
+ documentation_element.c \
+ documentable_element.c \
+ nested_element.c \
+ configurable_element.c \
+ types_element.c
+
+INCLUDES = -I$(top_builddir)/include \
+ -I$(AXIS2C_HOME)/include
Added: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/configurable_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/configurable_element.c?rev=404947&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/configurable_element.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/configurable_element.c Mon May 8 00:21:09 2006
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/xml/axis2_woden_configurable_element.h>
+
+axis2_status_t AXIS2_CALL
+axis2_woden_configurable_element_resolve_methods(
+ axis2_woden_configurable_element_t *configurable_element,
+ axis2_env_t **env,
+ axis2_hash_t *methods)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+
+ configurable_element->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ configurable_element->ops->to_configurable_element_free = axis2_hash_get(methods,
+ "to_configurable_element_free", AXIS2_HASH_KEY_STRING);
+ configurable_element->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+ configurable_element->ops->add_feature_element = axis2_hash_get(methods,
+ "add_feature_element", AXIS2_HASH_KEY_STRING);
+ configurable_element->ops->get_feature_elements = axis2_hash_get(methods,
+ "get_feature_elements", AXIS2_HASH_KEY_STRING);
+ configurable_element->ops->add_property_element = axis2_hash_get(methods,
+ "add_property_element", AXIS2_HASH_KEY_STRING);
+ configurable_element->ops->get_property_elements = axis2_hash_get(methods,
+ "get_property_elements", AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
+}
+
Added: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/documentable_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/documentable_element.c?rev=404947&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/documentable_element.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/documentable_element.c Mon May 8 00:21:09 2006
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/xml/axis2_woden_documentable_element.h>
+
+axis2_status_t AXIS2_CALL
+axis2_woden_documentable_element_resolve_methods(
+ axis2_woden_documentable_element_t *documentable_element,
+ axis2_env_t **env,
+ axis2_hash_t *methods)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+
+ documentable_element->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ documentable_element->ops->to_documentable_element_free =
+ axis2_hash_get(methods, "to_documentable_element_free",
+ AXIS2_HASH_KEY_STRING);
+ documentable_element->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+ documentable_element->ops->add_documentation_element =
+ axis2_hash_get(methods, "add_documention_element",
+ AXIS2_HASH_KEY_STRING);
+ documentable_element->ops->get_documentation_elements =
+ axis2_hash_get(methods, "get_documentation_elements",
+ AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
+}
+
Added: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/documentation_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/documentation_element.c?rev=404947&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/documentation_element.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/documentation_element.c Mon May 8 00:21:09 2006
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/xml/axis2_woden_documentation_element.h>
+
+axis2_status_t AXIS2_CALL
+axis2_woden_documentation_element_resolve_methods(
+ axis2_woden_documentation_element_t *documentation_element,
+ axis2_env_t **env,
+ axis2_hash_t *methods)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+
+ documentation_element->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ documentation_element->ops->to_documentation_element_free =
+ axis2_hash_get(methods, "to_documentation_element_free",
+ AXIS2_HASH_KEY_STRING);
+ documentation_element->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+ documentation_element->ops->set_content =
+ axis2_hash_get(methods, "set_content",
+ AXIS2_HASH_KEY_STRING);
+ documentation_element->ops->get_content =
+ axis2_hash_get(methods, "get_content",
+ AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
+}
+
Added: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/feature_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/feature_element.c?rev=404947&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/feature_element.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/feature_element.c Mon May 8 00:21:09 2006
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/xml/axis2_woden_feature_element.h>
+
+axis2_status_t AXIS2_CALL
+axis2_woden_feature_element_resolve_methods(
+ axis2_woden_feature_element_t *feature_element,
+ axis2_env_t **env,
+ axis2_hash_t *methods)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+
+ feature_element->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ feature_element->ops->to_feature_element_free = axis2_hash_get(methods,
+ "to_feature_element_free", AXIS2_HASH_KEY_STRING);
+ feature_element->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+ feature_element->ops->set_ref = axis2_hash_get(methods,
+ "set_ref", AXIS2_HASH_KEY_STRING);
+ feature_element->ops->get_ref = axis2_hash_get(methods,
+ "get_ref", AXIS2_HASH_KEY_STRING);
+ feature_element->ops->set_required = axis2_hash_get(methods,
+ "set_required", AXIS2_HASH_KEY_STRING);
+ feature_element->ops->is_required = axis2_hash_get(methods,
+ "is_required", AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
+}
+
Added: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/nested_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/nested_element.c?rev=404947&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/nested_element.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/nested_element.c Mon May 8 00:21:09 2006
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/xml/axis2_woden_nested_element.h>
+
+axis2_status_t AXIS2_CALL
+axis2_woden_nested_element_resolve_methods(
+ axis2_woden_nested_element_t *nested_element,
+ axis2_env_t **env,
+ axis2_hash_t *methods)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+
+ nested_element->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ nested_element->ops->to_nested_element_free = axis2_hash_get(methods,
+ "to_nested_element_free", AXIS2_HASH_KEY_STRING);
+ nested_element->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+ nested_element->ops->set_parent_element = axis2_hash_get(methods,
+ "set_parent_element", AXIS2_HASH_KEY_STRING);
+ nested_element->ops->get_parent_element = axis2_hash_get(methods,
+ "get_parent_element", AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
+}
+
Added: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/property_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/property_element.c?rev=404947&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/property_element.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/property_element.c Mon May 8 00:21:09 2006
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/xml/axis2_woden_property_element.h>
+
+axis2_status_t AXIS2_CALL
+axis2_woden_property_element_resolve_methods(
+ axis2_woden_property_element_t *property_element,
+ axis2_env_t **env,
+ axis2_hash_t *methods)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+
+ property_element->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ property_element->ops->to_property_element_free = axis2_hash_get(methods,
+ "to_property_element_free", AXIS2_HASH_KEY_STRING);
+ property_element->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+ property_element->ops->set_ref = axis2_hash_get(methods,
+ "set_ref", AXIS2_HASH_KEY_STRING);
+ property_element->ops->get_ref = axis2_hash_get(methods,
+ "get_ref", AXIS2_HASH_KEY_STRING);
+ property_element->ops->set_value = axis2_hash_get(methods,
+ "set_value", AXIS2_HASH_KEY_STRING);
+ property_element->ops->get_value = axis2_hash_get(methods,
+ "get_value", AXIS2_HASH_KEY_STRING);
+ property_element->ops->set_constraint_qname = axis2_hash_get(methods,
+ "set_constraint_qname", AXIS2_HASH_KEY_STRING);
+ property_element->ops->get_constraint_qname = axis2_hash_get(methods,
+ "get_constraint_qname", AXIS2_HASH_KEY_STRING);
+ property_element->ops->get_constraint = axis2_hash_get(methods,
+ "get_constraint", AXIS2_HASH_KEY_STRING);
+ property_element->ops->set_has_value_token = axis2_hash_get(methods,
+ "set_has_value_token", AXIS2_HASH_KEY_STRING);
+ property_element->ops->has_value_token = axis2_hash_get(methods,
+ "has_value_token", AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
+}
+
Added: webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/types_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/types_element.c?rev=404947&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/types_element.c (added)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/wsdl20/xml/types_element.c Mon May 8 00:21:09 2006
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/wsdl20/xml/axis2_woden_types_element.h>
+
+axis2_status_t AXIS2_CALL
+axis2_woden_types_element_resolve_methods(
+ axis2_woden_types_element_t *types_element,
+ axis2_env_t **env,
+ axis2_hash_t *methods)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+
+ types_element->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ types_element->ops->to_types_element_free = axis2_hash_get(methods,
+ "to_types_element_free", AXIS2_HASH_KEY_STRING);
+ types_element->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+ types_element->ops->set_type_system = axis2_hash_get(methods,
+ "set_type_system", AXIS2_HASH_KEY_STRING);
+ types_element->ops->get_type_system = axis2_hash_get(methods,
+ "get_type_system", AXIS2_HASH_KEY_STRING);
+ types_element->ops->add_schema = axis2_hash_get(methods,
+ "add_schema", AXIS2_HASH_KEY_STRING);
+ types_element->ops->remove_schema = axis2_hash_get(methods,
+ "remove_schema", AXIS2_HASH_KEY_STRING);
+ types_element->ops->get_schemas = axis2_hash_get(methods,
+ "get_schemas", AXIS2_HASH_KEY_STRING);
+ types_element->ops->get_schemas_with_namespace = axis2_hash_get(methods,
+ "get_schemas_with_namespace", AXIS2_HASH_KEY_STRING);
+ types_element->ops->get_inlined_schemas = axis2_hash_get(methods,
+ "get_inlined_schemas", AXIS2_HASH_KEY_STRING);
+ types_element->ops->get_imported_schemas = axis2_hash_get(methods,
+ "get_imported_schemas", AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
+}
+
Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/Makefile.am?rev=404947&r1=404946&r2=404947&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/Makefile.am Mon May 8 00:21:09 2006
@@ -1,5 +1,4 @@
-TESTS =
-lib_LTLIBRARIES = libaxis2_woden_xml.la
+noinst_LTLIBRARIES = libaxis2_woden_xml.la
libaxis2_woden_xml_la_SOURCES = \
xml_attr.c \
@@ -11,5 +10,5 @@
qname_or_token_any_attr.c \
bool_attr.c
-INCLUDES = -I$(top_builddir)/include/woden \
+INCLUDES = -I$(top_builddir)/include \
-I$(AXIS2C_HOME)/include
Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/bool_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/bool_attr.c?rev=404947&r1=404946&r2=404947&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/bool_attr.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/bool_attr.c Mon May 8 00:21:09 2006
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <woden/axis2_woden_bool_attr.h>
+#include <woden/xml/axis2_woden_bool_attr.h>
#include <axis2_om_element.h>
#include <axis2_om_node.h>
@@ -28,6 +28,7 @@
{
axis2_woden_bool_attr_t bool_attr;
axis2_woden_xml_attr_t *xml_attr;
+ axis2_woden_obj_types_t obj_type;
axis2_hash_t *methods;
};
@@ -38,6 +39,10 @@
axis2_woden_bool_attr_free(void *bool_attr,
axis2_env_t **env);
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_bool_attr_type(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);
@@ -53,24 +58,17 @@
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)
+static axis2_woden_bool_attr_t *
+create(
+ axis2_env_t **env)
{
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->obj_type = AXIS2_WODEN_BOOL_ATTR;
bool_attr_impl->xml_attr = NULL;
bool_attr_impl->methods = NULL;
bool_attr_impl->bool_attr.ops =
@@ -79,6 +77,8 @@
bool_attr_impl->bool_attr.ops->free =
axis2_woden_bool_attr_free;
+ bool_attr_impl->bool_attr.ops->type =
+ axis2_woden_bool_attr_type;
bool_attr_impl->bool_attr.ops->get_base_impl =
axis2_woden_bool_attr_get_base_impl;
bool_attr_impl->bool_attr.ops->get_boolean =
@@ -95,20 +95,50 @@
}
axis2_hash_set(bool_attr_impl->methods, "free",
AXIS2_HASH_KEY_STRING, axis2_woden_bool_attr_free);
+ axis2_hash_set(bool_attr_impl->methods, "type",
+ AXIS2_HASH_KEY_STRING, axis2_woden_bool_attr_type);
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);
+ return &(bool_attr_impl->bool_attr);
+}
+/*
+ * 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_ENV_CHECK(env, AXIS2_FAILURE);
+ bool_attr_impl = (axis2_woden_bool_attr_impl_t *) create(env);
+
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_woden_obj_types_t AXIS2_CALL
+axis2_woden_bool_attr_type(
+ 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);
+
+ return bool_attr_impl->obj_type;
+}
+
axis2_status_t AXIS2_CALL
axis2_woden_bool_attr_free(void *bool_attr,
axis2_env_t **env)
@@ -160,28 +190,23 @@
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);
+ bool_attr->ops->to_bool_attr_free = axis2_hash_get(methods,
+ "to_bool_attr_free", AXIS2_HASH_KEY_STRING);
+ bool_attr->ops->type =
+ axis2_hash_get(methods, "type", AXIS2_HASH_KEY_STRING);
+ bool_attr->ops->get_boolean = axis2_hash_get(methods, "get_boolean",
+ AXIS2_HASH_KEY_STRING);
+ bool_attr->ops->convert = axis2_hash_get(methods, "convert",
+ AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
}
axis2_bool_t AXIS2_CALL
Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_attr.c?rev=404947&r1=404946&r2=404947&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_attr.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_attr.c Mon May 8 00:21:09 2006
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <woden/axis2_woden_qname_attr.h>
+#include <woden/xml/axis2_woden_qname_attr.h>
#include <axis2_om_element.h>
#include <axis2_om_node.h>
@@ -28,6 +28,7 @@
{
axis2_woden_qname_attr_t qname_attr;
axis2_woden_xml_attr_t *xml_attr;
+ axis2_woden_obj_types_t obj_type;
axis2_hash_t *methods;
};
@@ -35,42 +36,52 @@
((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_qname_attr_free(
+ void *qname_attr,
+ axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_qname_attr_type(
+ 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_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);
+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);
+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_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->obj_type = AXIS2_WODEN_QNAME_ATTR;
qname_attr_impl->xml_attr = NULL;
qname_attr_impl->methods = NULL;
qname_attr_impl->qname_attr.ops =
@@ -79,6 +90,8 @@
qname_attr_impl->qname_attr.ops->free =
axis2_woden_qname_attr_free;
+ qname_attr_impl->qname_attr.ops->type =
+ axis2_woden_qname_attr_type;
qname_attr_impl->qname_attr.ops->get_base_impl =
axis2_woden_qname_attr_get_base_impl;
qname_attr_impl->qname_attr.ops->get_qname =
@@ -95,6 +108,8 @@
}
axis2_hash_set(qname_attr_impl->methods, "free",
AXIS2_HASH_KEY_STRING, axis2_woden_qname_attr_free);
+ axis2_hash_set(qname_attr_impl->methods, "type",
+ AXIS2_HASH_KEY_STRING, axis2_woden_qname_attr_type);
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",
@@ -102,16 +117,27 @@
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_woden_obj_types_t AXIS2_CALL
+axis2_woden_qname_attr_type(
+ 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 qname_attr_impl->obj_type;
+}
+
axis2_status_t AXIS2_CALL
-axis2_woden_qname_attr_free(void *qname_attr,
- axis2_env_t **env)
+axis2_woden_qname_attr_free(
+ void *qname_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_attr_impl_t *qname_attr_impl = NULL;
@@ -145,8 +171,9 @@
}
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_get_base_impl(
+ void *qname_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_attr_impl_t *qname_attr_impl = NULL;
@@ -158,35 +185,31 @@
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_t *qname_attr,
+ axis2_env_t **env,
+ 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;
+ qname_attr->ops->free = axis2_hash_get(methods,
+ "free", AXIS2_HASH_KEY_STRING);
+ qname_attr->ops->to_qname_attr_free = axis2_hash_get(methods,
+ "to_qname_attr_free", AXIS2_HASH_KEY_STRING);
+ qname_attr->ops->type = axis2_hash_get(methods,
+ "type", AXIS2_HASH_KEY_STRING);
+ qname_attr->ops->get_qname = axis2_hash_get(methods,
+ "get_qname", AXIS2_HASH_KEY_STRING);
+ qname_attr->ops->convert = axis2_hash_get(methods,
+ "convert", AXIS2_HASH_KEY_STRING);
- return axis2_woden_xml_attr_resolve_methods(&(qname_attr->base),
- env, qname_attr_impl_l->xml_attr, methods);
+ return AXIS2_SUCCESS;
}
axis2_qname_t *AXIS2_CALL
-axis2_woden_qname_attr_get_qname(void *qname_attr,
- axis2_env_t **env)
+axis2_woden_qname_attr_get_qname(
+ void *qname_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_attr_impl_t *qname_attr_impl = NULL;
@@ -197,11 +220,12 @@
}
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_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;
Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_list_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_list_attr.c?rev=404947&r1=404946&r2=404947&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_list_attr.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_list_attr.c Mon May 8 00:21:09 2006
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <woden/axis2_woden_qname_list_attr.h>
+#include <woden/xml/axis2_woden_qname_list_attr.h>
#include <axis2_om_element.h>
#include <axis2_om_node.h>
@@ -28,6 +28,7 @@
{
axis2_woden_qname_list_attr_t qname_list_attr;
axis2_woden_xml_attr_t *xml_attr;
+ axis2_woden_obj_types_t obj_type;
axis2_hash_t *methods;
};
@@ -35,42 +36,52 @@
((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_qname_list_attr_free(
+ void *qname_list_attr,
+ axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_qname_list_attr_type(
+ 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_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);
+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);
+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_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->obj_type = AXIS2_WODEN_QNAME_LIST_ATTR;
qname_list_attr_impl->xml_attr = NULL;
qname_list_attr_impl->methods = NULL;
qname_list_attr_impl->qname_list_attr.ops =
@@ -79,6 +90,8 @@
qname_list_attr_impl->qname_list_attr.ops->free =
axis2_woden_qname_list_attr_free;
+ qname_list_attr_impl->qname_list_attr.ops->type =
+ axis2_woden_qname_list_attr_type;
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 =
@@ -95,6 +108,8 @@
}
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, "type",
+ AXIS2_HASH_KEY_STRING, axis2_woden_qname_list_attr_type);
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",
@@ -102,16 +117,27 @@
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_woden_obj_types_t AXIS2_CALL
+axis2_woden_qname_list_attr_type(
+ 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 qname_list_attr_impl->obj_type;
+}
+
axis2_status_t AXIS2_CALL
-axis2_woden_qname_list_attr_free(void *qname_list_attr,
- axis2_env_t **env)
+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;
@@ -145,7 +171,8 @@
}
axis2_woden_xml_attr_t *AXIS2_CALL
-axis2_woden_qname_list_attr_get_base_impl(void *qname_list_attr,
+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;
@@ -158,35 +185,31 @@
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_t *qname_list_attr,
+ axis2_env_t **env,
+ 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);
+ qname_list_attr->ops->free = axis2_hash_get(methods,
+ "free", AXIS2_HASH_KEY_STRING);
+ qname_list_attr->ops->to_qname_list_attr_free = axis2_hash_get(methods,
+ "to_qname_list_attr_free", AXIS2_HASH_KEY_STRING);
+ qname_list_attr->ops->type = axis2_hash_get(methods,
+ "type", AXIS2_HASH_KEY_STRING);
+ qname_list_attr->ops->get_qnames = axis2_hash_get(methods,
+ "get_qnames", AXIS2_HASH_KEY_STRING);
+ qname_list_attr->ops->convert = axis2_hash_get(methods,
+ "convert", AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
}
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_get_qnames(
+ void *qname_list_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_list_attr_impl_t *qname_list_attr_impl = NULL;
@@ -197,11 +220,12 @@
}
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_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;
Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_list_or_token_any_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_list_or_token_any_attr.c?rev=404947&r1=404946&r2=404947&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_list_or_token_any_attr.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_list_or_token_any_attr.c Mon May 8 00:21:09 2006
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <woden/axis2_woden_qname_list_or_token_any_attr.h>
+#include <woden/xml/axis2_woden_qname_list_or_token_any_attr.h>
#include <axis2_om_element.h>
#include <axis2_om_node.h>
@@ -29,6 +29,7 @@
{
axis2_woden_qname_list_or_token_any_attr_t list_token_attr;
axis2_woden_xml_attr_t *xml_attr;
+ axis2_woden_obj_types_t obj_type;
axis2_hash_t *methods;
axis2_bool_t is_token;
};
@@ -39,61 +40,67 @@
axis2_status_t AXIS2_CALL
axis2_woden_qname_list_or_token_any_attr_free(
- void *list_token_attr,
- axis2_env_t **env);
+ void *list_token_attr,
+ axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_type(
+ 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);
+ 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);
+ 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);
+ 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);
+ 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 *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);
+ 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_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->obj_type = AXIS2_WODEN_QNAME_LIST_OR_TOKEN_ANY_ATTR;
list_token_attr_impl->xml_attr = NULL;
list_token_attr_impl->methods = NULL;
list_token_attr_impl->list_token_attr.ops =
@@ -102,6 +109,8 @@
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->type =
+ axis2_woden_qname_list_or_token_any_attr_type;
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 =
@@ -124,6 +133,8 @@
}
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, "type",
+ AXIS2_HASH_KEY_STRING, axis2_woden_qname_list_or_token_any_attr_type);
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);
@@ -142,17 +153,28 @@
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_woden_obj_types_t AXIS2_CALL
+axis2_woden_qname_list_or_token_any_attr_type(
+ 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 list_token_attr_impl->obj_type;
+}
+
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_free(
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_list_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -191,8 +213,8 @@
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)
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_list_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -206,52 +228,39 @@
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_t *list_token_attr,
+ axis2_env_t **env,
+ 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);
+ list_token_attr->ops->free = axis2_hash_get(methods,
+ "free", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->to_qname_list_or_token_any_attr_free =
+ axis2_hash_get(methods, "to_qname_list_or_token_any_attr_free",
+ AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->type = axis2_hash_get(methods,
+ "type", AXIS2_HASH_KEY_STRING);
+
+ list_token_attr->ops->is_qname_list = axis2_hash_get(methods,
+ "is_qname_list", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->is_token = axis2_hash_get(methods,
+ "is_token", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->get_qnames = axis2_hash_get(methods,
+ "get_qnames", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->get_token = axis2_hash_get(methods,
+ "get_token", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->convert = axis2_hash_get(methods,
+ "convert", AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
}
axis2_bool_t AXIS2_CALL
axis2_woden_qname_list_or_token_any_attr_is_qname_list(
- void *list_token_attr,
- axis2_env_t **env)
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_list_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -265,8 +274,8 @@
axis2_bool_t AXIS2_CALL
axis2_woden_qname_list_or_token_any_attr_is_token(
- void *list_token_attr,
- axis2_env_t **env)
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_list_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -286,8 +295,8 @@
axis2_array_list_t *AXIS2_CALL
axis2_woden_qname_list_or_token_any_attr_get_qnames(
- void *list_token_attr,
- axis2_env_t **env)
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_list_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -300,8 +309,8 @@
axis2_char_t *AXIS2_CALL
axis2_woden_qname_list_or_token_any_attr_get_token(
- void *list_token_attr,
- axis2_env_t **env)
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_list_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -322,11 +331,11 @@
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)
+ 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;
Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_or_token_any_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_or_token_any_attr.c?rev=404947&r1=404946&r2=404947&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_or_token_any_attr.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/qname_or_token_any_attr.c Mon May 8 00:21:09 2006
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <woden/axis2_woden_qname_or_token_any_attr.h>
+#include <woden/xml/axis2_woden_qname_or_token_any_attr.h>
#include <axis2_om_element.h>
#include <axis2_om_node.h>
@@ -29,6 +29,7 @@
{
axis2_woden_qname_or_token_any_attr_t list_token_attr;
axis2_woden_xml_attr_t *xml_attr;
+ axis2_woden_obj_types_t obj_type;
axis2_hash_t *methods;
axis2_bool_t is_token;
};
@@ -39,41 +40,46 @@
axis2_status_t AXIS2_CALL
axis2_woden_qname_or_token_any_attr_free(
- void *list_token_attr,
- axis2_env_t **env);
+ void *list_token_attr,
+ axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_type(
+ 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);
+ 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);
+ 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);
+ 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);
+ 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 *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);
+ 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
@@ -81,19 +87,19 @@
*/
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_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->obj_type = AXIS2_WODEN_QNAME_OR_TOKEN_ANY_ATTR;
list_token_attr_impl->xml_attr = NULL;
list_token_attr_impl->methods = NULL;
list_token_attr_impl->list_token_attr.ops =
@@ -102,6 +108,8 @@
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->type =
+ axis2_woden_qname_or_token_any_attr_type;
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 =
@@ -124,6 +132,8 @@
}
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, "type",
+ AXIS2_HASH_KEY_STRING, axis2_woden_qname_or_token_any_attr_type);
axis2_hash_set(list_token_attr_impl->methods, "is_qname",
AXIS2_HASH_KEY_STRING,
axis2_woden_qname_or_token_any_attr_is_qname);
@@ -142,17 +152,28 @@
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_woden_obj_types_t AXIS2_CALL
+axis2_woden_qname_or_token_any_attr_type(
+ 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 list_token_attr_impl->obj_type;
+}
+
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_free(
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -191,8 +212,8 @@
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)
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -206,52 +227,39 @@
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_t *
+ list_token_attr,
+ axis2_env_t **env,
+ 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);
+ list_token_attr->ops->free = axis2_hash_get(methods,
+ "free", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->to_qname_or_token_any_attr_free =
+ axis2_hash_get(methods,
+ "to_qname_or_token_any_attr_free", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->type = axis2_hash_get(methods,
+ "type", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->is_qname = axis2_hash_get(methods,
+ "is_qname", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->is_token = axis2_hash_get(methods,
+ "is_token", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->get_qnames = axis2_hash_get(methods,
+ "get_qnames", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->get_token = axis2_hash_get(methods,
+ "get_token", AXIS2_HASH_KEY_STRING);
+ list_token_attr->ops->convert = axis2_hash_get(methods,
+ "convert", AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
}
axis2_bool_t AXIS2_CALL
axis2_woden_qname_or_token_any_attr_is_qname(
- void *list_token_attr,
- axis2_env_t **env)
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -265,8 +273,8 @@
axis2_bool_t AXIS2_CALL
axis2_woden_qname_or_token_any_attr_is_token(
- void *list_token_attr,
- axis2_env_t **env)
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -287,8 +295,8 @@
axis2_array_list_t *AXIS2_CALL
axis2_woden_qname_or_token_any_attr_get_qnames(
- void *list_token_attr,
- axis2_env_t **env)
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -301,8 +309,8 @@
axis2_char_t *AXIS2_CALL
axis2_woden_qname_or_token_any_attr_get_token(
- void *list_token_attr,
- axis2_env_t **env)
+ void *list_token_attr,
+ axis2_env_t **env)
{
axis2_woden_qname_or_token_any_attr_impl_t *
list_token_attr_impl = NULL;
@@ -323,11 +331,11 @@
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)
+ 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;
Modified: webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/string_attr.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/string_attr.c?rev=404947&r1=404946&r2=404947&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/string_attr.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/woden/src/xml/string_attr.c Mon May 8 00:21:09 2006
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <woden/axis2_woden_string_attr.h>
+#include <woden/xml/axis2_woden_string_attr.h>
#include <axis2_url.h>
#include <axis2_om_element.h>
#include <axis2_om_node.h>
@@ -29,6 +29,7 @@
{
axis2_woden_string_attr_t string_attr;
axis2_woden_xml_attr_t *xml_attr;
+ axis2_woden_obj_types_t obj_type;
axis2_hash_t *methods;
};
@@ -36,42 +37,52 @@
((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_string_attr_free(
+ void *string_attr,
+ axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_string_attr_type(
+ 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_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);
+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);
+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_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->obj_type = AXIS2_WODEN_STRING_ATTR;
string_attr_impl->xml_attr = NULL;
string_attr_impl->methods = NULL;
string_attr_impl->string_attr.ops =
@@ -80,6 +91,8 @@
string_attr_impl->string_attr.ops->free =
axis2_woden_string_attr_free;
+ string_attr_impl->string_attr.ops->type =
+ axis2_woden_string_attr_type;
string_attr_impl->string_attr.ops->get_base_impl =
axis2_woden_string_attr_get_base_impl;
string_attr_impl->string_attr.ops->get_string =
@@ -96,6 +109,8 @@
}
axis2_hash_set(string_attr_impl->methods, "free",
AXIS2_HASH_KEY_STRING, axis2_woden_string_attr_free);
+ axis2_hash_set(string_attr_impl->methods, "type",
+ AXIS2_HASH_KEY_STRING, axis2_woden_string_attr_type);
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",
@@ -103,16 +118,14 @@
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_free(
+ void *string_attr,
+ axis2_env_t **env)
{
axis2_woden_string_attr_impl_t *string_attr_impl = NULL;
@@ -146,8 +159,9 @@
}
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_get_base_impl(
+ void *string_attr,
+ axis2_env_t **env)
{
axis2_woden_string_attr_impl_t *string_attr_impl = NULL;
@@ -159,35 +173,31 @@
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_t *string_attr,
+ axis2_env_t **env,
+ 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_hash_get(methods, "free", AXIS2_HASH_KEY_STRING);
+ string_attr->ops->to_string_attr_free = axis2_hash_get(methods,
+ "to_string_attr_free", AXIS2_HASH_KEY_STRING);
+ string_attr->ops->type = axis2_hash_get(methods,
+ "type", AXIS2_HASH_KEY_STRING);
+ string_attr->ops->get_string = axis2_hash_get(methods,
+ "get_string", AXIS2_HASH_KEY_STRING);
+ string_attr->ops->convert = axis2_hash_get(methods,
+ "convert", AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
}
axis2_char_t *AXIS2_CALL
-axis2_woden_string_attr_get_string(void *string_attr,
- axis2_env_t **env)
+axis2_woden_string_attr_get_string(
+ void *string_attr,
+ axis2_env_t **env)
{
axis2_woden_string_attr_impl_t *string_attr_impl = NULL;
@@ -198,11 +208,12 @@
}
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_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;