You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2007/01/22 06:57:42 UTC

svn commit: r498537 [2/3] - in /webservices/axis2/trunk/c: axiom/src/om/ axiom/src/parser/guththila/ include/ modules/core/addr/ modules/core/clientapi/ modules/core/context/ modules/core/deployment/ modules/core/engine/ modules/core/transport/http/ mo...

Modified: webservices/axis2/trunk/c/include/axis2_relates_to.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_relates_to.h?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_relates_to.h (original)
+++ webservices/axis2/trunk/c/include/axis2_relates_to.h Sun Jan 21 21:57:41 2007
@@ -46,123 +46,94 @@
 
     /** Type name for struct axis2_relates_to */
     typedef struct axis2_relates_to axis2_relates_to_t;
-    /** Type name for struct axis2_relates_to_ops */
-    typedef struct axis2_relates_to_ops axis2_relates_to_ops_t;
-
 
     /**
-     * relates to ops struct.
+     * creates relates to struct.
+     * @param env pointer to environment struct
+     * @param value value string 
+     * @param relationship_type relationship type string 
      */
-    struct axis2_relates_to_ops
-    {
-        /**
-         * Gets value. The value field represents the URI that corresponds to the 
-         * related message's message ID
-         * @param relates_to pointer to relates to struct
-         * @param env pointer to environment struct
-         * @return value string
-         */
-        const axis2_char_t *(AXIS2_CALL *
-                get_value)(
-                    const axis2_relates_to_t *relates_to,
-                    const axis2_env_t *env);
-
-        /**
-         * Sets value. The value field represents the URI that corresponds to the 
-         * related message's message ID
-         * @param relates_to pointer to relates to struct
-         * @param env pointer to environment struct
-         * @param value value string 
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                set_value)(
-                    struct axis2_relates_to *relates_to,
-                    const axis2_env_t *env,
-                    const axis2_char_t *value);
-
-        /**
-         * Gets relationship type. 
-         * @param relates_to pointer to relates to struct
-         * @param env pointer to environment struct
-         * @return relationship type string 
-         */
-        const axis2_char_t *(AXIS2_CALL *
-                get_relationship_type)(
-                    const axis2_relates_to_t *relates_to,
-                    const axis2_env_t *env);
-
-        /**
-         * Sets relationship type. 
-         * @param relates_to pointer to relates to struct
-         * @param env pointer to environment struct
-         * @param relationship_type relationship type string
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                set_relationship_type)(
-                    struct axis2_relates_to *relates_to,
-                    const axis2_env_t *env,
-                    const axis2_char_t *relationship_type);
-
-        /**
-         * Frees relates to struct.                     
-         * @param relates_to pointer to relates to struct
-         * @param env pointer to environment struct
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                free)(
-                    struct axis2_relates_to *relates_to,
-                    const axis2_env_t *env);
-    };
-
-    /**
-     * relates to struct.
-     */
-    struct axis2_relates_to
-    {
-        /** relates to ops */
-        axis2_relates_to_ops_t *ops;
-    };
+    AXIS2_EXTERN axis2_relates_to_t *AXIS2_CALL
+    axis2_relates_to_create(const axis2_env_t *env,
+        const axis2_char_t *value,
+        const axis2_char_t *relationship_type);
 
+    /**
+     * Gets value. The value field represents the URI that corresponds to the 
+     * related message's message ID
+     * @param relates_to pointer to relates to struct
+     * @param env pointer to environment struct
+     * @return value string
+     */
+    AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+    axis2_relates_to_get_value(
+        const axis2_relates_to_t *relates_to,
+        const axis2_env_t *env);
 
     /**
-     * creates relates to struct.
+     * Sets value. The value field represents the URI that corresponds to the 
+     * related message's message ID
+     * @param relates_to pointer to relates to struct
      * @param env pointer to environment struct
      * @param value value string 
-     * @param relationship_type relationship type string 
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
-    AXIS2_EXTERN axis2_relates_to_t *AXIS2_CALL
-    axis2_relates_to_create(
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_relates_to_set_value(struct axis2_relates_to *relates_to,
+        const axis2_env_t *env,
+        const axis2_char_t *value);
+
+    /**
+     * Gets relationship type. 
+     * @param relates_to pointer to relates to struct
+     * @param env pointer to environment struct
+     * @return relationship type string 
+     */
+    AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+    axis2_relates_to_get_relationship_type(const axis2_relates_to_t *relates_to,
+        const axis2_env_t *env);
+
+    /**
+     * Sets relationship type. 
+     * @param relates_to pointer to relates to struct
+     * @param env pointer to environment struct
+     * @param relationship_type relationship type string
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_relates_to_set_relationship_type(struct axis2_relates_to *relates_to,
         const axis2_env_t *env,
-        const axis2_char_t *value,
         const axis2_char_t *relationship_type);
 
-/** Gets value.
-    @sa axis2_relates_to_ops#get_value */
+    /**
+     * Frees relates to struct.                     
+     * @param relates_to pointer to relates to struct
+     * @param env pointer to environment struct
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_relates_to_free(struct axis2_relates_to *relates_to,
+        const axis2_env_t *env);
+
+/** Gets value. */
 #define AXIS2_RELATES_TO_GET_VALUE(relates_to, env) \
-      ((relates_to)->ops->get_value(relates_to, env))
+      axis2_relates_to_get_value(relates_to, env)
 
-/** Sets value.
-    @sa axis2_relates_to_ops#set_value */
+/** Sets value. */
 #define AXIS2_RELATES_TO_SET_VALUE(relates_to, env, vlaue) \
-      ((relates_to)->ops->set_value(relates_to, env, vlaue))
+      axis2_relates_to_set_value(relates_to, env, vlaue)
 
-/** Gets relationship type.
-    @sa axis2_relates_to_ops#get_relationship */
+/** Gets relationship type. */
 #define AXIS2_RELATES_TO_GET_RELATIONSHIP_TYPE(relates_to, env) \
-      ((relates_to)->ops->get_relationship_type(relates_to, env))
+      axis2_relates_to_get_relationship_type(relates_to, env)
 
-/** Sets relationship type.
-    @sa axis2_relates_to_ops#set_relationship */
+/** Sets relationship type. */
 #define AXIS2_RELATES_TO_SET_RELATIONSHIP_TYPE(relates_to, env, relationship_type) \
-      ((relates_to)->ops->set_relationship_type(relates_to, env, relationship_type))
+      axis2_relates_to_set_relationship_type(relates_to, env, relationship_type)
 
-/** Frees relates to struct.
-    @sa axis2_relates_to_ops#free */
+/** Frees relates to struct. */
 #define AXIS2_RELATES_TO_FREE(relates_to, env) \
-      ((relates_to)->ops->free(relates_to, env))
+      axis2_relates_to_free(relates_to, env)
 
 /** @} */
 

Modified: webservices/axis2/trunk/c/include/axis2_svc_name.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_svc_name.h?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc_name.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc_name.h Sun Jan 21 21:57:41 2007
@@ -45,92 +45,6 @@
 
     /** Type name for struct axis2_svc_name */
     typedef struct axis2_svc_name axis2_svc_name_t;
-    /** Type name for struct axis2_svc_name_ops */
-    typedef struct axis2_svc_name_ops axis2_svc_name_ops_t;
-
-
-    /**
-     * service name ops struct.
-     */
-    struct axis2_svc_name_ops
-    {
-        /**
-         * Gets QName. QName identifies the WSDL service element that contains 
-         * the definition of the endpoint being conveyed.
-         * @param svc_name pointer to service name struct
-         * @param env pointer to environment struct
-         * @return pointer to QName struct, returns a reference, not a cloned 
-         * copy
-         */
-        const axis2_qname_t *(AXIS2_CALL *
-                get_qname)(
-                    const axis2_svc_name_t *svc_name,
-                    const axis2_env_t *env);
-
-        /**
-         * Sets QName. QName identifies the WSDL service element that contains 
-         * the definition of the endpoint being conveyed.
-         * @param svc_name pointer to service name struct
-         * @param env pointer to environment struct
-         * @param qname pointer to QName, service name creates a clone of QName
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                set_qname)(
-                    struct axis2_svc_name *svc_name,
-                    const axis2_env_t *env,
-                    const axis2_qname_t *qname);
-
-        /**
-         * Gets endpoint name. Endpoint name is a non-qualified name that 
-         * identifies the specific port in the service that corresponds to 
-         * the endpoint.
-         * @param svc_name pointer to service name struct
-         * @param env pointer to environment struct
-         * @return endpoint name string
-         */
-        const axis2_char_t *(AXIS2_CALL *
-                get_endpoint_name)(
-                    const axis2_svc_name_t *svc_name,
-                    const axis2_env_t *env);
-
-        /**
-         * Sets endpoint name. Endpoint name is a non-qualified name that 
-         * identifies the specific port in the service that corresponds to 
-         * the endpoint.
-         * @param svc_name pointer to service name struct
-         * @param env pointer to environment struct
-         * @param endpoint_name endpoint name string
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                set_endpoint_name)(
-                    struct axis2_svc_name *svc_name,
-                    const axis2_env_t *env,
-                    const axis2_char_t *endpoint_name);
-
-        /**
-         * Frees service name struct.
-         * @param svc_name pointer to service name struct
-         * @param env pointer to environment struct
-         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
-         */
-        axis2_status_t (AXIS2_CALL *
-                free)(
-                    struct axis2_svc_name *svc_name,
-                    const axis2_env_t *env);
-
-    };
-
-    /**
-     * service name struct.
-     */
-    struct axis2_svc_name
-    {
-        /** service name related ops */
-        axis2_svc_name_ops_t *ops;
-    };
-
 
     /**
      * Creates a service name struct with given QName and endpoint name. 
@@ -145,30 +59,86 @@
         const axis2_qname_t *qname,
         const axis2_char_t *endpoint_name) ;
 
-/** Gets qualified name.
-    @sa axis2_svc_name_ops#get_qname */
+    /**
+     * Gets QName. QName identifies the WSDL service element that contains 
+     * the definition of the endpoint being conveyed.
+     * @param svc_name pointer to service name struct
+     * @param env pointer to environment struct
+     * @return pointer to QName struct, returns a reference, not a cloned 
+     * copy
+     */
+    AXIS2_EXTERN const axis2_qname_t *AXIS2_CALL
+    axis2_svc_name_get_qname(const axis2_svc_name_t *svc_name,
+        const axis2_env_t *env);
+
+    /**
+     * Sets QName. QName identifies the WSDL service element that contains 
+     * the definition of the endpoint being conveyed.
+     * @param svc_name pointer to service name struct
+     * @param env pointer to environment struct
+     * @param qname pointer to QName, service name creates a clone of QName
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_svc_name_set_qname(struct axis2_svc_name *svc_name,
+        const axis2_env_t *env,
+        const axis2_qname_t *qname);
+
+    /**
+     * Gets endpoint name. Endpoint name is a non-qualified name that 
+     * identifies the specific port in the service that corresponds to 
+     * the endpoint.
+     * @param svc_name pointer to service name struct
+     * @param env pointer to environment struct
+     * @return endpoint name string
+     */
+    AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+    axis2_svc_name_get_endpoint_name(const axis2_svc_name_t *svc_name,
+        const axis2_env_t *env);
+
+    /**
+     * Sets endpoint name. Endpoint name is a non-qualified name that 
+     * identifies the specific port in the service that corresponds to 
+     * the endpoint.
+     * @param svc_name pointer to service name struct
+     * @param env pointer to environment struct
+     * @param endpoint_name endpoint name string
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_svc_name_set_endpoint_name(struct axis2_svc_name *svc_name,
+        const axis2_env_t *env,
+        const axis2_char_t *endpoint_name);
+
+    /**
+     * Frees service name struct.
+     * @param svc_name pointer to service name struct
+     * @param env pointer to environment struct
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_svc_name_free(struct axis2_svc_name *svc_name,
+        const axis2_env_t *env);
+
+/** Gets qualified name. */
 #define AXIS2_SVC_NAME_GET_QNAME(svc_name, env) \
-      ((svc_name)->ops->get_qname(svc_name, env))
+      axis2_svc_name_get_qname(svc_name, env)
 
-/** Sets Qname.
-    @sa axis2_svc_name_ops#set_qname */
+/** Sets Qname. */
 #define AXIS2_SVC_NAME_SET_QNAME(svc_name, env, qname) \
-      ((svc_name)->ops->set_qname(svc_name, env, qname))
+      axis2_svc_name_set_qname(svc_name, env, qname)
 
-/** Gets endpoint name.
-    @sa axis2_svc_name_ops#get_endpoint_name */
+/** Gets endpoint name. */
 #define AXIS2_SVC_NAME_GET_ENDPOINT_NAME(svc_name, env) \
-      ((svc_name)->ops->get_endpoint_name(svc_name, env))
+      axis2_svc_name_get_endpoint_name(svc_name, env)
 
-/** Sets endpoint name.
-    @sa axis2_svc_name_ops#set_endpoint_name */
+/** Sets endpoint name. */
 #define AXIS2_SVC_NAME_SET_ENDPOINT_NAME(svc_name, env, endpoint_name) \
-      ((svc_name)->ops->set_endpoint_name(svc_name, env, endpoint_name))
+      axis2_svc_name_set_endpoint_name(svc_name, env, endpoint_name)
 
-/** Frees service name.
-    @sa axis2_svc_name_ops#free */
+/** Frees service name. */
 #define AXIS2_SVC_NAME_FREE(svc_name, env) \
-      ((svc_name)->ops->free(svc_name, env))
+      axis2_svc_name_free(svc_name, env)
 
 /** @} */
 

Modified: webservices/axis2/trunk/c/modules/core/addr/any_content_type.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/addr/any_content_type.c?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/modules/core/addr/any_content_type.c (original)
+++ webservices/axis2/trunk/c/modules/core/addr/any_content_type.c Sun Jan 21 21:57:41 2007
@@ -18,88 +18,40 @@
 #include <axis2_any_content_type.h>
 #include <axis2_string.h>
 
-typedef struct axis2_any_content_type_impl
+struct axis2_any_content_type
 {
-    axis2_any_content_type_t any_content_type;
     /** map of values in the any content type  */
     axis2_hash_t *value_map;
-}
-axis2_any_content_type_impl_t;
-
-#define AXIS2_INTF_TO_IMPL(any_content_type) \
-        ((axis2_any_content_type_impl_t *)any_content_type)
-
-axis2_status_t AXIS2_CALL
-axis2_any_content_type_add_value(
-    axis2_any_content_type_t *any_content_type,
-    const axis2_env_t *env,
-    const axis2_qname_t *qname,
-    const axis2_char_t *value);
-
-const axis2_char_t *AXIS2_CALL
-axis2_any_content_type_get_value(
-    const axis2_any_content_type_t *any_content_type,
-    const axis2_env_t *env,
-    const axis2_qname_t *qname);
-
-axis2_hash_t *AXIS2_CALL
-axis2_any_content_type_get_value_map(
-    const axis2_any_content_type_t *any_content_type,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_any_content_type_free(
-    axis2_any_content_type_t *any_content_type,
-    const axis2_env_t *env);
+};
 
 AXIS2_EXTERN axis2_any_content_type_t *AXIS2_CALL
 axis2_any_content_type_create(
     const axis2_env_t *env)
 {
-    axis2_any_content_type_impl_t *any_content_type_impl = NULL;
+    axis2_any_content_type_t *any_content_type = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    any_content_type_impl = AXIS2_MALLOC(env->allocator,
-            sizeof(axis2_any_content_type_impl_t));
-    if (!any_content_type_impl)
+    any_content_type = AXIS2_MALLOC(env->allocator,
+            sizeof(axis2_any_content_type_t));
+    if (!any_content_type)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    any_content_type_impl->any_content_type.ops = NULL;
-    any_content_type_impl->value_map = NULL;
+    any_content_type->value_map = NULL;
 
-    any_content_type_impl->value_map  = axis2_hash_make(env);
+    any_content_type->value_map  = axis2_hash_make(env);
 
-    if (!(any_content_type_impl->value_map))
+    if (!(any_content_type->value_map))
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_any_content_type_free(&(any_content_type_impl->any_content_type), env);
+        axis2_any_content_type_free(any_content_type, env);
         return NULL;
     }
 
-    /* initialize ops */
-    any_content_type_impl->any_content_type.ops  = AXIS2_MALLOC(env->allocator,
-            sizeof(axis2_any_content_type_ops_t));
-    if (!any_content_type_impl->any_content_type.ops)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_any_content_type_free(&(any_content_type_impl->any_content_type), env);
-        return NULL;
-    }
-
-    any_content_type_impl->any_content_type.ops->add_value =
-        axis2_any_content_type_add_value;
-    any_content_type_impl->any_content_type.ops->get_value =
-        axis2_any_content_type_get_value;
-    any_content_type_impl->any_content_type.ops->get_value_map =
-        axis2_any_content_type_get_value_map;
-    any_content_type_impl->any_content_type.ops->free =
-        axis2_any_content_type_free;
-
-    return &(any_content_type_impl->any_content_type);
+    return any_content_type;
 }
 
 axis2_status_t AXIS2_CALL
