You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2006/06/21 11:08:23 UTC
svn commit: r415946 [3/11] - in /webservices/axis2/trunk/c/woden/src:
builder/wsdl10/ wsdl10/ wsdl10/enumeration/ wsdl10/extensions/
wsdl10/extensions/soap/ wsdl10/xml/
Added: webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/Makefile.am?rev=415946&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/Makefile.am (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/Makefile.am Wed Jun 21 02:08:20 2006
@@ -0,0 +1,12 @@
+noinst_LTLIBRARIES = libwoden_wsdl10_enumeration.la
+
+libwoden_wsdl10_enumeration_la_SOURCES = \
+ msg_label.c \
+ direction.c \
+ soap_fault_code.c \
+ soap_fault_subcodes.c
+
+INCLUDES = -I$(top_builddir)/include \
+ @AXIOMINC@ \
+ @UTILINC@ \
+ @XMLSCHEMAINC@
Added: webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/direction.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/direction.c?rev=415946&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/direction.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/direction.c Wed Jun 21 02:08:20 2006
@@ -0,0 +1,149 @@
+/*
+ * 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_direction.h>
+
+typedef struct woden_direction_impl woden_direction_impl_t;
+
+/**
+ * @brief Direction Struct Impl
+ * Axis2 Direction
+ */
+struct woden_direction_impl
+{
+ woden_direction_t direction;
+ axis2_char_t *f_value;
+};
+
+#define INTF_TO_IMPL(direction) ((woden_direction_impl_t *) direction)
+
+static woden_direction_t *WODEN_DIRECTION_IN = NULL;
+static woden_direction_t *WODEN_DIRECTION_OUT = NULL;
+
+axis2_status_t AXIS2_CALL
+woden_direction_free(
+ void *direction,
+ const axis2_env_t *env);
+
+axis2_char_t *AXIS2_CALL
+woden_direction_to_string(
+ void *direction,
+ const axis2_env_t *env);
+
+static woden_direction_t *
+create(
+ const axis2_env_t *env)
+{
+ woden_direction_impl_t *direction_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ direction_impl = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_direction_impl_t));
+
+ direction_impl->f_value = NULL;
+
+ direction_impl->direction.ops = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_direction_ops_t));
+
+ direction_impl->direction.ops->free = woden_direction_free;
+
+ direction_impl->direction.ops->to_string = woden_direction_to_string;
+
+
+ return &(direction_impl->direction);
+}
+
+AXIS2_EXTERN woden_direction_t * AXIS2_CALL
+woden_direction_create(
+ const axis2_env_t *env,
+ axis2_char_t *value)
+{
+ woden_direction_impl_t *direction_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ direction_impl = (woden_direction_impl_t *) create(env);
+
+ direction_impl->f_value = AXIS2_STRDUP(value, env);
+
+ return &(direction_impl->direction);
+}
+
+AXIS2_EXTERN woden_direction_t *AXIS2_CALL
+woden_direction_get_direction_in(
+ const axis2_env_t *env)
+{
+ AXIS2_ENV_CHECK(env, NULL);
+
+ if(!WODEN_DIRECTION_IN)
+ WODEN_DIRECTION_IN = woden_direction_create(env, "in");
+
+ return WODEN_DIRECTION_IN;
+}
+
+AXIS2_EXTERN woden_direction_t *AXIS2_CALL
+woden_direction_get_direction_out(
+ const axis2_env_t *env)
+{
+ AXIS2_ENV_CHECK(env, NULL);
+
+ if(!WODEN_DIRECTION_OUT)
+ WODEN_DIRECTION_OUT = woden_direction_create(env, "out");
+ return WODEN_DIRECTION_OUT;
+}
+
+axis2_status_t AXIS2_CALL
+woden_direction_free(
+ void *direction,
+ const axis2_env_t *env)
+{
+ woden_direction_impl_t *direction_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ direction_impl = INTF_TO_IMPL(direction);
+
+ if(direction_impl->f_value)
+ {
+ AXIS2_FREE(env->allocator, direction_impl->f_value);
+ direction_impl->f_value = NULL;
+ }
+
+ if((&(direction_impl->direction))->ops)
+ {
+ AXIS2_FREE(env->allocator, (&(direction_impl->direction))->ops);
+ (&(direction_impl->direction))->ops = NULL;
+ }
+
+ if(direction_impl)
+ {
+ AXIS2_FREE(env->allocator, direction_impl);
+ direction_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+woden_direction_to_string(
+ void *direction,
+ const axis2_env_t *env)
+{
+ woden_direction_impl_t *direction_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ direction_impl = INTF_TO_IMPL(direction);
+
+ return direction_impl->f_value;
+}
+
Added: webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/msg_label.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/msg_label.c?rev=415946&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/msg_label.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/msg_label.c Wed Jun 21 02:08:20 2006
@@ -0,0 +1,218 @@
+/*
+ * 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_msg_label.h>
+
+typedef struct woden_msg_label_impl woden_msg_label_impl_t;
+
+/**
+ * @brief Message Label Struct Impl
+ * Axis2 Message Label
+ */
+struct woden_msg_label_impl
+{
+ woden_msg_label_t msg_label;
+ axis2_char_t *f_value;
+ axis2_bool_t f_valid;
+};
+
+#define INTF_TO_IMPL(msg_label) ((woden_msg_label_impl_t *) msg_label)
+
+static woden_msg_label_t *WODEN_MSG_LABEL_IN = NULL;
+static woden_msg_label_t *WODEN_MSG_LABEL_OUT = NULL;
+
+axis2_status_t AXIS2_CALL
+woden_msg_label_free(
+ void *msg_label,
+ const axis2_env_t *env);
+
+axis2_char_t *AXIS2_CALL
+woden_msg_label_to_string(
+ void *msg_label,
+ const axis2_env_t *env);
+
+axis2_bool_t AXIS2_CALL
+woden_msg_label_is_valid(
+ void *msg_label,
+ const axis2_env_t *env);
+
+axis2_bool_t AXIS2_CALL
+woden_msg_label_equals(
+ void *msg_label,
+ const axis2_env_t *env,
+ woden_msg_label_t *other);
+
+static woden_msg_label_t *
+create(
+ const axis2_env_t *env)
+{
+ woden_msg_label_impl_t *msg_label_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ msg_label_impl = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_msg_label_impl_t));
+
+ msg_label_impl->f_value = NULL;
+ msg_label_impl->f_valid = AXIS2_TRUE;
+
+ msg_label_impl->msg_label.ops = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_msg_label_ops_t));
+
+ msg_label_impl->msg_label.ops->free = woden_msg_label_free;
+
+ msg_label_impl->msg_label.ops->to_string = woden_msg_label_to_string;
+ msg_label_impl->msg_label.ops->is_valid = woden_msg_label_is_valid;
+ msg_label_impl->msg_label.ops->equals = woden_msg_label_equals;
+
+
+ return &(msg_label_impl->msg_label);
+}
+
+AXIS2_EXTERN woden_msg_label_t * AXIS2_CALL
+woden_msg_label_create(
+ const axis2_env_t *env,
+ const axis2_char_t *value,
+ axis2_bool_t valid)
+{
+ woden_msg_label_impl_t *msg_label_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ msg_label_impl = (woden_msg_label_impl_t *) create(env);
+
+ msg_label_impl->f_value = AXIS2_STRDUP(value, env);
+ msg_label_impl->f_valid = valid;
+
+ return &(msg_label_impl->msg_label);
+}
+
+AXIS2_EXTERN woden_msg_label_t *AXIS2_CALL
+woden_msg_label_get_msg_label_in(
+ const axis2_env_t *env)
+{
+ AXIS2_ENV_CHECK(env, NULL);
+
+ if(!WODEN_MSG_LABEL_IN)
+ WODEN_MSG_LABEL_IN = woden_msg_label_create(env, "In",
+ AXIS2_TRUE);
+
+ return WODEN_MSG_LABEL_IN;
+}
+
+AXIS2_EXTERN woden_msg_label_t *AXIS2_CALL
+woden_msg_label_get_msg_label_out(
+ const axis2_env_t *env)
+{
+ AXIS2_ENV_CHECK(env, NULL);
+
+ if(!WODEN_MSG_LABEL_OUT)
+ WODEN_MSG_LABEL_OUT = woden_msg_label_create(env, "Out",
+ AXIS2_TRUE);
+
+ return WODEN_MSG_LABEL_OUT;
+}
+
+AXIS2_EXTERN woden_msg_label_t *AXIS2_CALL
+woden_msg_label_get_invalid_value(
+ const axis2_env_t *env,
+ const axis2_char_t *value)
+{
+ woden_msg_label_t *msg_label = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+
+ msg_label = woden_msg_label_create(env, value, AXIS2_FALSE);
+
+ return msg_label;
+}
+
+axis2_status_t AXIS2_CALL
+woden_msg_label_free(
+ void *msg_label,
+ const axis2_env_t *env)
+{
+ woden_msg_label_impl_t *msg_label_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ msg_label_impl = INTF_TO_IMPL(msg_label);
+
+ if(msg_label_impl->f_value)
+ {
+ AXIS2_FREE(env->allocator, msg_label_impl->f_value);
+ msg_label_impl->f_value = NULL;
+ }
+
+ if((&(msg_label_impl->msg_label))->ops)
+ {
+ AXIS2_FREE(env->allocator, (&(msg_label_impl->msg_label))->ops);
+ (&(msg_label_impl->msg_label))->ops = NULL;
+ }
+
+ if(msg_label_impl)
+ {
+ AXIS2_FREE(env->allocator, msg_label_impl);
+ msg_label_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_char_t *AXIS2_CALL
+woden_msg_label_to_string(
+ void *msg_label,
+ const axis2_env_t *env)
+{
+ woden_msg_label_impl_t *msg_label_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ msg_label_impl = INTF_TO_IMPL(msg_label);
+
+ return msg_label_impl->f_value;
+}
+
+axis2_bool_t AXIS2_CALL
+woden_msg_label_is_valid(
+ void *msg_label,
+ const axis2_env_t *env)
+{
+ woden_msg_label_impl_t *msg_label_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ msg_label_impl = INTF_TO_IMPL(msg_label);
+
+ return msg_label_impl->f_valid;
+}
+
+axis2_bool_t AXIS2_CALL
+woden_msg_label_equals(
+ void *msg_label,
+ const axis2_env_t *env,
+ woden_msg_label_t *other)
+{
+ woden_msg_label_impl_t *msg_label_impl = NULL;
+ axis2_char_t *value = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, other, AXIS2_FAILURE);
+ msg_label_impl = INTF_TO_IMPL(msg_label);
+
+ value = WODEN_MSG_LABEL_TO_STRING(other, env);
+ if(0 == AXIS2_STRCMP(msg_label_impl->f_value, value))
+ {
+ return AXIS2_TRUE;
+ }
+
+ return AXIS2_FALSE;
+}
+
Added: webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/soap_fault_code.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/soap_fault_code.c?rev=415946&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/soap_fault_code.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/soap_fault_code.c Wed Jun 21 02:08:20 2006
@@ -0,0 +1,211 @@
+/*
+ * 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_soap_fault_code.h>
+
+typedef struct woden_soap_fault_code_impl woden_soap_fault_code_impl_t;
+
+/**
+ * @brief Soap Fault Code Struct Impl
+ * Axis2 Soap Fault Code
+ */
+struct woden_soap_fault_code_impl
+{
+ woden_soap_fault_code_t soap_fault_code;
+ axis2_char_t *f_token;
+ axis2_qname_t *f_code_qn;
+};
+
+#define INTF_TO_IMPL(soap_fault_code) ((woden_soap_fault_code_impl_t *) soap_fault_code)
+
+static void *WODEN_SOAP_FAULT_CODE_ANY = NULL;
+
+axis2_status_t AXIS2_CALL
+woden_soap_fault_code_free(
+ void *soap_fault_code,
+ const axis2_env_t *env);
+
+axis2_bool_t AXIS2_CALL
+woden_soap_fault_code_is_qname(
+ void *soap_fault_code,
+ const axis2_env_t *env);
+
+axis2_bool_t AXIS2_CALL
+woden_soap_fault_code_is_token(
+ void *soap_fault_code,
+ const axis2_env_t *env);
+
+axis2_qname_t *AXIS2_CALL
+woden_soap_fault_code_get_qname(
+ void *soap_fault_code,
+ const axis2_env_t *env);
+
+axis2_char_t *AXIS2_CALL
+woden_soap_fault_code_get_token(
+ void *soap_fault_code,
+ const axis2_env_t *env);
+
+
+static woden_soap_fault_code_t *
+create(
+ const axis2_env_t *env)
+{
+ woden_soap_fault_code_impl_t *soap_fault_code_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ soap_fault_code_impl = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_soap_fault_code_impl_t));
+
+ soap_fault_code_impl->f_token = NULL;
+ soap_fault_code_impl->f_code_qn = NULL;
+
+ soap_fault_code_impl->soap_fault_code.ops = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_soap_fault_code_ops_t));
+
+ soap_fault_code_impl->soap_fault_code.ops->free = woden_soap_fault_code_free;
+
+ soap_fault_code_impl->soap_fault_code.ops->is_qname =
+ woden_soap_fault_code_is_qname;
+ soap_fault_code_impl->soap_fault_code.ops->is_token =
+ woden_soap_fault_code_is_token;
+ soap_fault_code_impl->soap_fault_code.ops->get_qname =
+ woden_soap_fault_code_get_qname;
+ soap_fault_code_impl->soap_fault_code.ops->get_token =
+ woden_soap_fault_code_get_token;
+
+
+ return &(soap_fault_code_impl->soap_fault_code);
+}
+
+AXIS2_EXTERN woden_soap_fault_code_t * AXIS2_CALL
+woden_soap_fault_code_create(
+ const axis2_env_t *env,
+ axis2_char_t *token,
+ axis2_qname_t *code_qn)
+{
+ woden_soap_fault_code_impl_t *soap_fault_code_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ soap_fault_code_impl = (woden_soap_fault_code_impl_t *) create(env);
+
+ soap_fault_code_impl->f_token = AXIS2_STRDUP(token, env);
+ soap_fault_code_impl->f_code_qn = AXIS2_QNAME_CLONE(code_qn, env);
+
+ return &(soap_fault_code_impl->soap_fault_code);
+}
+
+axis2_status_t AXIS2_CALL
+woden_soap_fault_code_free(
+ void *soap_fault_code,
+ const axis2_env_t *env)
+{
+ woden_soap_fault_code_impl_t *soap_fault_code_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ soap_fault_code_impl = INTF_TO_IMPL(soap_fault_code);
+
+ if(soap_fault_code_impl->f_token)
+ {
+ AXIS2_FREE(env->allocator, soap_fault_code_impl->f_token);
+ soap_fault_code_impl->f_token = NULL;
+ }
+
+ if(soap_fault_code_impl->f_code_qn)
+ {
+ AXIS2_QNAME_FREE(soap_fault_code_impl->f_code_qn, env);
+ soap_fault_code_impl->f_code_qn = NULL;
+ }
+
+ if((&(soap_fault_code_impl->soap_fault_code))->ops)
+ {
+ AXIS2_FREE(env->allocator, (&(soap_fault_code_impl->soap_fault_code))->ops);
+ (&(soap_fault_code_impl->soap_fault_code))->ops = NULL;
+ }
+
+ if(soap_fault_code_impl)
+ {
+ AXIS2_FREE(env->allocator, soap_fault_code_impl);
+ soap_fault_code_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL
+woden_soap_fault_code_get_soap_fault_code_any(
+ const axis2_env_t *env)
+{
+
+ AXIS2_ENV_CHECK(env, NULL);
+
+ if(!WODEN_SOAP_FAULT_CODE_ANY)
+ WODEN_SOAP_FAULT_CODE_ANY = woden_soap_fault_code_create(env,
+ "#any", NULL);
+
+ return WODEN_SOAP_FAULT_CODE_ANY;
+}
+
+axis2_bool_t AXIS2_CALL
+woden_soap_fault_code_is_qname(
+ void *soap_fault_code,
+ const axis2_env_t *env)
+{
+ woden_soap_fault_code_impl_t *soap_fault_code_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ soap_fault_code_impl = INTF_TO_IMPL(soap_fault_code);
+
+ return (NULL != soap_fault_code_impl->f_code_qn);
+}
+
+axis2_bool_t AXIS2_CALL
+woden_soap_fault_code_is_token(
+ void *soap_fault_code,
+ const axis2_env_t *env)
+{
+ woden_soap_fault_code_impl_t *soap_fault_code_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ soap_fault_code_impl = INTF_TO_IMPL(soap_fault_code);
+
+ return (NULL != soap_fault_code_impl->f_token);
+}
+
+axis2_qname_t *AXIS2_CALL
+woden_soap_fault_code_get_qname(
+ void *soap_fault_code,
+ const axis2_env_t *env)
+{
+ woden_soap_fault_code_impl_t *soap_fault_code_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ soap_fault_code_impl = INTF_TO_IMPL(soap_fault_code);
+
+ return soap_fault_code_impl->f_code_qn;
+}
+
+axis2_char_t *AXIS2_CALL
+woden_soap_fault_code_get_token(
+ void *soap_fault_code,
+ const axis2_env_t *env)
+{
+ woden_soap_fault_code_impl_t *soap_fault_code_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ soap_fault_code_impl = INTF_TO_IMPL(soap_fault_code);
+
+ return soap_fault_code_impl->f_token;
+}
+
Added: webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/soap_fault_subcodes.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/soap_fault_subcodes.c?rev=415946&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/soap_fault_subcodes.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/enumeration/soap_fault_subcodes.c Wed Jun 21 02:08:20 2006
@@ -0,0 +1,222 @@
+/*
+ * 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_soap_fault_subcodes.h>
+
+typedef struct woden_soap_fault_subcodes_impl woden_soap_fault_subcodes_impl_t;
+
+/**
+ * @brief Soap Fault Subcodes Struct Impl
+ * Axis2 Soap Fault Subcodes
+ */
+struct woden_soap_fault_subcodes_impl
+{
+ woden_soap_fault_subcodes_t soap_fault_subcodes;
+ axis2_char_t *f_token;
+ axis2_array_list_t *f_subcode_qns;
+};
+
+#define INTF_TO_IMPL(soap_fault_subcodes) ((woden_soap_fault_subcodes_impl_t *) soap_fault_subcodes)
+
+static void *WODEN_SOAP_FAULT_SUBCODES_ANY = NULL;
+
+axis2_status_t AXIS2_CALL
+woden_soap_fault_subcodes_free(
+ void *soap_fault_subcodes,
+ const axis2_env_t *env);
+
+axis2_bool_t AXIS2_CALL
+woden_soap_fault_subcodes_is_qnames(
+ void *soap_fault_subcodes,
+ const axis2_env_t *env);
+
+axis2_bool_t AXIS2_CALL
+woden_soap_fault_subcodes_is_token(
+ void *soap_fault_subcodes,
+ const axis2_env_t *env);
+
+axis2_array_list_t *AXIS2_CALL
+woden_soap_fault_subcodes_get_qnames(
+ void *soap_fault_subcodes,
+ const axis2_env_t *env);
+
+axis2_char_t *AXIS2_CALL
+woden_soap_fault_subcodes_get_token(
+ void *soap_fault_subcodes,
+ const axis2_env_t *env);
+
+
+static woden_soap_fault_subcodes_t *
+create(
+ const axis2_env_t *env)
+{
+ woden_soap_fault_subcodes_impl_t *soap_fault_subcodes_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ soap_fault_subcodes_impl = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_soap_fault_subcodes_impl_t));
+
+ soap_fault_subcodes_impl->f_token = NULL;
+ soap_fault_subcodes_impl->f_subcode_qns = NULL;
+
+ soap_fault_subcodes_impl->soap_fault_subcodes.ops = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_soap_fault_subcodes_ops_t));
+
+ soap_fault_subcodes_impl->soap_fault_subcodes.ops->free = woden_soap_fault_subcodes_free;
+
+ soap_fault_subcodes_impl->soap_fault_subcodes.ops->is_qnames =
+ woden_soap_fault_subcodes_is_qnames;
+ soap_fault_subcodes_impl->soap_fault_subcodes.ops->is_token =
+ woden_soap_fault_subcodes_is_token;
+ soap_fault_subcodes_impl->soap_fault_subcodes.ops->get_qnames =
+ woden_soap_fault_subcodes_get_qnames;
+ soap_fault_subcodes_impl->soap_fault_subcodes.ops->get_token =
+ woden_soap_fault_subcodes_get_token;
+
+
+ return &(soap_fault_subcodes_impl->soap_fault_subcodes);
+}
+
+AXIS2_EXTERN woden_soap_fault_subcodes_t * AXIS2_CALL
+woden_soap_fault_subcodes_create(
+ const axis2_env_t *env,
+ axis2_char_t *token,
+ axis2_array_list_t *subcode_qns)
+{
+ woden_soap_fault_subcodes_impl_t *soap_fault_subcodes_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ soap_fault_subcodes_impl = (woden_soap_fault_subcodes_impl_t *) create(env);
+
+ soap_fault_subcodes_impl->f_token = AXIS2_STRDUP(token, env);
+ soap_fault_subcodes_impl->f_subcode_qns = subcode_qns;
+
+ return &(soap_fault_subcodes_impl->soap_fault_subcodes);
+}
+
+axis2_status_t AXIS2_CALL
+woden_soap_fault_subcodes_free(
+ void *soap_fault_subcodes,
+ const axis2_env_t *env)
+{
+ woden_soap_fault_subcodes_impl_t *soap_fault_subcodes_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ soap_fault_subcodes_impl = INTF_TO_IMPL(soap_fault_subcodes);
+
+ if(soap_fault_subcodes_impl->f_token)
+ {
+ AXIS2_FREE(env->allocator, soap_fault_subcodes_impl->f_token);
+ soap_fault_subcodes_impl->f_token = NULL;
+ }
+
+ if(soap_fault_subcodes_impl->f_subcode_qns)
+ {
+ int i = 0, size = 0;
+
+ size = AXIS2_ARRAY_LIST_SIZE(soap_fault_subcodes_impl->f_subcode_qns,
+ env);
+ for(i = 0; i < size; i++)
+ {
+ axis2_qname_t *qname = AXIS2_ARRAY_LIST_GET(soap_fault_subcodes_impl->
+ f_subcode_qns, env, i);
+ AXIS2_QNAME_FREE(qname, env);
+ }
+ AXIS2_ARRAY_LIST_FREE(soap_fault_subcodes_impl->f_subcode_qns, env);
+ soap_fault_subcodes_impl->f_subcode_qns = NULL;
+ }
+
+ if((&(soap_fault_subcodes_impl->soap_fault_subcodes))->ops)
+ {
+ AXIS2_FREE(env->allocator, (&(soap_fault_subcodes_impl->soap_fault_subcodes))->ops);
+ (&(soap_fault_subcodes_impl->soap_fault_subcodes))->ops = NULL;
+ }
+
+ if(soap_fault_subcodes_impl)
+ {
+ AXIS2_FREE(env->allocator, soap_fault_subcodes_impl);
+ soap_fault_subcodes_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL
+woden_soap_fault_subcodes_get_soap_fault_subcodes_any(
+ const axis2_env_t *env)
+{
+ AXIS2_ENV_CHECK(env, NULL);
+
+ if(!WODEN_SOAP_FAULT_SUBCODES_ANY)
+ WODEN_SOAP_FAULT_SUBCODES_ANY = woden_soap_fault_subcodes_create(env,
+ "#any", NULL);
+
+ return WODEN_SOAP_FAULT_SUBCODES_ANY;
+}
+
+axis2_bool_t AXIS2_CALL
+woden_soap_fault_subcodes_is_qnames(
+ void *soap_fault_subcodes,
+ const axis2_env_t *env)
+{
+ woden_soap_fault_subcodes_impl_t *soap_fault_subcodes_impl = NULL;
+ int size = 0;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ soap_fault_subcodes_impl = INTF_TO_IMPL(soap_fault_subcodes);
+
+ size = AXIS2_ARRAY_LIST_SIZE(soap_fault_subcodes_impl->f_subcode_qns, env);
+ return (size > 0);
+}
+
+axis2_bool_t AXIS2_CALL
+woden_soap_fault_subcodes_is_token(
+ void *soap_fault_subcodes,
+ const axis2_env_t *env)
+{
+ woden_soap_fault_subcodes_impl_t *soap_fault_subcodes_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ soap_fault_subcodes_impl = INTF_TO_IMPL(soap_fault_subcodes);
+
+ return (NULL != soap_fault_subcodes_impl->f_token);
+}
+
+axis2_array_list_t *AXIS2_CALL
+woden_soap_fault_subcodes_get_qnames(
+ void *soap_fault_subcodes,
+ const axis2_env_t *env)
+{
+ woden_soap_fault_subcodes_impl_t *soap_fault_subcodes_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ soap_fault_subcodes_impl = INTF_TO_IMPL(soap_fault_subcodes);
+
+ return soap_fault_subcodes_impl->f_subcode_qns;
+}
+
+axis2_char_t *AXIS2_CALL
+woden_soap_fault_subcodes_get_token(
+ void *soap_fault_subcodes,
+ const axis2_env_t *env)
+{
+ woden_soap_fault_subcodes_impl_t *soap_fault_subcodes_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ soap_fault_subcodes_impl = INTF_TO_IMPL(soap_fault_subcodes);
+
+ return soap_fault_subcodes_impl->f_token;
+}
+
Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/Makefile.am?rev=415946&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/Makefile.am (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/Makefile.am Wed Jun 21 02:08:20 2006
@@ -0,0 +1,15 @@
+noinst_LTLIBRARIES = libwoden_wsdl10_extensions.la
+SUBDIRS = soap
+
+libwoden_wsdl10_extensions_la_SOURCES = \
+ element_extensible.c \
+ attr_extensible.c \
+ component_exts.c \
+ ext_element.c \
+ ext_deserializer.c \
+ ext_registry.c
+
+INCLUDES = -I$(top_builddir)/include \
+ @AXIOMINC@ \
+ @UTILINC@ \
+ @XMLSCHEMAINC@
Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/attr_extensible.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/attr_extensible.c?rev=415946&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/attr_extensible.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/attr_extensible.c Wed Jun 21 02:08:20 2006
@@ -0,0 +1,438 @@
+/*
+ * 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_attr_extensible.h>
+#include <woden_xml_attr.h>
+#include <axis2_uri.h>
+#include <axis2_hash.h>
+
+typedef struct woden_attr_extensible_impl woden_attr_extensible_impl_t;
+
+/**
+ * @brief Attribute Extensible Struct Impl
+ * Axis2 Attribute Extensible
+ */
+struct woden_attr_extensible_impl
+{
+ woden_attr_extensible_t extensible;
+ axis2_hash_t *super;
+ woden_obj_types_t obj_type;
+ axis2_hash_t *f_ext_attrs;
+ axis2_array_list_t *temp_attrs;
+};
+
+#define INTF_TO_IMPL(extensible) \
+ ((woden_attr_extensible_impl_t *) extensible)
+
+axis2_status_t AXIS2_CALL
+woden_attr_extensible_free(
+ void *extensible,
+ const axis2_env_t *env);
+
+axis2_hash_t *AXIS2_CALL
+woden_attr_extensible_super_objs(
+ void *extensible,
+ const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL
+woden_attr_extensible_type(
+ void *extensible,
+ const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+woden_attr_extensible_set_ext_attr(
+ void *extensible,
+ const axis2_env_t *env,
+ axis2_qname_t *attr_type,
+ woden_xml_attr_t *attr);
+
+void *AXIS2_CALL
+woden_attr_extensible_get_ext_attr(
+ void *extensible,
+ const axis2_env_t *env,
+ axis2_qname_t *attr_type);
+
+axis2_array_list_t *AXIS2_CALL
+woden_attr_extensible_get_ext_attrs(
+ void *extensible,
+ const axis2_env_t *env);
+
+axis2_array_list_t *AXIS2_CALL
+woden_attr_extensible_get_ext_attrs_for_namespace(
+ void *extensible,
+ const axis2_env_t *env,
+ axis2_uri_t *namespc);
+
+axis2_bool_t AXIS2_CALL
+woden_attr_extensible_has_ext_attrs_for_namespace(
+ void *extensible,
+ const axis2_env_t *env,
+ axis2_uri_t *namespc);
+
+
+
+AXIS2_EXTERN woden_attr_extensible_t * AXIS2_CALL
+woden_attr_extensible_create(
+ const axis2_env_t *env)
+{
+ woden_attr_extensible_impl_t *extensible_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ extensible_impl = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_attr_extensible_impl_t));
+
+ extensible_impl->obj_type = WODEN_ATTR_EXTENSIBLE;
+ extensible_impl->super = NULL;
+ extensible_impl->f_ext_attrs = NULL;
+ extensible_impl->temp_attrs = NULL;
+
+ extensible_impl->extensible.ops =
+ AXIS2_MALLOC(env->allocator,
+ sizeof(woden_attr_extensible_ops_t));
+
+ extensible_impl->extensible.ops->free =
+ woden_attr_extensible_free;
+ extensible_impl->extensible.ops->super_objs =
+ woden_attr_extensible_super_objs;
+ extensible_impl->extensible.ops->type =
+ woden_attr_extensible_type;
+ extensible_impl->extensible.ops->set_ext_attr =
+ woden_attr_extensible_set_ext_attr;
+ extensible_impl->extensible.ops->get_ext_attr =
+ woden_attr_extensible_get_ext_attr;
+ extensible_impl->extensible.ops->get_ext_attrs =
+ woden_attr_extensible_get_ext_attrs;
+ extensible_impl->extensible.ops->get_ext_attrs_for_namespace =
+ woden_attr_extensible_get_ext_attrs_for_namespace;
+ extensible_impl->extensible.ops->has_ext_attrs_for_namespace =
+ woden_attr_extensible_has_ext_attrs_for_namespace;
+
+ extensible_impl->super = axis2_hash_make(env);
+ if(!extensible_impl->super)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ axis2_hash_set(extensible_impl->super, "WODEN_ATTR_EXTENSLBE",
+ AXIS2_HASH_KEY_STRING, &(extensible_impl->extensible));
+
+
+ return &(extensible_impl->extensible);
+}
+
+axis2_status_t AXIS2_CALL
+woden_attr_extensible_free(
+ void *extensible,
+ const axis2_env_t *env)
+{
+ woden_attr_extensible_impl_t *extensible_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ extensible_impl = INTF_TO_IMPL(extensible);
+
+ if(extensible_impl->f_ext_attrs)
+ {
+ axis2_hash_free(extensible_impl->f_ext_attrs, env);
+ extensible_impl->f_ext_attrs = NULL;
+ }
+
+ if(extensible_impl->temp_attrs)
+ {
+ int size = 0, i = 0;
+ size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->temp_attrs, env);
+ for(i = 0; i < size; i++)
+ {
+ void *ext_el = NULL;
+
+ ext_el = AXIS2_ARRAY_LIST_GET(extensible_impl->temp_attrs, env, i);
+ WODEN_XML_ATTR_FREE(ext_el, env);
+ }
+ AXIS2_ARRAY_LIST_FREE(extensible_impl->temp_attrs, env);
+ extensible_impl->temp_attrs = NULL;
+ }
+
+ if(extensible_impl->super)
+ {
+ axis2_hash_free(extensible_impl->super, env);
+ extensible_impl->super = NULL;
+ }
+
+ if((&(extensible_impl->extensible))->ops)
+ {
+ AXIS2_FREE(env->allocator, (&(extensible_impl->extensible))->ops);
+ (&(extensible_impl->extensible))->ops = NULL;
+ }
+
+ if(extensible_impl)
+ {
+ AXIS2_FREE(env->allocator, extensible_impl);
+ extensible_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+woden_attr_extensible_super_objs(
+ void *extensible,
+ const axis2_env_t *env)
+{
+ woden_attr_extensible_impl_t *extensible_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ extensible_impl = INTF_TO_IMPL(extensible);
+
+ return extensible_impl->super;
+}
+
+woden_obj_types_t AXIS2_CALL
+woden_attr_extensible_type(
+ void *extensible,
+ const axis2_env_t *env)
+{
+ woden_attr_extensible_impl_t *extensible_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ extensible_impl = INTF_TO_IMPL(extensible);
+
+ return extensible_impl->obj_type;
+}
+
+axis2_status_t AXIS2_CALL
+woden_attr_extensible_resolve_methods(
+ woden_attr_extensible_t *extensible,
+ const axis2_env_t *env,
+ woden_attr_extensible_t *extensible_impl,
+ axis2_hash_t *methods)
+{
+ woden_attr_extensible_impl_t *extensible_impl_l = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+ extensible_impl_l = INTF_TO_IMPL(extensible_impl);
+
+ extensible->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ extensible->ops->to_attr_extensible_free = axis2_hash_get(methods,
+ "to_attr_extensible_free", AXIS2_HASH_KEY_STRING);
+ extensible->ops->super_objs = axis2_hash_get(methods, "super_objs",
+ AXIS2_HASH_KEY_STRING);
+ extensible->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+
+ extensible->ops->set_ext_attr = axis2_hash_get(methods,
+ "set_ext_attr", AXIS2_HASH_KEY_STRING);
+ if(!extensible->ops->set_ext_attr && extensible_impl_l)
+ extensible->ops->set_ext_attr =
+ extensible_impl_l->extensible.ops->set_ext_attr;
+
+ extensible->ops->get_ext_attr = axis2_hash_get(methods,
+ "get_ext_attr", AXIS2_HASH_KEY_STRING);
+ if(!extensible->ops->get_ext_attr && extensible_impl_l)
+ extensible->ops->get_ext_attr =
+ extensible_impl_l->extensible.ops->get_ext_attr;
+
+ extensible->ops->get_ext_attrs = axis2_hash_get(methods,
+ "get_ext_attrs", AXIS2_HASH_KEY_STRING);
+ if(!extensible->ops->get_ext_attrs && extensible_impl_l)
+ extensible->ops->get_ext_attrs =
+ extensible_impl_l->extensible.ops->get_ext_attrs;
+
+ extensible->ops->get_ext_attrs_for_namespace = axis2_hash_get(methods,
+ "get_ext_attrs_for_namespace", AXIS2_HASH_KEY_STRING);
+ if(!extensible->ops->get_ext_attrs_for_namespace && extensible_impl_l)
+ extensible->ops->get_ext_attrs_for_namespace =
+ extensible_impl_l->extensible.ops->get_ext_attrs_for_namespace;
+
+ extensible->ops->has_ext_attrs_for_namespace = axis2_hash_get(methods,
+ "has_ext_attrs_for_namespace", AXIS2_HASH_KEY_STRING);
+ if(!extensible->ops->has_ext_attrs_for_namespace && extensible_impl_l)
+ extensible->ops->has_ext_attrs_for_namespace =
+ extensible_impl_l->extensible.ops->has_ext_attrs_for_namespace;
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+woden_attr_extensible_set_ext_attr(
+ void *extensible,
+ const axis2_env_t *env,
+ axis2_qname_t *attr_type,
+ woden_xml_attr_t *attr)
+{
+ woden_attr_extensible_impl_t *extensible_impl = NULL;
+ axis2_char_t *str_attr_type = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, attr_type, AXIS2_FAILURE);
+ super = WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+ extensible_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+ str_attr_type = AXIS2_QNAME_TO_STRING(attr_type, env);
+ if(attr)
+ axis2_hash_set(extensible_impl->f_ext_attrs, str_attr_type,
+ AXIS2_HASH_KEY_STRING, attr);
+ else
+ axis2_hash_set(extensible_impl->f_ext_attrs, str_attr_type,
+ AXIS2_HASH_KEY_STRING, NULL);
+ return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL
+woden_attr_extensible_get_ext_attr(
+ void *extensible,
+ const axis2_env_t *env,
+ axis2_qname_t *attr_type)
+{
+ woden_attr_extensible_impl_t *extensible_impl = NULL;
+ axis2_char_t *str_attr_type = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ AXIS2_PARAM_CHECK(env->error, attr_type, NULL);
+ super = WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+ extensible_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+ str_attr_type = AXIS2_QNAME_TO_STRING(attr_type, env);
+ return (woden_xml_attr_t *)axis2_hash_get(extensible_impl->f_ext_attrs,
+ str_attr_type, AXIS2_HASH_KEY_STRING);
+}
+
+axis2_array_list_t *AXIS2_CALL
+woden_attr_extensible_get_ext_attrs(
+ void *extensible,
+ const axis2_env_t *env)
+{
+ woden_attr_extensible_impl_t *extensible_impl = NULL;
+ axis2_hash_index_t *index = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ super = WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+ extensible_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+ if(extensible_impl->temp_attrs)
+ {
+ int size = 0, i = 0;
+ size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->temp_attrs, env);
+ for(i = 0; i < size; i++)
+ {
+ void *ext_el = NULL;
+
+ ext_el = AXIS2_ARRAY_LIST_GET(extensible_impl->temp_attrs, env, i);
+ WODEN_XML_ATTR_FREE(ext_el, env);
+ }
+ AXIS2_ARRAY_LIST_FREE(extensible_impl->temp_attrs, env);
+ extensible_impl->temp_attrs = NULL;
+ }
+ extensible_impl->temp_attrs = axis2_array_list_create(env, 0);
+ for (index = axis2_hash_first (extensible_impl->f_ext_attrs, env); index;
+ index = axis2_hash_next (env, index))
+ {
+ void *value = NULL;
+
+ axis2_hash_this (index, NULL, NULL, &value);
+ AXIS2_ARRAY_LIST_ADD(extensible_impl->temp_attrs, env, value);
+ }
+ return extensible_impl->temp_attrs;
+}
+
+axis2_array_list_t *AXIS2_CALL
+woden_attr_extensible_get_ext_attrs_for_namespace(void *extensible,
+ const axis2_env_t *env,
+ axis2_uri_t *namespc)
+{
+ woden_attr_extensible_impl_t *extensible_impl = NULL;
+ axis2_char_t *str_namespc = NULL;
+ axis2_hash_index_t *index = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ AXIS2_PARAM_CHECK(env->error, namespc, NULL);
+ super = WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+ extensible_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+ str_namespc = AXIS2_URI_TO_STRING(namespc, env, AXIS2_URI_UNP_OMITUSERINFO);
+ if(extensible_impl->temp_attrs)
+ {
+ int size = 0, i = 0;
+ size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->temp_attrs, env);
+ for(i = 0; i < size; i++)
+ {
+ void *ext_el = NULL;
+
+ ext_el = AXIS2_ARRAY_LIST_GET(extensible_impl->temp_attrs, env, i);
+ WODEN_XML_ATTR_FREE(ext_el, env);
+ }
+ AXIS2_ARRAY_LIST_FREE(extensible_impl->temp_attrs, env);
+ extensible_impl->temp_attrs = NULL;
+ }
+
+ extensible_impl->temp_attrs = axis2_array_list_create(env, 0);
+ for (index = axis2_hash_first (extensible_impl->f_ext_attrs, env); index;
+ index = axis2_hash_next (env, index))
+ {
+ void *value = NULL;
+
+ axis2_hash_this (index, NULL, NULL, &value);
+ AXIS2_ARRAY_LIST_ADD(extensible_impl->temp_attrs, env, value);
+ }
+
+ return extensible_impl->temp_attrs;
+}
+
+axis2_bool_t AXIS2_CALL
+woden_attr_extensible_has_ext_attrs_for_namespace(void *extensible,
+ const axis2_env_t *env,
+ axis2_uri_t *namespc)
+{
+ woden_attr_extensible_impl_t *extensible_impl = NULL;
+ axis2_bool_t result = AXIS2_FALSE;
+ axis2_char_t *str_namespc = NULL;
+ axis2_hash_index_t *index = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, namespc, AXIS2_FAILURE);
+ super = WODEN_ATTR_EXTENSIBLE_SUPER_OBJS(extensible, env);
+ extensible_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "WODEN_ATTR_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+ str_namespc = AXIS2_URI_TO_STRING(namespc, env, AXIS2_URI_UNP_OMITUSERINFO);
+ for (index = axis2_hash_first (extensible_impl->f_ext_attrs, env); index;
+ index = axis2_hash_next (env, index))
+ {
+ const void *v = NULL;
+ axis2_qname_t *key = NULL;
+ axis2_char_t *str_ns = NULL;
+
+ axis2_hash_this (index, &v, NULL, NULL);
+ key = (axis2_qname_t *) v;
+ str_ns = AXIS2_QNAME_GET_URI(key, env);
+ if(0 == AXIS2_STRCMP(str_ns, str_namespc))
+ {
+ result = AXIS2_TRUE;
+ break;
+ }
+ }
+ return result;
+}
+
+
Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/component_exts.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/component_exts.c?rev=415946&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/component_exts.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/component_exts.c Wed Jun 21 02:08:20 2006
@@ -0,0 +1,188 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden_component_exts.h>
+#include <woden_wsdl_element.h>
+#include <axis2_uri.h>
+#include <axis2_hash.h>
+
+typedef struct woden_component_exts_impl woden_component_exts_impl_t;
+
+/**
+ * @brief Component Extensions Struct Impl
+ * Axis2 Component Extensions
+ */
+struct woden_component_exts_impl
+{
+ woden_component_exts_t component_exts;
+ void *f_parent_element;
+ axis2_uri_t *f_namespc;
+};
+
+#define INTF_TO_IMPL(component_exts) ((woden_component_exts_impl_t *) component_exts)
+
+axis2_status_t AXIS2_CALL
+woden_component_exts_free(
+ void *component_exts,
+ const axis2_env_t *envv);
+
+axis2_uri_t *AXIS2_CALL
+woden_component_exts_get_namespace(
+ void *component_exts,
+ const axis2_env_t *env);
+
+void *AXIS2_CALL
+woden_component_exts_get_parent_element(
+ void *component_exts,
+ const axis2_env_t *env);
+
+axis2_status_t AXIS2_CALL
+woden_component_exts_init(
+ void *component_exts,
+ const axis2_env_t *env,
+ woden_wsdl_element_t *parent_el,
+ axis2_uri_t *namespc);
+
+AXIS2_EXTERN woden_component_exts_t * AXIS2_CALL
+woden_component_exts_create(
+ const axis2_env_t *env)
+{
+ woden_component_exts_impl_t *component_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ component_exts_impl = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_component_exts_impl_t));
+
+ component_exts_impl->f_parent_element = NULL;
+ component_exts_impl->f_namespc = NULL;
+
+ component_exts_impl->component_exts.ops = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_component_exts_ops_t));
+
+ component_exts_impl->component_exts.ops->free =
+ woden_component_exts_free;
+ component_exts_impl->component_exts.ops->init =
+ woden_component_exts_init;
+ component_exts_impl->component_exts.ops->get_namespace =
+ woden_component_exts_get_namespace;
+ component_exts_impl->component_exts.ops->get_parent_element =
+ woden_component_exts_get_parent_element;
+
+ return &(component_exts_impl->component_exts);
+}
+
+axis2_status_t AXIS2_CALL
+woden_component_exts_free(
+ void *component_exts,
+ const axis2_env_t *env)
+{
+ woden_component_exts_impl_t *component_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ component_exts_impl = INTF_TO_IMPL(component_exts);
+
+ if(component_exts_impl->f_parent_element)
+ {
+ WODEN_WSDL_ELEMENT_FREE(component_exts_impl->f_parent_element, env);
+ component_exts_impl->f_parent_element = NULL;
+ }
+
+ if(component_exts_impl->f_namespc)
+ {
+ AXIS2_URI_FREE(component_exts_impl->f_namespc, env);
+ component_exts_impl->f_namespc = NULL;
+ }
+
+ if((&(component_exts_impl->component_exts))->ops)
+ {
+ AXIS2_FREE(env->allocator, (&(component_exts_impl->component_exts))->ops);
+ (&(component_exts_impl->component_exts))->ops = NULL;
+ }
+
+ if(component_exts_impl)
+ {
+ AXIS2_FREE(env->allocator, component_exts_impl);
+ component_exts_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+woden_component_exts_resolve_methods(
+ woden_component_exts_t *component_exts,
+ const axis2_env_t *env,
+ axis2_hash_t *methods)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+
+ component_exts->ops = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_component_exts_ops_t));
+ component_exts->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ component_exts->ops->get_parent_element = axis2_hash_get(methods,
+ "get_parent_element", AXIS2_HASH_KEY_STRING);
+ component_exts->ops->to_component_exts_free = axis2_hash_get(methods,
+ "to_component_exts_free", AXIS2_HASH_KEY_STRING);
+ component_exts->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+ component_exts->ops->init = axis2_hash_get(methods,
+ "init", AXIS2_HASH_KEY_STRING); ;
+ component_exts->ops->get_namespace = axis2_hash_get(methods,
+ "get_namespace", AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_uri_t *AXIS2_CALL
+woden_component_exts_get_namespace(
+ void *component_exts,
+ const axis2_env_t *env)
+{
+ woden_component_exts_impl_t *component_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ component_exts_impl = INTF_TO_IMPL(component_exts);
+ return component_exts_impl->f_namespc;
+}
+
+void *AXIS2_CALL
+woden_component_exts_get_parent_element(
+ void *component_exts,
+ const axis2_env_t *env)
+{
+ woden_component_exts_impl_t *component_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ component_exts_impl = INTF_TO_IMPL(component_exts);
+ return component_exts_impl->f_parent_element;
+}
+
+axis2_status_t AXIS2_CALL
+woden_component_exts_init(
+ void *component_exts,
+ const axis2_env_t *env,
+ woden_wsdl_element_t *parent_el,
+ axis2_uri_t *namespc)
+{
+ woden_component_exts_impl_t *component_exts_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ component_exts_impl = INTF_TO_IMPL(component_exts);
+ component_exts_impl->f_parent_element = parent_el;
+ component_exts_impl->f_namespc = namespc;
+ return AXIS2_SUCCESS;
+}
Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/element_extensible.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/element_extensible.c?rev=415946&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/element_extensible.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/element_extensible.c Wed Jun 21 02:08:20 2006
@@ -0,0 +1,404 @@
+/*
+ * 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_element_extensible.h>
+#include <woden_ext_element.h>
+#include <woden_xml_attr.h>
+#include <axis2_uri.h>
+#include <axis2_hash.h>
+
+typedef struct woden_element_extensible_impl woden_element_extensible_impl_t;
+
+/**
+ * @brief Element Extensible Struct Impl
+ * Axis2 Element Extensible
+ */
+struct woden_element_extensible_impl
+{
+ woden_element_extensible_t extensible;
+ woden_obj_types_t obj_type;
+ axis2_hash_t *super;
+ axis2_array_list_t *f_ext_elements;
+ axis2_array_list_t *temp_elems;
+};
+
+#define INTF_TO_IMPL(extensible) \
+ ((woden_element_extensible_impl_t *) extensible)
+
+axis2_status_t AXIS2_CALL
+woden_element_extensible_free(
+ void *extensible,
+ const axis2_env_t *envv);
+
+axis2_hash_t *AXIS2_CALL
+woden_element_extensible_super_objs(
+ void *extensible,
+ const axis2_env_t *env);
+
+woden_obj_types_t AXIS2_CALL
+woden_element_extensible_type(
+ void *extensible,
+ const axis2_env_t *envv);
+
+axis2_status_t AXIS2_CALL
+woden_element_extensible_add_ext_element(
+ void *extensible,
+ const axis2_env_t *env,
+ woden_ext_element_t *ext_el);
+
+axis2_status_t AXIS2_CALL
+woden_element_extensible_remove_ext_element(
+ void *extensible,
+ const axis2_env_t *env,
+ woden_ext_element_t *ext_el);
+
+axis2_array_list_t *AXIS2_CALL
+woden_element_extensible_get_ext_elements(
+ void *extensible,
+ const axis2_env_t *env);
+
+axis2_array_list_t *AXIS2_CALL
+woden_element_extensible_get_ext_elements_of_type(
+ void *extensible,
+ const axis2_env_t *env,
+ axis2_qname_t *ext_type);
+
+axis2_bool_t AXIS2_CALL
+woden_element_extensible_has_ext_elements_for_namespace(
+ void *extensible,
+ const axis2_env_t *env,
+ axis2_uri_t *namespc);
+
+
+
+AXIS2_EXTERN woden_element_extensible_t * AXIS2_CALL
+woden_element_extensible_create(
+ const axis2_env_t *env)
+{
+ woden_element_extensible_impl_t *extensible_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ extensible_impl = AXIS2_MALLOC(env->allocator,
+ sizeof(woden_element_extensible_impl_t));
+
+ extensible_impl->obj_type = WODEN_ELEMENT_EXTENSIBLE;
+ extensible_impl->super = NULL;
+ extensible_impl->f_ext_elements = NULL;
+ extensible_impl->temp_elems = NULL;
+
+ extensible_impl->extensible.ops =
+ AXIS2_MALLOC(env->allocator,
+ sizeof(woden_element_extensible_ops_t));
+
+ extensible_impl->extensible.ops->free =
+ woden_element_extensible_free;
+ extensible_impl->extensible.ops->type =
+ woden_element_extensible_type;
+ extensible_impl->extensible.ops->add_ext_element =
+ woden_element_extensible_add_ext_element;
+ extensible_impl->extensible.ops->remove_ext_element =
+ woden_element_extensible_remove_ext_element;
+ extensible_impl->extensible.ops->get_ext_elements =
+ woden_element_extensible_get_ext_elements;
+ extensible_impl->extensible.ops->get_ext_elements_of_type =
+ woden_element_extensible_get_ext_elements_of_type;
+ extensible_impl->extensible.ops->has_ext_elements_for_namespace =
+ woden_element_extensible_has_ext_elements_for_namespace;
+
+ extensible_impl->super = axis2_hash_make(env);
+ if(!extensible_impl->super)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ axis2_hash_set(extensible_impl->super, "WODEN_ELEMENT_EXTENSLBE",
+ AXIS2_HASH_KEY_STRING, &(extensible_impl->extensible));
+
+ return &(extensible_impl->extensible);
+}
+
+axis2_status_t AXIS2_CALL
+woden_element_extensible_free(void *extensible,
+ const axis2_env_t *env)
+{
+ woden_element_extensible_impl_t *extensible_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ extensible_impl = INTF_TO_IMPL(extensible);
+
+ if(extensible_impl->f_ext_elements)
+ {
+ AXIS2_ARRAY_LIST_FREE(extensible_impl->f_ext_elements, env);
+ extensible_impl->f_ext_elements = NULL;
+ }
+
+ if(extensible_impl->temp_elems)
+ {
+ int size = 0, i = 0;
+ size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->temp_elems, env);
+ for(i = 0; i < size; i++)
+ {
+ void *ext_el = NULL;
+
+ ext_el = AXIS2_ARRAY_LIST_GET(extensible_impl->temp_elems, env, i);
+ WODEN_XML_ATTR_FREE(ext_el, env);
+ }
+ AXIS2_ARRAY_LIST_FREE(extensible_impl->temp_elems, env);
+ extensible_impl->temp_elems = NULL;
+ }
+
+ if(extensible_impl->super)
+ {
+ axis2_hash_free(extensible_impl->super, env);
+ extensible_impl->super = NULL;
+ }
+
+ if((&(extensible_impl->extensible))->ops)
+ {
+ AXIS2_FREE(env->allocator, (&(extensible_impl->extensible))->ops);
+ (&(extensible_impl->extensible))->ops = NULL;
+ }
+
+ if(extensible_impl)
+ {
+ AXIS2_FREE(env->allocator, extensible_impl);
+ extensible_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+woden_element_extensible_super_objs(
+ void *extensible,
+ const axis2_env_t *env)
+{
+ woden_element_extensible_impl_t *extensible_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ extensible_impl = INTF_TO_IMPL(extensible);
+
+ return extensible_impl->super;
+}
+
+woden_obj_types_t AXIS2_CALL
+woden_element_extensible_type(
+ void *extensible,
+ const axis2_env_t *env)
+{
+ woden_element_extensible_impl_t *extensible_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ extensible_impl = INTF_TO_IMPL(extensible);
+
+ return extensible_impl->obj_type;
+}
+
+axis2_status_t AXIS2_CALL
+woden_element_extensible_resolve_methods(
+ woden_element_extensible_t *extensible,
+ const axis2_env_t *env,
+ woden_element_extensible_t *extensible_impl,
+ axis2_hash_t *methods)
+{
+ woden_element_extensible_impl_t *extensible_impl_l = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+ extensible_impl_l = INTF_TO_IMPL(extensible_impl);
+
+ extensible->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ extensible->ops->super_objs = axis2_hash_get(methods, "super_objs",
+ AXIS2_HASH_KEY_STRING);
+ extensible->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+
+ extensible->ops->add_ext_element = axis2_hash_get(methods,
+ "add_ext_element", AXIS2_HASH_KEY_STRING);
+ if(!extensible->ops->add_ext_element && extensible_impl_l)
+ extensible->ops->add_ext_element =
+ extensible_impl_l->extensible.ops->add_ext_element;
+
+ extensible->ops->remove_ext_element = axis2_hash_get(methods,
+ "remove_ext_element", AXIS2_HASH_KEY_STRING);
+ if(!extensible->ops->remove_ext_element && extensible_impl_l)
+ extensible->ops->remove_ext_element =
+ extensible_impl_l->extensible.ops->remove_ext_element;
+
+ extensible->ops->get_ext_elements = axis2_hash_get(methods,
+ "get_ext_elements", AXIS2_HASH_KEY_STRING);
+ if(!extensible->ops->get_ext_elements && extensible_impl_l)
+ extensible->ops->get_ext_elements =
+ extensible_impl_l->extensible.ops->get_ext_elements;
+
+ extensible->ops->get_ext_elements_of_type = axis2_hash_get(methods,
+ "get_ext_elements_of_type", AXIS2_HASH_KEY_STRING);
+ if(!extensible->ops->get_ext_elements_of_type && extensible_impl_l)
+ extensible->ops->get_ext_elements_of_type =
+ extensible_impl_l->extensible.ops->get_ext_elements_of_type;
+
+ extensible->ops->has_ext_elements_for_namespace = axis2_hash_get(methods,
+ "has_ext_elements_for_namespace", AXIS2_HASH_KEY_STRING);
+ if(!extensible->ops->has_ext_elements_for_namespace && extensible_impl_l)
+ extensible->ops->has_ext_elements_for_namespace =
+ extensible_impl_l->extensible.ops->has_ext_elements_for_namespace;
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+woden_element_extensible_add_ext_element(
+ void *extensible,
+ const axis2_env_t *env,
+ woden_ext_element_t *ext_el)
+{
+ woden_element_extensible_impl_t *extensible_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, ext_el, AXIS2_FAILURE);
+ super = WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+ extensible_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+ return AXIS2_ARRAY_LIST_ADD(extensible_impl->f_ext_elements, env, ext_el);
+}
+
+axis2_status_t AXIS2_CALL
+woden_element_extensible_remove_ext_element(
+ void *extensible,
+ const axis2_env_t *env,
+ woden_ext_element_t *ext_el)
+{
+ woden_element_extensible_impl_t *extensible_impl = NULL;
+ int index = -1;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, ext_el, AXIS2_FAILURE);
+ super = WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+ extensible_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+ index = AXIS2_ARRAY_LIST_INDEX_OF(extensible_impl->f_ext_elements, env, ext_el);
+ AXIS2_ARRAY_LIST_REMOVE(extensible_impl->f_ext_elements, env, index);
+ return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL
+woden_element_extensible_get_ext_elements(void *extensible,
+ const axis2_env_t *env)
+{
+ woden_element_extensible_impl_t *extensible_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ super = WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+ extensible_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+ return extensible_impl->f_ext_elements;
+}
+
+axis2_array_list_t *AXIS2_CALL
+woden_element_extensible_get_ext_elements_of_type(void *extensible,
+ const axis2_env_t *env,
+ axis2_qname_t *ext_type)
+{
+ woden_element_extensible_impl_t *extensible_impl = NULL;
+ int i = 0;
+ int size = 0;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ AXIS2_PARAM_CHECK(env->error, ext_type, NULL);
+ super = WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+ extensible_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+ if(extensible_impl->temp_elems)
+ {
+ int size = 0, i = 0;
+ size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->temp_elems, env);
+ for(i = 0; i < size; i++)
+ {
+ void *ext_el = NULL;
+
+ ext_el = AXIS2_ARRAY_LIST_GET(extensible_impl->temp_elems, env, i);
+ WODEN_XML_ATTR_FREE(ext_el, env);
+ }
+ AXIS2_ARRAY_LIST_FREE(extensible_impl->temp_elems, env);
+ extensible_impl->temp_elems = NULL;
+ }
+
+ extensible_impl->temp_elems = axis2_array_list_create(env, 0);
+ size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->f_ext_elements, env);
+ for(i = 0; i < size; i++)
+ {
+ woden_ext_element_t *ext_elem = NULL;
+ axis2_qname_t *ext_type_l = NULL;
+
+ ext_elem = (woden_ext_element_t *)AXIS2_ARRAY_LIST_GET(
+ extensible_impl->f_ext_elements, env, i);
+ ext_type_l = WODEN_EXT_ELEMENT_GET_EXT_TYPE(ext_elem, env);
+ if(AXIS2_TRUE == AXIS2_QNAME_EQUALS(ext_type, env, ext_type_l))
+ {
+ AXIS2_ARRAY_LIST_ADD(extensible_impl->temp_elems, env, ext_elem);
+ }
+ }
+ return extensible_impl->temp_elems;
+}
+
+axis2_bool_t AXIS2_CALL
+woden_element_extensible_has_ext_elements_for_namespace(void *extensible,
+ const axis2_env_t *env,
+ axis2_uri_t *namespc)
+{
+ woden_element_extensible_impl_t *extensible_impl = NULL;
+ axis2_bool_t result = AXIS2_FALSE;
+ axis2_char_t *ext_ns = NULL;
+ int i = 0;
+ int size = 0;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, namespc, AXIS2_FAILURE);
+ super = WODEN_ELEMENT_EXTENSIBLE_SUPER_OBJS(extensible, env);
+ extensible_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "WODEN_ELEMENT_EXTENSIBLE", AXIS2_HASH_KEY_STRING));
+
+ ext_ns = AXIS2_URI_TO_STRING(namespc, env, AXIS2_URI_UNP_OMITUSERINFO);
+ size = AXIS2_ARRAY_LIST_SIZE(extensible_impl->f_ext_elements, env);
+ for(i = 0; i < size; i++)
+ {
+ woden_ext_element_t *ext_elem = NULL;
+ axis2_qname_t *ext_type = NULL;
+ axis2_char_t *uri = NULL;
+
+ ext_elem = (woden_ext_element_t *) AXIS2_ARRAY_LIST_GET(
+ extensible_impl->f_ext_elements, env, i);
+ ext_type = WODEN_EXT_ELEMENT_GET_EXT_TYPE(ext_elem, env);
+ uri = AXIS2_QNAME_GET_URI(ext_type, env);
+ if(0 == AXIS2_STRCMP(uri, ext_ns))
+ {
+ result = AXIS2_TRUE;
+ break;
+ }
+ }
+ return result;
+}
+
+
Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/ext_deserializer.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/ext_deserializer.c?rev=415946&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/ext_deserializer.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/ext_deserializer.c Wed Jun 21 02:08:20 2006
@@ -0,0 +1,39 @@
+/*
+ * 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_ext_deserializer.h>
+
+axis2_status_t AXIS2_CALL
+woden_ext_deserializer_resolve_methods(
+ woden_ext_deserializer_t *ext_deserializer,
+ const axis2_env_t *env,
+ axis2_hash_t *methods)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+
+ ext_deserializer->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+
+ ext_deserializer->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+
+ ext_deserializer->ops->unmarshall = axis2_hash_get(methods, "unmarshall",
+ AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
+}
+
Added: webservices/axis2/trunk/c/woden/src/wsdl10/extensions/ext_element.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl10/extensions/ext_element.c?rev=415946&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl10/extensions/ext_element.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl10/extensions/ext_element.c Wed Jun 21 02:08:20 2006
@@ -0,0 +1,51 @@
+/*
+ * 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_ext_element.h>
+
+axis2_status_t AXIS2_CALL
+woden_ext_element_resolve_methods(
+ woden_ext_element_t *ext_element,
+ const axis2_env_t *env,
+ axis2_hash_t *methods)
+{
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK(env->error, methods, AXIS2_FAILURE);
+
+ ext_element->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ ext_element->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+
+ ext_element->ops->set_ext_type =
+ axis2_hash_get(methods, "set_ext_type",
+ AXIS2_HASH_KEY_STRING);
+
+ ext_element->ops->get_ext_type =
+ axis2_hash_get(methods, "get_ext_type",
+ AXIS2_HASH_KEY_STRING);
+
+ ext_element->ops->set_required =
+ axis2_hash_get(methods, "set_required",
+ AXIS2_HASH_KEY_STRING);
+
+ ext_element->ops->is_required =
+ axis2_hash_get(methods, "is_required",
+ AXIS2_HASH_KEY_STRING);
+
+ return AXIS2_SUCCESS;
+}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org