ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r437539 - in /webservices/axis2/trunk/c: include/axis2_http_transport_sender.h include/axis2_soap_over_http_sender.h modules/core/transport/http/sender/http_transport_sender.c modules/core/transport/http/sender/soap_over_http_sender.c
Date Mon, 28 Aug 2006 05:35:29 GMT
Author: pini
Date: Sun Aug 27 22:35:29 2006
New Revision: 437539

URL: http://svn.apache.org/viewvc?rev=437539&view=rev
Log:
Fomatting fixes and parameter changes to const

Modified:
    webservices/axis2/trunk/c/include/axis2_http_transport_sender.h
    webservices/axis2/trunk/c/include/axis2_soap_over_http_sender.h
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c

Modified: webservices/axis2/trunk/c/include/axis2_http_transport_sender.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_http_transport_sender.h?rev=437539&r1=437538&r2=437539&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_transport_sender.h (original)
+++ webservices/axis2/trunk/c/include/axis2_http_transport_sender.h Sun Aug 27 22:35:29 2006
@@ -41,15 +41,15 @@
 {
 #endif
 
-    /** 
+    /**
      * @param env pointer to environment struct 
      */
-    AXIS2_EXTERN axis2_transport_sender_t * AXIS2_CALL
-    axis2_http_transport_sender_create (
+    AXIS2_EXTERN axis2_transport_sender_t *AXIS2_CALL
+    axis2_http_transport_sender_create(
         const axis2_env_t *env);
 
 
-/** @} */
+    /** @} */
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/include/axis2_soap_over_http_sender.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_soap_over_http_sender.h?rev=437539&r1=437538&r2=437539&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_over_http_sender.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_over_http_sender.h Sun Aug 27 22:35:29 2006
@@ -13,11 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #ifndef AXIOM_SOAP_OVER_HTTP_SENDER_H
 #define AXIOM_SOAP_OVER_HTTP_SENDER_H
 
 /**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
+/**
  * @file axiom_soap_over_http_sender.h
  * @brief axis2 SOAP over HTTP sender
  */
@@ -32,91 +37,169 @@
 
 
 #ifdef __cplusplus
-extern "C" 
+extern "C"
 {
 #endif
-/** 
-  * @ingroup axis2_core_transport_http
-  * @{
-  */
-
-typedef struct axiom_soap_over_http_sender_ops 
-                     axiom_soap_over_http_sender_ops_t;
-typedef struct axiom_soap_over_http_sender axiom_soap_over_http_sender_t;
-    
-    
-/** 
- * @brief SOAP over HTTP sender ops struct
- * Encapsulator struct for ops of axiom_soap_over_http_sender
- */
-AXIS2_DECLARE_DATA struct axiom_soap_over_http_sender_ops
-{
-   axis2_status_t (AXIS2_CALL *send) 
-                                (axiom_soap_over_http_sender_t *sender, 
-                                const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-                        axiom_soap_envelope_t *out, 
-                        const axis2_char_t *str_url, 
-                        const axis2_char_t *soap_action);
-   
-   axis2_status_t (AXIS2_CALL *set_chunked) 
-                                (axiom_soap_over_http_sender_t *sender, 
-                                const axis2_env_t *env, axis2_bool_t chunked);
-   
-   axis2_status_t (AXIS2_CALL *set_om_output)
-                                (axiom_soap_over_http_sender_t *sender, 
-                                const axis2_env_t *env, axiom_output_t *om_output);
-   
-   axis2_status_t (AXIS2_CALL *set_http_version)
-                        (axiom_soap_over_http_sender_t *sender, 
-                        const axis2_env_t *env, axis2_char_t *version);
-   
-   axis2_status_t (AXIS2_CALL *free) 
-                                (axiom_soap_over_http_sender_t *sender, 
-                                const axis2_env_t *env);
-};
-
-    
-axis2_status_t AXIS2_CALL 
-axiom_soap_over_http_sender_get_header_info 
-                        (axiom_soap_over_http_sender_t *sender, 
-                                const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx, 
-                        axis2_http_simple_response_t *response);
-
-axis2_status_t AXIS2_CALL
-axiom_soap_over_http_sender_process_response 
-                        (axiom_soap_over_http_sender_t *sender, 
-                                const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx, 
-                        axis2_http_simple_response_t *response);
-
-axis2_status_t AXIS2_CALL
-axiom_soap_over_http_sender_get_timeout_values 
-                        (axiom_soap_over_http_sender_t *sender, 
-                                const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx);
-
-/**
- * @brief HTTP SOAP over HTTP sender struct
- * Axis2 SOAP over HTTP sender
- */
-AXIS2_DECLARE_DATA struct axiom_soap_over_http_sender
-{
-   axiom_soap_over_http_sender_ops_t *ops;
-};
 
-
-AXIS2_EXTERN axiom_soap_over_http_sender_t * AXIS2_CALL 
-axiom_soap_over_http_sender_create(const axis2_env_t *env);
+    /** Type name for struct axis2_soap_over_http_sender_ops */
+    typedef struct axiom_soap_over_http_sender_ops
+                axiom_soap_over_http_sender_ops_t;
+    /** Type name for struct axis2_soap_over_http_sender_ */
+    typedef struct axiom_soap_over_http_sender axiom_soap_over_http_sender_t;
+
+
+    /**
+     * SOAP over HTTP sender ops struct
+     * Encapsulator struct for ops of axiom_soap_over_http_sender
+     */
+    struct axiom_soap_over_http_sender_ops
+    {
+        /**
+         * @param sender sender
+         * @param env pointer to environment struct
+         * @param msg_ctx pointer to message context
+         * @param out out
+         * @param str_url str url
+         * @param soap_action pointer to soap action
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_status_t (AXIS2_CALL *
+                send)(
+                    axiom_soap_over_http_sender_t *sender,
+                    const axis2_env_t *env, 
+                    axis2_msg_ctx_t *msg_ctx,
+                    axiom_soap_envelope_t *out,
+                    const axis2_char_t *str_url,
+                    const axis2_char_t *soap_action);
+
+        /**
+         * @param sender sender
+         * @param env pointer to environment struct
+         * @param chunked chunked
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_status_t (AXIS2_CALL *
+                set_chunked)(
+                    axiom_soap_over_http_sender_t *sender,
+                    const axis2_env_t *env, 
+                    axis2_bool_t chunked);
+
+        /**
+         * @param sender sender
+         * @param env pointer to environment struct
+         * @param om_output om output
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_status_t (AXIS2_CALL *
+                set_om_output)(
+                    axiom_soap_over_http_sender_t *sender,
+                    const axis2_env_t *env, 
+                    axiom_output_t *om_output);
+
+        /**
+         * @param sender sender
+         * @param env pointer to environment struct
+         * @param version pointer to version
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_status_t (AXIS2_CALL *
+                set_http_version)(
+                    axiom_soap_over_http_sender_t *sender,
+                    const axis2_env_t *env, 
+                    axis2_char_t *version);
+
+        /**
+         * @param sender sender
+         * @param env pointer to environment struct
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_status_t (AXIS2_CALL *
+                free)(
+                    axiom_soap_over_http_sender_t *sender,
+                    const axis2_env_t *env);
+    };
+
+
+    /**
+     * @param sender soap over http sender
+     * @param env pointer to environment struct
+     * @param msg_ctx pointer to message context
+     * @param response pointer to response
+     */
+    axis2_status_t AXIS2_CALL
+    axiom_soap_over_http_sender_get_header_info(
+        axiom_soap_over_http_sender_t *sender,
+        const axis2_env_t *env, 
+        axis2_msg_ctx_t *msg_ctx,
+        axis2_http_simple_response_t *response);
+
+    /**
+     * @param sender soap over http sender
+     * @param env pointer to environment struct
+     * @param msg_ctx pointer to message context
+     * @param response pointer to response
+     */
+    axis2_status_t AXIS2_CALL
+    axiom_soap_over_http_sender_process_response(
+        axiom_soap_over_http_sender_t *sender,
+        const axis2_env_t *env, 
+        axis2_msg_ctx_t *msg_ctx,
+        axis2_http_simple_response_t *response);
+
+
+    /**
+     * @param sender soap over http sender
+     * @param env pointer to environment struct
+     * @param msg_ctx pointer to message context
+     */
+    axis2_status_t AXIS2_CALL
+    axiom_soap_over_http_sender_get_timeout_values(
+        axiom_soap_over_http_sender_t *sender,
+        const axis2_env_t *env, 
+        axis2_msg_ctx_t *msg_ctx);
+
+    /**
+     * Axis2 SOAP over HTTP sender
+     */
+    struct axiom_soap_over_http_sender
+    {
+        /** Operations of Axis2 SOAP over HTTP sender */
+        axiom_soap_over_http_sender_ops_t *ops;
+    };
+
+
+    /**
+     * @param env pointer to environment struct
+     */
+    AXIS2_EXTERN axiom_soap_over_http_sender_t *AXIS2_CALL
+    axiom_soap_over_http_sender_create(
+        const axis2_env_t *env);
 
 /********************* Start of function macros   ***************************/
 
+/** Send.
+    @sa axis2_soap_over_http_sender_ops#send */
 #define AXIOM_SOAP_OVER_HTTP_SENDER_SEND(sender, env, msg_ctx, output, url, \
                   soap_action) ((sender)->ops->send (sender, env, msg_ctx\
                   ,output, url, soap_action))
+
+/** Set chunked.
+    @sa axis2_soap_over_http_sender_ops#set_chunked */
 #define AXIOM_SOAP_OVER_HTTP_SENDER_SET_CHUNKED(sender, env, chunked) \
                         ((sender)->ops->set_chunked(sender, env, chunked))
+
+/** Set om output.
+    @sa axis2_soap_over_http_sender_ops#set_om_output */
 #define AXIOM_SOAP_OVER_HTTP_SENDER_SET_OM_OUTPUT(sender, env, om_output) \
                         ((sender)->ops->set_om_output (sender, env, om_output))
+
+/** Set http version.
+    @sa axis2_soap_over_http_sender_ops#set_http_version */
 #define AXIOM_SOAP_OVER_SENDER_SET_HTTP_VERSION(sender, env, version)\
                         ((sender)->ops->set_http_version (sender, env, version))
+
+/** Frees the soap over http sender.
+    @sa axis2_soap_over_http_sender_ops#free */
 #define AXIOM_SOAP_OVER_HTTP_SENDER_FREE(sender, env) \
                         ((sender)->ops->free(sender, env))
 

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c?rev=437539&r1=437538&r2=437539&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c Sun Aug 27 22:35:29 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #include <axis2_http_transport_sender.h>
 #include <axis2_string.h>
 #include <axis2_endpoint_ref.h>
@@ -29,108 +29,114 @@
 #include <axis2_types.h>
 
 
-/** 
- * @brief HTTP Transport Sender struct impl
- *   Axis2 HTTP Transport Sender impl  
+/**
+ * HTTP Transport Sender struct impl
+ * Axis2 HTTP Transport Sender impl  
  */
-typedef struct axis2_http_transport_sender_impl 
-                     axis2_http_transport_sender_impl_t;  
-  
-struct axis2_http_transport_sender_impl
+
+typedef struct axis2_http_transport_sender_impl
 {
-   axis2_transport_sender_t transport_sender;
-   axis2_char_t *http_version;
-   axis2_bool_t chunked;
-   int connection_timeout;
-   int so_timeout;
-   
-};
+    axis2_transport_sender_t transport_sender;
+    axis2_char_t *http_version;
+    axis2_bool_t chunked;
+    int connection_timeout;
+    int so_timeout;
+
+}
+axis2_http_transport_sender_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(transport_sender) \
                          ((axis2_http_transport_sender_impl_t *)\
                      (transport_sender))
 
 /***************************** Function headers *******************************/
-axis2_status_t AXIS2_CALL 
-axis2_http_transport_sender_invoke
-                     (axis2_transport_sender_t *transport_sender, 
-                          const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx);
-    
-axis2_status_t AXIS2_CALL 
-axis2_http_transport_sender_clean_up
-                     (axis2_transport_sender_t *transport_sender, 
-                          const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx);
-    
-axis2_status_t AXIS2_CALL 
-axis2_http_transport_sender_init
-                     (axis2_transport_sender_t *transport_sender, 
-                          const axis2_env_t *env, axis2_conf_ctx_t *conf_ctx, 
-                     axis2_transport_out_desc_t *out_desc);
 axis2_status_t AXIS2_CALL
-axis2_http_transport_sender_write_message
-                     (axis2_transport_sender_t *transport_sender, 
-                          const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-                     axis2_endpoint_ref_t *epr, 
-                     axiom_soap_envelope_t *out, 
-                     axiom_output_t *om_output);
-    
-axis2_status_t AXIS2_CALL 
-axis2_http_transport_sender_free 
-                     (axis2_transport_sender_t *transport_sender, 
-                          const axis2_env_t *env);
+axis2_http_transport_sender_invoke(
+    axis2_transport_sender_t *transport_sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx);
+
+axis2_status_t AXIS2_CALL
+axis2_http_transport_sender_clean_up(
+    axis2_transport_sender_t *transport_sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx);
+
+axis2_status_t AXIS2_CALL
+axis2_http_transport_sender_init(
+    axis2_transport_sender_t *transport_sender,
+    const axis2_env_t *env, 
+    axis2_conf_ctx_t *conf_ctx,
+    axis2_transport_out_desc_t *out_desc);
+
+axis2_status_t AXIS2_CALL
+axis2_http_transport_sender_write_message(
+    axis2_transport_sender_t *transport_sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_endpoint_ref_t *epr,
+    axiom_soap_envelope_t *out,
+    axiom_output_t *om_output);
+
+axis2_status_t AXIS2_CALL
+axis2_http_transport_sender_free(
+    axis2_transport_sender_t *transport_sender,
+    const axis2_env_t *env);
+
 /***************************** End of function headers ************************/
 
-axis2_transport_sender_t* AXIS2_CALL
-axis2_http_transport_sender_create(const axis2_env_t *env)
+axis2_transport_sender_t *AXIS2_CALL
+axis2_http_transport_sender_create(
+    const axis2_env_t *env)
 {
     axis2_http_transport_sender_impl_t *transport_sender_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
-        
-    transport_sender_impl = (axis2_http_transport_sender_impl_t *)AXIS2_MALLOC 
-                            (env->allocator, sizeof(
-                            axis2_http_transport_sender_impl_t));
-   
+
+    transport_sender_impl = (axis2_http_transport_sender_impl_t *)AXIS2_MALLOC
+            (env->allocator, sizeof(
+                        axis2_http_transport_sender_impl_t));
+
     if(NULL == transport_sender_impl)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-      return NULL;
-   }
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
     transport_sender_impl->http_version = AXIS2_STRDUP(
-                  AXIS2_HTTP_HEADER_PROTOCOL_11, env);
-   transport_sender_impl->chunked = AXIS2_TRUE;
-   transport_sender_impl->connection_timeout = 
-                  AXIS2_HTTP_DEFAULT_CONNECTION_TIMEOUT;
-   transport_sender_impl->so_timeout = AXIS2_HTTP_DEFAULT_SO_TIMEOUT;
+                AXIS2_HTTP_HEADER_PROTOCOL_11, env);
+    transport_sender_impl->chunked = AXIS2_TRUE;
+    transport_sender_impl->connection_timeout =
+        AXIS2_HTTP_DEFAULT_CONNECTION_TIMEOUT;
+    transport_sender_impl->so_timeout = AXIS2_HTTP_DEFAULT_SO_TIMEOUT;
     transport_sender_impl->transport_sender.ops = AXIS2_MALLOC(env->allocator
-                  ,sizeof(axis2_transport_sender_ops_t));
+            , sizeof(axis2_transport_sender_ops_t));
     if(NULL == transport_sender_impl->transport_sender.ops)