@@ -109,18 +61,14 @@
     const axis2_qname_t *qname,
     const axis2_char_t *value)
 {
-    axis2_any_content_type_impl_t *any_content_type_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    any_content_type_impl = AXIS2_INTF_TO_IMPL(any_content_type);
-
-    if (any_content_type_impl->value_map)
+    if (any_content_type->value_map)
     {
         axis2_char_t *name = NULL;
 
         name = AXIS2_QNAME_TO_STRING((axis2_qname_t *)qname, env);
-        axis2_hash_set(any_content_type_impl->value_map, name,
+        axis2_hash_set(any_content_type->value_map, name,
                 AXIS2_HASH_KEY_STRING, value);
     }
     return AXIS2_SUCCESS;
@@ -132,18 +80,14 @@
     const axis2_env_t *env,
     const axis2_qname_t *qname)
 {
-    axis2_any_content_type_impl_t *any_content_type_impl = NULL;
-
     AXIS2_ENV_CHECK(env, NULL);
 
-    any_content_type_impl = AXIS2_INTF_TO_IMPL(any_content_type);
-
-    if (any_content_type_impl->value_map)
+    if (any_content_type->value_map)
     {
         axis2_char_t *name = NULL;
 
         name = AXIS2_QNAME_TO_STRING((axis2_qname_t *)qname, env);
-        return axis2_hash_get(any_content_type_impl->value_map, name,
+        return axis2_hash_get(any_content_type->value_map, name,
                 AXIS2_HASH_KEY_STRING);
     }
     return NULL;
@@ -155,7 +99,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(any_content_type)->value_map;
+    return any_content_type->value_map;
 }
 
 axis2_status_t AXIS2_CALL
@@ -163,26 +107,16 @@
     axis2_any_content_type_t *any_content_type,
     const axis2_env_t *env)
 {
-    axis2_any_content_type_impl_t *any_content_type_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    any_content_type_impl = AXIS2_INTF_TO_IMPL(any_content_type);
-
-    if (any_content_type_impl->any_content_type.ops)
-    {
-        AXIS2_FREE(env->allocator, any_content_type_impl->any_content_type.ops);
-        any_content_type_impl->any_content_type.ops = NULL;
-    }
-
-    if (any_content_type_impl->value_map)
+    if (any_content_type->value_map)
     {
-        axis2_hash_free(any_content_type_impl->value_map, env);
-        any_content_type_impl->value_map = NULL;
+        axis2_hash_free(any_content_type->value_map, env);
+        any_content_type->value_map = NULL;
     }
 
-    AXIS2_FREE(env->allocator, any_content_type_impl);
-    any_content_type_impl = NULL;
+    AXIS2_FREE(env->allocator, any_content_type);
+    any_content_type = NULL;
 
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/core/addr/endpoint_ref.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/addr/endpoint_ref.c?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/modules/core/addr/endpoint_ref.c (original)
+++ webservices/axis2/trunk/c/modules/core/addr/endpoint_ref.c Sun Jan 21 21:57:41 2007
@@ -19,9 +19,8 @@
 #include <axis2_string.h>
 #include <axis2_array_list.h>
 
-typedef struct axis2_endpoint_ref_impl
+struct axis2_endpoint_ref
 {
-    axis2_endpoint_ref_t endpoint_ref;
     /** endpoint address */
     axis2_char_t *address;
     /** interface qname */
@@ -38,208 +37,46 @@
     axis2_array_list_t *extension_list;
     /** service name */
     axis2_svc_name_t *svc_name;
-}
-axis2_endpoint_ref_impl_t;
-
-/** Interface to implementation conversion macro */
-#define AXIS2_INTF_TO_IMPL(endpoint_ref) ((axis2_endpoint_ref_impl_t *)endpoint_ref)
-
-
-
-const axis2_char_t *AXIS2_CALL
-axis2_endpoint_ref_get_address(
-    const axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_endpoint_ref_set_address(
-    axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env,
-    const axis2_char_t *address);
-
-const axis2_qname_t *AXIS2_CALL
-axis2_endpoint_ref_get_interface_qname(
-    const axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_endpoint_ref_set_interface_qname(
-    axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env,
-    const axis2_qname_t *interface_qname);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_endpoint_ref_get_ref_param_list(
-    const axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_endpoint_ref_get_metadata_list(
-    const axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_endpoint_ref_get_ref_attribute_list(
-    const axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_endpoint_ref_get_metadata_attribute_list(
-    const axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_endpoint_ref_get_extension_list(
-    const axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_endpoint_ref_add_ref_param(
-    axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env,
-    axiom_node_t *ref_param_node);
-
-axis2_status_t AXIS2_CALL
-axis2_endpoint_ref_add_metadata(
-    axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env,
-    axiom_node_t *meta_data_node);
-
-axis2_status_t AXIS2_CALL
-axis2_endpoint_ref_add_ref_attribute(
-    axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env,
-    axiom_attribute_t *attr);
-
-axis2_status_t AXIS2_CALL
-axis2_endpoint_ref_add_metadata_attribute(
-    axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env,
-    axiom_attribute_t *attr);
-
-axis2_status_t AXIS2_CALL
-axis2_endpoint_ref_add_extension(
-    axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env,
-    axiom_node_t *extension_node);
-
-axis2_svc_name_t *AXIS2_CALL
-axis2_endpoint_ref_get_svc_name(
-    const axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_endpoint_ref_set_svc_name(
-    axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env,
-    axis2_svc_name_t *svc_name);
-
-axis2_status_t AXIS2_CALL
-axis2_endpoint_ref_free(
-    axis2_endpoint_ref_t *endpoint_ref,
-    const axis2_env_t *env);
+};
 
 axis2_endpoint_ref_t *AXIS2_CALL
 axis2_endpoint_ref_create(
     const axis2_env_t *env,
     const axis2_char_t *address)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
+    axis2_endpoint_ref_t *endpoint_ref = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    endpoint_ref_impl = AXIS2_MALLOC(env->allocator,
-            sizeof(axis2_endpoint_ref_impl_t));
-    if (!endpoint_ref_impl)
+    endpoint_ref = AXIS2_MALLOC(env->allocator,
+            sizeof(axis2_endpoint_ref_t));
+    if (!endpoint_ref)
     {
         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_param_list = NULL;
-    endpoint_ref_impl->metadata_list = NULL;
-    endpoint_ref_impl->ref_attribute_list = NULL;
-    endpoint_ref_impl->meta_attribute_list = NULL;
-    endpoint_ref_impl->extension_list = NULL;
-    endpoint_ref_impl->svc_name = NULL;
+    endpoint_ref->address = NULL;
+    endpoint_ref->interface_qname = NULL;
+    endpoint_ref->ref_param_list = NULL;
+    endpoint_ref->metadata_list = NULL;
+    endpoint_ref->ref_attribute_list = NULL;
+    endpoint_ref->meta_attribute_list = NULL;
+    endpoint_ref->extension_list = NULL;
+    endpoint_ref->svc_name = NULL;
 
     if (address)
     {
-        endpoint_ref_impl->address = AXIS2_STRDUP(address, env);
-        if (!(endpoint_ref_impl->address))
+        endpoint_ref->address = AXIS2_STRDUP(address, env);
+        if (!(endpoint_ref->address))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-            axis2_endpoint_ref_free(&(endpoint_ref_impl->endpoint_ref), env);
+            axis2_endpoint_ref_free(endpoint_ref, env);
             return NULL;
         }
     }
 
-    /* initialize ops */
-    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_attribute_list =
-        axis2_endpoint_ref_get_ref_attribute_list;
-
-    endpoint_ref_impl->endpoint_ref.ops->get_metadata_attribute_list =
-        axis2_endpoint_ref_get_metadata_attribute_list;
-
-    endpoint_ref_impl->endpoint_ref.ops->get_extension_list =
-        axis2_endpoint_ref_get_extension_list;
-
-    endpoint_ref_impl->endpoint_ref.ops->add_ref_attribute =
-        axis2_endpoint_ref_add_ref_attribute;
-
-    endpoint_ref_impl->endpoint_ref.ops->add_metadata_attribute =
-        axis2_endpoint_ref_add_metadata_attribute;
-
-    endpoint_ref_impl->endpoint_ref.ops->add_extension =
-        axis2_endpoint_ref_add_extension;
-
-    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_ref_param_list =
-        axis2_endpoint_ref_get_ref_param_list;
-
-    endpoint_ref_impl->endpoint_ref.ops->get_metadata_list =
-        axis2_endpoint_ref_get_metadata_list;
-
-    endpoint_ref_impl->endpoint_ref.ops->add_ref_param =
-        axis2_endpoint_ref_add_ref_param;
-
-    endpoint_ref_impl->endpoint_ref.ops->add_metadata =
-        axis2_endpoint_ref_add_metadata;
-
-    endpoint_ref_impl->endpoint_ref.ops->free =
-        axis2_endpoint_ref_free;
-
-
-    return &(endpoint_ref_impl->endpoint_ref);
+    return endpoint_ref;
 }
 
 
@@ -249,7 +86,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(endpoint_ref)->address;
+    return endpoint_ref->address;
 }
 
 axis2_status_t AXIS2_CALL
@@ -259,13 +96,13 @@
     const axis2_char_t *address)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    if (AXIS2_INTF_TO_IMPL(endpoint_ref)->address)
+    if (endpoint_ref->address)
     {
-        AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(endpoint_ref)->address);
-        AXIS2_INTF_TO_IMPL(endpoint_ref)->address = NULL;
+        AXIS2_FREE(env->allocator, endpoint_ref->address);
+        endpoint_ref->address = NULL;
     }
 
-    AXIS2_INTF_TO_IMPL(endpoint_ref)->address = AXIS2_STRDUP(address, env);
+    endpoint_ref->address = AXIS2_STRDUP(address, env);
     return AXIS2_SUCCESS;
 }
 
@@ -275,7 +112,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(endpoint_ref)->interface_qname;
+    return endpoint_ref->interface_qname;
 }
 
 axis2_status_t AXIS2_CALL
@@ -285,7 +122,7 @@
     const axis2_qname_t *interface_qname)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(endpoint_ref)->interface_qname =
+    endpoint_ref->interface_qname =
         AXIS2_QNAME_CLONE((axis2_qname_t *)interface_qname, env);
     return AXIS2_SUCCESS;
 }
@@ -296,7 +133,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(endpoint_ref)->svc_name;
+    return endpoint_ref->svc_name;
 }
 
 axis2_status_t AXIS2_CALL
