axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r354268 - in /webservices/axis2/trunk/c: include/axis2_endpoint_ref.h modules/core/addr/src/Makefile.am modules/core/addr/src/endpoint_ref.c
Date Tue, 06 Dec 2005 03:23:00 GMT
Author: samisa
Date: Mon Dec  5 19:22:42 2005
New Revision: 354268

URL: http://svn.apache.org/viewcvs?rev=354268&view=rev
Log:
Added initial compiling version of endpoint reference

Added:
    webservices/axis2/trunk/c/include/axis2_endpoint_ref.h
    webservices/axis2/trunk/c/modules/core/addr/src/endpoint_ref.c
Modified:
    webservices/axis2/trunk/c/modules/core/addr/src/Makefile.am

Added: webservices/axis2/trunk/c/include/axis2_endpoint_ref.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_endpoint_ref.h?rev=354268&view=auto
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_endpoint_ref.h (added)
+++ webservices/axis2/trunk/c/include/axis2_endpoint_ref.h Mon Dec  5 19:22:42 2005
@@ -0,0 +1,159 @@
+/*
+ * 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_ENDPOINT_REF_H
+#define AXIS2_ENDPOINT_REF_H
+
+/**
+ * @file axis2_endpoint_ref.h
+ * @brief Axis2 core addressing interface
+ */
+
+#include <axis2_defines.h>
+#include <axis2_env.h>
+#include <axis2.h>
+#include <axis2_any_content_type.h>
+#include <axis2_svc_name.h>
+#include <axis2_om_node.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    struct axis2_endpoint_ref;
+    struct axis2_endpoint_ref_ops;
+    
+/**
+ * @defgroup axis2_endpoint_ref Addressing relates to header
+ * @ingroup axis2_addr
+ * @{
+ */
+
+/**
+ *   \brief Dispatcher operations struct
+ */
+ AXIS2_DECLARE_DATA typedef struct axis2_endpoint_ref_ops
+    { 
+        /**
+         * Method get_address
+         */
+        axis2_char_t* (AXIS2_CALL *get_address)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env);
+        /**
+         * Method set_address
+         *
+         * @param address
+         */
+        axis2_status_t (AXIS2_CALL *set_address)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env, axis2_char_t *address);
+        /**
+         * Method get_interface_qname
+         */
+        axis2_qname_t* (AXIS2_CALL *get_interface_qname)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env);
+        /**
+         * Method set_interface_qname
+         *
+         * @param interface_qname
+         */
+        axis2_status_t (AXIS2_CALL *set_interface_qname)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env, axis2_qname_t *interface_qname);
+        /**
+         * Method get_ref_properties
+         */
+        axis2_any_content_type_t* (AXIS2_CALL *get_ref_properties)(struct axis2_endpoint_ref
*endpoint_ref, 
+                                                       axis2_env_t **env);
+        /**
+         * Method set_ref_properties
+         *
+         * @param ref_properties
+         */
+        axis2_status_t (AXIS2_CALL *set_ref_properties)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env, axis2_any_content_type_t
*ref_properties);
+        /**
+         * Method get_ref_params
+         */
+        axis2_any_content_type_t* (AXIS2_CALL *get_ref_params)(struct axis2_endpoint_ref
*endpoint_ref, 
+                                                       axis2_env_t **env);
+        /**
+         * Method get_svc_name
+         */
+        axis2_svc_name_t* (AXIS2_CALL *get_svc_name)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env);
+        /**
+         * Method set_svc_name
+         *
+         * @param svc_name
+         */
+        axis2_status_t (AXIS2_CALL *set_svc_name)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env, axis2_svc_name_t
*svc_name);
+        axis2_om_node_t* (AXIS2_CALL *get_policies)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env);
+        axis2_status_t (AXIS2_CALL *set_policies)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env, axis2_om_node_t
*policies);
+        axis2_any_content_type_t* (AXIS2_CALL *get_metadata)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env);
+        axis2_status_t (AXIS2_CALL *set_metadata)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env, axis2_any_content_type_t
*metadata);
+        axis2_status_t (AXIS2_CALL *add_ref_param)(struct axis2_endpoint_ref *endpoint_ref,

+                                                       axis2_env_t **env, axis2_qname_t *qname,
axis2_char_t *value);
+        axis2_status_t (AXIS2_CALL *free)(struct axis2_endpoint_ref *endpoint_ref, 
+                                                       axis2_env_t **env);
+    } axis2_endpoint_ref_ops_t;
+	
+   /** 
+    * \brief Dispatcher struct
+    */
+    typedef struct axis2_endpoint_ref
+    {
+        /** Dispatcher related operations */
+        axis2_endpoint_ref_ops_t *ops;
+    } axis2_endpoint_ref_t;
+
+
+/**
+ * creates endpoint_ref struct
+ *
+ * @param value
+ * @param relationship_type
+ */
+AXIS2_DECLARE(axis2_endpoint_ref_t*) axis2_endpoint_ref_create(axis2_env_t **env, axis2_char_t
*address);
+    
+#define AXIS2_ENDPOINT_REF_GET_ADDRESS(endpoint_ref, env) ((endpoint_ref)->ops->get_address(endpoint_ref,
env))
+#define AXIS2_ENDPOINT_REF_SET_ADDRESS(endpoint_ref, env, address) ((endpoint_ref)->ops->set_address(endpoint_ref,
env, address))
+#define AXIS2_ENDPOINT_REF_GET_INTERFACE_NAME(endpoint_ref, env) ((endpoint_ref)->ops->get_interface_qname(endpoint_ref,
env))
+#define AXIS2_ENDPOINT_REF_SET_INTERFACE_NAME(endpoint_ref, env, interface_qname) ((endpoint_ref)->ops->set_interface_qname(endpoint_ref,
env, interface_qname))
+#define AXIS2_ENDPOINT_REF_GET_REF_PROPERTIES(endpoint_ref, env) ((endpoint_ref)->ops->get_ref_properties(endpoint_ref,
env))
+#define AXIS2_ENDPOINT_REF_SET_REF_PROPERTIES(endpoint_ref, env, ref_properties) ((endpoint_ref)->ops->set_ref_properties(endpoint_ref,
env, ref_properties))
+#define AXIS2_ENDPOINT_REF_GET_REF_PARAMS(endpoint_ref, env) ((endpoint_ref)->ops->get_ref_params(endpoint_ref,
env))
+#define AXIS2_ENDPOINT_REF_GET_SVC_NAME(endpoint_ref, env) ((endpoint_ref)->ops->get_svc_name(endpoint_ref,
env))
+#define AXIS2_ENDPOINT_REF_SET_SVC_NAME(endpoint_ref, env, svc_name) ((endpoint_ref)->ops->set_svc_name(endpoint_ref,
env, svc_name))
+#define AXIS2_ENDPOINT_REF_GET_POLICIES(endpoint_ref, env) ((endpoint_ref)->ops->get_policies(endpoint_ref,
env))
+#define AXIS2_ENDPOINT_REF_SET_POLICIES(endpoint_ref, env, policies) ((endpoint_ref)->ops->set_policies(endpoint_ref,
env, policies))
+#define AXIS2_ENDPOINT_REF_GET_METADATA(endpoint_ref, env) ((endpoint_ref)->ops->get_metadata(endpoint_ref,
env))
+#define AXIS2_ENDPOINT_REF_SET_METADATA(endpoint_ref, env, metadata) ((endpoint_ref)->ops->set_metadata(endpoint_ref,
env, metadata))
+#define AXIS2_ENDPOINT_REF_ADD_REF_PARAM(endpoint_ref, env, qname, value) ((endpoint_ref)->ops->add_ref_param(endpoint_ref,
env, qname, value))
+#define AXIS2_ENDPOINT_REF_FREE(endpoint_ref, env) ((endpoint_ref)->ops->free(endpoint_ref,
env))
+
+
+/** @} */
+    
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* AXIS2_ENDPOINT_REF_H */