-   {
-      axis2_http_transport_sender_free((axis2_transport_sender_t*)
-                  transport_sender_impl, env);
+    {
+        axis2_http_transport_sender_free((axis2_transport_sender_t *)
+                transport_sender_impl, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-      return NULL;
-   }
-    
-    transport_sender_impl->transport_sender.ops->invoke = 
-                        axis2_http_transport_sender_invoke;
-    transport_sender_impl->transport_sender.ops->cleanup = 
-                  axis2_http_transport_sender_clean_up;
-    transport_sender_impl->transport_sender.ops->init = 
-                  axis2_http_transport_sender_init;
-    transport_sender_impl->transport_sender.ops->free = 
-                  axis2_http_transport_sender_free;
-                        
-   return &(transport_sender_impl->transport_sender);
+        return NULL;
+    }
+
+    transport_sender_impl->transport_sender.ops->invoke =
+        axis2_http_transport_sender_invoke;
+    transport_sender_impl->transport_sender.ops->cleanup =
+        axis2_http_transport_sender_clean_up;
+    transport_sender_impl->transport_sender.ops->init =
+        axis2_http_transport_sender_init;
+    transport_sender_impl->transport_sender.ops->free =
+        axis2_http_transport_sender_free;
+
+    return &(transport_sender_impl->transport_sender);
 }
 
 
-axis2_status_t AXIS2_CALL 
-axis2_http_transport_sender_free 
-                  (axis2_transport_sender_t *transport_sender, 
-                  const axis2_env_t *env)
+axis2_status_t AXIS2_CALL
+axis2_http_transport_sender_free(
+    axis2_transport_sender_t *transport_sender,
+    const axis2_env_t *env)
 {
     axis2_http_transport_sender_impl_t *transport_sender_impl = NULL;
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     transport_sender_impl = AXIS2_INTF_TO_IMPL(transport_sender);
 
     if(NULL != transport_sender_impl->http_version)
@@ -141,16 +147,17 @@
 
     if(NULL != transport_sender->ops)
         AXIS2_FREE(env->allocator, transport_sender->ops);
-    
-   AXIS2_FREE(env->allocator, transport_sender_impl);
-   return AXIS2_SUCCESS;
+
+    AXIS2_FREE(env->allocator, transport_sender_impl);
+    return AXIS2_SUCCESS;
 }
 
 
-axis2_status_t AXIS2_CALL 
-axis2_http_transport_sender_invoke
-                     (axis2_transport_sender_t *transport_sender, 
-                          const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx)
+axis2_status_t AXIS2_CALL
+axis2_http_transport_sender_invoke(
+    axis2_transport_sender_t *transport_sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx)
 {
     const axis2_char_t *char_set_enc = NULL;
     axis2_endpoint_ref_t *epr = NULL;
@@ -165,89 +172,89 @@
     axis2_byte_t *output_stream = NULL;
     int buffer_size = 0;
 
-    
 
-   
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
-   
-   property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
-                     AXIS2_CHARACTER_SET_ENCODING, AXIS2_FALSE);
+
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+
+    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
+            AXIS2_CHARACTER_SET_ENCODING, AXIS2_FALSE);
     if(property)
     {
         char_set_enc = AXIS2_PROPERTY_GET_VALUE(property, env);
         property = NULL;
     }