@@ -306,7 +143,7 @@
     axis2_svc_name_t *svc_name)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(endpoint_ref)->svc_name = svc_name;
+    endpoint_ref->svc_name = svc_name;
     return AXIS2_SUCCESS;
 }
 
@@ -328,57 +165,47 @@
     axis2_endpoint_ref_t *endpoint_ref,
     const axis2_env_t *env)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
-
     AXIS2_ENV_CHECK(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)
+    if (endpoint_ref->address)
     {
-        AXIS2_FREE(env->allocator, endpoint_ref_impl->address);
-        endpoint_ref_impl->address = NULL;
+        AXIS2_FREE(env->allocator, endpoint_ref->address);
+        endpoint_ref->address = NULL;
     }
 
-    if (endpoint_ref_impl->ref_param_list)
+    if (endpoint_ref->ref_param_list)
     {
-        AXIS2_ARRAY_LIST_FREE(endpoint_ref_impl->ref_param_list, env);
-        endpoint_ref_impl->ref_param_list = NULL;
+        AXIS2_ARRAY_LIST_FREE(endpoint_ref->ref_param_list, env);
+        endpoint_ref->ref_param_list = NULL;
     }
 
-    if (endpoint_ref_impl->metadata_list)
+    if (endpoint_ref->metadata_list)
     {
-        AXIS2_ARRAY_LIST_FREE(endpoint_ref_impl->metadata_list, env);
-        endpoint_ref_impl->metadata_list = NULL;
+        AXIS2_ARRAY_LIST_FREE(endpoint_ref->metadata_list, env);
+        endpoint_ref->metadata_list = NULL;
     }
 
-    if (endpoint_ref_impl->ref_attribute_list)
+    if (endpoint_ref->ref_attribute_list)
     {
-        AXIS2_ARRAY_LIST_FREE(endpoint_ref_impl->ref_attribute_list, env);
-        endpoint_ref_impl->ref_attribute_list = NULL;
+        AXIS2_ARRAY_LIST_FREE(endpoint_ref->ref_attribute_list, env);
+        endpoint_ref->ref_attribute_list = NULL;
     }
 
-    if (endpoint_ref_impl->meta_attribute_list)
+    if (endpoint_ref->meta_attribute_list)
     {
-        AXIS2_ARRAY_LIST_FREE(endpoint_ref_impl->meta_attribute_list, env);
-        endpoint_ref_impl->meta_attribute_list = NULL;
+        AXIS2_ARRAY_LIST_FREE(endpoint_ref->meta_attribute_list, env);
+        endpoint_ref->meta_attribute_list = NULL;
     }
 
-    if (endpoint_ref_impl->extension_list)
+    if (endpoint_ref->extension_list)
     {
-        AXIS2_ARRAY_LIST_FREE(endpoint_ref_impl->extension_list, env);
-        endpoint_ref_impl->extension_list = NULL;
+        AXIS2_ARRAY_LIST_FREE(endpoint_ref->extension_list, env);
+        endpoint_ref->extension_list = NULL;
     }
 
 
