axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r518623 [8/17] - in /webservices/axis2/trunk/c: build/win32/ include/ modules/core/clientapi/ modules/core/deployment/ modules/core/engine/ modules/core/phaseresolver/ modules/core/receivers/ modules/core/transport/http/receiver/ modules/co...
Date Thu, 15 Mar 2007 13:16:11 GMT
Modified: webservices/axis2/trunk/c/modules/core/clientapi/options.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/options.c?view=diff&rev=518623&r1=518622&r2=518623
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/options.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/options.c Thu Mar 15 06:16:07 2007
@@ -23,11 +23,8 @@
 #include <axis2_msg_info_headers.h>
 #include <axis2_array_list.h>
 
-typedef struct axis2_options_impl
+struct axis2_options
 {
-    /** options base struct */
-    axis2_options_t options;
-
     /** parent options */
     axis2_options_t *parent;
 
@@ -58,935 +55,535 @@
     axis2_bool_t enable_mtom;
     axis2_string_t *soap_action;
 	axis2_bool_t xml_parser_reset;
-}
-axis2_options_impl_t;
-
-/** Interface to implementation conversion macro */
-#define AXIS2_INTF_TO_IMPL(options) ((axis2_options_impl_t *)options)
-
-/** private function prototypes */
-static void
-axis2_options_init_data(
-    axis2_options_impl_t *options);
-
-static void
-axis2_options_init_ops(
-    axis2_options_t *options);
-
-
-/** public function prototypes */
-const axis2_char_t *AXIS2_CALL
-axis2_options_get_action(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_endpoint_ref_t *AXIS2_CALL
-axis2_options_get_fault_to(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_endpoint_ref_t *AXIS2_CALL
-axis2_options_get_from(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_transport_receiver_t *AXIS2_CALL
-axis2_options_get_transport_receiver(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_transport_in_desc_t *AXIS2_CALL
-axis2_options_get_transport_in(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-AXIS2_TRANSPORT_ENUMS AXIS2_CALL
-axis2_options_get_transport_in_protocol(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-const axis2_char_t *AXIS2_CALL
-axis2_options_get_message_id(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_hash_t *AXIS2_CALL
-axis2_options_get_properties(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-void *AXIS2_CALL
-axis2_options_get_property(
-    const axis2_options_t *options,
-    const axis2_env_t *env,
-    const axis2_char_t *key);
-
-axis2_relates_to_t *AXIS2_CALL
-axis2_options_get_relates_to(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
+};
 
-axis2_endpoint_ref_t *AXIS2_CALL
-axis2_options_get_reply_to(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_transport_out_desc_t *AXIS2_CALL
-axis2_options_get_transport_out(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-AXIS2_TRANSPORT_ENUMS AXIS2_CALL
-axis2_options_get_sender_transport_protocol(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-const axis2_char_t *AXIS2_CALL
-axis2_options_get_soap_version_uri(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-long AXIS2_CALL
-axis2_options_get_timeout_in_milli_seconds(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_endpoint_ref_t *AXIS2_CALL
-axis2_options_get_to(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-
-axis2_bool_t AXIS2_CALL
-axis2_options_get_use_separate_listener(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_options_t *AXIS2_CALL
-axis2_options_get_parent(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_parent(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    const axis2_options_t *parent);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_action(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    const axis2_char_t *action);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_fault_to(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_endpoint_ref_t *fault_to);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_from(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_endpoint_ref_t *from);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_to(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_endpoint_ref_t *to);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_transport_receiver(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_transport_receiver_t *receiver);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_transport_in(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_transport_in_desc_t *transport_in);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_transport_in_protocol(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    const AXIS2_TRANSPORT_ENUMS transport_in_protocol);
-
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_message_id(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    const axis2_char_t *message_id);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_properties(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_hash_t *properties);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_property(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    const axis2_char_t *property_key,
-    const void *property);
-
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_relates_to(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_relates_to_t *relates_to);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_reply_to(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_endpoint_ref_t *reply_to);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_transport_out(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_transport_out_desc_t *transport_out);
-
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_sender_transport(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    const AXIS2_TRANSPORT_ENUMS sender_transport,
-    axis2_conf_t *conf);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_soap_version_uri(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    const axis2_char_t *soap_version_uri);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_timeout_in_milli_seconds(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    long timeout_in_milli_seconds);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_transport_info(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    const AXIS2_TRANSPORT_ENUMS sender_transport,
-    const AXIS2_TRANSPORT_ENUMS receiver_transport,
-    const axis2_bool_t use_separate_listener);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_use_separate_listener(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_bool_t use_separate_listener);
-
-axis2_status_t AXIS2_CALL
-axis2_options_add_reference_parameter(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axiom_node_t *reference_parameter);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_manage_session(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_bool_t manage_session);
-
-axis2_bool_t AXIS2_CALL
-axis2_options_get_manage_session(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_msg_info_headers(
-    const axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_msg_info_headers_t *msg_info_headers);
-
-axis2_msg_info_headers_t *AXIS2_CALL
-axis2_options_get_msg_info_headers(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-int AXIS2_CALL
-axis2_options_get_soap_version(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_soap_version(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    int soap_version);
-
-axis2_status_t AXIS2_CALL
-axis2_options_free(
-    axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_enable_mtom(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_bool_t enable_mtom);
-
-axis2_bool_t AXIS2_CALL
-axis2_options_get_enable_mtom(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_soap_action(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    axis2_string_t *soap_action);
-
-axis2_string_t* AXIS2_CALL
-axis2_options_get_soap_action(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_options_set_xml_parser_reset(
-    axis2_options_t *options,
-    const axis2_env_t *env,
-    const axis2_bool_t xml_parser_reset);
-
-axis2_bool_t  AXIS2_CALL
-axis2_options_get_xml_parser_reset(
-    const axis2_options_t *options,
-    const axis2_env_t *env);
-
-axis2_options_t *AXIS2_CALL
+AXIS2_EXTERN axis2_options_t *AXIS2_CALL
 axis2_options_create(
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
+    axis2_options_t *options = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_MALLOC(env->allocator, sizeof(axis2_options_impl_t));
-    if (!options_impl)
+    options = AXIS2_MALLOC(env->allocator, sizeof(axis2_options_t));
+    if (!options)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    /** initialize private data */
-    axis2_options_init_data(options_impl);
+    options->parent = NULL;
+    options->properties = NULL;
+    options->soap_version_uri = NULL;
+    options->timeout_in_milli_seconds = -1;
+    options->use_separate_listener = -1;
+    options->receiver = NULL;
+    options->transport_in = NULL;
+    options->transport_in_protocol = AXIS2_TRANSPORT_ENUM_HTTP;
+    options->transport_out = NULL;
+    options->sender_transport_protocol = AXIS2_TRANSPORT_ENUM_HTTP;
+    options->manage_session = -1;
+    options->soap_version = AXIOM_SOAP12;
+    options->enable_mtom = AXIS2_FALSE;
+    options->soap_action = NULL;
+    options->xml_parser_reset = AXIS2_TRUE;
 
-    options_impl->msg_info_headers = axis2_msg_info_headers_create(env, NULL, NULL);
-    if (!(options_impl->msg_info_headers))
-    {
-        axis2_options_free(&(options_impl->options), env);
-        return NULL;
-    }
 
-    options_impl->properties = axis2_hash_make(env);
-    if (!(options_impl->properties))
+    options->msg_info_headers = axis2_msg_info_headers_create(env, NULL, NULL);
+    if (!(options->msg_info_headers))
     {
-        axis2_options_free(&(options_impl->options), env);
+        axis2_options_free(options, env);
         return NULL;
     }
 
-    /** initialize ops */
-    options_impl->options.ops =
-        AXIS2_MALLOC(env->allocator, sizeof(axis2_options_ops_t));
-
-    if (!options_impl->options.ops)
+    options->properties = axis2_hash_make(env);
+    if (!(options->properties))
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_options_free(&(options_impl->options), env);
+        axis2_options_free(options, env);
         return NULL;
     }
 
-    axis2_options_init_ops(&(options_impl->options));
-
-    return &(options_impl->options);
+    return options;
 }
 
-axis2_options_t *AXIS2_CALL
+AXIS2_EXTERN axis2_options_t *AXIS2_CALL
 axis2_options_create_with_parent(
     const axis2_env_t *env,
     axis2_options_t *parent)
 {
 
-    axis2_options_impl_t *options_impl = NULL;
+    axis2_options_t *options = NULL;
 
-    options_impl = AXIS2_INTF_TO_IMPL(axis2_options_create(env));
+    options = axis2_options_create(env);
 
-    if (options_impl)
+    if (options)
     {
-        options_impl->parent = parent;
+        options->parent = parent;
     }
-    return &(options_impl->options);
+    return options;
 }
 
-const axis2_char_t *AXIS2_CALL
+AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
 axis2_options_get_action(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     const axis2_char_t *action = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
+    action = axis2_msg_info_headers_get_action(options->msg_info_headers, env);
 
-    action = axis2_msg_info_headers_get_action(options_impl->msg_info_headers, env);
-
-    if (action == NULL && options_impl->parent)
+    if (action == NULL && options->parent)
     {
-        return axis2_options_get_action(options_impl->parent, env);
+        return axis2_options_get_action(options->parent, env);
     }
 
     return action;
 }
 
-axis2_endpoint_ref_t *AXIS2_CALL
+AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
 axis2_options_get_fault_to(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     axis2_endpoint_ref_t *fault_to = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    fault_to = axis2_msg_info_headers_get_fault_to(options_impl->msg_info_headers, env);
+    fault_to = axis2_msg_info_headers_get_fault_to(options->msg_info_headers, env);
 
-    if (fault_to == NULL && options_impl->parent)
+    if (fault_to == NULL && options->parent)
     {
-        return axis2_options_get_fault_to(options_impl->parent, env);
+        return axis2_options_get_fault_to(options->parent, env);
     }
 
     return fault_to;
 }
 
 
-axis2_endpoint_ref_t *AXIS2_CALL
+AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
 axis2_options_get_from(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     axis2_endpoint_ref_t *from = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
+    from = axis2_msg_info_headers_get_from(options->msg_info_headers, env);
 
-    from = axis2_msg_info_headers_get_from(options_impl->msg_info_headers, env);
-
-    if (from == NULL && options_impl->parent)
+    if (from == NULL && options->parent)
     {
-        return axis2_options_get_from(options_impl->parent, env);
+        return axis2_options_get_from(options->parent, env);
     }
 
     return from;
 }
 
-axis2_transport_receiver_t *AXIS2_CALL
+AXIS2_EXTERN axis2_transport_receiver_t *AXIS2_CALL
 axis2_options_get_transport_receiver(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->receiver == NULL && options_impl->parent)
+    if (options->receiver == NULL && options->parent)
     {
-        return axis2_options_get_transport_receiver(options_impl->parent, env);
+        return axis2_options_get_transport_receiver(options->parent, env);
     }
 
-    return options_impl->receiver;
+    return options->receiver;
 }
 
 
-axis2_transport_in_desc_t *AXIS2_CALL
+AXIS2_EXTERN axis2_transport_in_desc_t *AXIS2_CALL
 axis2_options_get_transport_in(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->transport_in == NULL && options_impl->parent)
+    if (options->transport_in == NULL && options->parent)
     {
-        return axis2_options_get_transport_in(options_impl->parent, env);
+        return axis2_options_get_transport_in(options->parent, env);
     }
 
-    return options_impl->transport_in;
+    return options->transport_in;
 }
 
-AXIS2_TRANSPORT_ENUMS AXIS2_CALL
+AXIS2_EXTERN AXIS2_TRANSPORT_ENUMS AXIS2_CALL
 axis2_options_get_transport_in_protocol(const axis2_options_t *options,
         const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->parent)
+    if (options->parent)
     {
-        return axis2_options_get_transport_in_protocol(options_impl->parent, env);
+        return axis2_options_get_transport_in_protocol(options->parent, env);
     }
 
-    return options_impl->transport_in_protocol;
+    return options->transport_in_protocol;
 }
 
-const axis2_char_t *AXIS2_CALL
+AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
 axis2_options_get_message_id(const axis2_options_t *options,
         const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     const axis2_char_t *message_id = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    message_id = axis2_msg_info_headers_get_message_id(options_impl->msg_info_headers, env);
+    message_id = axis2_msg_info_headers_get_message_id(options->msg_info_headers, env);
 
-    if (message_id == NULL && options_impl->parent)
+    if (message_id == NULL && options->parent)
     {
-        return axis2_options_get_message_id(options_impl->parent, env);
+        return axis2_options_get_message_id(options->parent, env);
     }
 
     return message_id;
 }
 
-axis2_hash_t *AXIS2_CALL
+AXIS2_EXTERN axis2_hash_t *AXIS2_CALL
 axis2_options_get_properties(const axis2_options_t *options,
         const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (axis2_hash_count(options_impl->properties) == 0 && options_impl->parent)
+    if (axis2_hash_count(options->properties) == 0 && options->parent)
     {
-        return axis2_options_get_properties(options_impl->parent, env);
+        return axis2_options_get_properties(options->parent, env);
     }
 
-    return options_impl->properties;
+    return options->properties;
 }
 
-void *AXIS2_CALL
+AXIS2_EXTERN void *AXIS2_CALL
 axis2_options_get_property(const axis2_options_t *options,
         const axis2_env_t *env,
         const axis2_char_t *key)
 {
     void *property = NULL;
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    property = axis2_hash_get(options_impl->properties, key, AXIS2_HASH_KEY_STRING);
+    property = axis2_hash_get(options->properties, key, AXIS2_HASH_KEY_STRING);
 
-    if (property == NULL && options_impl->parent)
+    if (property == NULL && options->parent)
     {
-        return axis2_options_get_property(options_impl->parent, env, key);
+        return axis2_options_get_property(options->parent, env, key);
     }
 
     return property;
 }
 
-axis2_relates_to_t *AXIS2_CALL
+AXIS2_EXTERN axis2_relates_to_t *AXIS2_CALL
 axis2_options_get_relates_to(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     axis2_relates_to_t *relates_to = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    relates_to = axis2_msg_info_headers_get_relates_to(options_impl->msg_info_headers, env);
+    relates_to = axis2_msg_info_headers_get_relates_to(options->msg_info_headers, env);
 
-    if (relates_to == NULL && options_impl->parent)
+    if (relates_to == NULL && options->parent)
     {
-        return axis2_options_get_relates_to(options_impl->parent, env);
+        return axis2_options_get_relates_to(options->parent, env);
     }
 
     return relates_to;
 }
 
 
-axis2_endpoint_ref_t *AXIS2_CALL
+AXIS2_EXTERN axis2_endpoint_ref_t *AXIS2_CALL
 axis2_options_get_reply_to(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     axis2_endpoint_ref_t *reply_to = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
+    reply_to = axis2_msg_info_headers_get_reply_to(options->msg_info_headers, env);
 
-    reply_to = axis2_msg_info_headers_get_reply_to(options_impl->msg_info_headers, env);
-
-    if (reply_to == NULL && options_impl->parent)
+    if (reply_to == NULL && options->parent)
     {
-        return axis2_options_get_reply_to(options_impl->parent, env);
+        return axis2_options_get_reply_to(options->parent, env);
     }
 
     return reply_to;
 }
 
-axis2_transport_out_desc_t *AXIS2_CALL
+AXIS2_EXTERN axis2_transport_out_desc_t *AXIS2_CALL
 axis2_options_get_transport_out(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->transport_out == NULL && options_impl->parent)
+    if (options->transport_out == NULL && options->parent)
     {
-        return axis2_options_get_transport_out(options_impl->parent, env);
+        return axis2_options_get_transport_out(options->parent, env);
     }
 
-    return options_impl->transport_out;
+    return options->transport_out;
 }
 
-AXIS2_TRANSPORT_ENUMS AXIS2_CALL
+AXIS2_EXTERN AXIS2_TRANSPORT_ENUMS AXIS2_CALL
 axis2_options_get_sender_transport_protocol(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
 
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->parent)
+    if (options->parent)
     {
-        return axis2_options_get_sender_transport_protocol(options_impl->parent, env);
+        return axis2_options_get_sender_transport_protocol(options->parent, env);
     }
 
-    return options_impl->sender_transport_protocol;
+    return options->sender_transport_protocol;
 }
 
-const axis2_char_t *AXIS2_CALL
+AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
 axis2_options_get_soap_version_uri(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->soap_version_uri == NULL && options_impl->parent)
+    if (options->soap_version_uri == NULL && options->parent)
     {
-        return axis2_options_get_soap_version_uri(options_impl->parent, env);
+        return axis2_options_get_soap_version_uri(options->parent, env);
     }
 
-    if (options_impl->soap_version_uri)
+    if (options->soap_version_uri)
     {
-        return options_impl->soap_version_uri;
+        return options->soap_version_uri;
     }
     return AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI;
 
 }
 
-long AXIS2_CALL
+AXIS2_EXTERN long AXIS2_CALL
 axis2_options_get_timeout_in_milli_seconds(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->timeout_in_milli_seconds == -1 && options_impl->parent)
+    if (options->timeout_in_milli_seconds == -1 && options->parent)
     {
-        return axis2_options_get_timeout_in_milli_seconds(options_impl->parent, env);
+        return axis2_options_get_timeout_in_milli_seconds(options->parent, env);
     }
 
-    if (options_impl->timeout_in_milli_seconds == -1)
+    if (options->timeout_in_milli_seconds == -1)
     {
         return AXIS2_DEFAULT_TIMEOUT_MILLISECONDS;
     }
 
-    return options_impl->timeout_in_milli_seconds;
+    return options->timeout_in_milli_seconds;
 }
 
 
-axis2_endpoint_ref_t* AXIS2_CALL
+AXIS2_EXTERN axis2_endpoint_ref_t* AXIS2_CALL
 axis2_options_get_to(const axis2_options_t *options,
         const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     axis2_endpoint_ref_t *to = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
+    to = axis2_msg_info_headers_get_to(options->msg_info_headers, env);
 
-    to = axis2_msg_info_headers_get_to(options_impl->msg_info_headers, env);
-
-    if (to == NULL && options_impl->parent)
+    if (to == NULL && options->parent)
     {
-        return axis2_options_get_to(options_impl->parent, env);
+        return axis2_options_get_to(options->parent, env);
     }
 
     return to;
 }
 
 
-axis2_bool_t AXIS2_CALL
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 axis2_options_get_use_separate_listener(const axis2_options_t *options,
         const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
-    /*AXIS2_ENV_CHECK(env, NULL);*/
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->use_separate_listener == -1 && options_impl->parent)
+    if (options->use_separate_listener == -1 && options->parent)
     {
-        return axis2_options_get_use_separate_listener(options_impl->parent, env);
+        return axis2_options_get_use_separate_listener(options->parent, env);
     }
 
-    if (options_impl->use_separate_listener == -1)
+    if (options->use_separate_listener == -1)
     {
         return AXIS2_FALSE;
     }
 
-    return options_impl->use_separate_listener;
+    return options->use_separate_listener;
 }
 
-axis2_options_t *AXIS2_CALL
+AXIS2_EXTERN axis2_options_t *AXIS2_CALL
 axis2_options_get_parent(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    return options_impl->parent;
+    return options->parent;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_parent(
     axis2_options_t *options,
     const axis2_env_t *env,
     const axis2_options_t *parent)
 {
-    axis2_options_impl_t *options_impl = NULL;
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    options_impl->parent = (axis2_options_t *)parent;
+    options->parent = (axis2_options_t *)parent;
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_action(
     axis2_options_t *options,
     const axis2_env_t *env,
     const axis2_char_t *action)
 {
-    axis2_options_impl_t *options_impl = NULL;
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    axis2_msg_info_headers_set_action(options_impl->msg_info_headers, env, action);
+    axis2_msg_info_headers_set_action(options->msg_info_headers, env, action);
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_fault_to(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_endpoint_ref_t *fault_to)
 {
-    axis2_options_impl_t *options_impl = NULL;
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    axis2_msg_info_headers_set_fault_to(options_impl->msg_info_headers, env, fault_to);
+    axis2_msg_info_headers_set_fault_to(options->msg_info_headers, env, fault_to);
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_from(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_endpoint_ref_t *from)
 {
-    axis2_options_impl_t *options_impl = NULL;
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    axis2_msg_info_headers_set_from(options_impl->msg_info_headers, env, from);
+    axis2_msg_info_headers_set_from(options->msg_info_headers, env, from);
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_to(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_endpoint_ref_t *to)
 {
-    axis2_options_impl_t *options_impl = NULL;
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    axis2_msg_info_headers_set_to(options_impl->msg_info_headers, env, to);
+    axis2_msg_info_headers_set_to(options->msg_info_headers, env, to);
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_transport_receiver(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_transport_receiver_t *receiver)
 {
-
-    axis2_options_impl_t *options_impl = NULL;
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    options_impl->receiver = receiver;
+    options->receiver = receiver;
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_transport_in(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_transport_in_desc_t *transport_in)
 {
-
-    axis2_options_impl_t *options_impl = NULL;
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    options_impl->transport_in = transport_in;
+    options->transport_in = transport_in;
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_transport_in_protocol(
     axis2_options_t *options,
     const axis2_env_t *env,
     const AXIS2_TRANSPORT_ENUMS transport_in_protocol)
 {
-    axis2_options_impl_t *options_impl = NULL;
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    options_impl->transport_in_protocol = transport_in_protocol;
+    options->transport_in_protocol = transport_in_protocol;
     return AXIS2_SUCCESS;
 }
 
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_message_id(
     axis2_options_t *options,
     const axis2_env_t *env,
     const axis2_char_t *message_id)
 {
-
-    axis2_options_impl_t *options_impl = NULL;
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    axis2_msg_info_headers_set_message_id(options_impl->msg_info_headers, env, message_id);
+    axis2_msg_info_headers_set_message_id(options->msg_info_headers, env, message_id);
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_properties(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_hash_t *properties)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    options_impl = AXIS2_INTF_TO_IMPL(options);
 
-    if (options_impl->properties)
+    if (options->properties)
     {
-        axis2_hash_free(options_impl->properties, env);
+        axis2_hash_free(options->properties, env);
     }
-    options_impl->properties = properties;
+    options->properties = properties;
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_property(
     axis2_options_t *options,
     const axis2_env_t *env,
     const axis2_char_t *property_key,
     const void *property)
 {
-    axis2_options_impl_t *options_impl = NULL;
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-    axis2_hash_set(options_impl->properties, property_key,
+    axis2_hash_set(options->properties, property_key,
             AXIS2_HASH_KEY_STRING, property);
     return AXIS2_SUCCESS;
 }
 
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_relates_to(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_relates_to_t *relates_to)
 {
-    axis2_options_impl_t *options_impl = NULL;
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    axis2_msg_info_headers_set_relates_to(options_impl->msg_info_headers, env, relates_to);
+    axis2_msg_info_headers_set_relates_to(options->msg_info_headers, env, relates_to);
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_reply_to(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_endpoint_ref_t *reply_to)
 {
-    axis2_options_impl_t *options_impl = NULL;
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    axis2_msg_info_headers_set_reply_to(options_impl->msg_info_headers, env, reply_to);
+    axis2_msg_info_headers_set_reply_to(options->msg_info_headers, env, reply_to);
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_transport_out(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_transport_out_desc_t *transport_out)
 {
-    axis2_options_impl_t *options_impl = NULL;
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    options_impl->transport_out = transport_out;
+    options->transport_out = transport_out;
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_sender_transport(
     axis2_options_t *options,
     const axis2_env_t *env,
     const AXIS2_TRANSPORT_ENUMS sender_transport,
     axis2_conf_t *conf)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    options_impl->transport_out = AXIS2_CONF_GET_TRANSPORT_OUT(conf, env, sender_transport);
+    options->transport_out = AXIS2_CONF_GET_TRANSPORT_OUT(conf, env, sender_transport);
 
-    if (!(options_impl->transport_out))
+    if (!(options->transport_out))
     {
         /*TODO:error*/
         return AXIS2_FAILURE;
@@ -994,46 +591,38 @@
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_soap_version_uri(
     axis2_options_t *options,
     const axis2_env_t *env,
     const axis2_char_t *soap_version_uri)
 {
-    axis2_options_impl_t *options_impl = NULL;
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->soap_version_uri)
+    if (options->soap_version_uri)
     {
-        AXIS2_FREE(env->allocator, options_impl->soap_version_uri);
-        options_impl->soap_version_uri = NULL;
+        AXIS2_FREE(env->allocator, options->soap_version_uri);
+        options->soap_version_uri = NULL;
     }
 
     if (soap_version_uri)
     {
-        options_impl->soap_version_uri = AXIS2_STRDUP(soap_version_uri, env);
+        options->soap_version_uri = AXIS2_STRDUP(soap_version_uri, env);
     }
 
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_timeout_in_milli_seconds(
     axis2_options_t *options,
     const axis2_env_t *env,
     long timeout_in_milli_seconds)
 {
-    axis2_options_impl_t *options_impl = NULL;
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    options_impl->timeout_in_milli_seconds = timeout_in_milli_seconds;
+    options->timeout_in_milli_seconds = timeout_in_milli_seconds;
     return AXIS2_SUCCESS;
 }
 
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_transport_info(
     axis2_options_t *options,
     const axis2_env_t *env,
@@ -1041,10 +630,8 @@
     const AXIS2_TRANSPORT_ENUMS receiver_transport,
     const axis2_bool_t use_separate_listener)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
     /**
       here we check for the legal combination
       */
@@ -1059,135 +646,101 @@
     }
     else
     {
-        axis2_options_set_use_separate_listener(&(options_impl->options),
+        axis2_options_set_use_separate_listener(options,
                 env, use_separate_listener);
     }
-    axis2_options_set_transport_in_protocol(&(options_impl->options), env, receiver_transport);
-    options_impl->sender_transport_protocol = sender_transport;
+    axis2_options_set_transport_in_protocol(options, env, receiver_transport);
+    options->sender_transport_protocol = sender_transport;
 
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_use_separate_listener(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_bool_t use_separate_listener)
 {
-    axis2_options_impl_t *options_impl = NULL;
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    options_impl->use_separate_listener = use_separate_listener;
+    options->use_separate_listener = use_separate_listener;
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_add_reference_parameter(
     axis2_options_t *options,
     const axis2_env_t *env,
     axiom_node_t *reference_parameter)
 {
-
-    axis2_options_impl_t *options_impl = NULL;
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    axis2_msg_info_headers_add_ref_param(options_impl->msg_info_headers,
+    axis2_msg_info_headers_add_ref_param(options->msg_info_headers,
             env, reference_parameter);
     return AXIS2_SUCCESS;
 }
 
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_manage_session(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_bool_t manage_session)
 {
-    axis2_options_impl_t *options_impl = NULL;
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    options_impl->manage_session = manage_session;
+    options->manage_session = manage_session;
     return AXIS2_SUCCESS;
 }
 
-axis2_bool_t AXIS2_CALL
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 axis2_options_get_manage_session(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FALSE);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->manage_session == -1 && options_impl->parent)
+    if (options->manage_session == -1 && options->parent)
     {
-        return axis2_options_get_manage_session(options_impl->parent, env);
+        return axis2_options_get_manage_session(options->parent, env);
     }
 
-    if (options_impl->manage_session == -1)
+    if (options->manage_session == -1)
     {
         return AXIS2_FALSE;
     }
 
-    return options_impl->manage_session;
+    return options->manage_session;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_msg_info_headers(
-    const axis2_options_t *options,
+    axis2_options_t *options,
     const axis2_env_t *env,
     axis2_msg_info_headers_t *msg_info_headers)
 {
-    axis2_options_impl_t *options_impl = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    options_impl->msg_info_headers = msg_info_headers;
+    options->msg_info_headers = msg_info_headers;
     return AXIS2_SUCCESS;
 }
 
 
-axis2_msg_info_headers_t *AXIS2_CALL
+AXIS2_EXTERN axis2_msg_info_headers_t *AXIS2_CALL
 axis2_options_get_msg_info_headers(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    return options_impl->msg_info_headers;
+    return options->msg_info_headers;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_free(
     axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->options.ops)
-    {
-        AXIS2_FREE(env->allocator, options_impl->options.ops);
-        options_impl->options.ops = NULL;
-    }
-
-    if (options_impl->properties)
+    if (options->properties)
     {
         axis2_hash_index_t *hi = NULL;
         void *val = NULL;
         const void *key = NULL;
-        for (hi = axis2_hash_first(options_impl->properties, env);
+        for (hi = axis2_hash_first(options->properties, env);
                 hi; hi = axis2_hash_next(env, hi))
         {
             axis2_property_t *property = NULL;
@@ -1198,167 +751,70 @@
             if (property)
             {
                 AXIS2_PROPERTY_FREE(property, env);
-                property = NULL;
             }
-
-            val = NULL;
-            key = NULL;
         }
+        axis2_hash_free(options->properties, env);
+    }
 
+    if (options->soap_version_uri)
+    {
+        AXIS2_FREE(env->allocator, options->soap_version_uri);
+    }
 
-        axis2_hash_free(options_impl->properties, env);
-        options_impl->properties = NULL;
+    if (options->msg_info_headers)
+    {
+        axis2_msg_info_headers_free(options->msg_info_headers, env);
     }
 
-    if (options_impl->soap_version_uri)
+    if (options->soap_action)
     {
-        AXIS2_FREE(env->allocator, options_impl->soap_version_uri);
-        options_impl->soap_version_uri = NULL;
+        axis2_string_free(options->soap_action, env);
     }
 
-    if (options_impl->msg_info_headers)
-    {
-        axis2_msg_info_headers_free(options_impl->msg_info_headers, env);
-        options_impl->msg_info_headers = NULL;
-    }
-
-    if (options_impl->soap_action)
-    {
-        axis2_string_free(options_impl->soap_action, env);
-        options_impl->soap_action = NULL;
-    }
-
-    AXIS2_FREE(env->allocator, options_impl);
-    options_impl = NULL;
-
-    return AXIS2_SUCCESS;
-}
-
-static void
-axis2_options_init_data(
-    axis2_options_impl_t *options_impl)
-{
-    options_impl->options.ops = NULL;
-    options_impl->parent = NULL;
-    options_impl->properties = NULL;
-    options_impl->soap_version_uri = NULL;
-    options_impl->timeout_in_milli_seconds = -1;
-    options_impl->use_separate_listener = -1;
-
-    options_impl->receiver = NULL;
-    options_impl->transport_in = NULL;
-    options_impl->transport_in_protocol = AXIS2_TRANSPORT_ENUM_HTTP;
-    options_impl->transport_out = NULL;
-    options_impl->sender_transport_protocol = AXIS2_TRANSPORT_ENUM_HTTP;
-    options_impl->manage_session = -1;
-    options_impl->soap_version = AXIOM_SOAP12;
-    options_impl->enable_mtom = AXIS2_FALSE;
-    options_impl->soap_action = NULL;
-    options_impl->xml_parser_reset = AXIS2_TRUE;
-}
-
-static void
-axis2_options_init_ops(
-    axis2_options_t *options)
-{
-
-    options->ops->get_action = axis2_options_get_action;
-    options->ops->get_fault_to = axis2_options_get_fault_to;
-    options->ops->get_from = axis2_options_get_from;
-    options->ops->get_transport_receiver = axis2_options_get_transport_receiver;
-    options->ops->get_transport_in = axis2_options_get_transport_in;
-    options->ops->get_transport_in_protocol = axis2_options_get_transport_in_protocol;
-    options->ops->get_message_id = axis2_options_get_message_id;
-    options->ops->get_properties = axis2_options_get_properties;
-    options->ops->get_property = axis2_options_get_property;
-    options->ops->get_relates_to = axis2_options_get_relates_to;
-    options->ops->get_reply_to = axis2_options_get_reply_to;
-    options->ops->get_transport_out = axis2_options_get_transport_out;
-    options->ops->get_sender_transport_protocol = axis2_options_get_sender_transport_protocol;
-    options->ops->get_soap_version_uri = axis2_options_get_soap_version_uri;
-    options->ops->get_timeout_in_milli_seconds = axis2_options_get_timeout_in_milli_seconds;
-    options->ops->get_to = axis2_options_get_to;
-    options->ops->get_use_separate_listener = axis2_options_get_use_separate_listener;
-    options->ops->get_parent = axis2_options_get_parent;
-    options->ops->set_parent = axis2_options_set_parent;
-    options->ops->set_action = axis2_options_set_action;
-    options->ops->set_fault_to = axis2_options_set_fault_to;
-    options->ops->set_from = axis2_options_set_from;
-    options->ops->set_to = axis2_options_set_to;
-    options->ops->set_transport_receiver = axis2_options_set_transport_receiver;
-    options->ops->set_transport_in = axis2_options_set_transport_in;
-    options->ops->set_transport_in_protocol = axis2_options_set_transport_in_protocol;
-    options->ops->set_message_id = axis2_options_set_message_id;
-    options->ops->set_properties = axis2_options_set_properties;
-    options->ops->set_property = axis2_options_set_property;
-    options->ops->set_relates_to = axis2_options_set_relates_to;
-    options->ops->set_reply_to = axis2_options_set_reply_to;
-    options->ops->set_transport_out = axis2_options_set_transport_out;
-    options->ops->set_sender_transport = axis2_options_set_sender_transport;
-    options->ops->set_soap_version_uri = axis2_options_set_soap_version_uri;
-    options->ops->set_timeout_in_milli_seconds = axis2_options_set_timeout_in_milli_seconds;
-    options->ops->set_transport_info = axis2_options_set_transport_info;
-    options->ops->set_use_separate_listener = axis2_options_set_use_separate_listener;
-    options->ops->add_reference_parameter = axis2_options_add_reference_parameter;
-    options->ops->set_manage_session = axis2_options_set_manage_session;
-    options->ops->get_manage_session = axis2_options_get_manage_session;
-    options->ops->get_msg_info_headers = axis2_options_get_msg_info_headers;
-    options->ops->set_msg_info_headers = axis2_options_set_msg_info_headers;
-    options->ops->set_soap_version = axis2_options_set_soap_version;
-    options->ops->get_soap_version = axis2_options_get_soap_version;
-    options->ops->set_enable_mtom = axis2_options_set_enable_mtom;
-    options->ops->get_enable_mtom = axis2_options_get_enable_mtom;
-    options->ops->set_soap_action = axis2_options_set_soap_action;
-    options->ops->get_soap_action = axis2_options_get_soap_action;
-    options->ops->set_xml_parser_reset = axis2_options_set_xml_parser_reset;
-    options->ops->get_xml_parser_reset = axis2_options_get_xml_parser_reset;
-    options->ops->free = axis2_options_free;
+    AXIS2_FREE(env->allocator, options);
+
+    return AXIS2_SUCCESS;
 }
 
-int AXIS2_CALL
+AXIS2_EXTERN int AXIS2_CALL
 axis2_options_get_soap_version(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(options)->soap_version;
+    return options->soap_version;
 
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_soap_version(
     axis2_options_t *options,
     const axis2_env_t *env,
     int soap_version)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
     if (soap_version == AXIOM_SOAP11)
     {
-        options_impl->soap_version = soap_version;
+        options->soap_version = soap_version;
         axis2_options_set_soap_version_uri(options, env,
                 AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI);
     }
     else
     {
-        options_impl->soap_version = AXIOM_SOAP12;
+        options->soap_version = AXIOM_SOAP12;
         axis2_options_set_soap_version_uri(options, env,
                 AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
     }
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_options_set_enable_mtom(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_bool_t enable_mtom)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_INTF_TO_IMPL(options)->enable_mtom = enable_mtom;
+    options->enable_mtom = enable_mtom;
 
     if (enable_mtom)
     {
@@ -1373,74 +829,61 @@
     return AXIS2_SUCCESS;
 }
 
-axis2_bool_t AXIS2_CALL
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 axis2_options_get_enable_mtom(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(options)->enable_mtom;
+    return options->enable_mtom;
 }
 
-axis2_string_t* AXIS2_CALL
+AXIS2_EXTERN axis2_string_t* AXIS2_CALL
 axis2_options_get_soap_action(
     const axis2_options_t *options,
     const axis2_env_t *env)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    return options_impl->soap_action;
+    return options->soap_action;
 }
 
-axis2_status_t AXIS2_CALL 
+AXIS2_EXTERN axis2_status_t AXIS2_CALL 
 axis2_options_set_soap_action(
     axis2_options_t *options,
     const axis2_env_t *env,
     axis2_string_t *soap_action)
 {
-    axis2_options_impl_t *options_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-    if (options_impl->soap_action)
+    if (options->soap_action)
     {
-        axis2_string_free(options_impl->soap_action, env);
-        options_impl->soap_action = NULL;
+        axis2_string_free(options->soap_action, env);
+        options->soap_action = NULL;
     }
 
     if (soap_action)
     {
-        options_impl->soap_action = axis2_string_clone(soap_action, env);
+        options->soap_action = axis2_string_clone(soap_action, env);
     }
     return AXIS2_SUCCESS;
 }
 
 
-axis2_bool_t AXIS2_CALL
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 axis2_options_get_xml_parser_reset (
 	const axis2_options_t *options,
 	const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(options)->xml_parser_reset;
+    return options->xml_parser_reset;
 }
 
-axis2_status_t AXIS2_CALL 
+AXIS2_EXTERN axis2_status_t AXIS2_CALL 
 axis2_options_set_xml_parser_reset (
     axis2_options_t *options,
     const axis2_env_t *env,
     const axis2_bool_t xml_parser_reset)
 {
-    axis2_options_impl_t *options_impl = NULL;
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
-    options_impl = AXIS2_INTF_TO_IMPL(options);
-
-	options_impl->xml_parser_reset = xml_parser_reset;
+	options->xml_parser_reset = xml_parser_reset;
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/modules/core/clientapi/stub.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/stub.c?view=diff&rev=518623&r1=518622&r2=518623
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/stub.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/stub.c Thu Mar 15 06:16:07 2007
@@ -17,123 +17,33 @@
 
 #include <axis2_stub.h>
 
-/**
- * @brief
- */
-typedef struct axis2_stub_impl
+struct axis2_stub
 {
-    axis2_stub_t stub;
     axis2_svc_client_t *svc_client;
     axis2_options_t *options;
+};
 
-}
-axis2_stub_impl_t;
-
-#define AXIS2_INTF_TO_IMPL(stub) \
-    ((axis2_stub_impl_t *) stub)
-
-/************************* Function prototypes ********************************/
-
-axis2_status_t AXIS2_CALL
-axis2_stub_free(
-    axis2_stub_t *stub,
-    const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_stub_set_endpoint_ref(
-    axis2_stub_t *stub,
-    const axis2_env_t *env,
-    axis2_endpoint_ref_t *endpoint_ref);
-
-axis2_status_t AXIS2_CALL
-axis2_stub_set_endpoint_uri(
-    axis2_stub_t *stub,
-    const axis2_env_t *env,
-    const axis2_char_t *endpoint_uri);
-
-/**
- * @param use_separate_transport
- */
-axis2_status_t AXIS2_CALL
-axis2_stub_set_use_separate_listener(
-    axis2_stub_t *stub,
-    const axis2_env_t *env,
-    axis2_bool_t use_separate_listener);
-
-
-axis2_status_t AXIS2_CALL
-axis2_stub_engage_module(
-    axis2_stub_t *stub,
-    const axis2_env_t *env,
-    const axis2_char_t *module_name);
-
-/**
- * Set the soap version
- * @param soap_version
- */
-axis2_status_t AXIS2_CALL
-axis2_stub_set_soap_version(
-    axis2_stub_t *stub,
-    const axis2_env_t *env,
-    const int soap_version);
-
-
-const axis2_char_t *AXIS2_CALL
-axis2_stub_get_svc_ctx_id(
-    const axis2_stub_t *stub,
-    const axis2_env_t *env);
-
-axis2_svc_client_t *AXIS2_CALL
-axis2_stub_get_svc_client(
-    const axis2_stub_t *stub,
-    const axis2_env_t *env);
-
-axis2_options_t *AXIS2_CALL
-axis2_stub_get_options(
-    const axis2_stub_t *stub,
-    const axis2_env_t *env);
 
 AXIS2_EXTERN axis2_stub_t *AXIS2_CALL
 axis2_stub_create(
     const axis2_env_t *env)
 {
-    axis2_stub_impl_t *stub_impl = NULL;
+    axis2_stub_t *stub = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    stub_impl = (axis2_stub_impl_t *) AXIS2_MALLOC(env->
-            allocator, sizeof(axis2_stub_impl_t));
+    stub = (axis2_stub_t *) AXIS2_MALLOC(env->
+            allocator, sizeof(axis2_stub_t));
 
-    if (NULL == stub_impl)
+    if (NULL == stub)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    stub_impl->svc_client = NULL;
-    stub_impl->options = NULL;
+    stub->svc_client = NULL;
+    stub->options = NULL;
 
-    stub_impl->stub.ops = NULL;
-
-    stub_impl->stub.ops =
-        AXIS2_MALLOC(env->allocator, sizeof(axis2_stub_ops_t));
-    if (NULL == stub_impl->stub.ops)
-    {
-        axis2_stub_free(&(stub_impl->stub), env);
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
-
-    stub_impl->stub.ops->free = axis2_stub_free;
-    stub_impl->stub.ops->set_endpoint_ref = axis2_stub_set_endpoint_ref;
-    stub_impl->stub.ops->set_endpoint_uri = axis2_stub_set_endpoint_uri;
-    stub_impl->stub.ops->set_use_separate_listener = axis2_stub_set_use_separate_listener;
-    stub_impl->stub.ops->engage_module = axis2_stub_engage_module;
-    stub_impl->stub.ops->set_soap_version = axis2_stub_set_soap_version;
-    stub_impl->stub.ops->get_svc_ctx_id = axis2_stub_get_svc_ctx_id;
-    stub_impl->stub.ops->get_svc_client = axis2_stub_get_svc_client;
-    stub_impl->stub.ops->get_options = axis2_stub_get_options;
-
-    return &(stub_impl->stub);
+    return stub;
 }
 
 AXIS2_EXTERN axis2_stub_t *AXIS2_CALL
@@ -142,43 +52,43 @@
     axis2_endpoint_ref_t *endpoint_ref,
     const axis2_char_t *client_home)
 {
-    axis2_stub_impl_t *stub_impl = NULL;
+    axis2_stub_t *stub = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, endpoint_ref, NULL);
 
-    stub_impl = (axis2_stub_impl_t *) axis2_stub_create(env);
-    if (!stub_impl)
+    stub = (axis2_stub_t *) axis2_stub_create(env);
+    if (!stub)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
     /* create service_client*/
-    stub_impl->svc_client = axis2_svc_client_create(env , client_home);
+    stub->svc_client = axis2_svc_client_create(env , client_home);
 
-    if (!stub_impl->svc_client)
+    if (!stub->svc_client)
     {
-        axis2_stub_free(&(stub_impl->stub), env);
+        axis2_stub_free(stub, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
     /* create options */
-    stub_impl->options = axis2_options_create(env);
-    if (!stub_impl->options)
+    stub->options = axis2_options_create(env);
+    if (!stub->options)
     {
-        axis2_stub_free(&(stub_impl->stub), env);
+        axis2_stub_free(stub, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
 
     }
     /* Set service client options */
-    AXIS2_SVC_CLIENT_SET_OPTIONS(stub_impl->svc_client,
+    AXIS2_SVC_CLIENT_SET_OPTIONS(stub->svc_client,
             env,
-            stub_impl-> options);
+            stub-> options);
 
-    AXIS2_OPTIONS_SET_TO(stub_impl->options, env, endpoint_ref);
+    AXIS2_OPTIONS_SET_TO(stub->options, env, endpoint_ref);
 
-    return &(stub_impl->stub);
+    return stub;
 }
 
 AXIS2_EXTERN axis2_stub_t *AXIS2_CALL
@@ -187,7 +97,7 @@
     const axis2_char_t *endpoint_uri,
     const axis2_char_t *client_home)
 {
-    axis2_stub_impl_t *stub_impl = NULL;
+    axis2_stub_t *stub = NULL;
     axis2_endpoint_ref_t *endpoint_ref = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
@@ -198,18 +108,18 @@
     {
         return NULL;
     }
-    stub_impl = (axis2_stub_impl_t *)
+    stub = (axis2_stub_t *)
             axis2_stub_create_with_endpoint_ref_and_client_home(env, endpoint_ref,
                     client_home);
 
-    if (!stub_impl)
+    if (!stub)
     {
-        axis2_stub_free(&(stub_impl->stub), env);
+        axis2_stub_free(stub, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    return &(stub_impl->stub);
+    return stub;
 }
 
 axis2_status_t AXIS2_CALL
@@ -217,28 +127,16 @@
     axis2_stub_t *stub,
     const axis2_env_t *env)
 {
-    axis2_stub_impl_t *stub_impl = NULL;
-
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    stub_impl = AXIS2_INTF_TO_IMPL(stub);
-
-    if (stub->ops)
-    {
-        AXIS2_FREE(env->allocator, stub->ops);
-        stub->ops = NULL;
-    }
-
-    if (stub_impl->svc_client)
+    if (stub->svc_client)
     {
-        AXIS2_SVC_CLIENT_FREE(stub_impl->svc_client, env);
-        stub_impl->svc_client = NULL;
+        AXIS2_SVC_CLIENT_FREE(stub->svc_client, env);
     }
 
-    if (stub_impl)
+    if (stub)
     {
-        AXIS2_FREE(env->allocator, stub_impl);
-        stub_impl = NULL;
+        AXIS2_FREE(env->allocator, stub);
     }
 
     return AXIS2_SUCCESS;
@@ -250,13 +148,8 @@
     const axis2_env_t *env,
     axis2_endpoint_ref_t *endpoint_ref)
 {
-    axis2_stub_impl_t *stub_impl = NULL;
-
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, endpoint_ref, AXIS2_FAILURE);
-    stub_impl = AXIS2_INTF_TO_IMPL(stub);
-
-    AXIS2_OPTIONS_SET_TO(stub_impl->options , env, endpoint_ref);
+    AXIS2_OPTIONS_SET_TO(stub->options , env, endpoint_ref);
     return AXIS2_SUCCESS;
 }
 
@@ -266,19 +159,17 @@
     const axis2_env_t *env,
     const axis2_char_t *endpoint_uri)
 {
-    axis2_stub_impl_t *stub_impl = NULL;
     axis2_endpoint_ref_t *endpoint_ref = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, endpoint_uri, AXIS2_FAILURE);
-    stub_impl = AXIS2_INTF_TO_IMPL(stub);
 
     endpoint_ref = axis2_endpoint_ref_create(env, endpoint_uri);
     if (!endpoint_ref)
     {
         return AXIS2_FAILURE;
     }
-    AXIS2_OPTIONS_SET_TO(stub_impl->options , env, endpoint_ref);
+    AXIS2_OPTIONS_SET_TO(stub->options , env, endpoint_ref);
 
     return AXIS2_SUCCESS;
 }
@@ -289,14 +180,8 @@
     const axis2_env_t *env,
     const axis2_bool_t use_separate_listener)
 {
-    axis2_stub_impl_t *stub_impl = NULL;
-
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    stub_impl = AXIS2_INTF_TO_IMPL(stub);
-
-    AXIS2_OPTIONS_SET_USE_SEPARATE_LISTENER(stub_impl-> options, env,
+    return AXIS2_OPTIONS_SET_USE_SEPARATE_LISTENER(stub-> options, env,
             use_separate_listener);
-    return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
@@ -305,13 +190,9 @@
     const axis2_env_t *env,
     const axis2_char_t *module_name)
 {
-    axis2_stub_impl_t *stub_impl = NULL;
-
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, module_name, AXIS2_FAILURE);
-    stub_impl = AXIS2_INTF_TO_IMPL(stub);
 
-    return AXIS2_SVC_CLIENT_ENGAGE_MODULE(stub_impl->svc_client, env, module_name);
+    return AXIS2_SVC_CLIENT_ENGAGE_MODULE(stub->svc_client, env, module_name);
 }
 
 axis2_status_t AXIS2_CALL
@@ -320,16 +201,11 @@
     const axis2_env_t *env,
     int soap_version)
 {
-    axis2_stub_impl_t *stub_impl = NULL;
-
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    stub_impl = AXIS2_INTF_TO_IMPL(stub);
-
-    if (!stub_impl-> options)
+    if (!stub-> options)
     {
         return AXIS2_FAILURE;
     }
-    return AXIS2_OPTIONS_SET_SOAP_VERSION(stub_impl-> options,
+    return AXIS2_OPTIONS_SET_SOAP_VERSION(stub-> options,
             env, soap_version);
 }
 
@@ -338,14 +214,10 @@
     const axis2_stub_t *stub,
     const axis2_env_t *env)
 {
-    axis2_stub_impl_t *stub_impl = NULL;
     const axis2_svc_ctx_t *svc_ctx = NULL;
     const axis2_char_t *svc_ctx_id = NULL;
 
-    AXIS2_ENV_CHECK(env, NULL);
-    stub_impl = AXIS2_INTF_TO_IMPL(stub);
-
-    svc_ctx = AXIS2_SVC_CLIENT_GET_SVC_CTX(stub_impl->svc_client,
+    svc_ctx = AXIS2_SVC_CLIENT_GET_SVC_CTX(stub->svc_client,
             env);
     svc_ctx_id =  axis2_svc_ctx_get_svc_id(svc_ctx, env);
     return svc_ctx_id;
@@ -356,8 +228,7 @@
     const axis2_stub_t *stub,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(stub)->svc_client;
+    return stub->svc_client;
 }
 
 axis2_options_t *AXIS2_CALL
@@ -365,6 +236,7 @@
     const axis2_stub_t *stub,
     const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(stub)->options;
+    return stub->options;
 }
+
+



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


Mime
View raw message