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/05/25 13:54:29 UTC
svn commit: r409367 - in /webservices/axis2/trunk/c/woden: include/woden/
include/woden/wsdl20/ include/woden/wsdl20/xml/ src/wsdl20/ src/wsdl20/xml/
Author: damitha
Date: Thu May 25 04:54:25 2006
New Revision: 409367
URL: http://svn.apache.org/viewvc?rev=409367&view=rev
Log:
New files added and more code
Added:
webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_endpoint.h
webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_svc.h
webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_wsdl_ref.h
webservices/axis2/trunk/c/woden/src/wsdl20/svc.c
webservices/axis2/trunk/c/woden/src/wsdl20/wsdl_ref.c
Modified:
webservices/axis2/trunk/c/woden/include/woden/axis2_woden.h
webservices/axis2/trunk/c/woden/include/woden/wsdl20/xml/axis2_woden_endpoint_element.h
webservices/axis2/trunk/c/woden/src/wsdl20/Makefile.am
webservices/axis2/trunk/c/woden/src/wsdl20/xml/Makefile.am
Modified: webservices/axis2/trunk/c/woden/include/woden/axis2_woden.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden/axis2_woden.h?rev=409367&r1=409366&r2=409367&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden/axis2_woden.h (original)
+++ webservices/axis2/trunk/c/woden/include/woden/axis2_woden.h Thu May 25 04:54:25 2006
@@ -73,7 +73,8 @@
AXIS2_WODEN_BINDING_FAULT,
AXIS2_WODEN_BINDING_FAULT_REF,
AXIS2_WODEN_BINDING_MSG_REF,
- AXIS2_WODEN_BINDING_OP
+ AXIS2_WODEN_BINDING_OP,
+ AXIS2_WODEN_ENDPOINT
} axis2_woden_obj_types_t;
/** @} */
Added: webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_endpoint.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_endpoint.h?rev=409367&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_endpoint.h (added)
+++ webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_endpoint.h Thu May 25 04:54:25 2006
@@ -0,0 +1,210 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_WODEN_ENDPOINT_H
+#define AXIS2_WODEN_ENDPOINT_H
+
+/**
+ * @file axis2_woden_endpoint.h
+ * @brief Axis2 Endpoint Interface
+ * This class represents the Endpoint component and the <endpoint> element.
+ *
+ */
+
+#include <woden/axis2_woden.h>
+#include <woden/wsdl20/xml/axis2_woden_endpoint_element.h>
+#include <woden/wsdl20/axis2_woden_nested_configurable.h>
+#include <woden/wsdl20/axis2_woden_nested_component.h>
+#include <woden/wsdl20/axis2_woden_configurable_component.h>
+#include <woden/types/woden_nc_name.h>
+
+/** @defgroup axis2_woden_endpoint Endpoint
+ * @ingroup axis2_wsdl
+ * @{
+ */
+
+typedef union axis2_woden_endpoint_base axis2_woden_endpoint_base_t;
+typedef struct axis2_woden_endpoint axis2_woden_endpoint_t;
+typedef struct axis2_woden_endpoint_ops axis2_woden_endpoint_ops_t;
+struct axis2_woden_documentation_element;
+struct axis2_woden_wsdl_component;
+struct axis2_woden_documentable;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct axis2_woden_endpoint_ops
+{
+ /**
+ * Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *
+ free) (void *endpoint,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *
+ to_endpoint_free) (void *endpoint,
+ axis2_env_t **env);
+
+ axis2_hash_t *(AXIS2_CALL *
+ super_objs) (void *endpoint,
+ axis2_env_t **env);
+
+ axis2_woden_obj_types_t (AXIS2_CALL *
+ type) (void *endpoint,
+ axis2_env_t **env);
+ /**
+ * @return the base implementation class
+ */
+ struct axis2_woden_nested_configurable *(AXIS2_CALL *
+ get_base_impl) (
+ void *endpoint,
+ axis2_env_t **env);
+
+ /* ************************************************************
+ * Endpoint interface methods (the WSDL Component model)
+ * ************************************************************/
+
+ woden_nc_name_t *(AXIS2_CALL *
+ get_name) (
+ void *endpoint,
+ axis2_env_t **env);
+
+ void *(AXIS2_CALL *
+ get_binding) (
+ void *endpoint,
+ axis2_env_t **env);
+
+ axis2_url_t *(AXIS2_CALL *
+ get_address) (
+ void *endpoint,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *
+ set_binding_element) (
+ void *endpoint,
+ axis2_env_t **env,
+ void *binding);
+
+};
+
+union axis2_woden_endpoint_base
+{
+ axis2_woden_nested_configurable_t nested_configurable;
+ axis2_woden_endpoint_element_t endpoint_element;
+ axis2_woden_configurable_component_t configurable_component;
+ axis2_woden_configurable_component_t nested_component;
+};
+
+struct axis2_woden_endpoint
+{
+ axis2_woden_endpoint_base_t base;
+ axis2_woden_endpoint_ops_t *ops;
+};
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_create(
+ axis2_env_t **env);
+
+
+/***************************Woden C Internal Methods***************************/
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_endpoint_element(
+ void *endpoint,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_nested_element(
+ void *endpoint,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_documentable_element(
+ void *endpoint,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_nested_configurable(
+ void *endpoint,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_configurable(
+ void *endpoint,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_nested_component(
+ void *endpoint,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_configurable_component(
+ void *endpoint,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_endpoint_t *)
+axis2_woden_endpoint_to_wsdl_component(
+ void *endpoint,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_status_t)
+axis2_woden_endpoint_resolve_methods(
+ axis2_woden_endpoint_t *endpoint,
+ axis2_env_t **env,
+ axis2_woden_endpoint_t *endpoint_impl,
+ axis2_hash_t *methods);
+/************************End of Woden C Internal Methods***********************/
+
+#define AXIS2_WODEN_ENDPOINT_FREE(endpoint, env) \
+ (((axis2_woden_endpoint_t *) endpoint)->ops->free(endpoint, env))
+
+#define AXIS2_WODEN_ENDPOINT_TO_ENDPOINT_FREE(endpoint, env) \
+ (((axis2_woden_endpoint_t *) endpoint)->ops->to_endpoint_free(endpoint, env))
+
+#define AXIS2_WODEN_ENDPOINT_SUPER_OBJS(endpoint, env) \
+ (((axis2_woden_endpoint_t *) endpoint)->ops->super_objs(endpoint, env))
+
+#define AXIS2_WODEN_ENDPOINT_TYPE(endpoint, env) \
+ (((axis2_woden_endpoint_t *) endpoint)->ops->type(endpoint, env))
+
+#define AXIS2_WODEN_ENDPOINT_GET_BASE_IMPL(endpoint, env) \
+ (((axis2_woden_endpoint_t *) endpoint)->ops->get_base_impl(endpoint, env))
+
+#define AXIS2_WODEN_ENDPOINT_GET_NAME(endpoint, env) \
+ (((axis2_woden_endpoint_t *) endpoint)->\
+ get_name(endpoint, env))
+
+#define AXIS2_WODEN_ENDPOINT_GET_BINDING(endpoint, env) \
+ (((axis2_woden_endpoint_t *) endpoint)->\
+ get_binding(endpoint, env))
+
+#define AXIS2_WODEN_ENDPOINT_GET_ADDRESS(endpoint, env) \
+ (((axis2_woden_endpoint_t *) endpoint)->ops->\
+ get_address(endpoint, env))
+
+#define AXIS2_WODEN_ENDPOINT_SET_BINDING_ELEMENT(endpoint, env, binding) \
+ (((axis2_woden_endpoint_t *) endpoint)->ops->\
+ set_binding_element(endpoint, env, binding))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_ENDPOINT_H */
Added: webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_svc.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_svc.h?rev=409367&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_svc.h (added)
+++ webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_svc.h Thu May 25 04:54:25 2006
@@ -0,0 +1,208 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_WODEN_SVC_H
+#define AXIS2_WODEN_SVC_H
+
+/**
+ * @file axis2_woden_svc.h
+ * @brief Axis2 Service Interface
+ * This class represents the Service component and the
+ * <service> element.
+ *
+ */
+
+#include <woden/axis2_woden.h>
+#include <woden/wsdl20/xml/axis2_woden_svc_element.h>
+#include <woden/axis2_woden_wsdl_obj.h>
+#include <woden/wsdl20/axis2_woden_configurable.h>
+#include <woden/wsdl20/axis2_woden_configurable_component.h>
+#include <woden/types/woden_nc_name.h>
+
+/** @defgroup axis2_woden_svc Service
+ * @ingroup axis2_wsdl
+ * @{
+ */
+
+typedef union axis2_woden_svc_base axis2_woden_svc_base_t;
+typedef struct axis2_woden_svc axis2_woden_svc_t;
+typedef struct axis2_woden_svc_ops axis2_woden_svc_ops_t;
+struct axis2_woden_documentation_element;
+struct axis2_woden_wsdl_component;
+struct axis2_woden_documentable;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct axis2_woden_svc_ops
+{
+ /**
+ * Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *
+ free) (void *svc,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *
+ to_svc_free) (void *svc,
+ axis2_env_t **env);
+
+ axis2_hash_t *(AXIS2_CALL *
+ super_objs) (void *svc,
+ axis2_env_t **env);
+
+ axis2_woden_obj_types_t (AXIS2_CALL *
+ type) (void *svc,
+ axis2_env_t **env);
+ /**
+ * @return the base implementation class
+ */
+ struct axis2_woden_configurable *(AXIS2_CALL *
+ get_base_impl) (
+ void *svc,
+ axis2_env_t **env);
+ /* ************************************************************
+ * Service interface methods (the WSDL Component model)
+ * ************************************************************/
+
+ axis2_qname_t *(AXIS2_CALL *
+ get_qname) (
+ void *svc,
+ axis2_env_t **env);
+
+ void *(AXIS2_CALL *
+ get_interface) (
+ void *svc,
+ axis2_env_t **env);
+
+ axis2_array_list_t *(AXIS2_CALL *
+ get_endpoints) (
+ void *svc,
+ axis2_env_t **env);
+ /******************************************************************************
+ * Non-API implementation methods
+ *****************************************************************************/
+
+ axis2_status_t (AXIS2_CALL *
+ set_interface_element) (
+ void *svc,
+ axis2_env_t **env,
+ void *interface);
+
+
+};
+
+union axis2_woden_svc_base
+{
+ axis2_woden_configurable_t configurable;
+ axis2_woden_svc_element_t svc_element;
+ axis2_woden_configurable_component_t configurable_component;
+};
+
+struct axis2_woden_svc
+{
+ axis2_woden_svc_base_t base;
+ axis2_woden_svc_ops_t *ops;
+};
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_create(
+ axis2_env_t **env);
+
+
+/***************************Woden C Internal Methods***************************/
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_svc_element(
+ void *svc,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_nested_element(
+ void *svc,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_documentable_element(
+ void *svc,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_configurable(
+ void *svc,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_nested_component(
+ void *svc,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_configurable_component(
+ void *svc,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_wsdl_component(
+ void *svc,
+ axis2_env_t **env);
+
+AXIS2_DECLARE(axis2_status_t)
+axis2_woden_svc_resolve_methods(
+ axis2_woden_svc_t *svc,
+ axis2_env_t **env,
+ axis2_woden_svc_t *svc_impl,
+ axis2_hash_t *methods);
+/************************End of Woden C Internal Methods***********************/
+
+#define AXIS2_WODEN_SVC_FREE(svc, env) \
+ (((axis2_woden_svc_t *) svc)->ops->free(svc, env))
+
+#define AXIS2_WODEN_SVC_TO_SVC_FREE(svc, env) \
+ (((axis2_woden_svc_t *) svc)->ops->to_svc_free(svc, env))
+
+#define AXIS2_WODEN_SVC_SUPER_OBJS(svc, env) \
+ (((axis2_woden_svc_t *) svc)->ops->super_objs(svc, env))
+
+#define AXIS2_WODEN_SVC_TYPE(svc, env) \
+ (((axis2_woden_svc_t *) svc)->ops->type(svc, env))
+
+#define AXIS2_WODEN_SVC_GET_BASE_IMPL(svc, env) \
+ (((axis2_woden_svc_t *) svc)->ops->get_base_impl(svc, env))
+
+#define AXIS2_WODEN_SVC_GET_QNAME(svc, env) \
+ (((axis2_woden_svc_t *) svc)->\
+ get_qname(svc, env))
+
+#define AXIS2_WODEN_SVC_GET_INTERFACE(svc, env) \
+ (((axis2_woden_svc_t *) svc)->\
+ get_interface(svc, env))
+
+#define AXIS2_WODEN_SVC_GET_ENDPOINTS(svc, env) \
+ (((axis2_woden_svc_t *) svc)->ops->\
+ get_endpoints(svc, env))
+
+#define AXIS2_WODEN_SVC_SET_INTERFACE_ELEMENT(svc, env, interface) \
+ (((axis2_woden_svc_t *) svc)->ops->\
+ set_interface_element(svc, env, interface))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_SVC_H */
Added: webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_wsdl_ref.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_wsdl_ref.h?rev=409367&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_wsdl_ref.h (added)
+++ webservices/axis2/trunk/c/woden/include/woden/wsdl20/axis2_woden_wsdl_ref.h Thu May 25 04:54:25 2006
@@ -0,0 +1,173 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_WODEN_WSDL_REF_H
+#define AXIS2_WODEN_WSDL_REF_H
+
+/**
+ * @file axis2_woden_wsdl_ref.h
+ * @brief Axis2 Wsdl Ref Interface
+ * This abstract class defines the common behaviour for referencing WSDL
+ * documents via the <wsdl:import> and <wsdl:include> elements.
+ * It is extended by the concrete implementation classes for those two elements.
+ *
+ *
+ */
+
+#include <woden/axis2_woden.h>
+#include <woden/wsdl20/xml/axis2_woden_wsdl_element.h>
+#include <woden/wsdl20/axis2_woden_wsdl_component.h>
+
+/** @defgroup axis2_woden_wsdl_ref Wsdl Ref
+ * @ingroup axis2_wsdl
+ * @{
+ */
+
+typedef union axis2_woden_wsdl_ref_base axis2_woden_wsdl_ref_base_t;
+typedef struct axis2_woden_wsdl_ref axis2_woden_wsdl_ref_t;
+typedef struct axis2_woden_wsdl_ref_ops axis2_woden_wsdl_ref_ops_t;
+struct axis2_woden_component_exts;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+struct axis2_woden_wsdl_ref_ops
+{
+ /**
+ * Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *
+ free) (
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+ axis2_hash_t *(AXIS2_CALL *
+ super_objs) (
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+ axis2_woden_obj_types_t (AXIS2_CALL *
+ type) (
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+ /**
+ * @return the base implementation class
+ */
+ axis2_woden_wsdl_element_t *(AXIS2_CALL *
+ get_base_impl) (
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+ axis2_url_t *(AXIS2_CALL *
+ get_location) (
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *
+ set_location) (
+ void *wsdl_ref,
+ axis2_env_t **env,
+ axis2_url_t *loc_uri);
+
+ void *(AXIS2_CALL *
+ get_desc_element) (
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+ axis2_status_t (AXIS2_CALL *
+ set_desc_element) (
+ void *wsdl_ref,
+ axis2_env_t **env,
+ void *desc);
+
+ axis2_status_t (AXIS2_CALL *
+ add_documentation_element) (
+ void *wsdl_ref,
+ axis2_env_t **env,
+ void *doc_el);
+
+ axis2_array_list_t *(AXIS2_CALL *
+ get_documentation_elements) (
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+
+};
+
+struct axis2_woden_wsdl_ref
+{
+ axis2_woden_wsdl_element_t wsdl_element;
+ axis2_woden_wsdl_ref_ops_t *ops;
+};
+
+AXIS2_DECLARE(axis2_woden_wsdl_ref_t *)
+axis2_woden_wsdl_ref_create(
+ axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_status_t)
+axis2_woden_wsdl_ref_resolve_methods(
+ axis2_woden_wsdl_ref_t *wsdl_ref,
+ axis2_env_t **env,
+ axis2_woden_wsdl_ref_t *wsdl_ref_impl,
+ axis2_hash_t *methods);
+/************************End of Woden C Internal Methods***********************/
+
+#define AXIS2_WODEN_WSDL_REF_FREE(wsdl_ref, env) \
+ (((axis2_woden_wsdl_ref_t *) wsdl_ref)->ops->free(wsdl_ref, env))
+
+#define AXIS2_WODEN_WSDL_REF_SUPER_OBJS(wsdl_ref, env) \
+ (((axis2_woden_wsdl_ref_t *) wsdl_ref)->ops->super_objs(wsdl_ref, env))
+
+#define AXIS2_WODEN_WSDL_REF_TYPE(wsdl_ref, env) \
+ (((axis2_woden_wsdl_ref_t *) wsdl_ref)->ops->type(wsdl_ref, env))
+
+#define AXIS2_WODEN_WSDL_REF_GET_BASE_IMPL(wsdl_ref, env) \
+ (((axis2_woden_wsdl_ref_t *) wsdl_ref)->ops->get_base_impl(wsdl_ref, env))
+
+#define AXIS2_WODEN_WSDL_REF_GET_LOCATION(wsdl_ref, env) \
+ (((axis2_woden_wsdl_ref_t *) wsdl_ref)->ops->\
+ get_location (wsdl_ref, env))
+
+#define AXIS2_WODEN_WSDL_REF_SET_LOCATION(wsdl_ref, env, loc_uri) \
+ (((axis2_woden_wsdl_ref_t *) wsdl_ref)->ops->\
+ set_location(wsdl_ref, env, loc_uri))
+
+#define AXIS2_WODEN_WSDL_REF_GET_DESC_ELEMENT(wsdl_ref, env) \
+ (((axis2_woden_wsdl_ref_t *) wsdl_ref)->ops->\
+ get_desc_element (wsdl_ref, env))
+
+#define AXIS2_WODEN_WSDL_REF_SET_DESC_ELEMENT(wsdl_ref, env, desc) \
+ (((axis2_woden_wsdl_ref_t *) wsdl_ref)->ops->\
+ set_desc_element(wsdl_ref, env, desc))
+
+#define AXIS2_WODEN_WSDL_REF_ADD_DOCUMENTATION_ELEMENT(wsdl_ref, env, doc_el) \
+ (((axis2_woden_wsdl_ref_t *) wsdl_ref)->ops->\
+ add_documentation_element (wsdl_ref, env, doc_el))
+
+#define AXIS2_WODEN_WSDL_REF_GET_DOCUMENTATION_ELEMENTS(wsdl_ref, env) \
+ (((axis2_woden_wsdl_ref_t *) wsdl_ref)->ops->\
+ get_documentation_elements(wsdl_ref, env))
+
+/** @} */
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_WODEN_WSDL_REF_H */
Modified: webservices/axis2/trunk/c/woden/include/woden/wsdl20/xml/axis2_woden_endpoint_element.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/include/woden/wsdl20/xml/axis2_woden_endpoint_element.h?rev=409367&r1=409366&r2=409367&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/include/woden/wsdl20/xml/axis2_woden_endpoint_element.h (original)
+++ webservices/axis2/trunk/c/woden/include/woden/wsdl20/xml/axis2_woden_endpoint_element.h Thu May 25 04:54:25 2006
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-#ifndef AXIS2_WODEN_FEATURE_ELEMENT_H
-#define AXIS2_WODEN_FEATURE_ELEMENT_H
+#ifndef AXIS2_WODEN_SVC_ELEMENT_H
+#define AXIS2_WODEN_SVC_ELEMENT_H
/**
* @file axis2_woden_endpoint_element.h
- * @brief Axis2 Feature Element Interface
+ * @brief Axis2 Endpoint Element Interface
* This interface represents an <endpoint> element
* information item, a child element of WSDL <service>.
*
@@ -48,7 +48,7 @@
typedef struct axis2_woden_endpoint_element_ops axis2_woden_endpoint_element_ops_t;
typedef union axis2_woden_endpoint_element_base axis2_woden_endpoint_element_base_t;
-/** @defgroup axis2_woden_endpoint_element Feature Element
+/** @defgroup axis2_woden_endpoint_element Endpoint Element
* @ingroup axis2_wsdl
* @{
*/
@@ -135,48 +135,48 @@
axis2_hash_t *methods);
/************************End of Woden C Internal Methods***********************/
-#define AXIS2_WODEN_FEATURE_ELEMENT_FREE(endpoint_el, env) \
+#define AXIS2_WODEN_SVC_ELEMENT_FREE(endpoint_el, env) \
(((axis2_woden_endpoint_element_t *) endpoint_el)->ops->\
free (endpoint_el, env))
-#define AXIS2_WODEN_FEATURE_ELEMENT_TO_FEATURE_ELEMENT_FREE(endpoint_el, env) \
+#define AXIS2_WODEN_SVC_ELEMENT_TO_SVC_ELEMENT_FREE(endpoint_el, env) \
(((axis2_woden_endpoint_element_t *) endpoint_el)->ops->\
to_endpoint_element_free (endpoint_el, env))
-#define AXIS2_WODEN_FEATURE_ELEMENT_TYPE(endpoint_el, env) \
+#define AXIS2_WODEN_SVC_ELEMENT_TYPE(endpoint_el, env) \
(((axis2_woden_endpoint_element_t *) endpoint_el)->ops->\
type (endpoint_el, env))
-#define AXIS2_WODEN_FEATURE_ELEMENT_SET_NAME(endpoint_el, env, name) \
+#define AXIS2_WODEN_SVC_ELEMENT_SET_NAME(endpoint_el, env, name) \
(((axis2_woden_endpoint_element_t *) endpoint_el)->ops->\
- set_ref(endpoint_el, env, name))
+ set_name(endpoint_el, env, name))
-#define AXIS2_WODEN_FEATURE_ELEMENT_GET_NAME(endpoint_el, env) \
+#define AXIS2_WODEN_SVC_ELEMENT_GET_NAME(endpoint_el, env) \
(((axis2_woden_endpoint_element_t *) endpoint_el)->ops->\
- get_ref(endpoint_el, env))
+ get_name(endpoint_el, env))
-#define AXIS2_WODEN_FEATURE_ELEMENT_SET_BINDING_QNAME(endpoint_el, env, qname) \
+#define AXIS2_WODEN_SVC_ELEMENT_SET_BINDING_QNAME(endpoint_el, env, qname) \
(((axis2_woden_endpoint_element_t *) endpoint_el)->ops->\
- set_required(endpoint_el, env, qname))
+ set_binding_qname(endpoint_el, env, qname))
-#define AXIS2_WODEN_FEATURE_ELEMENT_GET_BINDING_QNAME(endpoint_el, env) \
+#define AXIS2_WODEN_SVC_ELEMENT_GET_BINDING_QNAME(endpoint_el, env) \
(((axis2_woden_endpoint_element_t *) endpoint_el)->ops->\
- is_required(endpoint_el, env))
+ get_binding_qname(endpoint_el, env))
-#define AXIS2_WODEN_FEATURE_ELEMENT_GET_BINDING_ELEMENT(endpoint_el, env) \
+#define AXIS2_WODEN_SVC_ELEMENT_GET_BINDING_ELEMENT(endpoint_el, env) \
(((axis2_woden_endpoint_element_t *) endpoint_el)->ops->\
- is_required(endpoint_el, env))
+ get_binding_element(endpoint_el, env))
-#define AXIS2_WODEN_FEATURE_ELEMENT_SET_ADDRESS(endpoint_el, env, uri) \
+#define AXIS2_WODEN_SVC_ELEMENT_SET_ADDRESS(endpoint_el, env, uri) \
(((axis2_woden_endpoint_element_t *) endpoint_el)->ops->\
- set_ref(endpoint_el, env, uri))
+ set_address(endpoint_el, env, uri))
-#define AXIS2_WODEN_FEATURE_ELEMENT_GET_ADDRESS(endpoint_el, env) \
+#define AXIS2_WODEN_SVC_ELEMENT_GET_ADDRESS(endpoint_el, env) \
(((axis2_woden_endpoint_element_t *) endpoint_el)->ops->\
- get_ref(endpoint_el, env))
+ get_address(endpoint_el, env))
/** @} */
#ifdef __cplusplus
}
#endif
-#endif /* AXIS2_WODEN_FEATURE_ELEMENT_H */
+#endif /* AXIS2_WODEN_SVC_ELEMENT_H */
Modified: webservices/axis2/trunk/c/woden/src/wsdl20/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/Makefile.am?rev=409367&r1=409366&r2=409367&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/Makefile.am (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/Makefile.am Thu May 25 04:54:25 2006
@@ -25,7 +25,8 @@
binding_fault_ref.c \
binding_msg_ref.c \
binding_op.c \
- endpoint.c
+ endpoint.c \
+ svc.c
INCLUDES = -I$(top_builddir)/include \
@AXIOMINC@ \
Added: webservices/axis2/trunk/c/woden/src/wsdl20/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/svc.c?rev=409367&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/svc.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/svc.c Thu May 25 04:54:25 2006
@@ -0,0 +1,988 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/axis2_woden_wsdl_obj.h>
+#include <woden/wsdl20/axis2_woden_svc.h>
+#include <woden/wsdl20/extensions/axis2_woden_ext_element.h>
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
+#include <woden/xml/axis2_woden_xml_attr.h>
+#include <woden/wsdl20/xml/axis2_woden_documentation_element.h>
+
+typedef struct axis2_woden_svc_impl axis2_woden_svc_impl_t;
+
+/**
+ * @brief Service Struct Impl
+ * Axis2 Service
+ */
+struct axis2_woden_svc_impl
+{
+ axis2_woden_svc_t svc;
+ axis2_woden_obj_types_t obj_type;
+ axis2_woden_configurable_t *configurable;
+ axis2_hash_t *super;
+ axis2_hash_t *methods;
+ woden_nc_name_t *f_qname;
+ axis2_qname_t *f_interface_qname;
+ void *f_interface;
+ axis2_array_list_t *f_endpoints;
+};
+
+#define INTF_TO_IMPL(svc) ((axis2_woden_svc_impl_t *) svc)
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_free(
+ void *svc,
+ axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_svc_super_objs(
+ void *svc,
+ axis2_env_t **env);
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_svc_type(
+ void *svc,
+ axis2_env_t **env);
+
+axis2_woden_configurable_t *AXIS2_CALL
+axis2_woden_svc_get_base_impl(
+ void *svc,
+ axis2_env_t **env);
+/* ************************************************************
+ * Service interface methods (the WSDL Component model)
+ * ************************************************************/
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_svc_get_qname(
+ void *svc,
+ axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_svc_get_interface(
+ void *svc,
+ axis2_env_t **env);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_svc_get_endpoints(
+ void *svc,
+ axis2_env_t **env);
+/* ************************************************************
+ * Service Element interface methods (the XML Element model)
+ * ************************************************************/
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_qname(
+ void *svc,
+ axis2_env_t **env,
+ woden_nc_name_t *qname);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_interface_qname(
+ void *svc,
+ axis2_env_t **env,
+ axis2_qname_t *interface_qname);
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_svc_get_interface_qname(
+ void *svc,
+ axis2_env_t **env);
+
+void *AXIS2_CALL
+axis2_woden_svc_get_interface_element(
+ void *svc,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_add_endpoint_element(
+ void *svc,
+ axis2_env_t **env,
+ void *endpoint);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_svc_get_endpoint_elements(
+ void *svc,
+ axis2_env_t **env);
+
+/******************************************************************************
+ * Non-API implementation methods
+ *****************************************************************************/
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_interface_element(
+ void *svc,
+ axis2_env_t **env,
+ void *interface);
+
+
+static axis2_woden_svc_t *
+create(axis2_env_t **env);
+
+/************************Woden C Internal Methods******************************/
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_svc_element(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ if(!svc)
+ {
+ svc_impl = (axis2_woden_svc_impl_t *) create(env);
+ }
+ else
+ svc_impl = (axis2_woden_svc_impl_t *) svc;
+
+ svc_impl->svc.base.svc_element.ops =
+ AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_svc_element_ops_t));
+ axis2_woden_svc_element_resolve_methods(&(svc_impl->svc.base.
+ svc_element), env, svc_impl->methods);
+ return svc;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_to_svc_element_free(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = INTF_TO_IMPL(svc);
+
+ if(svc_impl->svc.base.svc_element.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ svc_element.ops);
+ svc_impl->svc.base.svc_element.ops = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_nested_element(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ if(!svc)
+ {
+ svc_impl = (axis2_woden_svc_impl_t *) create(env);
+ }
+ else
+ svc_impl = (axis2_woden_svc_impl_t *) svc;
+
+ svc_impl->svc.base.svc_element.base.nested_element.ops =
+ AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_nested_element_ops_t));
+ axis2_woden_nested_element_resolve_methods(&(svc_impl->svc.base.
+ svc_element.base.nested_element), env, svc_impl->methods);
+ return svc;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_to_nested_element_free(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = INTF_TO_IMPL(svc);
+
+ if(svc_impl->svc.base.svc_element.base.nested_element.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ svc_element.base.nested_element.ops);
+ svc_impl->svc.base.svc_element.base.nested_element.ops =
+ NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_documentable_element(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ if(!svc)
+ {
+ svc_impl = (axis2_woden_svc_impl_t *) create(env);
+ }
+ else
+ svc_impl = (axis2_woden_svc_impl_t *) svc;
+
+ svc_impl->svc.base.svc_element.base.documentable_element.ops =
+ AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_documentable_element_ops_t));
+ axis2_woden_documentable_element_resolve_methods(&(svc_impl->svc.base.
+ svc_element.base.documentable_element), env,
+ svc_impl->methods);
+ return svc;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_to_documentable_element_free(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = INTF_TO_IMPL(svc);
+
+ if(svc_impl->svc.base.svc_element.base.documentable_element.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ svc_element.base.documentable_element.ops);
+ svc_impl->svc.base.svc_element.base.documentable_element.ops =
+ NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_configurable(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ if(!svc)
+ {
+ svc_impl = (axis2_woden_svc_impl_t *) create(env);
+ }
+ else
+ svc_impl = (axis2_woden_svc_impl_t *) svc;
+
+ svc_impl->svc.base.configurable.ops =
+ AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_configurable_ops_t));
+ axis2_woden_configurable_resolve_methods(&(svc_impl->svc.base.
+ configurable), env, svc_impl->configurable,
+ svc_impl->methods);
+ return svc;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_to_configurable_free(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = INTF_TO_IMPL(svc);
+
+ if(svc_impl->svc.base.configurable.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ configurable.ops);
+ svc_impl->svc.base.configurable.ops =
+ NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_nested_component(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ if(!svc)
+ {
+ svc_impl = (axis2_woden_svc_impl_t *) create(env);
+ }
+ else
+ svc_impl = (axis2_woden_svc_impl_t *) svc;
+
+ svc_impl->svc.base.configurable.base.nested_component.ops =
+ AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_nested_component_ops_t));
+ axis2_woden_nested_component_resolve_methods(&(svc_impl->svc.base.
+ configurable.base.nested_component), env, svc_impl->methods);
+ return svc;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_to_nested_component_free(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = INTF_TO_IMPL(svc);
+
+ if(svc_impl->svc.base.configurable.base.nested_component.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ configurable.base.nested_component.ops);
+ svc_impl->svc.base.configurable.base.nested_component.
+ ops = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_configurable_component(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ if(!svc)
+ {
+ svc_impl = (axis2_woden_svc_impl_t *) create(env);
+ }
+ else
+ svc_impl = (axis2_woden_svc_impl_t *) svc;
+
+ svc_impl->svc.base.configurable_component.ops =
+ AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_configurable_component_ops_t));
+ axis2_woden_configurable_component_resolve_methods(&(svc_impl->svc.base.
+ configurable_component), env, svc_impl->methods);
+ return svc;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_to_configurable_component_free(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = INTF_TO_IMPL(svc);
+
+ if(svc_impl->svc.base.configurable_component.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ configurable_component.ops);
+ svc_impl->svc.base.configurable_component.ops = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_to_wsdl_component(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ if(!svc)
+ {
+ svc_impl = (axis2_woden_svc_impl_t *) create(env);
+ }
+ else
+ svc_impl = (axis2_woden_svc_impl_t *) svc;
+ svc_impl->svc.base.configurable_component.wsdl_component.ops =
+ AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_wsdl_component_ops_t));
+ axis2_woden_wsdl_component_resolve_methods(&(svc_impl->svc.base.
+ configurable_component.wsdl_component), env, svc_impl->methods);
+ return svc;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_to_wsdl_component_free(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = INTF_TO_IMPL(svc);
+
+ if(svc_impl->svc.base.configurable_component.wsdl_component.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ configurable_component.wsdl_component.ops);
+ svc_impl->svc.base.configurable_component.wsdl_component.ops = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+/************************End of Woden C Internal Methods***********************/
+static axis2_woden_svc_t *
+create(axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_svc_impl_t));
+
+ svc_impl->obj_type= AXIS2_WODEN_SVC;
+ svc_impl->super = NULL;
+ svc_impl->methods = NULL;
+ svc_impl->f_qname = NULL;
+ svc_impl->f_interface_qname = NULL;
+ svc_impl->f_interface = NULL;
+ svc_impl->f_endpoints = NULL;
+
+ svc_impl->svc.base.svc_element.ops = NULL;
+ svc_impl->svc.base.svc_element.base.nested_element.ops = NULL;
+ svc_impl->svc.base.svc_element.base.documentable_element.ops =
+ NULL;
+ svc_impl->svc.base.configurable.ops = NULL;
+ svc_impl->svc.base.configurable.base.configurable.ops = NULL;
+ svc_impl->svc.base.configurable.base.nested_component.ops = NULL;
+ svc_impl->svc.base.configurable_component.ops = NULL;
+ svc_impl->svc.base.configurable_component.wsdl_component.ops = NULL;
+
+ svc_impl->svc.ops = AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_svc_ops_t));
+
+ svc_impl->svc.ops->free = axis2_woden_svc_free;
+ svc_impl->svc.ops->super_objs = axis2_woden_svc_super_objs;
+ svc_impl->svc.ops->type = axis2_woden_svc_type;
+ svc_impl->svc.ops->get_base_impl = axis2_woden_svc_get_base_impl;
+
+ svc_impl->svc.ops->get_qname = axis2_woden_svc_get_qname;
+ svc_impl->svc.ops->get_interface = axis2_woden_svc_get_interface;
+ svc_impl->svc.ops->get_endpoints =
+ axis2_woden_svc_get_endpoints;
+ svc_impl->svc.ops->set_interface_element =
+ axis2_woden_svc_set_interface_element;
+
+ svc_impl->methods = axis2_hash_make(env);
+ if(!svc_impl->methods)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ axis2_hash_set(svc_impl->methods, "free", AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_free);
+ axis2_hash_set(svc_impl->methods, "to_svc_element_free",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_to_svc_element_free);
+ axis2_hash_set(svc_impl->methods, "to_nested_element_free",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_to_nested_element_free);
+ axis2_hash_set(svc_impl->methods, "to_documentable_element_free",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_to_documentable_element_free);
+ axis2_hash_set(svc_impl->methods, "to_configurable_free",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_to_configurable_free);
+ axis2_hash_set(svc_impl->methods, "to_configurable_free",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_to_configurable_free);
+ axis2_hash_set(svc_impl->methods, "to_nested_component_free",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_to_nested_component_free);
+ axis2_hash_set(svc_impl->methods, "to_configurable_component_free",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_to_configurable_component_free);
+ axis2_hash_set(svc_impl->methods, "to_wsdl_component_free",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_to_wsdl_component_free);
+ axis2_hash_set(svc_impl->methods, "super_objs",
+ AXIS2_HASH_KEY_STRING, axis2_woden_svc_super_objs);
+ axis2_hash_set(svc_impl->methods, "type",
+ AXIS2_HASH_KEY_STRING, axis2_woden_svc_type);
+
+ axis2_hash_set(svc_impl->methods, "get_qname",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_get_qname);
+ axis2_hash_set(svc_impl->methods, "get_interface",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_get_interface);
+ axis2_hash_set(svc_impl->methods, "get_endpoints",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_get_endpoints);
+ axis2_hash_set(svc_impl->methods, "set_qname",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_set_qname);
+ axis2_hash_set(svc_impl->methods, "set_interface_qname",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_set_interface_qname);
+ axis2_hash_set(svc_impl->methods, "get_interface_qname",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_get_interface_qname);
+ axis2_hash_set(svc_impl->methods, "get_interface_element",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_get_interface_element);
+ axis2_hash_set(svc_impl->methods, "add_endpoint_element",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_add_enpoint_element);
+ axis2_hash_set(svc_impl->methods, "get_endpoint_elements",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_get_endpoint_elements);
+ axis2_hash_set(svc_impl->methods, "set_interface_element",
+ AXIS2_HASH_KEY_STRING,
+ axis2_woden_svc_set_interface_element);
+
+ return &(svc_impl->svc);
+}
+
+AXIS2_DECLARE(axis2_woden_svc_t *)
+axis2_woden_svc_create(axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = (axis2_woden_svc_impl_t *) create(env);
+
+ svc_impl->configurable = axis2_woden_configurable_create(env);
+
+ svc_impl->super = axis2_hash_make(env);
+ if(!svc_impl->super)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ axis2_hash_set(svc_impl->super, "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING,
+ &(svc_impl->svc));
+ axis2_hash_set(svc_impl->super, "AXIS2_WODEN_NESTED_CONFIGURABLE", AXIS2_HASH_KEY_STRING,
+ svc_impl->configurable);
+
+ return &(svc_impl->svc);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_free(void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = INTF_TO_IMPL(svc);
+
+ if(svc_impl->f_qname)
+ {
+ WODEN_QNAME_FREE(svc_impl->f_qname, env);
+ svc_impl->f_qname = NULL;
+ }
+
+ if(svc_impl->f_interface_qname)
+ {
+ WODEN_QNAME_FREE(svc_impl->f_interface_qname, env);
+ svc_impl->f_interface_qname = NULL;
+ }
+
+ if(svc_impl->f_interface)
+ {
+ AXIS2_WODEN_INTERFACE_FREE(svc_impl->f_interface, env);
+ svc_impl->f_interface = NULL;
+ }
+
+ if(svc_impl->f_endpoints)
+ {
+ AXIS2_ARRAY_LIST_FREE(svc_impl->f_endpoints, env);
+ svc_impl->f_endpoints = NULL;
+ }
+
+ /* TODO free f_parent */
+
+ if(svc_impl->super)
+ {
+ axis2_hash_free(svc_impl->super, env);
+ svc_impl->super = NULL;
+ }
+
+ if(svc_impl->methods)
+ {
+ axis2_hash_free(svc_impl->methods, env);
+ svc_impl->methods = NULL;
+ }
+
+ if(svc_impl->configurable)
+ {
+ AXIS2_WODEN_NESTED_CONFIGURABLE_FREE(svc_impl->configurable, env);
+ svc_impl->configurable = NULL;
+ }
+
+ if(svc_impl->svc.base.svc_element.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ svc_element.ops);
+ svc_impl->svc.base.svc_element.ops = NULL;
+ }
+
+ if(svc_impl->svc.base.svc_element.base.nested_element.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ svc_element.base.nested_element.ops);
+ svc_impl->svc.base.svc_element.base.nested_element.ops =
+ NULL;
+ }
+
+ if(svc_impl->svc.base.svc_element.base.documentable_element.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ svc_element.base.documentable_element.ops);
+ svc_impl->svc.base.svc_element.base.documentable_element.ops =
+ NULL;
+ }
+
+ if(svc_impl->svc.base.configurable.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ configurable.ops);
+ svc_impl->svc.base.configurable.ops =
+ NULL;
+ }
+
+ if(svc_impl->svc.base.configurable.base.configurable.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ configurable.base.configurable.ops);
+ svc_impl->svc.base.configurable.base.configurable.ops =
+ NULL;
+ }
+
+ if(svc_impl->svc.base.configurable.base.nested_component.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ configurable.base.nested_component.ops);
+ svc_impl->svc.base.configurable.base.nested_component.ops = NULL;
+ }
+
+ if(svc_impl->svc.base.configurable_component.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ configurable_component.ops);
+ svc_impl->svc.base.configurable_component.ops = NULL;
+ }
+
+ if(svc_impl->svc.base.configurable_component.wsdl_component.ops)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl->svc.base.
+ configurable_component.wsdl_component.ops);
+ svc_impl->svc.base.configurable_component.wsdl_component.ops = NULL;
+ }
+
+ if((&(svc_impl->svc))->ops)
+ {
+ AXIS2_FREE((*env)->allocator, (&(svc_impl->svc))->ops);
+ (&(svc_impl->svc))->ops = NULL;
+ }
+
+ if(svc_impl)
+ {
+ AXIS2_FREE((*env)->allocator, svc_impl);
+ svc_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_svc_super_objs(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = INTF_TO_IMPL(svc);
+
+ return svc_impl->super;
+}
+
+axis2_woden_obj_types_t AXIS2_CALL
+axis2_woden_svc_type(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ svc_impl = INTF_TO_IMPL(svc);
+
+ return svc_impl->obj_type;
+}
+
+axis2_woden_configurable_t *AXIS2_CALL
+axis2_woden_svc_get_base_impl(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ svc_impl = INTF_TO_IMPL(svc);
+
+ return svc_impl->configurable;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_resolve_methods(
+ axis2_woden_svc_t *svc,
+ axis2_env_t **env,
+ axis2_woden_svc_t *svc_impl,
+ axis2_hash_t *methods)
+{
+ axis2_woden_svc_impl_t *svc_impl_l = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+ svc_impl_l = INTF_TO_IMPL(svc_impl);
+
+ svc->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ svc->ops->to_svc_free = axis2_hash_get(methods, "to_svc_free",
+ AXIS2_HASH_KEY_STRING);
+ svc->ops->super_objs = axis2_hash_get(methods, "super_objs",
+ AXIS2_HASH_KEY_STRING);
+ svc->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+
+ svc->ops->get_qname = axis2_hash_get(methods,
+ "get_qname", AXIS2_HASH_KEY_STRING);
+ if(!svc->ops->get_qname && svc_impl_l)
+ svc->ops->get_qname =
+ svc_impl_l->svc.ops->get_qname;
+
+ svc->ops->get_interface = axis2_hash_get(methods,
+ "get_interface", AXIS2_HASH_KEY_STRING);
+ if(!svc->ops->get_interface && svc_impl_l)
+ svc->ops->get_interface =
+ svc_impl_l->svc.ops->get_interface;
+
+ svc->ops->get_endpoints = axis2_hash_get(methods,
+ "get_endpoints", AXIS2_HASH_KEY_STRING);
+ if(!svc->ops->get_endpoints && svc_impl_l)
+ svc->ops->get_endpoints =
+ svc_impl_l->svc.ops->get_endpoints;
+
+ svc->ops->set_interface_element = axis2_hash_get(methods,
+ "set_interface_element", AXIS2_HASH_KEY_STRING);
+ if(!svc->ops->set_interface_element && svc_impl_l)
+ svc->ops->set_interface_element =
+ svc_impl_l->svc.ops->set_interface_element;
+
+ return AXIS2_SUCCESS;
+}
+/* ************************************************************
+ * Service interface methods (the WSDL Component model)
+ * ************************************************************/
+
+woden_qname_t *AXIS2_CALL
+axis2_woden_svc_get_qname(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+ svc_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+ return svc_impl->f_qname;
+}
+
+void *AXIS2_CALL
+axis2_woden_svc_get_interface(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+ svc_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+ return svc_impl->f_interface;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_svc_get_endpoints(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+ svc_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+ return svc_impl->f_endpoints;
+}
+/* ************************************************************
+ * Service Element interface methods (the XML Element model)
+ * ************************************************************/
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_qname(
+ void *svc,
+ axis2_env_t **env,
+ woden_nc_name_t *qname)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+ svc_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+ if(svc_impl->f_qname)
+ {
+ AXIS2_QNAME_FREE(svc_impl->f_qname, env);
+ }
+ svc_impl->f_qname = AXIS2_QNAME_CLONE(qname, env);
+ return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_interface_qname(
+ void *svc,
+ axis2_env_t **env,
+ axis2_qname_t *interface_qname)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+ svc_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+ if(svc_impl->f_interface_qname)
+ {
+ AXIS2_QNAME_FREE(svc_impl->f_interface_qname, env);
+ }
+
+ svc_impl->f_interface_qname = AXIS2_QNAME_CLONE(interface_qname, env);
+ return AXIS2_SUCCESS;
+}
+
+axis2_qname_t *AXIS2_CALL
+axis2_woden_svc_get_interface_qname(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+ svc_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+ return svc_impl->f_interface_qname;
+}
+
+void *AXIS2_CALL
+axis2_woden_svc_get_interface_element(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+ svc_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+ return svc_impl->f_interface;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_add_endpoint_element(
+ void *svc,
+ axis2_env_t **env,
+ void *endpoint)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+ svc_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+ if(!svc_impl->f_endpoints)
+ {
+ svc_impl->f_endpoints = axis2_array_list_create(env, 0);
+ if(!svc_impl->f_endpoints)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ }
+
+ return AXIS2_ARRAY_LIST_ADD(svc_impl->f_endpoints, env, endpoint);
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_svc_get_endpoint_elements(
+ void *svc,
+ axis2_env_t **env)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+ svc_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+ return svc_impl->f_endpoints;
+}
+/******************************************************************************
+ * Non-API implementation methods
+ *****************************************************************************/
+
+axis2_status_t AXIS2_CALL
+axis2_woden_svc_set_interface_element(
+ void *svc,
+ axis2_env_t **env,
+ void *interface)
+{
+ axis2_woden_svc_impl_t *svc_impl = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_SVC_SUPER_OBJS(svc, env);
+ svc_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_SVC", AXIS2_HASH_KEY_STRING));
+
+ if(svc_impl->f_interface)
+ {
+ /* TODO */
+ }
+
+ svc_impl->f_interface = interface;
+ return AXIS2_SUCCESS;
+}
+
+
Added: webservices/axis2/trunk/c/woden/src/wsdl20/wsdl_ref.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/wsdl_ref.c?rev=409367&view=auto
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/wsdl_ref.c (added)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/wsdl_ref.c Thu May 25 04:54:25 2006
@@ -0,0 +1,395 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <woden/axis2_woden_wsdl_ref.h>
+#include <woden/wsdl20/extensions/axis2_woden_component_exts.h>
+
+typedef struct axis2_woden_wsdl_ref_impl axis2_woden_wsdl_ref_impl_t;
+
+/**
+ * @brief Wsdl Ref Struct Impl
+ * Axis2 Wsdl Ref
+ */
+struct axis2_woden_wsdl_ref_impl
+{
+ axis2_woden_wsdl_ref_t wsdl_ref;
+ axis2_woden_wsdl_element_t *wsdl_element;
+ axis2_hash_t *super;
+ axis2_woden_obj_types_t obj_type;
+ axis2_array_list_t *f_documentation_elements;
+ axis2_url_t *f_location;
+ axis2_desc_element_t *f_desc_element;
+};
+
+#define INTF_TO_IMPL(wsdl_ref) ((axis2_woden_wsdl_ref_impl_t *) wsdl_ref)
+
+axis2_status_t AXIS2_CALL
+axis2_woden_wsdl_ref_free(
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_wsdl_ref_super_objs(
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+axis2_woden_wsdl_element_t *AXIS2_CALL
+axis2_woden_wsdl_ref_get_base_impl(
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+axis2_url_t *AXIS2_CALL
+axis2_woden_wsdl_ref_get_location(
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_wsdl_ref_set_location(
+ void *wsdl_ref,
+ axis2_env_t **env,
+ axis2_url_t *loc_uri);
+
+void *AXIS2_CALL
+axis2_woden_wsdl_ref_get_desc_element(
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_wsdl_ref_set_desc_element(
+ void *wsdl_ref,
+ axis2_env_t **env,
+ void *desc);
+
+axis2_status_t AXIS2_CALL
+axis2_woden_wsdl_ref_add_documentation_element(
+ void *wsdl_ref,
+ axis2_env_t **env,
+ void *doc_el);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_wsdl_ref_get_documentation_elements(
+ void *wsdl_ref,
+ axis2_env_t **env);
+
+static axis2_woden_wsdl_ref_t *
+create(
+ axis2_env_t **env)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ wsdl_ref_impl = AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_wsdl_ref_impl_t));
+
+ wsdl_ref_impl->wsdl_element = NULL;
+ wsdl_ref_impl->f_documentation_elements = NULL;
+ wsdl_ref_impl->f_location = NULL;
+ wsdl_ref_impl->f_desc_element = NULL;
+
+ wsdl_ref_impl->wsdl_ref.ops = AXIS2_MALLOC((*env)->allocator,
+ sizeof(axis2_woden_wsdl_ref_ops_t));
+
+ wsdl_ref_impl->wsdl_ref.ops->free = axis2_woden_wsdl_ref_free;
+ wsdl_ref_impl->wsdl_ref.ops->super_objs = axis2_woden_wsdl_ref_super_objs;
+ wsdl_ref_impl->wsdl_ref.ops->get_base_impl = axis2_woden_wsdl_ref_get_base_impl;
+ wsdl_ref_impl->wsdl_ref.ops->get_location =
+ axis2_woden_wsdl_ref_get_location;
+ wsdl_ref_impl->wsdl_ref.ops->set_location =
+ axis2_woden_wsdl_ref_set_location;
+ wsdl_ref_impl->wsdl_ref.ops->get_desc_element =
+ axis2_woden_wsdl_ref_get_desc_element;
+ wsdl_ref_impl->wsdl_ref.ops->set_desc_element =
+ axis2_woden_wsdl_ref_set_desc_element;
+ wsdl_ref_impl->wsdl_ref.ops->add_documentation_element =
+ axis2_woden_wsdl_ref_add_documentation_element;
+ wsdl_ref_impl->wsdl_ref.ops->get_documentation_elements =
+ axis2_woden_wsdl_ref_get_documentation_elements;
+
+ return &(wsdl_ref_impl->wsdl_ref);
+}
+
+AXIS2_DECLARE(axis2_woden_wsdl_ref_t *)
+axis2_woden_wsdl_ref_create(
+ axis2_env_t **env)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ wsdl_ref_impl = (axis2_woden_wsdl_ref_impl_t *) create(env);
+
+ wsdl_ref_impl->wsdl_element = axis2_woden_wsdl_element_create(env);
+
+ wsdl_ref_impl->super = axis2_hash_make(env);
+ if(!wsdl_ref_impl->super)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+ axis2_hash_set(wsdl_ref_impl->super, "AXIS2_WODEN_WSDL_REF", AXIS2_HASH_KEY_STRING,
+ &(wsdl_ref_impl->wsdl_ref));
+ axis2_hash_set(wsdl_ref_impl->super, "AXIS2_WODEN_WSDL_ELEMENT", AXIS2_HASH_KEY_STRING,
+ wsdl_ref_impl->wsdl_element);
+ return &(wsdl_ref_impl->wsdl_ref);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_wsdl_ref_free(
+ void *wsdl_ref,
+ axis2_env_t **env)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ wsdl_ref_impl = INTF_TO_IMPL(wsdl_ref);
+
+ if(wsdl_ref_impl->wsdl_element)
+ {
+ AXIS2_WODEN_WSDL_ELEMENT_FREE(wsdl_ref_impl->wsdl_element, env);
+ wsdl_ref_impl->wsdl_element = NULL;
+ }
+
+ if(wsdl_ref_impl->super)
+ {
+ axis2_hash_free(wsdl_ref_impl->super, env);
+ wsdl_ref_impl->super = NULL;
+ }
+
+ if((&(wsdl_ref_impl->wsdl_ref))->ops)
+ {
+ AXIS2_FREE((*env)->allocator, (&(wsdl_ref_impl->wsdl_ref))->ops);
+ (&(wsdl_ref_impl->wsdl_ref))->ops = NULL;
+ }
+
+ if(wsdl_ref_impl)
+ {
+ AXIS2_FREE((*env)->allocator, wsdl_ref_impl);
+ wsdl_ref_impl = NULL;
+ }
+ return AXIS2_SUCCESS;
+}
+
+axis2_hash_t *AXIS2_CALL
+axis2_woden_wsdl_ref_super(
+ void *wsdl_ref,
+ axis2_env_t **env)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ wsdl_ref_impl = INTF_TO_IMPL(wsdl_ref);
+
+ return wsdl_ref_impl->super;
+}
+
+axis2_woden_wsdl_element_t *AXIS2_CALL
+axis2_woden_wsdl_ref_get_base_impl(
+ void *wsdl_ref,
+ axis2_env_t **env)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl = NULL;
+
+ AXIS2_ENV_CHECK(env, NULL);
+ wsdl_ref_impl = INTF_TO_IMPL(wsdl_ref);
+
+ return wsdl_ref_impl->wsdl_element;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_wsdl_ref_resolve_methods(
+ axis2_woden_wsdl_ref_t *wsdl_ref,
+ axis2_env_t **env,
+ axis2_woden_wsdl_ref_t *wsdl_ref_impl,
+ axis2_hash_t *methods)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl_l = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, methods, AXIS2_FAILURE);
+ wsdl_ref_impl_l = INTF_TO_IMPL(wsdl_ref_impl);
+
+ wsdl_ref->ops->free = axis2_hash_get(methods, "free",
+ AXIS2_HASH_KEY_STRING);
+ wsdl_ref->ops->super_objs = axis2_hash_get(methods, "super_objs",
+ AXIS2_HASH_KEY_STRING);
+ wsdl_ref->ops->type = axis2_hash_get(methods, "type",
+ AXIS2_HASH_KEY_STRING);
+
+ wsdl_ref->ops->get_location = axis2_hash_get(methods,
+ "get_location", AXIS2_HASH_KEY_STRING);
+ if(!wsdl_ref->ops->get_location && wsdl_ref_impl_l)
+ wsdl_ref->ops->get_location =
+ wsdl_ref_impl_l->wsdl_ref.ops->get_location;
+
+ wsdl_ref->ops->set_location = axis2_hash_get(methods,
+ "set_location", AXIS2_HASH_KEY_STRING);
+ if(!wsdl_ref->ops->set_location && wsdl_ref_impl_l)
+ wsdl_ref->ops->set_location =
+ wsdl_ref_impl_l->wsdl_ref.ops->set_location;
+
+ wsdl_ref->ops->get_desc_element = axis2_hash_get(methods,
+ "get_desc_element", AXIS2_HASH_KEY_STRING);
+ if(!wsdl_ref->ops->get_desc_element && wsdl_ref_impl_l)
+ wsdl_ref->ops->get_desc_element =
+ wsdl_ref_impl_l->wsdl_ref.ops->get_desc_element;
+
+ wsdl_ref->ops->set_desc_element = axis2_hash_get(methods,
+ "set_desc_element", AXIS2_HASH_KEY_STRING);
+ if(!wsdl_ref->ops->set_desc_element && wsdl_ref_impl_l)
+ wsdl_ref->ops->set_desc_element =
+ wsdl_ref_impl_l->wsdl_ref.ops->set_desc_element;
+
+ wsdl_ref->ops->add_documentation_element = axis2_hash_get(methods,
+ "add_documentation_element", AXIS2_HASH_KEY_STRING);
+ if(!wsdl_ref->ops->add_documentation_element && wsdl_ref_impl_l)
+ wsdl_ref->ops->add_documentation_element =
+ wsdl_ref_impl_l->wsdl_ref.ops->add_documentation_element;
+
+ wsdl_ref->ops->get_documentation_elements = axis2_hash_get(methods,
+ "get_documentation_elements", AXIS2_HASH_KEY_STRING);
+ if(!wsdl_ref->ops->get_documentation_elements && wsdl_ref_impl_l)
+ wsdl_ref->ops->get_documentation_elements =
+ wsdl_ref_impl_l->wsdl_ref.ops->get_documentation_elements;
+
+
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_url_t *AXIS2_CALL
+axis2_woden_wsdl_ref_get_location(
+ void *wsdl_ref,
+ axis2_env_t **env)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl = NULL;
+ axis2_char_t *str_namespc = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_WSDL_REF_SUPER_OBJS(wsdl_ref, env);
+ wsdl_ref_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_WSDL_REF", AXIS2_HASH_KEY_STRING));
+
+ return wsdl_ref_impl->f_location;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_wsdl_ref_set_location(
+ void *wsdl_ref,
+ axis2_env_t **env,
+ axis2_url_t *loc_uri)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl = NULL;
+ axis2_char_t *str_namespc;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_WSDL_REF_SUPER_OBJS(wsdl_ref, env);
+ wsdl_ref_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_WSDL_REF", AXIS2_HASH_KEY_STRING));
+
+ if(wsdl_ref_impl->f_location)
+ {
+ /* TODO */
+ }
+ wsdl_ref_impl->f_location = loc_uri;
+ return AXIS2_SUCCESS;
+}
+
+void *AXIS2_CALL
+axis2_woden_wsdl_ref_get_desc_element(
+ void *wsdl_ref,
+ axis2_env_t **env)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl = NULL;
+ axis2_char_t *str_namespc = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_WSDL_REF_SUPER_OBJS(wsdl_ref, env);
+ wsdl_ref_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_WSDL_REF", AXIS2_HASH_KEY_STRING));
+
+ return wsdl_ref_impl->f_desc_element;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_wsdl_ref_set_desc_element(
+ void *wsdl_ref,
+ axis2_env_t **env,
+ void *desc)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl = NULL;
+ axis2_char_t *str_namespc;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_WSDL_REF_SUPER_OBJS(wsdl_ref, env);
+ wsdl_ref_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_WSDL_REF", AXIS2_HASH_KEY_STRING));
+
+ if(wsdl_ref_impl->f_desc_element)
+ {
+ /* TODO */
+ }
+ wsdl_ref_impl->f_desc_element = desc;
+ return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_woden_wsdl_ref_add_documentation_element(
+ void *wsdl_ref,
+ axis2_env_t **env,
+ void *doc_el)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl = NULL;
+ axis2_char_t *str_namespc;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_WSDL_REF_SUPER_OBJS(wsdl_ref, env);
+ wsdl_ref_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_WSDL_REF", AXIS2_HASH_KEY_STRING));
+
+ if(!wsdl_ref_impl->f_documentation_elements)
+ {
+ f_documentation_elements = axis2_array_list_create(env, 0);
+ if(!f_documentation_elements)
+ {
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+ }
+ return AXIS2_ARRAY_LIST_ADD(wsdl_ref_impl->f_documentation_elements, env,
+ doc_el);
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_woden_wsdl_ref_get_documentation_elements(
+ void *wsdl_ref,
+ axis2_env_t **env)
+{
+ axis2_woden_wsdl_ref_impl_t *wsdl_ref_impl = NULL;
+ axis2_char_t *str_namespc = NULL;
+ axis2_hash_t *super = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ super = AXIS2_WODEN_WSDL_REF_SUPER_OBJS(wsdl_ref, env);
+ wsdl_ref_impl = INTF_TO_IMPL(axis2_hash_get(super,
+ "AXIS2_WODEN_WSDL_REF", AXIS2_HASH_KEY_STRING));
+
+ return wsdl_ref_impl->f_documentation_elements;
+}
+
Modified: webservices/axis2/trunk/c/woden/src/wsdl20/xml/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/woden/src/wsdl20/xml/Makefile.am?rev=409367&r1=409366&r2=409367&view=diff
==============================================================================
--- webservices/axis2/trunk/c/woden/src/wsdl20/xml/Makefile.am (original)
+++ webservices/axis2/trunk/c/woden/src/wsdl20/xml/Makefile.am Thu May 25 04:54:25 2006
@@ -22,7 +22,8 @@
import_element.c \
fault_ref_element.c \
desc_element.c \
- endpoint_element.c
+ endpoint_element.c \
+ svc_element.c
INCLUDES = -I$(top_builddir)/include \
@AXIOMINC@ \
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org