-    AXIS2_FREE(env->allocator, endpoint_ref_impl);
-    endpoint_ref_impl = NULL;
+    AXIS2_FREE(env->allocator, endpoint_ref);
+    endpoint_ref = NULL;
 
     return AXIS2_SUCCESS;
 }
@@ -388,13 +215,9 @@
     const axis2_endpoint_ref_t *endpoint_ref,
     const axis2_env_t *env)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
-
     AXIS2_ENV_CHECK(env, NULL);
 
-    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
-
-    return endpoint_ref_impl->ref_param_list;
+    return endpoint_ref->ref_param_list;
 }
 
 axis2_array_list_t *AXIS2_CALL
@@ -402,13 +225,9 @@
     const axis2_endpoint_ref_t *endpoint_ref,
     const axis2_env_t *env)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
-
     AXIS2_ENV_CHECK(env, NULL);
 
-    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
-
-    return endpoint_ref_impl->metadata_list;
+    return endpoint_ref->metadata_list;
 }
 
 
@@ -418,25 +237,21 @@
     const axis2_env_t *env,
     axiom_node_t *ref_param_node)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
-    
-    if (!(endpoint_ref_impl->ref_param_list))
+    if (!(endpoint_ref->ref_param_list))
     {
-        endpoint_ref_impl->ref_param_list = axis2_array_list_create(env, 0);
-        if (!(endpoint_ref_impl->ref_param_list))
+        endpoint_ref->ref_param_list = axis2_array_list_create(env, 0);
+        if (!(endpoint_ref->ref_param_list))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return AXIS2_FAILURE;
         }
     }
 
-    if (endpoint_ref_impl->ref_param_list && ref_param_node)
+    if (endpoint_ref->ref_param_list && ref_param_node)
     {
-        return AXIS2_ARRAY_LIST_ADD(endpoint_ref_impl->ref_param_list, env, ref_param_node);
+        return AXIS2_ARRAY_LIST_ADD(endpoint_ref->ref_param_list, env, ref_param_node);
     }
 
     return AXIS2_FAILURE;
@@ -448,25 +263,21 @@
     const axis2_env_t *env,
     axiom_node_t *meta_data_node)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
-   
-    if (!(endpoint_ref_impl->metadata_list))
+    if (!(endpoint_ref->metadata_list))
     {
-        endpoint_ref_impl->metadata_list = axis2_array_list_create(env, 0);
-        if (!(endpoint_ref_impl->metadata_list))
+        endpoint_ref->metadata_list = axis2_array_list_create(env, 0);
+        if (!(endpoint_ref->metadata_list))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return AXIS2_FAILURE;
         }
     }
 
-    if (endpoint_ref_impl->metadata_list && meta_data_node)
+    if (endpoint_ref->metadata_list && meta_data_node)
     {
-        return AXIS2_ARRAY_LIST_ADD(endpoint_ref_impl->metadata_list, env, meta_data_node);
+        return AXIS2_ARRAY_LIST_ADD(endpoint_ref->metadata_list, env, meta_data_node);
     }
 
     return AXIS2_FAILURE;
@@ -478,13 +289,9 @@
     const axis2_endpoint_ref_t *endpoint_ref,
     const axis2_env_t *env)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
-
     AXIS2_ENV_CHECK(env, NULL);
 
-    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
-
-    return endpoint_ref_impl->ref_attribute_list;
+    return endpoint_ref->ref_attribute_list;
 }
 
 axis2_array_list_t *AXIS2_CALL
@@ -492,13 +299,9 @@
     const axis2_endpoint_ref_t *endpoint_ref,
     const axis2_env_t *env)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
-
     AXIS2_ENV_CHECK(env, NULL);
 
-    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
-
-    return endpoint_ref_impl->meta_attribute_list;
+    return endpoint_ref->meta_attribute_list;
 }
 
 axis2_array_list_t *AXIS2_CALL
@@ -506,13 +309,9 @@
     const axis2_endpoint_ref_t *endpoint_ref,
     const axis2_env_t *env)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
-
     AXIS2_ENV_CHECK(env, NULL);
 
-    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
-
-    return endpoint_ref_impl->extension_list;
+    return endpoint_ref->extension_list;
 }
 
 axis2_status_t AXIS2_CALL
@@ -521,25 +320,21 @@
     const axis2_env_t *env,
     axiom_attribute_t *attr)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
-
-    if (!(endpoint_ref_impl->ref_attribute_list))
+    if (!(endpoint_ref->ref_attribute_list))
     {
-        endpoint_ref_impl->ref_attribute_list = axis2_array_list_create(env, 0);
-        if (!(endpoint_ref_impl->ref_attribute_list))
+        endpoint_ref->ref_attribute_list = axis2_array_list_create(env, 0);
+        if (!(endpoint_ref->ref_attribute_list))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return AXIS2_FAILURE;
         }
     }
 
-    if (endpoint_ref_impl->ref_attribute_list && attr)
+    if (endpoint_ref->ref_attribute_list && attr)
     {
-        return AXIS2_ARRAY_LIST_ADD(endpoint_ref_impl->ref_attribute_list, env, attr);
+        return AXIS2_ARRAY_LIST_ADD(endpoint_ref->ref_attribute_list, env, attr);
     }
 
     return AXIS2_FAILURE;
@@ -551,25 +346,21 @@
     const axis2_env_t *env,
     axiom_attribute_t *attr)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
-    
-    if (!(endpoint_ref_impl->meta_attribute_list))
+    if (!(endpoint_ref->meta_attribute_list))
     {
-        endpoint_ref_impl->meta_attribute_list = axis2_array_list_create(env, 0);
-        if (!(endpoint_ref_impl->meta_attribute_list))
+        endpoint_ref->meta_attribute_list = axis2_array_list_create(env, 0);
+        if (!(endpoint_ref->meta_attribute_list))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return AXIS2_FAILURE;
         }
     }
 
-    if (endpoint_ref_impl->meta_attribute_list && attr)
+    if (endpoint_ref->meta_attribute_list && attr)
     {
-        return AXIS2_ARRAY_LIST_ADD(endpoint_ref_impl->meta_attribute_list, env, attr);
+        return AXIS2_ARRAY_LIST_ADD(endpoint_ref->meta_attribute_list, env, attr);
     }
 
     return AXIS2_FAILURE;
@@ -581,25 +372,21 @@
     const axis2_env_t *env,
     axiom_node_t *extension_node)
 {
-    axis2_endpoint_ref_impl_t *endpoint_ref_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    endpoint_ref_impl = AXIS2_INTF_TO_IMPL(endpoint_ref);
-
-    if (!(endpoint_ref_impl->extension_list))
+    if (!(endpoint_ref->extension_list))
     {
-        endpoint_ref_impl->extension_list = axis2_array_list_create(env, 0);
-        if (!(endpoint_ref_impl->extension_list))
+        endpoint_ref->extension_list = axis2_array_list_create(env, 0);
+        if (!(endpoint_ref->extension_list))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return AXIS2_FAILURE;
         }
     }
 
-    if (endpoint_ref_impl->extension_list && extension_node)
+    if (endpoint_ref->extension_list && extension_node)
     {
-        return AXIS2_ARRAY_LIST_ADD(endpoint_ref_impl->extension_list, env, extension_node);
+        return AXIS2_ARRAY_LIST_ADD(endpoint_ref->extension_list, env, extension_node);
     }
 
     return AXIS2_FAILURE;

Modified: webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c (original)
+++ webservices/axis2/trunk/c/modules/core/addr/msg_info_headers.c Sun Jan 21 21:57:41 2007
@@ -19,9 +19,8 @@
 #include <axis2_msg_info_headers.h>
 #include <axis2_string.h>
 