Modified: webservices/axis2/trunk/c/modules/core/addr/src/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/addr/src/Makefile.am?rev=354268&r1=354267&r2=354268&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/addr/src/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/core/addr/src/Makefile.am Mon Dec  5 19:22:42 2005
@@ -1,6 +1,6 @@
 lib_LTLIBRARIES = libaxis2_addr.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libaxis2_addr_la_SOURCES = relates_to.c svc_name.c any_content_type.c
+libaxis2_addr_la_SOURCES = relates_to.c svc_name.c any_content_type.c endpoint_ref.c
 
 libaxis2_addr_la_LIBADD = $(LDFLAGS)
 INCLUDES = -I${CUTEST_HOME}/include \

Added: webservices/axis2/trunk/c/modules/core/addr/src/endpoint_ref.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/addr/src/endpoint_ref.c?rev=354268&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/core/addr/src/endpoint_ref.c (added)
+++ webservices/axis2/trunk/c/modules/core/addr/src/endpoint_ref.c Mon Dec  5 19:22:42 2005
@@ -0,0 +1,321 @@
+/*
+ * 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.
+ */
+ 
+ /** <wsa:RelatesTo RelationshipType="..."?>xs:anyURI</wsa:RelatesTo> */
+
+#include <axis2_endpoint_ref.h>
+#include <axis2_string.h>
+
+typedef struct axis2_endpoint_ref_impl
+{
+    axis2_endpoint_ref_t endpoint_ref;    
+    /** endpoint address */
+    axis2_char_t *address;
+    /** interface qname */
+    axis2_qname_t *interface_qname;
+    /** reference properties */
+    axis2_any_content_type_t *ref_properties;
+    /** reference parameters */
+    axis2_any_content_type_t *ref_params;
+    /** service name */
+    axis2_svc_name_t *svc_name;
+    /** policies represented as an OM node */
+    axis2_om_node_t *policies;
+    /** meta data */
+    axis2_any_content_type_t *metadata;
+} axis2_endpoint_ref_impl_t;
+
+/** Interface to implementation conversion macro */
+#define AXIS2_INTF_TO_IMPL(endpoint_ref) ((axis2_endpoint_ref_impl_t *)endpoint_ref)
+
+axis2_char_t* AXIS2_CALL axis2_endpoint_ref_get_address(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env);
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_address(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env, axis2_char_t *address);
+axis2_qname_t* AXIS2_CALL axis2_endpoint_ref_get_interface_qname(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env);
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_interface_qname(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env, axis2_qname_t *interface_qname);
+axis2_any_content_type_t* AXIS2_CALL axis2_endpoint_ref_get_ref_properties(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env);
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_ref_properties(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env, axis2_any_content_type_t
*ref_properties);
+axis2_any_content_type_t* AXIS2_CALL axis2_endpoint_ref_get_ref_params(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env);
+axis2_svc_name_t* AXIS2_CALL axis2_endpoint_ref_get_svc_name(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env);
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_svc_name(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env, axis2_svc_name_t *svc_name);
+axis2_om_node_t* AXIS2_CALL axis2_endpoint_ref_get_policies(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env);
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_policies(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env, axis2_om_node_t *policies);
+axis2_any_content_type_t* AXIS2_CALL axis2_endpoint_ref_get_metadata(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env);
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_metadata(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env, axis2_any_content_type_t
*metadata);
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_add_ref_param(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env, axis2_qname_t *qname, axis2_char_t
*value);
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_free (struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env);
+
+
+axis2_endpoint_ref_t* AXIS2_CALL axis2_endpoint_ref_create(axis2_env_t **env, axis2_char_t
*address) 
+{
+    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    
+    endpoint_ref_impl = AXIS2_MALLOC( (*env)->allocator, sizeof(axis2_endpoint_ref_impl_t)
);
+    if (!endpoint_ref_impl)
+    { 
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;        
+    }
+
+    endpoint_ref_impl->endpoint_ref.ops = NULL;
+    endpoint_ref_impl->address = NULL;
+    endpoint_ref_impl->interface_qname = NULL;
+    endpoint_ref_impl->ref_properties = NULL;
+    endpoint_ref_impl->ref_params = NULL;
+    endpoint_ref_impl->svc_name = NULL;
+    endpoint_ref_impl->policies = NULL;
+    endpoint_ref_impl->metadata = NULL;
+    
+    if (address)
+    {
+        endpoint_ref_impl->address = AXIS2_STRDUP(address, env);
+        if (!(endpoint_ref_impl->address))
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            axis2_endpoint_ref_free(&(endpoint_ref_impl->endpoint_ref), env);
+            return NULL;        
+        }
+    }
+    
+    /* initialize operations */
+    endpoint_ref_impl->endpoint_ref.ops  = AXIS2_MALLOC( (*env)->allocator, sizeof(axis2_endpoint_ref_ops_t)
);
+    if (!endpoint_ref_impl->endpoint_ref.ops)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        axis2_endpoint_ref_free(&(endpoint_ref_impl->endpoint_ref), env);
+        return NULL;        
+    }
+
+    endpoint_ref_impl->endpoint_ref.ops->get_address = axis2_endpoint_ref_get_address;
+    endpoint_ref_impl->endpoint_ref.ops->set_address = axis2_endpoint_ref_set_address;
+    endpoint_ref_impl->endpoint_ref.ops->get_interface_qname = axis2_endpoint_ref_get_interface_qname;
+    endpoint_ref_impl->endpoint_ref.ops->set_interface_qname = axis2_endpoint_ref_set_interface_qname;
+    endpoint_ref_impl->endpoint_ref.ops->get_ref_properties = axis2_endpoint_ref_get_ref_properties;
+    endpoint_ref_impl->endpoint_ref.ops->set_ref_properties = axis2_endpoint_ref_set_ref_properties;
+    endpoint_ref_impl->endpoint_ref.ops->get_ref_params = axis2_endpoint_ref_get_ref_params;
+    endpoint_ref_impl->endpoint_ref.ops->get_svc_name = axis2_endpoint_ref_get_svc_name;
+    endpoint_ref_impl->endpoint_ref.ops->set_svc_name = axis2_endpoint_ref_set_svc_name;
+    endpoint_ref_impl->endpoint_ref.ops->get_policies = axis2_endpoint_ref_get_policies;
+    endpoint_ref_impl->endpoint_ref.ops->set_policies = axis2_endpoint_ref_set_policies;
+    endpoint_ref_impl->endpoint_ref.ops->get_metadata = axis2_endpoint_ref_get_metadata;
+    endpoint_ref_impl->endpoint_ref.ops->set_metadata = axis2_endpoint_ref_set_metadata;
+    endpoint_ref_impl->endpoint_ref.ops->add_ref_param = axis2_endpoint_ref_add_ref_param;
+    endpoint_ref_impl->endpoint_ref.ops->free = axis2_endpoint_ref_free;
+
+    return &(endpoint_ref_impl->endpoint_ref);
+}
+
+
+/**
+ * Method get_address
+ */
+axis2_char_t* AXIS2_CALL axis2_endpoint_ref_get_address(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, NULL);
+    return AXIS2_INTF_TO_IMPL(endpoint_ref)->address;
+}
+
+/**
+ * Method set_address
+ *
+ * @param address
+ */
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_address(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env, axis2_char_t *address)