-   if(NULL == char_set_enc)
-   {
-      axis2_op_ctx_t *op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
-      if(NULL != op_ctx)
-      {
+    if(NULL == char_set_enc)
+    {
+        axis2_op_ctx_t *op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
+        if(NULL != op_ctx)
+        {
             axis2_ctx_t *ctx = AXIS2_OP_CTX_GET_BASE(op_ctx, env);
             if (ctx)
             {
-             property = AXIS2_CTX_GET_PROPERTY(ctx, env, 
-                     AXIS2_CHARACTER_SET_ENCODING, AXIS2_FALSE);
+                property = AXIS2_CTX_GET_PROPERTY(ctx, env,
+                        AXIS2_CHARACTER_SET_ENCODING, AXIS2_FALSE);
                 if(property)
                 {
                     char_set_enc = AXIS2_PROPERTY_GET_VALUE(property, env);
                     property = NULL;
                 }
             }
-      }
-   }
-   /**
-    * If we still can't find the char set enc we will
-    * use default
-    */
-   if(NULL == char_set_enc)
-   {
-      char_set_enc = AXIS2_DEFAULT_CHAR_SET_ENCODING;
-   }
-      
-   do_mtom = axis2_http_transport_utils_do_write_mtom(env,
-                     msg_ctx);
-   AXIS2_MSG_CTX_SET_DOING_MTOM(msg_ctx, env, do_mtom);
-   /*do_mtom = AXIS2_MSG_CTX_GET_DOING_MTOM(msg_ctx, env);*/
-   /*AXIS2_MSG_CTX_SET_DOING_REST(msg_ctx, 
-                     env, axis2_http_transport_utils_is_doing_rest(env, 
-                     msg_ctx));*/
-   property = (axis2_property_t*)AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
-                     AXIS2_TRANSPORT_URL, AXIS2_FALSE);
+        }
+    }
+    /**
+     * If we still can't find the char set enc we will
+     * use default
+     */
+    if(NULL == char_set_enc)
+    {
+        char_set_enc = AXIS2_DEFAULT_CHAR_SET_ENCODING;
+    }
+
+    do_mtom = axis2_http_transport_utils_do_write_mtom(env,
+            msg_ctx);
+    AXIS2_MSG_CTX_SET_DOING_MTOM(msg_ctx, env, do_mtom);
+    /*do_mtom = AXIS2_MSG_CTX_GET_DOING_MTOM(msg_ctx, env);*/
+    /*AXIS2_MSG_CTX_SET_DOING_REST(msg_ctx,
+                      env, axis2_http_transport_utils_is_doing_rest(env, 
+                      msg_ctx));*/
+    property = (axis2_property_t *)AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
+            AXIS2_TRANSPORT_URL, AXIS2_FALSE);
     if(property)
     {
         transport_url = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE(property, env);
         property = NULL;
     }
-   if(NULL != transport_url)
-   {
-      epr = axis2_endpoint_ref_create(env, transport_url);
-   }
-   else
-   {
-      axis2_endpoint_ref_t *ctx_epr = AXIS2_MSG_CTX_GET_TO(msg_ctx, env);
-      if(NULL !=  ctx_epr && 0 != AXIS2_STRCMP(
-                     AXIS2_WSA_ANONYMOUS_URL_SUBMISSION, 
-                     AXIS2_ENDPOINT_REF_GET_ADDRESS(ctx_epr, env)) &&
-                     0 != AXIS2_STRCMP(AXIS2_WSA_ANONYMOUS_URL, 
-                     AXIS2_ENDPOINT_REF_GET_ADDRESS(ctx_epr, env)))
-      {
-         epr = ctx_epr;
-      }
-   }
-   
+    if(NULL != transport_url)
+    {
+        epr = axis2_endpoint_ref_create(env, transport_url);
+    }
+    else
+    {
+        axis2_endpoint_ref_t *ctx_epr = AXIS2_MSG_CTX_GET_TO(msg_ctx, env);
+        if(NULL !=  ctx_epr && 0 != AXIS2_STRCMP(
+                    AXIS2_WSA_ANONYMOUS_URL_SUBMISSION,
+                    AXIS2_ENDPOINT_REF_GET_ADDRESS(ctx_epr, env)) &&
+                0 != AXIS2_STRCMP(AXIS2_WSA_ANONYMOUS_URL,
+                        AXIS2_ENDPOINT_REF_GET_ADDRESS(ctx_epr, env)))
+        {
+            epr = ctx_epr;
+        }
+    }
+
     soap_data_out = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
     if(NULL == soap_data_out)
     {
-        AXIS2_ERROR_SET(env->error, 
-                    AXIS2_ERROR_NULL_SOAP_ENVELOPE_IN_MSG_CTX, 
-                    AXIS2_FAILURE);
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "%s", 
-                        AXIS2_ERROR_GET_MESSAGE(env->error));
+        AXIS2_ERROR_SET(env->error,
+                AXIS2_ERROR_NULL_SOAP_ENVELOPE_IN_MSG_CTX,
+                AXIS2_FAILURE);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "%s",
+                AXIS2_ERROR_GET_MESSAGE(env->error));
         return AXIS2_FAILURE;
     }
-    xml_writer = axiom_xml_writer_create_for_memory(env, NULL, 
-                    AXIS2_TRUE, 0, AXIS2_XML_PARSER_TYPE_BUFFER);
+    xml_writer = axiom_xml_writer_create_for_memory(env, NULL,
+            AXIS2_TRUE, 0, AXIS2_XML_PARSER_TYPE_BUFFER);
     if(NULL == xml_writer)
     {
         return AXIS2_FAILURE;
@@ -261,98 +268,98 @@
     }
 
     AXIOM_OUTPUT_SET_SOAP11(om_output, env, AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env));
-   if(NULL != epr)
-   {
-        if (AXIS2_STRCMP(AXIS2_WSA_NONE_URL_SUBMISSION, AXIS2_ENDPOINT_REF_GET_ADDRESS(epr, env)) == 0 || 
-                AXIS2_STRCMP(AXIS2_WSA_NONE_URL, AXIS2_ENDPOINT_REF_GET_ADDRESS(epr, env)) ==0 )
+    if(NULL != epr)
+    {
+        if (AXIS2_STRCMP(AXIS2_WSA_NONE_URL_SUBMISSION, AXIS2_ENDPOINT_REF_GET_ADDRESS(epr, env)) == 0 ||
+                AXIS2_STRCMP(AXIS2_WSA_NONE_URL, AXIS2_ENDPOINT_REF_GET_ADDRESS(epr, env)) == 0 )
         {
             epr = NULL;
         }
         else
         {
-          axis2_http_transport_sender_write_message(transport_sender, env, msg_ctx
-                     , epr, soap_data_out, om_output);
-        }    
-   }
-   
+            axis2_http_transport_sender_write_message(transport_sender, env, msg_ctx
+                    , epr, soap_data_out, om_output);
+        }
+    }
+
     if (!epr)
-   {
-      axis2_stream_t *out_stream = NULL;
-        
+    {
+        axis2_stream_t *out_stream = NULL;
+
         property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
-                     AXIS2_TRANSPORT_OUT, AXIS2_FALSE);
+                AXIS2_TRANSPORT_OUT, AXIS2_FALSE);
         if(property)
         {
             out_stream = AXIS2_PROPERTY_GET_VALUE(property, env);
             property = NULL;
         }
-      if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_SERVER_SIDE(msg_ctx, env))
-      {
+        if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_SERVER_SIDE(msg_ctx, env))
+        {
             axis2_op_ctx_t *op_ctx = NULL;
             axis2_ctx_t *ctx = NULL;
             axis2_http_out_transport_info_t *out_info = NULL;
-         axis2_bool_t is_soap11 = AXIS2_FALSE;
-                     
-            property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
-             AXIS2_HTTP_OUT_TRANSPORT_INFO, AXIS2_FALSE);
+            axis2_bool_t is_soap11 = AXIS2_FALSE;
+
+            property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
+                    AXIS2_HTTP_OUT_TRANSPORT_INFO, AXIS2_FALSE);
             if(property)
             {
-              
-              out_info = (axis2_http_out_transport_info_t *) 
-                    AXIS2_PROPERTY_GET_VALUE(property, env);
+
+                out_info = (axis2_http_out_transport_info_t *)
+                        AXIS2_PROPERTY_GET_VALUE(property, env);
                 property = NULL;
             }