-typedef struct axis2_msg_info_headers_impl
+struct axis2_msg_info_headers
 {
-    axis2_msg_info_headers_t msg_info_headers;
     /** The address of the intended receiver of the message. This is mandatory */
     axis2_endpoint_ref_t *to;
     /** Reference of the endpoint where the message originated from */
@@ -48,149 +47,7 @@
     axis2_char_t *message_id;
     /** reference parameters */
     axis2_array_list_t *ref_params;
-}
-axis2_msg_info_headers_impl_t;
-
-/** Interface to implementation conversion macro */
-#define AXIS2_INTF_TO_IMPL(msg_info_headers) ((axis2_msg_info_headers_impl_t *)msg_info_headers)
-
-
-axis2_endpoint_ref_t *AXIS2_CALL
-axis2_msg_info_headers_get_to(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_set_to(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    axis2_endpoint_ref_t *to);
-
-axis2_endpoint_ref_t *AXIS2_CALL
-axis2_msg_info_headers_get_from(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_set_from(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    axis2_endpoint_ref_t *from);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_set_reply_to_none(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    axis2_bool_t none);
-
-axis2_bool_t AXIS2_CALL
-axis2_msg_info_headers_get_reply_to_none(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_set_reply_to_anonymous(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    axis2_bool_t anonymous);
-
-axis2_bool_t AXIS2_CALL
-axis2_msg_info_headers_get_reply_to_anonymous(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-axis2_endpoint_ref_t *AXIS2_CALL
-axis2_msg_info_headers_get_reply_to(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_set_reply_to(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    axis2_endpoint_ref_t *reply_to);
-
-axis2_endpoint_ref_t *AXIS2_CALL
-axis2_msg_info_headers_get_fault_to(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_set_fault_to(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    axis2_endpoint_ref_t *fault_to);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_set_fault_to_none(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    axis2_bool_t none);
-
-axis2_bool_t AXIS2_CALL
-axis2_msg_info_headers_get_fault_to_none(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_set_fault_to_anonymous(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    axis2_bool_t anonymous);
-
-axis2_bool_t AXIS2_CALL
-axis2_msg_info_headers_get_fault_to_anonymous(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-const axis2_char_t *AXIS2_CALL
-axis2_msg_info_headers_get_action(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_set_action(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    const axis2_char_t *action);
-
-const axis2_char_t *AXIS2_CALL
-axis2_msg_info_headers_get_message_id(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_set_message_id(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    const axis2_char_t *message_id);
-
-axis2_relates_to_t *AXIS2_CALL
-axis2_msg_info_headers_get_relates_to(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_set_relates_to(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    axis2_relates_to_t *relates_to);
-
-axis2_array_list_t *AXIS2_CALL
-axis2_msg_info_headers_get_all_ref_params(
-    const axis2_msg_info_headers_t *msg_info_headers,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_add_ref_param(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env,
-    axiom_node_t *ref_param);
-
-axis2_status_t AXIS2_CALL
-axis2_msg_info_headers_free(
-    struct axis2_msg_info_headers *msg_info_headers,
-    const axis2_env_t *env);
+};
 
 axis2_msg_info_headers_t *AXIS2_CALL
 axis2_msg_info_headers_create(
@@ -198,136 +55,49 @@
     axis2_endpoint_ref_t *to,
     const axis2_char_t *action)
 {
-    axis2_msg_info_headers_impl_t *msg_info_headers_impl = NULL;
+    axis2_msg_info_headers_t *msg_info_headers = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    msg_info_headers_impl =
-        AXIS2_MALLOC(env->allocator, sizeof(axis2_msg_info_headers_impl_t));
+    msg_info_headers =
+        AXIS2_MALLOC(env->allocator, sizeof(axis2_msg_info_headers_t));
 
-    if (!msg_info_headers_impl)
+    if (!msg_info_headers)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    msg_info_headers_impl->msg_info_headers.ops = NULL;
-    msg_info_headers_impl->to = NULL;
-    msg_info_headers_impl->from = NULL;
-    msg_info_headers_impl->relates_to = NULL;
-    msg_info_headers_impl->reply_to_none = AXIS2_FALSE;
-    msg_info_headers_impl->reply_to_anonymous = AXIS2_FALSE;
-    msg_info_headers_impl->reply_to = NULL;
-    msg_info_headers_impl->fault_to_none = AXIS2_FALSE;
-    msg_info_headers_impl->fault_to_anonymous = AXIS2_FALSE;
-    msg_info_headers_impl->fault_to = NULL;
-    msg_info_headers_impl->action = NULL;
-    msg_info_headers_impl->message_id = NULL;
-    msg_info_headers_impl->ref_params = NULL;
+    msg_info_headers->to = NULL;
+    msg_info_headers->from = NULL;
+    msg_info_headers->relates_to = NULL;
+    msg_info_headers->reply_to_none = AXIS2_FALSE;
+    msg_info_headers->reply_to_anonymous = AXIS2_FALSE;
+    msg_info_headers->reply_to = NULL;
+    msg_info_headers->fault_to_none = AXIS2_FALSE;
+    msg_info_headers->fault_to_anonymous = AXIS2_FALSE;
+    msg_info_headers->fault_to = NULL;
+    msg_info_headers->action = NULL;
+    msg_info_headers->message_id = NULL;
+    msg_info_headers->ref_params = NULL;
 
     if (to)
     {
-        msg_info_headers_impl->to = to;
+        msg_info_headers->to = to;
     }
 
     if (action)
     {
-        msg_info_headers_impl->action = AXIS2_STRDUP(action, env);
-        if (!(msg_info_headers_impl->action))
+        msg_info_headers->action = AXIS2_STRDUP(action, env);
+        if (!(msg_info_headers->action))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-            axis2_msg_info_headers_free(&(msg_info_headers_impl->msg_info_headers), env);
+            axis2_msg_info_headers_free(msg_info_headers, env);
             return NULL;
         }
     }
 
-    /* initialize ops */
-    msg_info_headers_impl->msg_info_headers.ops  =
-        AXIS2_MALLOC(env->allocator, sizeof(axis2_msg_info_headers_ops_t));
-
-    if (!msg_info_headers_impl->msg_info_headers.ops)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_msg_info_headers_free(&(msg_info_headers_impl->msg_info_headers), env);
-        return NULL;
-    }
-
-    msg_info_headers_impl->msg_info_headers.ops->get_to =
-        axis2_msg_info_headers_get_to;
-
-    msg_info_headers_impl->msg_info_headers.ops->set_to =
-        axis2_msg_info_headers_set_to;
-
-    msg_info_headers_impl->msg_info_headers.ops->get_from =
-        axis2_msg_info_headers_get_from;
-
-    msg_info_headers_impl->msg_info_headers.ops->set_from =
-        axis2_msg_info_headers_set_from;
-
-    msg_info_headers_impl->msg_info_headers.ops->set_reply_to_none =
-        axis2_msg_info_headers_set_reply_to_none;
-
-    msg_info_headers_impl->msg_info_headers.ops->get_reply_to_none =
-        axis2_msg_info_headers_get_reply_to_none;
-
-    msg_info_headers_impl->msg_info_headers.ops->set_reply_to_anonymous =
-        axis2_msg_info_headers_set_reply_to_anonymous;
-
-    msg_info_headers_impl->msg_info_headers.ops->get_reply_to_anonymous =
-        axis2_msg_info_headers_get_reply_to_anonymous;
-
-    msg_info_headers_impl->msg_info_headers.ops->get_reply_to =
-        axis2_msg_info_headers_get_reply_to;
-
-    msg_info_headers_impl->msg_info_headers.ops->set_reply_to =
-        axis2_msg_info_headers_set_reply_to;
-
-    msg_info_headers_impl->msg_info_headers.ops->set_fault_to_none =
-        axis2_msg_info_headers_set_fault_to_none;
-
-    msg_info_headers_impl->msg_info_headers.ops->get_fault_to_none =
-        axis2_msg_info_headers_get_fault_to_none;
-
-    msg_info_headers_impl->msg_info_headers.ops->set_fault_to_anonymous =
-        axis2_msg_info_headers_set_fault_to_anonymous;
-
-    msg_info_headers_impl->msg_info_headers.ops->get_fault_to_anonymous =
-        axis2_msg_info_headers_get_fault_to_anonymous;
-
-    msg_info_headers_impl->msg_info_headers.ops->get_fault_to =
-        axis2_msg_info_headers_get_fault_to;
-
-    msg_info_headers_impl->msg_info_headers.ops->set_fault_to =
-        axis2_msg_info_headers_set_fault_to;
-
-    msg_info_headers_impl->msg_info_headers.ops->get_action =
-        axis2_msg_info_headers_get_action;
-
-    msg_info_headers_impl->msg_info_headers.ops->set_action =
-        axis2_msg_info_headers_set_action;
-
-    msg_info_headers_impl->msg_info_headers.ops->get_message_id =
-        axis2_msg_info_headers_get_message_id;
-
-    msg_info_headers_impl->msg_info_headers.ops->set_message_id =
-        axis2_msg_info_headers_set_message_id;
-
-    msg_info_headers_impl->msg_info_headers.ops->get_relates_to =
-        axis2_msg_info_headers_get_relates_to;
-
-    msg_info_headers_impl->msg_info_headers.ops->set_relates_to =
-        axis2_msg_info_headers_set_relates_to;
-
-    msg_info_headers_impl->msg_info_headers.ops->get_all_ref_params =
-        axis2_msg_info_headers_get_all_ref_params;
-
-    msg_info_headers_impl->msg_info_headers.ops->add_ref_param =
-        axis2_msg_info_headers_add_ref_param;
-
-    msg_info_headers_impl->msg_info_headers.ops->free =
-        axis2_msg_info_headers_free;
-
-    return &(msg_info_headers_impl->msg_info_headers);
+    return msg_info_headers;
 }
 
 /**
@@ -341,7 +111,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->to;
+    return msg_info_headers->to;
 }
 
 axis2_status_t AXIS2_CALL
@@ -350,20 +120,16 @@
     const axis2_env_t *env,
     axis2_endpoint_ref_t *to)
 {
-    axis2_msg_info_headers_impl_t *msg_info_headers_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    msg_info_headers_impl = AXIS2_INTF_TO_IMPL(msg_info_headers);
-
-    if (msg_info_headers_impl->to && to) /* if the incoming to is NULL,
-                                                                            we consider that to be a reset,
-                                                                            so don't free */
+    if (msg_info_headers->to && to) /* if the incoming to is NULL,
+                                       we consider that to be a reset,
+                                       so don't free */
     {
-        AXIS2_ENDPOINT_REF_FREE(msg_info_headers_impl->to, env);
-        msg_info_headers_impl->to = NULL;
+        AXIS2_ENDPOINT_REF_FREE(msg_info_headers->to, env);
+        msg_info_headers->to = NULL;
     }
-    msg_info_headers_impl->to = to;
+    msg_info_headers->to = to;
     return AXIS2_SUCCESS;
 }
 
@@ -373,7 +139,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->from;
+    return msg_info_headers->from;
 }
 
 axis2_status_t AXIS2_CALL
@@ -383,7 +149,7 @@
     axis2_endpoint_ref_t *from)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(msg_info_headers)->from = from;
+    msg_info_headers->from = from;
     return AXIS2_SUCCESS;
 }
 
@@ -393,7 +159,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->reply_to;
+    return msg_info_headers->reply_to;
 }
 
 axis2_status_t AXIS2_CALL
@@ -403,7 +169,7 @@
     axis2_endpoint_ref_t *reply_to)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(msg_info_headers)->reply_to = reply_to;
+    msg_info_headers->reply_to = reply_to;
     return AXIS2_SUCCESS;
 }
 
@@ -413,7 +179,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->fault_to;
+    return msg_info_headers->fault_to;
 }
 
 axis2_status_t AXIS2_CALL
@@ -423,7 +189,7 @@
     axis2_endpoint_ref_t *fault_to)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(msg_info_headers)->fault_to = fault_to;
+    msg_info_headers->fault_to = fault_to;
     return AXIS2_SUCCESS;
 }
 
@@ -433,7 +199,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->action;
+    return msg_info_headers->action;
 }
 
 axis2_status_t AXIS2_CALL
@@ -443,13 +209,13 @@
     const axis2_char_t *action)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    if (AXIS2_INTF_TO_IMPL(msg_info_headers)->action)
+    if (msg_info_headers->action)
     {
-        AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(msg_info_headers)->action);
-        AXIS2_INTF_TO_IMPL(msg_info_headers)->action = NULL;
+        AXIS2_FREE(env->allocator, msg_info_headers->action);
+        msg_info_headers->action = NULL;
     }
     if (action)
-        AXIS2_INTF_TO_IMPL(msg_info_headers)->action = AXIS2_STRDUP(action, env);
+        msg_info_headers->action = AXIS2_STRDUP(action, env);
     return AXIS2_SUCCESS;
 }
 