+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(endpoint_ref)->address = address;
+    return AXIS2_SUCCESS;
+}
+
+/**
+ * Method get_interface_qname
+ */
+axis2_qname_t* AXIS2_CALL axis2_endpoint_ref_get_interface_qname(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, NULL);
+    return AXIS2_INTF_TO_IMPL(endpoint_ref)->interface_qname;
+}
+
+/**
+ * Method set_interface_qname
+ *
+ * @param interface_qname
+ */
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_interface_qname(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env, axis2_qname_t *interface_qname)

+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(endpoint_ref)->interface_qname = interface_qname;
+    return AXIS2_SUCCESS;
+}
+
+/**
+ * Method get_ref_properties
+ */
+axis2_any_content_type_t* AXIS2_CALL axis2_endpoint_ref_get_ref_properties(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, NULL);
+    return AXIS2_INTF_TO_IMPL(endpoint_ref)->ref_properties;
+}
+
+/**
+ * Method set_ref_properties
+ *
+ * @param ref_properties
+ */
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_ref_properties(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env, axis2_any_content_type_t
*ref_properties) 
+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(endpoint_ref)->ref_properties = ref_properties;
+    return AXIS2_SUCCESS;    
+}
+
+/**
+ * Method get_ref_params
+ */
+axis2_any_content_type_t* AXIS2_CALL axis2_endpoint_ref_get_ref_params(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, NULL);
+    return AXIS2_INTF_TO_IMPL(endpoint_ref)->ref_params;
+}
+
+
+/**
+ * Method get_svc_name
+ */
+axis2_svc_name_t* AXIS2_CALL axis2_endpoint_ref_get_svc_name(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, NULL);
+    return AXIS2_INTF_TO_IMPL(endpoint_ref)->svc_name;
+}
+
+/**
+ * Method set_svc_name
+ *
+ * @param svc_name
+ */
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_svc_name(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env, axis2_svc_name_t *svc_name)