-         
-         
-         if(NULL == out_info)
-         {
-            AXIS2_ERROR_SET(env->error, 
-                     AXIS2_ERROR_OUT_TRNSPORT_INFO_NULL, AXIS2_FAILURE);
+
+
+            if(NULL == out_info)
+            {
+                AXIS2_ERROR_SET(env->error,
+                        AXIS2_ERROR_OUT_TRNSPORT_INFO_NULL, AXIS2_FAILURE);
                 AXIOM_OUTPUT_FREE(om_output, env);
                 om_output = NULL;
                 xml_writer = NULL;
-            return AXIS2_FAILURE;
-         }
-         is_soap11 = AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env);
-         /* AXIOM_OUTPUT_SET_SOAP11(om_output, env, is_soap_11);
-          */
-         AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CHAR_ENCODING(out_info, env, 
-                     char_set_enc);
-         if(AXIS2_TRUE == is_soap11)
+                return AXIS2_FAILURE;
+            }
+            is_soap11 = AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env);
+            /* AXIOM_OUTPUT_SET_SOAP11(om_output, env, is_soap_11);
+             */
+            AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CHAR_ENCODING(out_info, env,
+                    char_set_enc);
+            if(AXIS2_TRUE == is_soap11)
             {
-                AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CONTENT_TYPE(out_info, env, 
+                AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CONTENT_TYPE(out_info, env,
                         AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML);
             }
             else
             {
-                AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CONTENT_TYPE(out_info, env, 
+                AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CONTENT_TYPE(out_info, env,
                         AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP);
             }
             /*
             AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CONTENT_TYPE(out_info, env, 
                      AXIOM_OUTPUT_GET_CONTENT_TYPE(om_output, env));*/
-         /* AXIOM_OUTPUT_SET_DO_OPTIMIZE(om_output, env, 
-          *            AXIS2_MSG_CTX_GET_IS_DOING_MTOM(msg_ctx, env);
-          */
+            /* AXIOM_OUTPUT_SET_DO_OPTIMIZE(om_output, env,
+             *            AXIS2_MSG_CTX_GET_IS_DOING_MTOM(msg_ctx, env);
+             */
             if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_DOING_REST(msg_ctx, env))
             {
                 axiom_node_t *body_node = NULL;
                 axiom_soap_body_t *soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(
-                                soap_data_out, env);
-                
+                            soap_data_out, env);
+
                 if(NULL == soap_body)
                 {
-                    AXIS2_ERROR_SET(env->error, 
-                                AXIS2_ERROR_SOAP_ENVELOPE_OR_SOAP_BODY_NULL, 
-                                AXIS2_FAILURE);
-                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "%s", 
-                                AXIS2_ERROR_GET_MESSAGE(env->error));
+                    AXIS2_ERROR_SET(env->error,
+                            AXIS2_ERROR_SOAP_ENVELOPE_OR_SOAP_BODY_NULL,
+                            AXIS2_FAILURE);
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "%s",
+                            AXIS2_ERROR_GET_MESSAGE(env->error));
                     AXIOM_OUTPUT_FREE(om_output, env);
                     om_output = NULL;
                     xml_writer = NULL;
                     return AXIS2_FAILURE;
                 }
-                body_node = AXIOM_SOAP_BODY_GET_BASE_NODE(soap_body,env);
+                body_node = AXIOM_SOAP_BODY_GET_BASE_NODE(soap_body, env);
                 if(NULL == body_node)
                 {
                     AXIOM_OUTPUT_FREE(om_output, env);
@@ -361,8 +368,8 @@
                     return AXIS2_FAILURE;
                 }
                 data_out = AXIOM_NODE_GET_FIRST_CHILD(body_node, env);
-                if(NULL == data_out || AXIOM_NODE_GET_NODE_TYPE(data_out,env)
-                                != AXIOM_ELEMENT)
+                if(NULL == data_out || AXIOM_NODE_GET_NODE_TYPE(data_out, env)
+                        != AXIOM_ELEMENT)
                 {
                     AXIOM_OUTPUT_FREE(om_output, env);
                     om_output = NULL;
@@ -376,30 +383,30 @@
             else
             {
                 AXIOM_OUTPUT_SET_DO_OPTIMIZE(om_output, env,
-                               do_mtom);
-                AXIOM_SOAP_ENVELOPE_SERIALIZE (soap_data_out, env, om_output, 
-                            AXIS2_FALSE);
+                        do_mtom);
+                AXIOM_SOAP_ENVELOPE_SERIALIZE (soap_data_out, env, om_output,
+                        AXIS2_FALSE);
                 if (do_mtom)
                 {
                     axis2_char_t *content_type = NULL;
                     AXIOM_OUTPUT_FLUSH(om_output, env, &output_stream,
-                                    &buffer_size);
+                            &buffer_size);
                     content_type = (axis2_char_t *)AXIOM_OUTPUT_GET_CONTENT_TYPE(
-                            om_output,
-                            env);
-                    AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CONTENT_TYPE(out_info, 
-                        env, content_type);
+                                om_output,
+                                env);
+                    AXIS2_HTTP_OUT_TRANSPORT_INFO_SET_CONTENT_TYPE(out_info,
+                            env, content_type);
                     buffer = output_stream;
                 }
                 else
                 {
-                    buffer = (axis2_char_t*)AXIOM_XML_WRITER_GET_XML(xml_writer, env);
+                    buffer = (axis2_char_t *)AXIOM_XML_WRITER_GET_XML(xml_writer, env);
                     buffer_size = AXIS2_STRLEN(buffer);
                 }
             }
-         AXIS2_STREAM_WRITE(out_stream, env, buffer, buffer_size);            
-         AXIS2_FREE(env->allocator, buffer);
-   
+            AXIS2_STREAM_WRITE(out_stream, env, buffer, buffer_size);
+            AXIS2_FREE(env->allocator, buffer);
+
             op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
             if (op_ctx)
             {
@@ -413,15 +420,15 @@
                     AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
                     AXIS2_PROPERTY_SET_VALUE(property, env, value);
                     AXIS2_CTX_SET_PROPERTY(ctx, env, AXIS2_RESPONSE_WRITTEN,
-                                                property, AXIS2_FALSE);
+                            property, AXIS2_FALSE);
                 }
             }
-            
-      }
-   }
-   AXIOM_OUTPUT_FREE(om_output, env);
-   om_output = NULL;
-   xml_writer = NULL;
+
+        }
+    }
+    AXIOM_OUTPUT_FREE(om_output, env);
+    om_output = NULL;
+    xml_writer = NULL;
 
     if(NULL != transport_url)
     {
@@ -431,219 +438,223 @@
             epr = NULL;
         }
     }
-   /*
-    * TODO handle errors
-    */   
+    /*
+     * TODO handle errors
+     */
     return AXIS2_SUCCESS;
 }
 
 
-axis2_status_t AXIS2_CALL 
-axis2_http_transport_sender_clean_up
-                     (axis2_transport_sender_t *transport_sender, 
-                          const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx)
+axis2_status_t AXIS2_CALL
+axis2_http_transport_sender_clean_up(
+    axis2_transport_sender_t *transport_sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
-   /*
-    * Clean up is not used. If the http sender needs
-    * to be cleaned up it should be done here.
-    */
-   return AXIS2_SUCCESS;
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+    /*
+     * Clean up is not used. If the http sender needs
+     * to be cleaned up it should be done here.
+     */
+    return AXIS2_SUCCESS;
 }
 
 