@@ -459,7 +225,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->message_id;
+    return msg_info_headers->message_id;
 }
 
 axis2_status_t AXIS2_CALL
@@ -468,22 +234,18 @@
     const axis2_env_t *env,
     const axis2_char_t *message_id)
 {
-    axis2_msg_info_headers_impl_t *msg_info_headers_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    msg_info_headers_impl = AXIS2_INTF_TO_IMPL(msg_info_headers);
-
-    if (msg_info_headers_impl->message_id)
+    if (msg_info_headers->message_id)
     {
-        AXIS2_FREE(env->allocator, msg_info_headers_impl->message_id);
-        msg_info_headers_impl->message_id = NULL;
+        AXIS2_FREE(env->allocator, msg_info_headers->message_id);
+        msg_info_headers->message_id = NULL;
     }
 
     if (message_id)
     {
-        msg_info_headers_impl->message_id = AXIS2_STRDUP(message_id, env);
-        if (!(msg_info_headers_impl->message_id))
+        msg_info_headers->message_id = AXIS2_STRDUP(message_id, env);
+        if (!(msg_info_headers->message_id))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return AXIS2_FAILURE;
@@ -499,7 +261,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->relates_to;
+    return msg_info_headers->relates_to;
 }
 
 axis2_status_t AXIS2_CALL
@@ -509,7 +271,7 @@
     axis2_relates_to_t *relates_to)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(msg_info_headers)->relates_to = relates_to;
+    msg_info_headers->relates_to = relates_to;
     return AXIS2_SUCCESS;
 }
 
@@ -519,7 +281,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->ref_params;
+    return msg_info_headers->ref_params;
 }
 
 axis2_status_t AXIS2_CALL
@@ -528,22 +290,18 @@
     const axis2_env_t *env,
     axiom_node_t *ref_param)
 {
-    axis2_msg_info_headers_impl_t *msg_info_headers_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    msg_info_headers_impl = AXIS2_INTF_TO_IMPL(msg_info_headers);
-
-    if (!(msg_info_headers_impl->ref_params))
+    if (!(msg_info_headers->ref_params))
     {
-        msg_info_headers_impl->ref_params = axis2_array_list_create(env, 10);
-        if (!(msg_info_headers_impl->ref_params))
+        msg_info_headers->ref_params = axis2_array_list_create(env, 10);
+        if (!(msg_info_headers->ref_params))
             return AXIS2_FAILURE;
     }
 
     if (ref_param)
     {
-        return AXIS2_ARRAY_LIST_ADD(msg_info_headers_impl->ref_params, env, ref_param);
+        return AXIS2_ARRAY_LIST_ADD(msg_info_headers->ref_params, env, ref_param);
     }
 
     return AXIS2_SUCCESS;
@@ -554,64 +312,53 @@
     struct axis2_msg_info_headers *msg_info_headers,
     const axis2_env_t *env)
 {
-    axis2_msg_info_headers_impl_t *msg_info_headers_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    msg_info_headers_impl = AXIS2_INTF_TO_IMPL(msg_info_headers);
-
-    if (msg_info_headers_impl->to)
+    if (msg_info_headers->to)
     {
-        AXIS2_ENDPOINT_REF_FREE(msg_info_headers_impl->to, env);
-        msg_info_headers_impl->to = NULL;
+        AXIS2_ENDPOINT_REF_FREE(msg_info_headers->to, env);
+        msg_info_headers->to = NULL;
     }
-    if (msg_info_headers_impl->from)
+    if (msg_info_headers->from)
     {
-        AXIS2_ENDPOINT_REF_FREE(msg_info_headers_impl->from, env);
-        msg_info_headers_impl->from = NULL;
+        AXIS2_ENDPOINT_REF_FREE(msg_info_headers->from, env);
+        msg_info_headers->from = NULL;
     }
-    if (msg_info_headers_impl->reply_to)
+    if (msg_info_headers->reply_to)
     {
-        AXIS2_ENDPOINT_REF_FREE(msg_info_headers_impl->reply_to, env);
-        msg_info_headers_impl->reply_to = NULL;
+        AXIS2_ENDPOINT_REF_FREE(msg_info_headers->reply_to, env);
+        msg_info_headers->reply_to = NULL;
     }
-    if (msg_info_headers_impl->relates_to)
+    if (msg_info_headers->relates_to)
     {
-        AXIS2_ENDPOINT_REF_FREE(msg_info_headers_impl->relates_to, env);
-        msg_info_headers_impl->relates_to = NULL;
+        AXIS2_RELATES_TO_FREE(msg_info_headers->relates_to, env);
+        msg_info_headers->relates_to = NULL;
     }
 
-    if (msg_info_headers_impl->fault_to)
-    {
-        AXIS2_ENDPOINT_REF_FREE(msg_info_headers_impl->fault_to, env);
-        msg_info_headers_impl->fault_to = NULL;
-    }
-
-
-    if (msg_info_headers_impl->msg_info_headers.ops)
+    if (msg_info_headers->fault_to)
     {
-        AXIS2_FREE(env->allocator, msg_info_headers_impl->msg_info_headers.ops);
-        msg_info_headers_impl->msg_info_headers.ops = NULL;
+        AXIS2_ENDPOINT_REF_FREE(msg_info_headers->fault_to, env);
+        msg_info_headers->fault_to = NULL;
     }
 
-    if (msg_info_headers_impl->ref_params)
+    if (msg_info_headers->ref_params)
     {
-        AXIS2_ARRAY_LIST_FREE(msg_info_headers_impl->ref_params, env);
-        msg_info_headers_impl->ref_params = NULL;
+        AXIS2_ARRAY_LIST_FREE(msg_info_headers->ref_params, env);
+        msg_info_headers->ref_params = NULL;
     }
-    if (AXIS2_INTF_TO_IMPL(msg_info_headers)->action)
+    if (msg_info_headers->action)
     {
-        AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(msg_info_headers)->action);
-        AXIS2_INTF_TO_IMPL(msg_info_headers)->action = NULL;
+        AXIS2_FREE(env->allocator, msg_info_headers->action);
+        msg_info_headers->action = NULL;
     }
-    if (msg_info_headers_impl->message_id)
+    if (msg_info_headers->message_id)
     {
-        AXIS2_FREE(env->allocator, msg_info_headers_impl->message_id);
-        msg_info_headers_impl->message_id = NULL;
+        AXIS2_FREE(env->allocator, msg_info_headers->message_id);
+        msg_info_headers->message_id = NULL;
     }
 
-    AXIS2_FREE(env->allocator, msg_info_headers_impl);
-    msg_info_headers_impl = NULL;
+    AXIS2_FREE(env->allocator, msg_info_headers);
+    msg_info_headers = NULL;
 
     return AXIS2_SUCCESS;
 }
@@ -624,7 +371,7 @@
     axis2_bool_t none)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(msg_info_headers)->reply_to_none = none;
+    msg_info_headers->reply_to_none = none;
     return AXIS2_SUCCESS;
 }
 
@@ -634,7 +381,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->reply_to_none;
+    return msg_info_headers->reply_to_none;
 }
 
 axis2_status_t AXIS2_CALL
@@ -644,7 +391,7 @@
     axis2_bool_t anonymous)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(msg_info_headers)->reply_to_anonymous = anonymous;
+    msg_info_headers->reply_to_anonymous = anonymous;
     return AXIS2_SUCCESS;
 }
 
@@ -654,7 +401,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->reply_to_anonymous;
+    return msg_info_headers->reply_to_anonymous;
 }
 
 axis2_status_t AXIS2_CALL
@@ -664,7 +411,7 @@
     axis2_bool_t none)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(msg_info_headers)->fault_to_none = none;
+    msg_info_headers->fault_to_none = none;
     return AXIS2_SUCCESS;
 }
 
@@ -674,7 +421,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->fault_to_none;
+    return msg_info_headers->fault_to_none;
 }
 
 axis2_status_t AXIS2_CALL
@@ -684,7 +431,7 @@
     axis2_bool_t anonymous)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(msg_info_headers)->fault_to_anonymous = anonymous;
+    msg_info_headers->fault_to_anonymous = anonymous;
     return AXIS2_SUCCESS;
 }
 
@@ -694,5 +441,5 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(msg_info_headers)->fault_to_anonymous;
+    return msg_info_headers->fault_to_anonymous;
 }

Modified: webservices/axis2/trunk/c/modules/core/addr/relates_to.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/addr/relates_to.c?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/modules/core/addr/relates_to.c (original)
+++ webservices/axis2/trunk/c/modules/core/addr/relates_to.c Sun Jan 21 21:57:41 2007
@@ -18,46 +18,13 @@
 #include <axis2_relates_to.h>
 #include <axis2_string.h>
 
-typedef struct axis2_relates_to_impl
+struct axis2_relates_to
 {
-    axis2_relates_to_t relates_to;
     /** value string  */
     axis2_char_t *value;
     /** relationship type string */
     axis2_char_t *relationship_type;
-}
-axis2_relates_to_impl_t;
-
-/** Interface to implementation conversion macro */
-#define AXIS2_INTF_TO_IMPL(relates_to) ((axis2_relates_to_impl_t *)relates_to)
-
-
-const axis2_char_t *AXIS2_CALL
-axis2_relates_to_get_value(
-    const axis2_relates_to_t *relates_to,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_relates_to_set_value(
-    struct axis2_relates_to *relates_to,
-    const axis2_env_t *env,
-    const axis2_char_t *value);
-
-const axis2_char_t *AXIS2_CALL
-axis2_relates_to_get_relationship_type(
-    const axis2_relates_to_t *relates_to,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_relates_to_set_relationship_type(
-    struct axis2_relates_to *relates_to,
-    const axis2_env_t *env,
-    const axis2_char_t *relationship_type);
-
-axis2_status_t AXIS2_CALL
-axis2_relates_to_free(
-    struct axis2_relates_to *relates_to,
-    const axis2_env_t *env);
+};
 
 axis2_relates_to_t *AXIS2_CALL
 axis2_relates_to_create(
@@ -65,68 +32,43 @@
     const axis2_char_t *value,
     const axis2_char_t *relationship_type)
 {
-    axis2_relates_to_impl_t *relates_to_impl = NULL;
+    axis2_relates_to_t *relates_to = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    relates_to_impl = AXIS2_MALLOC(env->allocator, sizeof(axis2_relates_to_impl_t));
-    if (!relates_to_impl)
+    relates_to = AXIS2_MALLOC(env->allocator, sizeof(axis2_relates_to_t));
+    if (!relates_to)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    relates_to_impl->relates_to.ops = NULL;
-    relates_to_impl->value = NULL;
-    relates_to_impl->relationship_type = NULL;
+    relates_to->value = NULL;
+    relates_to->relationship_type = NULL;
 
     if (value)
     {
-        relates_to_impl->value = AXIS2_STRDUP(value, env);
-        if (!(relates_to_impl->value))
+        relates_to->value = AXIS2_STRDUP(value, env);
+        if (!(relates_to->value))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-            axis2_relates_to_free(&(relates_to_impl->relates_to), env);
+            axis2_relates_to_free(relates_to, env);
             return NULL;
         }
     }
 
     if (relationship_type)
     {
-        relates_to_impl->relationship_type = AXIS2_STRDUP(relationship_type, env);
-        if (!(relates_to_impl->relationship_type))
+        relates_to->relationship_type = AXIS2_STRDUP(relationship_type, env);
+        if (!(relates_to->relationship_type))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-            axis2_relates_to_free(&(relates_to_impl->relates_to), env);
+            axis2_relates_to_free(relates_to, env);
             return NULL;
         }
     }
 