+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(endpoint_ref)->svc_name = svc_name;
+    return AXIS2_SUCCESS;
+}
+
+axis2_om_node_t* AXIS2_CALL axis2_endpoint_ref_get_policies(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, NULL);
+    return AXIS2_INTF_TO_IMPL(endpoint_ref)->policies;
+}
+
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_policies(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env, axis2_om_node_t *policies)

+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(endpoint_ref)->policies = policies;
+    return AXIS2_SUCCESS;
+}
+
+axis2_any_content_type_t* AXIS2_CALL axis2_endpoint_ref_get_metadata(struct axis2_endpoint_ref
*endpoint_ref, 
+                                               axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, NULL);
+    return AXIS2_INTF_TO_IMPL(endpoint_ref)->metadata;
+}
+
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_set_metadata(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env, axis2_any_content_type_t
*metadata) 
+{
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(endpoint_ref)->metadata = metadata;
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_add_ref_param(struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env, axis2_qname_t *qname, axis2_char_t
*value) 
+{
+    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, AXIS2_FAILURE);
+    
+    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
+    
+    if (!(endpoint_ref_impl->ref_params))
+    {
+        endpoint_ref_impl->ref_params = axis2_any_content_type_create(env);
+        if (!(endpoint_ref_impl->ref_params ))
+            return AXIS2_FAILURE;
+    }
+    
+    return AXIS2_ANY_CONTENT_TYPE_ADD_VALUE(endpoint_ref_impl->ref_params, env, qname,
value);
+}
+
+axis2_status_t AXIS2_CALL axis2_endpoint_ref_free (struct axis2_endpoint_ref *endpoint_ref,

+                                               axis2_env_t **env)
+{
+    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(endpoint_ref, env, AXIS2_FAILURE);
+    
+    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
+    
+    if (endpoint_ref_impl->endpoint_ref.ops)
+    {
+        AXIS2_FREE((*env)->allocator, endpoint_ref_impl->endpoint_ref.ops);
+        endpoint_ref_impl->endpoint_ref.ops = NULL;
+    }
+    
+    if (endpoint_ref_impl->address)
+    {
+        AXIS2_FREE((*env)->allocator, endpoint_ref_impl->address);
+        endpoint_ref_impl->address = NULL;
+    }    
+    
+    if (endpoint_ref_impl->ref_params)
+    {
+        AXIS2_ANY_CONTENT_TYPE_FREE(endpoint_ref_impl->ref_params, env);
+        endpoint_ref_impl->ref_params = NULL;
+    }    
+
+    AXIS2_FREE((*env)->allocator, endpoint_ref_impl);
+    endpoint_ref_impl = NULL;
+    
+    return AXIS2_SUCCESS;
+}



Mime
View raw message