-axis2_status_t AXIS2_CALL 
-axis2_http_transport_sender_init
-                     (axis2_transport_sender_t *transport_sender, 
-                          const axis2_env_t *env, axis2_conf_ctx_t *conf_ctx, 
-                     axis2_transport_out_desc_t *out_desc)
+axis2_status_t AXIS2_CALL
+axis2_http_transport_sender_init(
+    axis2_transport_sender_t *transport_sender,
+    const axis2_env_t *env, 
+    axis2_conf_ctx_t *conf_ctx,
+    axis2_transport_out_desc_t *out_desc)
 {
-   axis2_param_t *version_param = NULL;
+    axis2_param_t *version_param = NULL;
     axis2_char_t *version = NULL;
-   axis2_char_t *temp = NULL;
-   axis2_param_t *temp_param = NULL;
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    axis2_char_t *temp = NULL;
+    axis2_param_t *temp_param = NULL;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, out_desc, AXIS2_FAILURE);
-   
-   version_param = AXIS2_PARAM_CONTAINER_GET_PARAM(
-                     out_desc->param_container, env, 
-                     AXIS2_HTTP_PROTOCOL_VERSION);
-   if(NULL != version_param)
-   {
-      version = AXIS2_PARAM_GET_VALUE(version_param, env);
-   }
-   if(NULL != version)
-   {
-      if(0 == AXIS2_STRCMP(version, AXIS2_HTTP_HEADER_PROTOCOL_11))
-      {
-         axis2_char_t *encoding = NULL;
-         axis2_param_t *encoding_param = NULL;
-         if(NULL != AXIS2_INTF_TO_IMPL(transport_sender)->http_version)
-         {
-            AXIS2_FREE(env->allocator, 
-                     AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
-         }
-         AXIS2_INTF_TO_IMPL(transport_sender)->http_version = AXIS2_STRDUP(
-                     version, env);
-         encoding_param = AXIS2_PARAM_CONTAINER_GET_PARAM(
-                     out_desc->param_container, env, 
-                     AXIS2_HTTP_HEADER_TRANSFER_ENCODING);
-         if(NULL != encoding_param)
-         {
-            encoding = AXIS2_PARAM_GET_VALUE(encoding_param, env);
-         }
-         if(NULL != encoding && 0 == AXIS2_STRCMP(encoding, 
-                     AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
-         {
-            AXIS2_INTF_TO_IMPL(transport_sender)->chunked = AXIS2_TRUE;
-         }
-         else
-         {
+    AXIS2_PARAM_CHECK(env->error, out_desc, AXIS2_FAILURE);
+
+    version_param = AXIS2_PARAM_CONTAINER_GET_PARAM(
+                out_desc->param_container, env,
+                AXIS2_HTTP_PROTOCOL_VERSION);
+    if(NULL != version_param)
+    {
+        version = AXIS2_PARAM_GET_VALUE(version_param, env);
+    }
+    if(NULL != version)
+    {
+        if(0 == AXIS2_STRCMP(version, AXIS2_HTTP_HEADER_PROTOCOL_11))
+        {
+            axis2_char_t *encoding = NULL;
+            axis2_param_t *encoding_param = NULL;
+            if(NULL != AXIS2_INTF_TO_IMPL(transport_sender)->http_version)
+            {
+                AXIS2_FREE(env->allocator,
+                        AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
+            }
+            AXIS2_INTF_TO_IMPL(transport_sender)->http_version = AXIS2_STRDUP(
+                        version, env);
+            encoding_param = AXIS2_PARAM_CONTAINER_GET_PARAM(
+                        out_desc->param_container, env,
+                        AXIS2_HTTP_HEADER_TRANSFER_ENCODING);
+            if(NULL != encoding_param)
+            {
+                encoding = AXIS2_PARAM_GET_VALUE(encoding_param, env);
+            }
+            if(NULL != encoding && 0 == AXIS2_STRCMP(encoding,
+                    AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
+            {
+                AXIS2_INTF_TO_IMPL(transport_sender)->chunked = AXIS2_TRUE;
+            }
+            else
+            {
+                AXIS2_INTF_TO_IMPL(transport_sender)->chunked = AXIS2_FALSE;
+            }
+        }
+        else if(0 == AXIS2_STRCMP(version, AXIS2_HTTP_HEADER_PROTOCOL_10))
+        {
+            if(NULL != AXIS2_INTF_TO_IMPL(transport_sender)->http_version)
+            {
+                AXIS2_FREE(env->allocator,
+                        AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
+            }
+            AXIS2_INTF_TO_IMPL(transport_sender)->http_version = AXIS2_STRDUP(
+                        version, env);
             AXIS2_INTF_TO_IMPL(transport_sender)->chunked = AXIS2_FALSE;
-         }
-      }
-      else if(0 == AXIS2_STRCMP(version, AXIS2_HTTP_HEADER_PROTOCOL_10))
-      {
-         if(NULL != AXIS2_INTF_TO_IMPL(transport_sender)->http_version)
-         {
-            AXIS2_FREE(env->allocator, 
-                     AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
-         }
-         AXIS2_INTF_TO_IMPL(transport_sender)->http_version = AXIS2_STRDUP(
-                     version, env);
-         AXIS2_INTF_TO_IMPL(transport_sender)->chunked = AXIS2_FALSE;
-      }
-   }
-   else
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_HTTP_VERSION, 
-                     AXIS2_FAILURE);
-      return AXIS2_FAILURE;
-   }
-      
-      
-   temp_param = AXIS2_PARAM_CONTAINER_GET_PARAM(
-                     out_desc->param_container, env, 
-                     AXIS2_HTTP_SO_TIMEOUT);
-   if(NULL != temp_param)
-   {
-      temp = AXIS2_PARAM_GET_VALUE(temp_param, env);
-   }
-   if(NULL != temp)
-   {
-      AXIS2_INTF_TO_IMPL(transport_sender)->so_timeout = AXIS2_ATOI(temp);
-   }
-   temp = (axis2_char_t *)AXIS2_PARAM_CONTAINER_GET_PARAM(
-                     out_desc->param_container, env, 
-                     AXIS2_HTTP_CONNECTION_TIMEOUT);
-   if(NULL != temp_param)
-   {
-      temp = AXIS2_PARAM_GET_VALUE(temp_param, env);
-   }
-   if(NULL != temp)
-   {
-      AXIS2_INTF_TO_IMPL(transport_sender)->connection_timeout = 
-                        AXIS2_ATOI(temp);
-   }
+        }
+    }
+    else
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_HTTP_VERSION,
+                AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+
+
+    temp_param = AXIS2_PARAM_CONTAINER_GET_PARAM(
+                out_desc->param_container, env,
+                AXIS2_HTTP_SO_TIMEOUT);
+    if(NULL != temp_param)
+    {
+        temp = AXIS2_PARAM_GET_VALUE(temp_param, env);
+    }
+    if(NULL != temp)
+    {
+        AXIS2_INTF_TO_IMPL(transport_sender)->so_timeout = AXIS2_ATOI(temp);
+    }
+    temp = (axis2_char_t *)AXIS2_PARAM_CONTAINER_GET_PARAM(
+                out_desc->param_container, env,
+                AXIS2_HTTP_CONNECTION_TIMEOUT);
+    if(NULL != temp_param)
+    {
+        temp = AXIS2_PARAM_GET_VALUE(temp_param, env);
+    }
+    if(NULL != temp)
+    {
+        AXIS2_INTF_TO_IMPL(transport_sender)->connection_timeout =
+            AXIS2_ATOI(temp);
+    }
 
-   return AXIS2_SUCCESS;
+    return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
-axis2_http_transport_sender_write_message
-                     (axis2_transport_sender_t *transport_sender, 
-                          const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-                     axis2_endpoint_ref_t *epr, 
-                     axiom_soap_envelope_t *out, 
-                     axiom_output_t *om_output)
+axis2_http_transport_sender_write_message(
+    axis2_transport_sender_t *transport_sender,
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_endpoint_ref_t *epr,
+    axiom_soap_envelope_t *out,
+    axiom_output_t *om_output)
 {
-   const axis2_char_t *soap_action = NULL;
-   axis2_char_t *url = NULL;
-   axiom_soap_over_http_sender_t *sender = NULL;
+    const axis2_char_t *soap_action = NULL;
+    axis2_char_t *url = NULL;
+    axiom_soap_over_http_sender_t *sender = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, epr, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, om_output, AXIS2_FAILURE);
-
-   url = AXIS2_ENDPOINT_REF_GET_ADDRESS(epr, env);
-   soap_action = AXIS2_MSG_CTX_GET_SOAP_ACTION(msg_ctx, env);
-   if(NULL == soap_action || 0 == AXIS2_STRLEN(soap_action))
-   {
-      soap_action = AXIS2_MSG_CTX_GET_WSA_ACTION(msg_ctx, env);
-   }
-   if(NULL == soap_action)
-   {
-      soap_action = "";
-   }
-   if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_DOING_REST(msg_ctx, env))
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, epr, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, om_output, AXIS2_FAILURE);
+
+    url = AXIS2_ENDPOINT_REF_GET_ADDRESS(epr, env);
+    soap_action = AXIS2_MSG_CTX_GET_SOAP_ACTION(msg_ctx, env);
+    if(NULL == soap_action || 0 == AXIS2_STRLEN(soap_action))
+    {
+        soap_action = AXIS2_MSG_CTX_GET_WSA_ACTION(msg_ctx, env);
+    }
+    if(NULL == soap_action)
+    {
+        soap_action = "";
+    }
+    if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_DOING_REST(msg_ctx, env))
     {
         axiom_node_t *data_out = NULL;
         axiom_node_t *body_node = NULL;
         axiom_soap_body_t *soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(out, env);
         axis2_rest_sender_t *sender = NULL;
-        
+
         if(NULL == soap_body)
         {
-            AXIS2_ERROR_SET(env->error, 
-                        AXIS2_ERROR_SOAP_ENVELOPE_OR_SOAP_BODY_NULL, 
-                        AXIS2_FAILURE);
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "%s", 
-                        AXIS2_ERROR_GET_MESSAGE(env->error));
+            AXIS2_ERROR_SET(env->error,
+                    AXIS2_ERROR_SOAP_ENVELOPE_OR_SOAP_BODY_NULL,
+                    AXIS2_FAILURE);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "%s",
+                    AXIS2_ERROR_GET_MESSAGE(env->error));
             return AXIS2_FAILURE;
         }
-        body_node = AXIOM_SOAP_BODY_GET_BASE_NODE(soap_body,env);
+        body_node = AXIOM_SOAP_BODY_GET_BASE_NODE(soap_body, env);
         if(NULL == body_node)
         {
             return AXIS2_FAILURE;
         }
         data_out = AXIOM_NODE_GET_FIRST_CHILD(body_node, env);
         if(NULL == data_out || AXIOM_NODE_GET_NODE_TYPE(data_out, env)
-                        != AXIOM_ELEMENT)
+                != AXIOM_ELEMENT)
         {
             return AXIS2_FAILURE;
         }
-       sender = axis2_rest_sender_create(env);
-        AXIS2_REST_SENDER_SET_CHUNKED(sender, env, 
-                            AXIS2_INTF_TO_IMPL(transport_sender)->chunked);
+        sender = axis2_rest_sender_create(env);
+        AXIS2_REST_SENDER_SET_CHUNKED(sender, env,
+                AXIS2_INTF_TO_IMPL(transport_sender)->chunked);
         AXIS2_REST_SENDER_SET_OM_OUTPUT(sender, env, om_output);
-        AXIS2_REST_SENDER_SET_HTTP_VERSION(sender, env, 
-                            AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
+        AXIS2_REST_SENDER_SET_HTTP_VERSION(sender, env,
+                AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
         status = AXIS2_REST_SENDER_SEND(sender, env, msg_ctx, data_out, url);
     }
-   else
+    else
     {
         sender = axiom_soap_over_http_sender_create(env);
-        
+
         if(NULL == sender)
         {
             return AXIS2_FAILURE;
         }
-        AXIOM_SOAP_OVER_HTTP_SENDER_SET_CHUNKED(sender, env, 
-                            AXIS2_INTF_TO_IMPL(transport_sender)->chunked);
+        AXIOM_SOAP_OVER_HTTP_SENDER_SET_CHUNKED(sender, env,
+                AXIS2_INTF_TO_IMPL(transport_sender)->chunked);
         AXIOM_SOAP_OVER_HTTP_SENDER_SET_OM_OUTPUT(sender, env, om_output);
-        AXIOM_SOAP_OVER_SENDER_SET_HTTP_VERSION(sender, env, 
-                            AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
+        AXIOM_SOAP_OVER_SENDER_SET_HTTP_VERSION(sender, env,
+                AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
         status = AXIOM_SOAP_OVER_HTTP_SENDER_SEND(sender, env, msg_ctx, out, url
-                            , soap_action);
+                , soap_action);
         /*
          * TODO check for errors
          */
         AXIOM_SOAP_OVER_HTTP_SENDER_FREE(sender, env);
         sender = NULL;
     }
-   return status;
+    return status;
 }
 
 /**
  * Following block distinguish the exposed part of the dll.
  */
-AXIS2_EXPORT int 
-axis2_get_instance(struct axis2_transport_sender **inst,
-                        const axis2_env_t *env)
+AXIS2_EXPORT int
+axis2_get_instance(
+    struct axis2_transport_sender **inst,
+    const axis2_env_t *env)
 {
     *inst = axis2_http_transport_sender_create(env);
     if(!(*inst))
@@ -655,9 +666,10 @@
     return AXIS2_SUCCESS;
 }
 
-AXIS2_EXPORT int 
-axis2_remove_instance(axis2_transport_sender_t *inst,
-                            const axis2_env_t *env)
+AXIS2_EXPORT int
+axis2_remove_instance(
+    axis2_transport_sender_t *inst,
+    const axis2_env_t *env)
 {
     axis2_status_t status = AXIS2_FAILURE;
     if (inst)

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c?rev=437539&r1=437538&r2=437539&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c Sun Aug 27 22:35:29 2006
@@ -32,10 +32,8 @@
  * @brief SOAP over HTTP sender struct impl
  *   Axis2 SOAP over HTTP sender impl  
  */
-typedef struct axiom_soap_over_http_sender_impl 
-                  axiom_soap_over_http_sender_impl_t;  
   
-struct axiom_soap_over_http_sender_impl
+typedef struct axiom_soap_over_http_sender_impl
 {
    axiom_soap_over_http_sender_t sender;
    axis2_char_t *http_version;
@@ -44,66 +42,76 @@
    int connection_timeout;
    axiom_output_t *om_output;
    axis2_http_client_t *client;
-};
+}
+axiom_soap_over_http_sender_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(sender) \
                        ((axiom_soap_over_http_sender_impl_t *)(sender))
 
 /***************************** Function headers *******************************/
 axis2_status_t AXIS2_CALL 
-axiom_soap_over_http_sender_get_header_info 
-                  (axiom_soap_over_http_sender_t *sender, 
-                  const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-                  axis2_http_simple_response_t *response);
+axiom_soap_over_http_sender_get_header_info(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_http_simple_response_t *response);
 
 axis2_status_t AXIS2_CALL
-axiom_soap_over_http_sender_process_response 
-                  (axiom_soap_over_http_sender_t *sender, 
-                  const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx, 
-                  axis2_http_simple_response_t *response);
+axiom_soap_over_http_sender_process_response(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx, 
+    axis2_http_simple_response_t *response);
 
 axis2_status_t AXIS2_CALL
-axiom_soap_over_http_sender_get_timeout_values 
-                  (axiom_soap_over_http_sender_t *sender, 
-                  const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx);
+axiom_soap_over_http_sender_get_timeout_values(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx);
 
 axis2_status_t AXIS2_CALL 
-axiom_soap_over_http_sender_send 
-                  (axiom_soap_over_http_sender_t *sender, 
-                  const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-                  axiom_soap_envelope_t *out, 
-                  const axis2_char_t *str_url, 
-                  const axis2_char_t *soap_action);
+axiom_soap_over_http_sender_send(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx,
+    axiom_soap_envelope_t *out, 
+    const axis2_char_t *str_url, 
+    const axis2_char_t *soap_action);
 
 axis2_status_t AXIS2_CALL 
-axiom_soap_over_http_sender_set_chunked
-                  (axiom_soap_over_http_sender_t *sender, 
-                  const axis2_env_t *env, axis2_bool_t chunked);
+axiom_soap_over_http_sender_set_chunked(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_bool_t chunked);
 
 axis2_status_t AXIS2_CALL 
-axiom_soap_over_http_sender_set_om_output
-                  (axiom_soap_over_http_sender_t *sender, 
-                  const axis2_env_t *env, axiom_output_t *om_output);
+axiom_soap_over_http_sender_set_om_output(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axiom_output_t *om_output);
                   
 axis2_status_t AXIS2_CALL
-axiom_soap_over_http_sender_set_http_version
-                           (axiom_soap_over_http_sender_t *sender, 
-                           const axis2_env_t *env, axis2_char_t *version);
+axiom_soap_over_http_sender_set_http_version(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_char_t *version);
                                     
 axis2_status_t AXIS2_CALL
 axiom_soap_over_http_sender_configure_proxy(
-                                    axiom_soap_over_http_sender_t *sender, 
-                           const axis2_env_t *env, 
-                                    axis2_msg_ctx_t *msg_ctx);
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx);
 
 axis2_status_t AXIS2_CALL 
-axiom_soap_over_http_sender_free
-                  (axiom_soap_over_http_sender_t *sender, 
-                  const axis2_env_t *env);
+axiom_soap_over_http_sender_free(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env);
+
 /***************************** End of function headers ************************/
 
-axiom_soap_over_http_sender_t * AXIS2_CALL 
-axiom_soap_over_http_sender_create(const axis2_env_t *env)
+axiom_soap_over_http_sender_t *AXIS2_CALL 
+axiom_soap_over_http_sender_create(
+    const axis2_env_t *env)
 {
     axiom_soap_over_http_sender_impl_t *sender_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
@@ -121,22 +129,22 @@
     sender_impl->http_version = (axis2_char_t *)AXIS2_HTTP_HEADER_PROTOCOL_11;
     sender_impl->so_timeout = AXIS2_HTTP_DEFAULT_SO_TIMEOUT;
     sender_impl->connection_timeout = AXIS2_HTTP_DEFAULT_CONNECTION_TIMEOUT;
-   /* unlike the java impl we don't have a default om output
-    * it should be explicitly set and it's a MUST
-    */
-   sender_impl->om_output = NULL;
-   sender_impl->chunked = AXIS2_FALSE;
-   sender_impl->client = NULL;
+    /* unlike the java impl we don't have a default om output
+     * it should be explicitly set and it's a MUST
+     */
+    sender_impl->om_output = NULL;
+    sender_impl->chunked = AXIS2_FALSE;
+    sender_impl->client = NULL;
     
     sender_impl->sender.ops = AXIS2_MALLOC(env->allocator,
                         sizeof(axiom_soap_over_http_sender_ops_t));
     if(NULL == sender_impl->sender.ops)
-   {
-      axiom_soap_over_http_sender_free((axiom_soap_over_http_sender_t*)
+    {
+        axiom_soap_over_http_sender_free((axiom_soap_over_http_sender_t *)
                   sender_impl, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-   }
+    }
     
     sender_impl->sender.ops->send =
                         axiom_soap_over_http_sender_send;
@@ -144,19 +152,20 @@
                         axiom_soap_over_http_sender_set_chunked;
     sender_impl->sender.ops->set_om_output =
                         axiom_soap_over_http_sender_set_om_output;
-   sender_impl->sender.ops->set_http_version =
+    sender_impl->sender.ops->set_http_version =
                   axiom_soap_over_http_sender_set_http_version;
     sender_impl->sender.ops->free =
                         axiom_soap_over_http_sender_free;
-   return &(sender_impl->sender);
+    return &(sender_impl->sender);
 }
 
 axis2_status_t AXIS2_CALL 
-axiom_soap_over_http_sender_free (axiom_soap_over_http_sender_t *sender, 
-                        const axis2_env_t *env)
+axiom_soap_over_http_sender_free(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env)
 {
     axiom_soap_over_http_sender_impl_t *sender_impl = NULL;
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     
     sender_impl = AXIS2_INTF_TO_IMPL(sender);
     if(NULL != sender_impl->http_version)
@@ -171,18 +180,19 @@
      * of the response soap message
      */
     sender_impl->client = NULL;
-   AXIS2_FREE(env->allocator, sender_impl);
-   return AXIS2_SUCCESS;
+    AXIS2_FREE(env->allocator, sender_impl);
+    return AXIS2_SUCCESS;
 }
 
 
 axis2_status_t AXIS2_CALL 
-axiom_soap_over_http_sender_send 
-                  (axiom_soap_over_http_sender_t *sender, 
-                  const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx,
-                  axiom_soap_envelope_t *out, 
-                  const axis2_char_t *str_url, 
-                  const axis2_char_t *soap_action)
+axiom_soap_over_http_sender_send(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx,
+    axiom_soap_envelope_t *out, 
+    const axis2_char_t *str_url, 
+    const axis2_char_t *soap_action)
 {
     axis2_http_simple_request_t *request = NULL;
     axis2_http_request_line_t *request_line = NULL;
@@ -206,24 +216,24 @@
     AXIS2_PARAM_CHECK(env->error, str_url, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, soap_action, AXIS2_FAILURE);
    
-   url = axis2_url_parse_string(env, str_url);
-   sender_impl = AXIS2_INTF_TO_IMPL(sender);
-   if(NULL == url)
-   {
-      return AXIS2_FAILURE;
-   }
-    
-    if (sender_impl->client)
+    url = axis2_url_parse_string(env, str_url);
+    sender_impl = AXIS2_INTF_TO_IMPL(sender);
+    if(NULL == url)
     {
-        AXIS2_HTTP_CLIENT_FREE(sender_impl->client, env);
-        sender_impl->client = NULL;
+        return AXIS2_FAILURE;
+    }
+     
+     if (sender_impl->client)
+     {
+         AXIS2_HTTP_CLIENT_FREE(sender_impl->client, env);
+         sender_impl->client = NULL;
+     }
+     
+    sender_impl->client = axis2_http_client_create(env, url);
+    if(NULL == sender_impl->client)
+    {
+        return AXIS2_FAILURE;
     }
-    
-   sender_impl->client = axis2_http_client_create(env, url);
-   if(NULL == sender_impl->client)
-   {
-      return AXIS2_FAILURE;
-   }
     /* configure proxy settings if we have set so 
      */
     axiom_soap_over_http_sender_configure_proxy(sender, env, msg_ctx);
@@ -240,30 +250,30 @@
 
     doing_mtom = AXIS2_MSG_CTX_GET_DOING_MTOM(msg_ctx, env);
 
-   if(NULL == sender_impl->om_output)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_OM_OUTPUT, 
+    if(NULL == sender_impl->om_output)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_OM_OUTPUT, 
                   AXIS2_FAILURE);
-      return AXIS2_FAILURE;
-   }
-   xml_writer = AXIOM_OUTPUT_GET_XML_WRITER(sender_impl->om_output, env);
+        return AXIS2_FAILURE;
+    }
+    xml_writer = AXIOM_OUTPUT_GET_XML_WRITER(sender_impl->om_output, env);
    
-   property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
+    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
                      AXIS2_CHARACTER_SET_ENCODING, AXIS2_FALSE);
     if(property)
     {
         char_set_enc = AXIS2_PROPERTY_GET_VALUE(property, env);
         property = NULL;
     }