-    /* initialize ops */
-    relates_to_impl->relates_to.ops  = AXIS2_MALLOC(env->allocator, sizeof(axis2_relates_to_ops_t));
-    if (!relates_to_impl->relates_to.ops)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_relates_to_free(&(relates_to_impl->relates_to), env);
-        return NULL;
-    }
-
-    relates_to_impl->relates_to.ops->get_value =
-        axis2_relates_to_get_value;
-
-    relates_to_impl->relates_to.ops->set_value =
-        axis2_relates_to_set_value;
-
-    relates_to_impl->relates_to.ops->get_relationship_type =
-        axis2_relates_to_get_relationship_type;
-
-    relates_to_impl->relates_to.ops->set_relationship_type =
-        axis2_relates_to_set_relationship_type;
-
-    relates_to_impl->relates_to.ops->free =
-        axis2_relates_to_free;
-
-    return &(relates_to_impl->relates_to);
+    return relates_to;
 }
 
 const axis2_char_t *AXIS2_CALL
@@ -135,7 +77,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(relates_to)->value;
+    return relates_to->value;
 }
 
 axis2_status_t AXIS2_CALL
@@ -144,22 +86,18 @@
     const axis2_env_t *env,
     const axis2_char_t *value)
 {
-    axis2_relates_to_impl_t *relates_to_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    relates_to_impl = AXIS2_INTF_TO_IMPL(relates_to);
-
-    if (relates_to_impl->value)
+    if (relates_to->value)
     {
-        AXIS2_FREE(env->allocator, relates_to_impl->value);
-        relates_to_impl->value = NULL;
+        AXIS2_FREE(env->allocator, relates_to->value);
+        relates_to->value = NULL;
     }
 
     if (value)
     {
-        relates_to_impl->value = (axis2_char_t *)AXIS2_STRDUP(value, env);
-        if (!(relates_to_impl->value))
+        relates_to->value = (axis2_char_t *)AXIS2_STRDUP(value, env);
+        if (!(relates_to->value))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return AXIS2_FAILURE;
@@ -175,7 +113,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(relates_to)->relationship_type;
+    return relates_to->relationship_type;
 }
 
 axis2_status_t AXIS2_CALL
@@ -184,23 +122,19 @@
     const axis2_env_t *env,
     const axis2_char_t *relationship_type)
 {
-    axis2_relates_to_impl_t *relates_to_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    relates_to_impl = AXIS2_INTF_TO_IMPL(relates_to);
-
-    if (relates_to_impl->relationship_type)
+    if (relates_to->relationship_type)
     {
-        AXIS2_FREE(env->allocator, relates_to_impl->relationship_type);
-        relates_to_impl->relationship_type = NULL;
+        AXIS2_FREE(env->allocator, relates_to->relationship_type);
+        relates_to->relationship_type = NULL;
     }
 
     if (relationship_type)
     {
-        relates_to_impl->relationship_type =
+        relates_to->relationship_type =
             (axis2_char_t *)AXIS2_STRDUP(relationship_type, env);
-        if (!(relates_to_impl->relationship_type))
+        if (!(relates_to->relationship_type))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
             return AXIS2_FAILURE;
@@ -215,32 +149,22 @@
     struct axis2_relates_to *relates_to,
     const axis2_env_t *env)
 {
-    axis2_relates_to_impl_t *relates_to_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    relates_to_impl = AXIS2_INTF_TO_IMPL(relates_to);
-
-    if (relates_to_impl->relates_to.ops)
-    {
-        AXIS2_FREE(env->allocator, relates_to_impl->relates_to.ops);
-        relates_to_impl->relates_to.ops = NULL;
-    }
-
-    if (relates_to_impl->value)
+    if (relates_to->value)
     {
-        AXIS2_FREE(env->allocator, relates_to_impl->value);
-        relates_to_impl->value = NULL;
+        AXIS2_FREE(env->allocator, relates_to->value);
+        relates_to->value = NULL;
     }
 
-    if (relates_to_impl->relationship_type)
+    if (relates_to->relationship_type)
     {
-        AXIS2_FREE(env->allocator, relates_to_impl->relationship_type);
-        relates_to_impl->relationship_type = NULL;
+        AXIS2_FREE(env->allocator, relates_to->relationship_type);
+        relates_to->relationship_type = NULL;
     }
 
-    AXIS2_FREE(env->allocator, relates_to_impl);
-    relates_to_impl = NULL;
+    AXIS2_FREE(env->allocator, relates_to);
+    relates_to = NULL;
 
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/core/addr/svc_name.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/addr/svc_name.c?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/modules/core/addr/svc_name.c (original)
+++ webservices/axis2/trunk/c/modules/core/addr/svc_name.c Sun Jan 21 21:57:41 2007
@@ -19,46 +19,13 @@
 #include <axis2_svc_name.h>
 #include <axis2_string.h>
 
-typedef struct axis2_svc_name_impl
+struct axis2_svc_name
 {
-    axis2_svc_name_t svc_name;
     /** service QName */
     axis2_qname_t *qname;
     /** service endpoint name */
     axis2_char_t *endpoint_name;
-}
-axis2_svc_name_impl_t;
-
-/** Interface to implementation conversion macro */
-#define AXIS2_INTF_TO_IMPL(svc_name) ((axis2_svc_name_impl_t *)svc_name)
-
-
-const axis2_qname_t *AXIS2_CALL
-axis2_svc_name_get_qname(
-    const axis2_svc_name_t *svc_name,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_svc_name_set_qname(
-    struct axis2_svc_name *svc_name,
-    const axis2_env_t *env,
-    const axis2_qname_t *qname);
-
-const axis2_char_t *AXIS2_CALL
-axis2_svc_name_get_endpoint_name(
-    const axis2_svc_name_t *svc_name,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_svc_name_set_endpoint_name(
-    struct axis2_svc_name *svc_name,
-    const axis2_env_t *env,
-    const axis2_char_t *endpoint_name);
-
-axis2_status_t AXIS2_CALL
-axis2_svc_name_free(
-    struct axis2_svc_name *svc_name,
-    const axis2_env_t *env);
+};
 
 axis2_svc_name_t *AXIS2_CALL
 axis2_svc_name_create(
@@ -66,61 +33,44 @@
     const axis2_qname_t *qname,
     const axis2_char_t *endpoint_name)
 {
-    axis2_svc_name_impl_t *svc_name_impl = NULL;
+    axis2_svc_name_t *svc_name = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    svc_name_impl =
-        AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_name_impl_t));
-    if (!svc_name_impl)
+    svc_name =
+        AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_name_t));
+    if (!svc_name)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    svc_name_impl->svc_name.ops = NULL;
-    svc_name_impl->qname = NULL;
-    svc_name_impl->endpoint_name = NULL;
+    svc_name->qname = NULL;
+    svc_name->endpoint_name = NULL;
 
     if (qname)
     {
-        svc_name_impl->qname = AXIS2_QNAME_CLONE((axis2_qname_t *)qname, env);
-        if (!(svc_name_impl->qname))
+        svc_name->qname = AXIS2_QNAME_CLONE((axis2_qname_t *)qname, env);
+        if (!(svc_name->qname))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-            axis2_svc_name_free(&(svc_name_impl->svc_name), env);
+            axis2_svc_name_free(svc_name, env);
             return NULL;
         }
     }
 
     if (endpoint_name)
     {
-        svc_name_impl->endpoint_name = AXIS2_STRDUP(endpoint_name, env);
-        if (!(svc_name_impl->endpoint_name))
+        svc_name->endpoint_name = AXIS2_STRDUP(endpoint_name, env);
+        if (!(svc_name->endpoint_name))
         {
             AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-            axis2_svc_name_free(&(svc_name_impl->svc_name), env);
+            axis2_svc_name_free(svc_name, env);
             return NULL;
         }
     }
 
-    /* initialize ops */
-    svc_name_impl->svc_name.ops  =
-        AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_name_ops_t));
-    if (!svc_name_impl->svc_name.ops)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_svc_name_free(&(svc_name_impl->svc_name), env);
-        return NULL;
-    }
-
-    svc_name_impl->svc_name.ops->get_qname = axis2_svc_name_get_qname;
-    svc_name_impl->svc_name.ops->set_qname = axis2_svc_name_set_qname;
-    svc_name_impl->svc_name.ops->get_endpoint_name = axis2_svc_name_get_endpoint_name;
-    svc_name_impl->svc_name.ops->set_endpoint_name = axis2_svc_name_set_endpoint_name;
-    svc_name_impl->svc_name.ops->free = axis2_svc_name_free;
-
-    return &(svc_name_impl->svc_name);
+    return svc_name;
 }
 
 const axis2_qname_t *AXIS2_CALL
@@ -129,7 +79,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(svc_name)->qname;
+    return svc_name->qname;
 }
 
 axis2_status_t AXIS2_CALL
@@ -138,22 +88,18 @@
     const axis2_env_t *env,
     const axis2_qname_t *qname)
 {
-    axis2_svc_name_impl_t *svc_name_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    svc_name_impl = AXIS2_INTF_TO_IMPL(svc_name);
-
-    if (svc_name_impl->qname)
+    if (svc_name->qname)
     {
-        AXIS2_QNAME_FREE(svc_name_impl->qname, env);
-        svc_name_impl->qname = NULL;
+        AXIS2_QNAME_FREE(svc_name->qname, env);
+        svc_name->qname = NULL;
     }
 
     if (qname)
     {
-        svc_name_impl->qname = AXIS2_QNAME_CLONE((axis2_qname_t *)qname, env);
-        if (!(svc_name_impl->qname))
+        svc_name->qname = AXIS2_QNAME_CLONE((axis2_qname_t *)qname, env);
+        if (!(svc_name->qname))
             return AXIS2_FAILURE;
     }
 
@@ -166,7 +112,7 @@
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(svc_name)->endpoint_name;
+    return svc_name->endpoint_name;
 }
 
 axis2_status_t AXIS2_CALL
@@ -175,22 +121,18 @@
     const axis2_env_t *env,
     const axis2_char_t *endpoint_name)
 {
-    axis2_svc_name_impl_t *svc_name_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    svc_name_impl = AXIS2_INTF_TO_IMPL(svc_name);
-
-    if (svc_name_impl->endpoint_name)
+    if (svc_name->endpoint_name)
     {
-        AXIS2_FREE(env->allocator, svc_name_impl->endpoint_name);
-        svc_name_impl->endpoint_name = NULL;
+        AXIS2_FREE(env->allocator, svc_name->endpoint_name);
+        svc_name->endpoint_name = NULL;
     }
 
     if (endpoint_name)
     {
-        svc_name_impl->endpoint_name = AXIS2_STRDUP(endpoint_name, env);
-        if (!(svc_name_impl->endpoint_name))
+        svc_name->endpoint_name = AXIS2_STRDUP(endpoint_name, env);
+        if (!(svc_name->endpoint_name))
             return AXIS2_FAILURE;
     }
 
@@ -202,32 +144,22 @@
     struct axis2_svc_name *svc_name,
     const axis2_env_t *env)
 {
-    axis2_svc_name_impl_t *svc_name_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    svc_name_impl = AXIS2_INTF_TO_IMPL(svc_name);
-
-    if (svc_name_impl->svc_name.ops)
-    {
-        AXIS2_FREE(env->allocator, svc_name_impl->svc_name.ops);
-        svc_name_impl->svc_name.ops = NULL;
-    }
-
-    if (svc_name_impl->qname)
+    if (svc_name->qname)
     {
-        AXIS2_QNAME_FREE(svc_name_impl->qname, env);
-        svc_name_impl->qname = NULL;
+        AXIS2_QNAME_FREE(svc_name->qname, env);
+        svc_name->qname = NULL;
     }
 
-    if (svc_name_impl->endpoint_name)
+    if (svc_name->endpoint_name)
     {
-        AXIS2_FREE(env->allocator, svc_name_impl->endpoint_name);
-        svc_name_impl->endpoint_name = NULL;
+        AXIS2_FREE(env->allocator, svc_name->endpoint_name);
+        svc_name->endpoint_name = NULL;
     }
 
-    AXIS2_FREE(env->allocator, svc_name_impl);
-    svc_name_impl = NULL;
+    AXIS2_FREE(env->allocator, svc_name);
+    svc_name = NULL;
 
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/op_client.c?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/op_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/op_client.c Sun Jan 21 21:57:41 2007
@@ -544,7 +544,7 @@
             if(!to_epr)
                 to_epr = AXIS2_OPTIONS_GET_TO(op_client_impl->options, env);
             epr_address = AXIS2_ENDPOINT_REF_GET_ADDRESS(to_epr, env);
-            property = axis2_property_create_with_args(env, 0, 0, 0, epr_address);
+            property = axis2_property_create_with_args(env, 0, 0, 0, (axis2_char_t *)epr_address);
             /*AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,
                     AXIS2_TRANSPORT_URL, property, AXIS2_FALSE);*/
             AXIS2_MSG_CTX_SET_SVC_CTX(msg_ctx, env, op_client_impl->svc_ctx);

Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/msg_ctx.c?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Sun Jan 21 21:57:41 2007
@@ -142,6 +142,7 @@
                 const axis2_env_t *env,
                 struct axis2_svc *svc);
 
+    axis2_string_t *charset_encoding;
 };
 
 AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
@@ -204,6 +205,7 @@
     msg_ctx->paused_handler_index = -1;
     msg_ctx->current_phase_index = 0;
     msg_ctx->paused_phase_index = 0;
+    msg_ctx->charset_encoding = NULL;
 
     msg_ctx->base = axis2_ctx_create(env);
     if (!(msg_ctx->base))
@@ -337,6 +339,12 @@
         msg_ctx->fault_soap_envelope = NULL;
     }
 
+    if (msg_ctx->charset_encoding)
+    {
+        axis2_string_free(msg_ctx->charset_encoding, env);
+        msg_ctx->charset_encoding = NULL;
+    }
+
     AXIS2_FREE(env->allocator, msg_ctx);
     msg_ctx = NULL;
 
@@ -1448,10 +1456,17 @@
 
 axis2_bool_t AXIS2_CALL
 axis2_msg_ctx_get_doing_mtom(
-    const axis2_msg_ctx_t *msg_ctx,
+    axis2_msg_ctx_t *msg_ctx,
     const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    if (!(msg_ctx->doing_mtom) && msg_ctx->conf_ctx)
+    {
+        axis2_conf_t *conf = AXIS2_CONF_CTX_GET_CONF(msg_ctx->conf_ctx, env);
+        msg_ctx->doing_mtom  = axis2_conf_get_enable_mtom(conf, env);
+    }
+
     return msg_ctx->doing_mtom;
 }
 
@@ -1906,4 +1921,41 @@
 {
     return msg_ctx->find_op(msg_ctx, env, svc);
 }
+
+
+AXIS2_EXTERN axis2_string_t* AXIS2_CALL
+axis2_msg_ctx_get_charset_encoding(axis2_msg_ctx_t *msg_ctx,
+    const axis2_env_t *env)
+{    
+    if (msg_ctx)
+        return msg_ctx->charset_encoding;
+    else
+        return NULL;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_charset_encoding(axis2_msg_ctx_t *msg_ctx,
+    const axis2_env_t *env,
+    axis2_string_t *str)
+{    
+    if (msg_ctx)
+    {
+        if (msg_ctx->charset_encoding)
+        {
+            axis2_string_free(msg_ctx->charset_encoding, env);
+            msg_ctx->charset_encoding = NULL;
+        }
+        if (str)
+        {
+            msg_ctx->charset_encoding = axis2_string_clone(str, env);
+        }
+    }
+    else
+    {
+        return AXIS2_FAILURE;
+    }
+    
+    return AXIS2_SUCCESS;
+}
+
 

Modified: webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c Sun Jan 21 21:57:41 2007
@@ -215,6 +215,7 @@
     axiom_element_t *disp_order_element = NULL;
     axiom_node_t *disp_order_node = NULL;
     axis2_status_t status = AXIS2_FAILURE;
+    axis2_param_t *param = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     builder_impl = AXIS2_INTF_TO_IMPL(conf_builder);
@@ -333,6 +334,20 @@
         }
     }
     /* TODO processing Axis Storages */
+
+    param = axis2_param_container_get_param(builder_impl->conf->param_container, 
+        env, AXIS2_ENABLE_MTOM);
+    if (param)
+    {
+        axis2_char_t *value = NULL;
+        value = AXIS2_PARAM_GET_VALUE(param, env);
+        if (value)
+        {
+            axis2_conf_set_enable_mtom(builder_impl->conf, env, 
+                (AXIS2_STRCMP(value, AXIS2_VALUE_TRUE) == 0));
+        }
+    }
+    
     return AXIS2_SUCCESS;
 }
 
@@ -882,6 +897,7 @@
             }
         }
     }
+    
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Sun Jan 21 21:57:41 2007
@@ -832,7 +832,8 @@
     out_fault_phases = AXIS2_PHASES_INFO_GET_OP_OUT_FAULTPHASES(
         dep_engine_impl->phases_info, env);
     new_out_fault_phases = axis2_phases_info_copy_flow(env, out_fault_phases); 
-    AXIS2_ARRAY_LIST_FREE(out_fault_phases, env);
+    if (out_fault_phases)
+        AXIS2_ARRAY_LIST_FREE(out_fault_phases, env);
     AXIS2_CONF_SET_OUT_FAULT_PHASES(dep_engine_impl->conf, env, new_out_fault_phases);
     if (AXIS2_SUCCESS != status)
     {

Modified: webservices/axis2/trunk/c/modules/core/engine/conf.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/engine/conf.c?view=diff&rev=498537&r1=498536&r2=498537
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/conf.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/conf.c Sun Jan 21 21:57:41 2007
@@ -61,6 +61,7 @@
     axis2_char_t *axis2_repo;
     axis2_dep_engine_t *dep_engine;
     axis2_array_list_t *handlers;
+    axis2_bool_t enable_mtom;
 };
 
 #define AXIS2_INTF_TO_IMPL(conf) ((axis2_conf_impl_t *)conf)
@@ -390,6 +391,7 @@
     config_impl->transports_out = NULL;
     config_impl->handlers = NULL;
     config_impl->conf.ops = NULL;
+    config_impl->enable_mtom = AXIS2_FALSE;
 
     config_impl->conf.param_container = (axis2_param_container_t *)
             axis2_param_container_create(env);
@@ -2167,3 +2169,28 @@
     AXIS2_QNAME_FREE(module_qname, env);
     return status;
 }
+
+axis2_bool_t AXIS2_CALL
+axis2_conf_get_enable_mtom(
+    axis2_conf_t *conf,
+    const axis2_env_t *env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, conf, AXIS2_FAILURE);
+
+    return AXIS2_INTF_TO_IMPL(conf)->enable_mtom;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_conf_set_enable_mtom(
+    axis2_conf_t *conf,
+    const axis2_env_t *env,
+    axis2_bool_t enable_mtom)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, conf, AXIS2_FAILURE);
+
+    AXIS2_INTF_TO_IMPL(conf)->enable_mtom = enable_mtom;
+    return AXIS2_SUCCESS;
+}
+



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org