-   if(NULL == char_set_enc)
-   {
-      char_set_enc = AXIS2_DEFAULT_CHAR_SET_ENCODING;
-   }
+    if(NULL == char_set_enc)
+    {
+        char_set_enc = AXIS2_DEFAULT_CHAR_SET_ENCODING;
+    }
    
     AXIOM_OUTPUT_SET_DO_OPTIMIZE(sender_impl->om_output, env, 
                doing_mtom);
    
-   AXIOM_SOAP_ENVELOPE_SERIALIZE (out, env, sender_impl->om_output, 
+    AXIOM_SOAP_ENVELOPE_SERIALIZE (out, env, sender_impl->om_output, 
                   AXIS2_FALSE);
 
     if (doing_mtom)
@@ -283,15 +293,15 @@
         return AXIS2_FAILURE;
     }
    
-   request_line = axis2_http_request_line_create(env, "POST", 
+    request_line = axis2_http_request_line_create(env, "POST", 
                   AXIS2_URL_GET_PATH(url, env), 
                   sender_impl->http_version);
-   request = axis2_http_simple_request_create(env, request_line, NULL, 0, 
+    request = axis2_http_simple_request_create(env, request_line, NULL, 0, 
                   NULL);
    
-   http_header = axis2_http_header_create(env, AXIS2_HTTP_HEADER_USER_AGENT, 
+    http_header = axis2_http_header_create(env, AXIS2_HTTP_HEADER_USER_AGENT, 
                   "Axis2/C");
-   AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+    AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
     if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env))
     {
         if('\"' != *soap_action)
@@ -312,9 +322,9 @@
         AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
     }
 
-   if(AXIS2_FALSE == sender_impl->chunked)
-   {
-      axis2_char_t tmp_buf[10];
+    if(AXIS2_FALSE == sender_impl->chunked)
+    {
+        axis2_char_t tmp_buf[10];
         int size = 0;
         if (buffer)
         {
@@ -325,40 +335,40 @@
             size = output_stream_size;
         }
         
-      sprintf(tmp_buf, "%d", size);
-      http_header = axis2_http_header_create(env, 
+       sprintf(tmp_buf, "%d", size);
+       http_header = axis2_http_header_create(env, 
                   AXIS2_HTTP_HEADER_CONTENT_LENGTH, tmp_buf);
-      AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
-   }
-   else
-   {
-      http_header = axis2_http_header_create(env, 
+       AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+    }
+    else
+    {
+        http_header = axis2_http_header_create(env, 
                   AXIS2_HTTP_HEADER_TRANSFER_ENCODING, 
                   AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED);
-      AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
-   }
-   /* TODO we need to set the content type with soap action header for soap12*/
+        AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+    }
+    /* TODO we need to set the content type with soap action header for soap12*/
     if (doing_mtom)
     {
         content_type = (axis2_char_t *)AXIOM_OUTPUT_GET_CONTENT_TYPE(sender_impl->om_output, 
                         env);
     }
-   else if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env))
-   {
+    else if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env))
+    {
         content_type = (axis2_char_t *)AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML;
         content_type = AXIS2_STRACAT(content_type, ";charset=", env);
         content_type = AXIS2_STRACAT(content_type, char_set_enc, env);
-   }
-   else
-   {
+    }
+    else
+    {
         content_type = (axis2_char_t *)AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP;
         content_type = AXIS2_STRACAT(content_type, ";charset=", env);
         content_type = AXIS2_STRACAT(content_type, char_set_enc, env);
         content_type = AXIS2_STRACAT(content_type, ";action=", env);
         content_type = AXIS2_STRACAT(content_type, soap_action, env);
         content_type = AXIS2_STRACAT(content_type, ";", env);
-   }
-   http_header = axis2_http_header_create(env, AXIS2_HTTP_HEADER_CONTENT_TYPE, 
+    }
+    http_header = axis2_http_header_create(env, AXIS2_HTTP_HEADER_CONTENT_TYPE, 
                   content_type);
     if (content_type)
     {
@@ -366,10 +376,10 @@
         content_type = NULL;
     }
     
-   AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
-   if(0 == AXIS2_STRCMP(sender_impl->http_version, 
+    AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+    if(0 == AXIS2_STRCMP(sender_impl->http_version, 
       AXIS2_HTTP_HEADER_PROTOCOL_11))
-   {
+    {
         axis2_char_t *header = NULL;
         header = AXIS2_MALLOC(env->allocator, AXIS2_STRLEN(
                         AXIS2_URL_GET_SERVER(url, env)) + 10 * sizeof(
@@ -382,11 +392,11 @@
         AXIS2_FREE(env->allocator, header);
         header = NULL;
       AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
-   }
+    }
 
     if (doing_mtom)
     {
-        axis2_stream_t* stream = AXIS2_HTTP_SIMPLE_REQUEST_GET_BODY(request, env);
+        axis2_stream_t *stream = AXIS2_HTTP_SIMPLE_REQUEST_GET_BODY(request, env);
         if (stream)
         {
             AXIS2_STREAM_WRITE(stream, env, output_stream, output_stream_size);
@@ -397,24 +407,24 @@
         AXIS2_HTTP_SIMPLE_REQUEST_SET_BODY_STRING(request, env, buffer);
     }
     
-   axiom_soap_over_http_sender_get_timeout_values(sender, env, msg_ctx);
-   AXIS2_HTTP_CLIENT_SET_TIMEOUT(sender_impl->client, env, 
+    axiom_soap_over_http_sender_get_timeout_values(sender, env, msg_ctx);
+    AXIS2_HTTP_CLIENT_SET_TIMEOUT(sender_impl->client, env, 
                   sender_impl->so_timeout);
    
-   status_code = AXIS2_HTTP_CLIENT_SEND(sender_impl->client, env, request);
+    status_code = AXIS2_HTTP_CLIENT_SEND(sender_impl->client, env, request);
     
     AXIS2_FREE(env->allocator, buffer);
     buffer = NULL;
    
-   AXIS2_HTTP_SIMPLE_REQUEST_FREE(request, env);
-   request = NULL;
+    AXIS2_HTTP_SIMPLE_REQUEST_FREE(request, env);
+    request = NULL;
    
-   status_code = AXIS2_HTTP_CLIENT_RECIEVE_HEADER(sender_impl->client, env);
+    status_code = AXIS2_HTTP_CLIENT_RECIEVE_HEADER(sender_impl->client, env);
     
     if(status_code < 0)
-   {
-      return AXIS2_FAILURE;
-   }
+    {
+       return AXIS2_FAILURE;
+    }
     response = AXIS2_HTTP_CLIENT_GET_RESPONSE(sender_impl->client, env);
     if(AXIS2_HTTP_RESPONSE_OK_CODE_VAL == status_code || 
                         AXIS2_HTTP_RESPONSE_ACK_CODE_VAL == status_code)
@@ -447,67 +457,70 @@
 
 
 axis2_status_t AXIS2_CALL 
-axiom_soap_over_http_sender_set_chunked
-                  (axiom_soap_over_http_sender_t *sender, 
-                  const axis2_env_t *env, axis2_bool_t chunked)
+axiom_soap_over_http_sender_set_chunked(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_bool_t chunked)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_INTF_TO_IMPL(sender)->chunked = chunked;
-   return AXIS2_SUCCESS;   
+    return AXIS2_SUCCESS;   
 }
 
 
 axis2_status_t AXIS2_CALL 
-axiom_soap_over_http_sender_set_om_output
-                  (axiom_soap_over_http_sender_t *sender, 
-                  const axis2_env_t *env, axiom_output_t *om_output)
+axiom_soap_over_http_sender_set_om_output(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axiom_output_t *om_output)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_INTF_TO_IMPL(sender)->om_output = om_output;
-   return AXIS2_SUCCESS;
+    return AXIS2_SUCCESS;
 }
 
 
 axis2_status_t AXIS2_CALL 
-axiom_soap_over_http_sender_get_header_info 
-                  (axiom_soap_over_http_sender_t *sender, 
-                  const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx, 
-                  axis2_http_simple_response_t *response)
-{
-   axis2_array_list_t *headers = NULL;
-   axis2_char_t *charset = NULL;
-   axiom_soap_over_http_sender_impl_t *sender_impl = NULL;
-   int i = 0;
-   axis2_bool_t response_chunked = AXIS2_FALSE;
-   int *content_length = NULL;
+axiom_soap_over_http_sender_get_header_info(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx, 
+    axis2_http_simple_response_t *response)
+{
+    axis2_array_list_t *headers = NULL;
+    axis2_char_t *charset = NULL;
+    axiom_soap_over_http_sender_impl_t *sender_impl = NULL;
+    int i = 0;
+    axis2_bool_t response_chunked = AXIS2_FALSE;
+    int *content_length = NULL;
     axis2_property_t *property = NULL;
     axis2_char_t *content_type = NULL;
    
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, response, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, response, AXIS2_FAILURE);
    
-   sender_impl = AXIS2_INTF_TO_IMPL(sender);
+    sender_impl = AXIS2_INTF_TO_IMPL(sender);
    
    /*
     * TODO MTOM support (MIME header)
     */
-   headers = AXIS2_HTTP_SIMPLE_RESPONSE_GET_HEADERS(response, env);
-   if(headers == NULL)
-   {
-      return AXIS2_SUCCESS;
-   }
-   for(i = 0; i < AXIS2_ARRAY_LIST_SIZE(headers, env); i++)
-   {
-      axis2_http_header_t *header = AXIS2_ARRAY_LIST_GET(headers, env, i);
-      axis2_char_t *name = AXIS2_HTTP_HEADER_GET_NAME((axis2_http_header_t *)
+    headers = AXIS2_HTTP_SIMPLE_RESPONSE_GET_HEADERS(response, env);
+    if(headers == NULL)
+    {
+        return AXIS2_SUCCESS;
+    }
+    for(i = 0; i < AXIS2_ARRAY_LIST_SIZE(headers, env); i++)
+    {
+        axis2_http_header_t *header = AXIS2_ARRAY_LIST_GET(headers, env, i);
+        axis2_char_t *name = AXIS2_HTTP_HEADER_GET_NAME((axis2_http_header_t *)
                   header, env);
-      if(NULL != name)
-      {
-         if(0 == AXIS2_STRCMP(name, AXIS2_HTTP_HEADER_TRANSFER_ENCODING) && 
+       if(NULL != name)
+       {
+           if(0 == AXIS2_STRCMP(name, AXIS2_HTTP_HEADER_TRANSFER_ENCODING) && 
                   0 == AXIS2_STRCMP(AXIS2_HTTP_HEADER_GET_VALUE(header
                   , env), AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
-         {
+           {
                 axis2_char_t *transfer_encoding = NULL;
 
                 transfer_encoding = 
@@ -516,27 +529,27 @@
                 property = axis2_property_create(env);
                 AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
                 AXIS2_PROPERTY_SET_VALUE(property, env, transfer_encoding);
-            AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, 
+                AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, 
                   AXIS2_HTTP_HEADER_TRANSFER_ENCODING, 
                   property,
                   AXIS2_FALSE);
-            response_chunked = AXIS2_TRUE;
-         }
-         if(0 != AXIS2_STRCMP(name, AXIS2_HTTP_HEADER_CONTENT_TYPE))
-         {
-            axis2_char_t *tmp_charset = NULL;
-            axis2_char_t *content_type = AXIS2_HTTP_HEADER_GET_VALUE(header, 
-                  env);
-            tmp_charset = strstr(content_type, AXIS2_HTTP_CHAR_SET_ENCODING);
-            if(NULL != charset)
+                response_chunked = AXIS2_TRUE;
+            }
+            if(0 != AXIS2_STRCMP(name, AXIS2_HTTP_HEADER_CONTENT_TYPE))
             {
-               charset = AXIS2_STRDUP(tmp_charset, env);
-               break;
+                axis2_char_t *tmp_charset = NULL;
+                axis2_char_t *content_type = AXIS2_HTTP_HEADER_GET_VALUE(header, 
+                  env);
+                tmp_charset = strstr(content_type, AXIS2_HTTP_CHAR_SET_ENCODING);
+                if(NULL != charset)
+                {
+                    charset = AXIS2_STRDUP(tmp_charset, env);
+                    break;
+                }
             }
-         }
-      }
-   }
-   content_type = (axis2_char_t*)AXIS2_HTTP_SIMPLE_RESPONSE_GET_CONTENT_TYPE(
+        }
+    }
+    content_type = (axis2_char_t *)AXIS2_HTTP_SIMPLE_RESPONSE_GET_CONTENT_TYPE(
                         response, env);
     if(NULL != content_type)
     {
@@ -587,50 +600,52 @@
 }
 
 axis2_status_t AXIS2_CALL
-axiom_soap_over_http_sender_process_response 
-                        (axiom_soap_over_http_sender_t *sender, 
-                                const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx, 
-                        axis2_http_simple_response_t *response)
+axiom_soap_over_http_sender_process_response(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx, 
+    axis2_http_simple_response_t *response)
 {
     axis2_stream_t *in_stream = NULL;
     axis2_property_t *property = NULL;
    
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, response, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, response, AXIS2_FAILURE);
    
-   in_stream = AXIS2_HTTP_SIMPLE_RESPONSE_GET_BODY(response, env);
-   if(NULL == in_stream)
-   {
-      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_STREAM_IN_RESPONSE_BODY, 
+    in_stream = AXIS2_HTTP_SIMPLE_RESPONSE_GET_BODY(response, env);
+    if(NULL == in_stream)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_STREAM_IN_RESPONSE_BODY, 
                         AXIS2_FAILURE);
-      return AXIS2_FAILURE;
-   }
+        return AXIS2_FAILURE;
+    }
    
-   axiom_soap_over_http_sender_get_header_info(sender, env, msg_ctx, response);
-   /*axis_ctx = AXIS2_OP_CTX_GET_BASE(AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env), 
+    axiom_soap_over_http_sender_get_header_info(sender, env, msg_ctx, response);
+    /*axis_ctx = AXIS2_OP_CTX_GET_BASE(AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env), 
                   env);*/
     property = axis2_property_create(env);
     AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env, axis2_stream_free_void_arg);
     AXIS2_PROPERTY_SET_VALUE(property, env, in_stream);
-   /*AXIS2_CTX_SET_PROPERTY(axis_ctx, env, AXIS2_TRANSPORT_IN, property, 
+    /*AXIS2_CTX_SET_PROPERTY(axis_ctx, env, AXIS2_TRANSPORT_IN, property, 
                   AXIS2_FALSE);*/
-   AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_IN, property, 
+    AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_IN, property, 
                   AXIS2_FALSE);
-   return AXIS2_SUCCESS;
+    return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
-axiom_soap_over_http_sender_get_timeout_values 
-                        (axiom_soap_over_http_sender_t *sender, 
-                                const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx)
+axiom_soap_over_http_sender_get_timeout_values(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx)
 {
     axis2_char_t *so_str = NULL;
-   axis2_char_t *connection_str = NULL;
+    axis2_char_t *connection_str = NULL;
     axis2_param_t *tmp_param = NULL;
 
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
    
    
     tmp_param = AXIS2_MSG_CTX_GET_PARAMETER(msg_ctx, 
@@ -638,7 +653,7 @@
    
     if(NULL != tmp_param)
     {
-        so_str = (axis2_char_t*)AXIS2_PARAM_GET_VALUE(tmp_param, env);
+        so_str = (axis2_char_t *)AXIS2_PARAM_GET_VALUE(tmp_param, env);
         if(NULL != so_str)
         {
             AXIS2_INTF_TO_IMPL(sender)->so_timeout = AXIS2_ATOI(so_str);
@@ -648,33 +663,36 @@
                         AXIS2_HTTP_CONNECTION_TIMEOUT);
     if(NULL != tmp_param)
     {
-        connection_str = (axis2_char_t*)AXIS2_PARAM_GET_VALUE(tmp_param, env);
+        connection_str = (axis2_char_t *)AXIS2_PARAM_GET_VALUE(tmp_param, env);
         if(NULL != connection_str)
         {
             AXIS2_INTF_TO_IMPL(sender)->connection_timeout = 
                         AXIS2_ATOI(connection_str);
         }
     }
-   return AXIS2_SUCCESS;
+    return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
-axiom_soap_over_http_sender_set_http_version
-                           (axiom_soap_over_http_sender_t *sender, 
-                           const axis2_env_t *env, axis2_char_t *version)
-{
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-   AXIS2_INTF_TO_IMPL(sender)->http_version =  AXIS2_STRDUP(version, env);
-   if(NULL == AXIS2_INTF_TO_IMPL(sender)->http_version)
-   {
-      return AXIS2_FAILURE;
-   }
-   return AXIS2_SUCCESS;
+axiom_soap_over_http_sender_set_http_version(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_char_t *version)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(sender)->http_version =  AXIS2_STRDUP(version, env);
+    if(NULL == AXIS2_INTF_TO_IMPL(sender)->http_version)
+    {
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL
-axiom_soap_over_http_sender_configure_proxy(axiom_soap_over_http_sender_t *sender, 
-                           const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx)
+axiom_soap_over_http_sender_configure_proxy(
+    axiom_soap_over_http_sender_t *sender, 
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx)
 {
     axis2_conf_ctx_t *conf_ctx = NULL;
     axis2_conf_t *conf = NULL;
@@ -727,7 +745,7 @@
             {
                 return AXIS2_FAILURE;
             }
-            host_attr = (axiom_attribute_t*)AXIS2_GENERIC_OBJ_GET_VALUE(obj,
+            host_attr = (axiom_attribute_t *)AXIS2_GENERIC_OBJ_GET_VALUE(obj,
                         env);
             if(NULL == host_attr)
             {



---------------------------------------------------------------------
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