axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject svn commit: r805347 [22/31] - in /webservices/axis2/trunk/c/src: core/addr/ core/clientapi/ core/context/ core/deployment/ core/description/ core/engine/ core/phaseresolver/ core/receivers/ core/transport/amqp/receiver/ core/transport/amqp/receiver/qpi...
Date Tue, 18 Aug 2009 10:15:53 GMT
Modified: webservices/axis2/trunk/c/src/core/transport/http/sender/http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/transport/http/sender/http_sender.c?rev=805347&r1=805346&r2=805347&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/transport/http/sender/http_sender.c (original)
+++ webservices/axis2/trunk/c/src/core/transport/http/sender/http_sender.c Tue Aug 18 10:15:49 2009
@@ -52,101 +52,106 @@
     axis2_bool_t is_soap;
 };
 
-
-
 #ifndef AXIS2_LIBCURL_ENABLED
-static void axis2_http_sender_add_header_list (axis2_http_simple_request_t *
-                                               request,
-                                               const axutil_env_t * env,
-                                               axutil_array_list_t *
-                                               array_list);
+static void
+axis2_http_sender_add_header_list(
+    axis2_http_simple_request_t * request,
+    const axutil_env_t * env,
+    axutil_array_list_t * array_list);
 
-static axis2_status_t axis2_http_sender_configure_proxy (axis2_http_sender_t *
-                                                         sender,
-                                                         const axutil_env_t *
-                                                         env,
-                                                         axis2_msg_ctx_t *
-                                                         msg_ctx);
+static axis2_status_t
+axis2_http_sender_configure_proxy(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx);
 
 static axis2_status_t
-axis2_http_sender_configure_server_cert (axis2_http_sender_t * sender,
-                                         const axutil_env_t * env,
-                                         axis2_msg_ctx_t * msg_ctx);
+axis2_http_sender_configure_server_cert(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx);
 
 static axis2_status_t
-axis2_http_sender_configure_key_file (axis2_http_sender_t * sender,
-                                      const axutil_env_t * env,
-                                      axis2_msg_ctx_t * msg_ctx);
+axis2_http_sender_configure_key_file(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx);
 
 static axis2_status_t
-axis2_http_sender_configure_http_auth (axis2_http_sender_t * sender,
-                                       const axutil_env_t * env,
-                                       axis2_msg_ctx_t * msg_ctx,
-                                       axis2_http_simple_request_t * request);
+axis2_http_sender_configure_http_auth(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx,
+    axis2_http_simple_request_t * request);
 
 static axis2_status_t
-axis2_http_sender_configure_proxy_auth (axis2_http_sender_t * sender,
-                                        const axutil_env_t * env,
-                                        axis2_msg_ctx_t * msg_ctx,
-                                        axis2_http_simple_request_t * request);
+axis2_http_sender_configure_proxy_auth(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx,
+    axis2_http_simple_request_t * request);
 
 static axis2_status_t
-axis2_http_sender_set_http_auth_type (axis2_http_sender_t * sender,
-                                      const axutil_env_t * env,
-                                      axis2_msg_ctx_t * msg_ctx,
-                                      axis2_http_simple_request_t * request);
+axis2_http_sender_set_http_auth_type(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx,
+    axis2_http_simple_request_t * request);
 
 static axis2_status_t
-axis2_http_sender_set_proxy_auth_type (axis2_http_sender_t * sender,
-                                       const axutil_env_t * env,
-                                       axis2_msg_ctx_t * msg_ctx,
-                                       axis2_http_simple_request_t * request);
+axis2_http_sender_set_proxy_auth_type(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx,
+    axis2_http_simple_request_t * request);
 
 static axis2_status_t
-axis2_http_sender_configure_http_basic_auth (axis2_http_sender_t * sender,
-                                             const axutil_env_t * env,
-                                             axis2_msg_ctx_t * msg_ctx,
-                                             axis2_http_simple_request_t *
-                                             request);
+axis2_http_sender_configure_http_basic_auth(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx,
+    axis2_http_simple_request_t * request);
 
 static axis2_status_t
-axis2_http_sender_configure_proxy_basic_auth (axis2_http_sender_t * sender,
-                                              const axutil_env_t * env,
-                                              axis2_msg_ctx_t * msg_ctx,
-                                              axis2_http_simple_request_t *
-                                              request);
+axis2_http_sender_configure_proxy_basic_auth(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx,
+    axis2_http_simple_request_t * request);
 
 static axis2_status_t
-axis2_http_sender_configure_http_digest_auth (axis2_http_sender_t * sender,
-                                              const axutil_env_t * env,
-                                              axis2_msg_ctx_t * msg_ctx,
-                                              axis2_http_simple_request_t * request,
-                                              axis2_char_t * header_data);
+axis2_http_sender_configure_http_digest_auth(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx,
+    axis2_http_simple_request_t * request,
+    axis2_char_t * header_data);
 
 static axis2_status_t
-axis2_http_sender_configure_proxy_digest_auth (axis2_http_sender_t * sender,
-                                               const axutil_env_t * env,
-                                               axis2_msg_ctx_t * msg_ctx,
-                                               axis2_http_simple_request_t * request,
-                                               axis2_char_t * header_data);
+axis2_http_sender_configure_proxy_digest_auth(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx,
+    axis2_http_simple_request_t * request,
+    axis2_char_t * header_data);
 #endif
 
 AXIS2_EXTERN axis2_http_sender_t *AXIS2_CALL
-axis2_http_sender_create (const axutil_env_t * env)
+axis2_http_sender_create(
+    const axutil_env_t * env)
 {
     axis2_http_sender_t *sender = NULL;
 
-    sender = (axis2_http_sender_t *) AXIS2_MALLOC
-        (env->allocator, sizeof (axis2_http_sender_t));
+    sender = (axis2_http_sender_t *)AXIS2_MALLOC(env->allocator, sizeof(axis2_http_sender_t));
 
-    if (!sender)
+    if(!sender)
     {
         AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    memset (sender, 0, sizeof (axis2_http_sender_t));
-    sender->http_version = (axis2_char_t *) AXIS2_HTTP_HEADER_PROTOCOL_11;
+    memset(sender, 0, sizeof(axis2_http_sender_t));
+    sender->http_version = (axis2_char_t *)AXIS2_HTTP_HEADER_PROTOCOL_11;
     sender->so_timeout = AXIS2_HTTP_DEFAULT_SO_TIMEOUT;
     /* unlike the java impl we don't have a default om output
      * it should be explicitly set and it's a MUST
@@ -159,30 +164,32 @@
 }
 
 AXIS2_EXTERN void AXIS2_CALL
-axis2_http_sender_free (axis2_http_sender_t * sender,
-                        const axutil_env_t * env)
+axis2_http_sender_free(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env)
 {
-    if (sender->http_version)
+    if(sender->http_version)
     {
-        AXIS2_FREE (env->allocator, sender->http_version);
+        AXIS2_FREE(env->allocator, sender->http_version);
     }
 
     /* Do not free this here since it will be required in later processing
      * of the response soap message
      */
     sender->client = NULL;
-    AXIS2_FREE (env->allocator, sender);
+    AXIS2_FREE(env->allocator, sender);
     return;
 }
 
 #ifndef AXIS2_LIBCURL_ENABLED
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_http_sender_send (axis2_http_sender_t * sender,
-                        const axutil_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_sender_send(
+    axis2_http_sender_t * sender,
+    const axutil_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;
@@ -202,7 +209,7 @@
     int output_stream_size = 0;
     axis2_bool_t doing_mtom = AXIS2_FALSE;
     axutil_property_t *dump_property = NULL;
-    axutil_param_t *ssl_pp_param = NULL;	
+    axutil_param_t *ssl_pp_param = NULL;
     /* ssl passphrase */
     axis2_char_t *ssl_pp = NULL;
     axutil_property_t *ssl_pp_property = NULL;
@@ -219,7 +226,7 @@
     axutil_property_t *http_auth_property = NULL;
     axis2_char_t *http_auth_property_value = NULL;
     axis2_bool_t force_http_auth = AXIS2_FALSE;
-    axis2_bool_t force_http_auth_with_head = AXIS2_FALSE; 
+    axis2_bool_t force_http_auth_with_head = AXIS2_FALSE;
     axutil_property_t *content_type_property = NULL;
     axutil_hash_t *content_type_hash = NULL;
     axis2_char_t *content_type_value = NULL;
@@ -250,14 +257,14 @@
     axutil_property_t *property = NULL;/* Property for holding http client */
 
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Entry:axis2_http_sender_send");
-    soap_body = axiom_soap_envelope_get_body (out, env);
+    soap_body = axiom_soap_envelope_get_body(out, env);
 
-    AXIS2_PARAM_CHECK (env->error, msg_ctx, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK (env->error, out, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK (env->error, str_url, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK (env->error, soap_action, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, out, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, str_url, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, soap_action, AXIS2_FAILURE);
 
-    if (AXIS2_TRUE == axis2_msg_ctx_get_doing_rest (msg_ctx, env))
+    if(AXIS2_TRUE == axis2_msg_ctx_get_doing_rest(msg_ctx, env))
     {
         is_soap = AXIS2_FALSE;
     }
@@ -266,172 +273,154 @@
         is_soap = AXIS2_TRUE;
     }
 
-    url = axutil_url_parse_string (env, str_url);
+    url = axutil_url_parse_string(env, str_url);
 
-    if (!is_soap)
+    if(!is_soap)
     {
         if(soap_body)
         {
-            body_node = axiom_soap_body_get_base_node (soap_body, env);
+            body_node = axiom_soap_body_get_base_node(soap_body, env);
         }
         if(body_node)
         {
-            data_out = axiom_node_get_first_element (body_node, env);
+            data_out = axiom_node_get_first_element(body_node, env);
         }
 
-        method = (axutil_property_t *) axis2_msg_ctx_get_property (msg_ctx, env,
-                                                                   AXIS2_HTTP_METHOD);
-        if (method)
+        method = (axutil_property_t *)axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_HTTP_METHOD);
+        if(method)
         {
-            method_value = (axis2_char_t *) axutil_property_get_value (method,
-                                                                       env);
+            method_value = (axis2_char_t *)axutil_property_get_value(method, env);
         }
 
         /* The default is POST */
-        if (method_value && 
-            0 == axutil_strcmp (method_value, AXIS2_HTTP_GET))
+        if(method_value && 0 == axutil_strcmp(method_value, AXIS2_HTTP_GET))
         {
             send_via_get = AXIS2_TRUE;
         }
-        else if (method_value && 
-                 0 == axutil_strcmp (method_value, AXIS2_HTTP_HEAD))
+        else if(method_value && 0 == axutil_strcmp(method_value, AXIS2_HTTP_HEAD))
         {
             send_via_head = AXIS2_TRUE;
         }
-        else if (method_value && 
-                 0 == axutil_strcmp (method_value, AXIS2_HTTP_PUT))
+        else if(method_value && 0 == axutil_strcmp(method_value, AXIS2_HTTP_PUT))
         {
             send_via_put = AXIS2_TRUE;
         }
-        else if (method_value && 
-                 0 == axutil_strcmp (method_value, AXIS2_HTTP_DELETE))
+        else if(method_value && 0 == axutil_strcmp(method_value, AXIS2_HTTP_DELETE))
         {
             send_via_delete = AXIS2_TRUE;
         }
     }
 
-    if (!url)
+    if(!url)
     {
-        AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                         "url is null for string %s", str_url);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "url is null for string %s", str_url);
         return AXIS2_FAILURE;
     }
 
-    if (sender->client)
+    if(sender->client)
     {
-        axis2_http_client_free (sender->client, env);
+        axis2_http_client_free(sender->client, env);
         sender->client = NULL;
     }
 
-    sender->client = axis2_http_client_create (env, url);
-    if (!sender->client)
+    sender->client = axis2_http_client_create(env, url);
+    if(!sender->client)
     {
-        AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                         "sender->client creation failed for url %s", url);
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "sender->client creation failed for url %s", url);
         return AXIS2_FAILURE;
     }
-   
+
     /* We put the client into msg_ctx so that we can free it once the processing
      * is done at client side
      */
-    property = axutil_property_create (env);
-    axutil_property_set_scope (property, env, AXIS2_SCOPE_REQUEST);
-    axutil_property_set_free_func (property, env,
-                                   axis2_http_client_free_void_arg);
-    axutil_property_set_value (property, env, sender->client);
-    axis2_msg_ctx_set_property (msg_ctx, env, AXIS2_HTTP_CLIENT, property);
+    property = axutil_property_create(env);
+    axutil_property_set_scope(property, env, AXIS2_SCOPE_REQUEST);
+    axutil_property_set_free_func(property, env, axis2_http_client_free_void_arg);
+    axutil_property_set_value(property, env, sender->client);
+    axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_HTTP_CLIENT, property);
 
     /* configure proxy settings if we have set so
      */
 
-    axis2_http_sender_configure_proxy (sender, env, msg_ctx);
-    
-    conf_ctx = axis2_msg_ctx_get_conf_ctx (msg_ctx, env);
-    if (conf_ctx)
+    axis2_http_sender_configure_proxy(sender, env, msg_ctx);
+
+    conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
+    if(conf_ctx)
     {
-        conf = axis2_conf_ctx_get_conf (conf_ctx, env);
+        conf = axis2_conf_ctx_get_conf(conf_ctx, env);
     }
 
-    if (conf)
+    if(conf)
     {
-        trans_desc = axis2_conf_get_transport_out (conf,
-                                                   env, 
-                                                   AXIS2_TRANSPORT_ENUM_HTTP);
+        trans_desc = axis2_conf_get_transport_out(conf, env, AXIS2_TRANSPORT_ENUM_HTTP);
     }
 
-    if (trans_desc)
+    if(trans_desc)
     {
         /* get xml declaration details from axis2.xml */
-        write_xml_declaration_param =
-            axutil_param_container_get_param
-            (axis2_transport_out_desc_param_container (trans_desc, env), env,
-             AXIS2_XML_DECLARATION);
+        write_xml_declaration_param = axutil_param_container_get_param(
+            axis2_transport_out_desc_param_container(trans_desc, env), env, AXIS2_XML_DECLARATION);
     }
 
-
-    if (write_xml_declaration_param)
+    if(write_xml_declaration_param)
     {
         /* accessing attributes of the HTTP transport's , xml
          * declaration element from axis2.xml*/
 
-        transport_attrs = axutil_param_get_attributes (write_xml_declaration_param, env);
-        if (transport_attrs)
+        transport_attrs = axutil_param_get_attributes(write_xml_declaration_param, env);
+        if(transport_attrs)
         {
             axutil_generic_obj_t *obj = NULL;
             axiom_attribute_t *write_xml_declaration_attr = NULL;
             axis2_char_t *write_xml_declaration_attr_value = NULL;
 
-            obj = axutil_hash_get (transport_attrs, AXIS2_ADD_XML_DECLARATION,
-                                   AXIS2_HASH_KEY_STRING);
-            if (obj)
+            obj
+                = axutil_hash_get(transport_attrs, AXIS2_ADD_XML_DECLARATION, AXIS2_HASH_KEY_STRING);
+            if(obj)
             {
-                write_xml_declaration_attr = 
-                    (axiom_attribute_t *) axutil_generic_obj_get_value (obj,
-                                                                        env);
+                write_xml_declaration_attr = (axiom_attribute_t *)axutil_generic_obj_get_value(obj,
+                    env);
             }
 
-            if (write_xml_declaration_attr)
+            if(write_xml_declaration_attr)
             {
-                write_xml_declaration_attr_value = 
-                    axiom_attribute_get_value (write_xml_declaration_attr, env);
+                write_xml_declaration_attr_value = axiom_attribute_get_value(
+                    write_xml_declaration_attr, env);
             }
 
-            if (write_xml_declaration_attr_value && 
-                0 == axutil_strcasecmp (write_xml_declaration_attr_value, 
-                                        AXIS2_VALUE_TRUE))
+            if(write_xml_declaration_attr_value && 0 == axutil_strcasecmp(
+                write_xml_declaration_attr_value, AXIS2_VALUE_TRUE))
             {
                 write_xml_declaration = AXIS2_TRUE;
             }
         }
     }
 
-    if (write_xml_declaration)
+    if(write_xml_declaration)
     {
-        axiom_output_write_xml_version_encoding (sender->om_output, env);
+        axiom_output_write_xml_version_encoding(sender->om_output, env);
     }
 
-    if (!send_via_get && !send_via_head && !send_via_delete)
+    if(!send_via_get && !send_via_head && !send_via_delete)
     {
         /* processing POST and PUT methods */
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "msg_ctx_id:%s", 
-            axis2_msg_ctx_get_msg_id(msg_ctx,env));
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "msg_ctx_id:%s", axis2_msg_ctx_get_msg_id(msg_ctx,
+            env));
 
-        doing_mtom = axis2_msg_ctx_get_doing_mtom (msg_ctx, env);
+        doing_mtom = axis2_msg_ctx_get_doing_mtom(msg_ctx, env);
 
-        if (!sender->om_output)
+        if(!sender->om_output)
         {
-            AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_NULL_OM_OUTPUT,
-                               AXIS2_FAILURE);
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "%s",
-                AXIS2_ERROR_GET_MESSAGE(env->error));
+            AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_NULL_OM_OUTPUT, AXIS2_FAILURE);
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "%s", AXIS2_ERROR_GET_MESSAGE(env->error));
             return AXIS2_FAILURE;
         }
 
-        xml_writer = axiom_output_get_xml_writer (sender->om_output, env);
+        xml_writer = axiom_output_get_xml_writer(sender->om_output, env);
 
-        char_set_enc_str = axis2_msg_ctx_get_charset_encoding (msg_ctx, env);
+        char_set_enc_str = axis2_msg_ctx_get_charset_encoding(msg_ctx, env);
 
-        if (!char_set_enc_str)
+        if(!char_set_enc_str)
         {
             /* if there is no character encoding details available
              * use default one.  
@@ -441,48 +430,43 @@
         }
         else
         {
-            char_set_enc = axutil_string_get_buffer (char_set_enc_str, env);
+            char_set_enc = axutil_string_get_buffer(char_set_enc_str, env);
         }
 
-        if (!send_via_put && is_soap)
+        if(!send_via_put && is_soap)
         {
             /* HTTP POST case */
             /* dump property use to dump message without sending */
-            dump_property = axis2_msg_ctx_get_property (msg_ctx, env,
-                                                        AXIS2_DUMP_INPUT_MSG_TRUE);
-            if (dump_property)
-            {
-                axis2_char_t *dump_true =
-                    axutil_property_get_value (dump_property, env);
-                if (0 == axutil_strcmp (dump_true, AXIS2_VALUE_TRUE))
+            dump_property = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_DUMP_INPUT_MSG_TRUE);
+            if(dump_property)
+            {
+                axis2_char_t *dump_true = axutil_property_get_value(dump_property, env);
+                if(0 == axutil_strcmp(dump_true, AXIS2_VALUE_TRUE))
                 {
-                    axis2_http_client_set_dump_input_msg (sender->client,
-                                                          env, AXIS2_TRUE);
+                    axis2_http_client_set_dump_input_msg(sender->client, env, AXIS2_TRUE);
                 }
             }
 
-            axiom_output_set_do_optimize (sender->om_output, env, doing_mtom);
-            axiom_soap_envelope_serialize (out, env, sender->om_output,
-                                           AXIS2_FALSE);
+            axiom_output_set_do_optimize(sender->om_output, env, doing_mtom);
+            axiom_soap_envelope_serialize(out, env, sender->om_output, AXIS2_FALSE);
         }
-        else if (is_soap)
+        else if(is_soap)
         {
-            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                             "Attempt to send SOAP message using HTTP PUT failed");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                "Attempt to send SOAP message using HTTP PUT failed");
             return AXIS2_FAILURE;
         }
         else
         {
-            if (!data_out)
+            if(!data_out)
             {
-                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                    "body node payload is NULL");
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "body node payload is NULL");
                 return AXIS2_FAILURE;
             }
-            axiom_node_serialize (data_out, env, sender->om_output);
+            axiom_node_serialize(data_out, env, sender->om_output);
         }
 
-        if (doing_mtom)
+        if(doing_mtom)
         {
             axutil_param_t *callback_name_param = NULL;
             axis2_status_t mtom_status = AXIS2_FAILURE;
@@ -492,71 +476,66 @@
             /* Getting the sender callback name paramter if it is 
              * specified in the configuration file */
 
-            callback_name_param = axis2_msg_ctx_get_parameter(msg_ctx, env ,
+            callback_name_param = axis2_msg_ctx_get_parameter(msg_ctx, env,
                 AXIS2_MTOM_SENDING_CALLBACK);
             if(callback_name_param)
             {
-                mtom_sending_callback_name =
-                    (axis2_char_t *) axutil_param_get_value (callback_name_param, env);
+                mtom_sending_callback_name = (axis2_char_t *)axutil_param_get_value(
+                    callback_name_param, env);
                 if(mtom_sending_callback_name)
                 {
-                    axis2_http_client_set_mtom_sending_callback_name(
-                        sender->client, env, mtom_sending_callback_name);
+                    axis2_http_client_set_mtom_sending_callback_name(sender->client, env,
+                        mtom_sending_callback_name);
                 }
             }
 
             /* Here we put all the attachment related stuff in a array_list
-               After this method we have the message in parts */
+             After this method we have the message in parts */
 
-            mtom_status = axiom_output_flush (sender->om_output, env);
+            mtom_status = axiom_output_flush(sender->om_output, env);
             if(mtom_status == AXIS2_FAILURE)
             {
                 return mtom_status;
             }
             /* HTTP client should distinguish an MTOM invocation because the way
-               of sending the message in MTOM case is different */
+             of sending the message in MTOM case is different */
             axis2_http_client_set_doing_mtom(sender->client, env, doing_mtom);
 
             /* HTTP client will keep this mime_parts, which it will send in chunks at
-               th end */
+             th end */
             mime_parts = axiom_output_get_mime_parts(sender->om_output, env);
             if(mime_parts)
             {
-                axis2_http_client_set_mime_parts(sender->client, env, mime_parts);    
+                axis2_http_client_set_mime_parts(sender->client, env, mime_parts);
             }
         }
         else
         {
-            buffer = axiom_xml_writer_get_xml (xml_writer, env);
+            buffer = axiom_xml_writer_get_xml(xml_writer, env);
         }
 
-        if (!(buffer || doing_mtom))
+        if(!(buffer || doing_mtom))
         {
-            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                             "NULL xml returned from xml writer");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL xml returned from xml writer");
             return AXIS2_FAILURE;
         }
 
-        if (!send_via_put)
+        if(!send_via_put)
         {
             /* HTTP POST */
             axis2_char_t *path_with_query = NULL;
 
-            path_with_query = axutil_strcat(env, axutil_url_get_path (url, env),
-                                                 axutil_url_get_query(url, env), NULL);
-            request_line =
-                axis2_http_request_line_create (env, AXIS2_HTTP_POST,
-                                                path_with_query,
-                                                sender->http_version);
+            path_with_query = axutil_strcat(env, axutil_url_get_path(url, env),
+                axutil_url_get_query(url, env), NULL);
+            request_line = axis2_http_request_line_create(env, AXIS2_HTTP_POST, path_with_query,
+                sender->http_version);
             AXIS2_FREE(env->allocator, path_with_query);
         }
         else
         {
             /* HTTP PUT */
-            request_line =
-                axis2_http_request_line_create (env, AXIS2_HTTP_PUT,
-                                                axutil_url_get_path (url, env),
-                                                sender->http_version);
+            request_line = axis2_http_request_line_create(env, AXIS2_HTTP_PUT, axutil_url_get_path(
+                url, env), sender->http_version);
         }
     }
     else
@@ -566,163 +545,129 @@
         axis2_char_t *request_params = NULL;
         axis2_char_t *path = NULL;
 
-        request_params = axis2_http_sender_get_param_string (sender,
-                                                             env, msg_ctx);
+        request_params = axis2_http_sender_get_param_string(sender, env, msg_ctx);
 
         if(request_params)
         {
             /* substituting AXIS2_Q_MARK for "?" */
-            path = axutil_strcat (env,
-                              axutil_url_get_path (url, env),
-                              AXIS2_Q_MARK_STR, request_params, NULL);
-			AXIS2_FREE(env->allocator, request_params);
-			request_params = NULL;
+            path = axutil_strcat(env, axutil_url_get_path(url, env), AXIS2_Q_MARK_STR,
+                request_params, NULL);
+            AXIS2_FREE(env->allocator, request_params);
+            request_params = NULL;
         }
         else
         {
-            path = axutil_strdup(env,axutil_url_get_path(url, env));
+            path = axutil_strdup(env, axutil_url_get_path(url, env));
         }
 
-        if (send_via_get)
+        if(send_via_get)
         {
-            request_line = axis2_http_request_line_create (env, 
-                                                           AXIS2_HTTP_GET, 
-                                                           path,
-                                                           sender->http_version);
+            request_line = axis2_http_request_line_create(env, AXIS2_HTTP_GET, path,
+                sender->http_version);
         }
-        else if (send_via_head)
+        else if(send_via_head)
         {
-            request_line = axis2_http_request_line_create (env, 
-                                                           AXIS2_HTTP_HEAD, 
-                                                           path,
-                                                           sender->http_version);
+            request_line = axis2_http_request_line_create(env, AXIS2_HTTP_HEAD, path,
+                sender->http_version);
         }
-        else if (send_via_delete)
+        else if(send_via_delete)
         {
-            request_line = axis2_http_request_line_create (env, 
-                                                           AXIS2_HTTP_DELETE,
-                                                           path,
-                                                           sender->http_version);
+            request_line = axis2_http_request_line_create(env, AXIS2_HTTP_DELETE, path,
+                sender->http_version);
         }
 
-		if(path)
-		{
-			AXIS2_FREE(env->allocator, path);
-			path = NULL;
-		}
+        if(path)
+        {
+            AXIS2_FREE(env->allocator, path);
+            path = NULL;
+        }
     }
 
-    request = axis2_http_simple_request_create (env, request_line, NULL, 0,
-                                                NULL);
+    request = axis2_http_simple_request_create(env, request_line, NULL, 0, NULL);
 
     /* User-Agent:Axis2/C header */
-    axis2_http_sender_util_add_header (env,
-                                       request,
-                                       AXIS2_HTTP_HEADER_USER_AGENT, 
-                                       AXIS2_USER_AGENT);
-
+    axis2_http_sender_util_add_header(env, request, AXIS2_HTTP_HEADER_USER_AGENT, AXIS2_USER_AGENT);
 
-    http_property =
-        axis2_msg_ctx_get_property (msg_ctx,
-                                    env, AXIS2_TRANSPORT_HEADER_PROPERTY);
-    if (http_property)
+    http_property = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_TRANSPORT_HEADER_PROPERTY);
+    if(http_property)
     {
-        array_list = (axutil_array_list_t *)
-            axutil_property_get_value (http_property, env);
-        axis2_http_sender_add_header_list (request, env, array_list);
+        array_list = (axutil_array_list_t *)axutil_property_get_value(http_property, env);
+        axis2_http_sender_add_header_list(request, env, array_list);
     }
 
-    if (!send_via_get && !send_via_head && !send_via_put && !send_via_delete &&
-        AXIS2_TRUE == axis2_msg_ctx_get_is_soap_11 (msg_ctx, env))
+    if(!send_via_get && !send_via_head && !send_via_put && !send_via_delete && AXIS2_TRUE
+        == axis2_msg_ctx_get_is_soap_11(msg_ctx, env))
     {
-        if (AXIS2_ESC_DOUBLE_QUOTE != *soap_action)
+        if(AXIS2_ESC_DOUBLE_QUOTE != *soap_action)
         {
             axis2_char_t *tmp_soap_action = NULL;
-            tmp_soap_action =
-                AXIS2_MALLOC (env->allocator,
-                              (axutil_strlen (soap_action) +
-                               5) * sizeof (axis2_char_t));
-            sprintf (tmp_soap_action, "\"%s\"", soap_action);
-            axis2_http_sender_util_add_header (env,
-                                               request,
-                                               AXIS2_HTTP_HEADER_SOAP_ACTION,
-                                               tmp_soap_action);
-            AXIS2_FREE (env->allocator, tmp_soap_action);
+            tmp_soap_action = AXIS2_MALLOC(env->allocator, (axutil_strlen(soap_action) + 5)
+                * sizeof(axis2_char_t));
+            sprintf(tmp_soap_action, "\"%s\"", soap_action);
+            axis2_http_sender_util_add_header(env, request, AXIS2_HTTP_HEADER_SOAP_ACTION,
+                tmp_soap_action);
+            AXIS2_FREE(env->allocator, tmp_soap_action);
         }
         else
         {
-            axis2_http_sender_util_add_header (env,
-                                               request,
-                                               AXIS2_HTTP_HEADER_SOAP_ACTION,
-                                               (const axis2_char_t *)
-                                               soap_action);
+            axis2_http_sender_util_add_header(env, request, AXIS2_HTTP_HEADER_SOAP_ACTION,
+                (const axis2_char_t *)soap_action);
         }
     }
-    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))
     {
-        AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                         "Adding of SOAP Action Failed for REST request");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Adding of SOAP Action Failed for REST request");
 
         return AXIS2_FAILURE;
     }
 
-    if (!send_via_get && !send_via_head && !send_via_delete)
+    if(!send_via_get && !send_via_head && !send_via_delete)
     {
         /* processing PUT and POST */
-        buffer_size = axiom_xml_writer_get_xml_size (xml_writer, env);
+        buffer_size = axiom_xml_writer_get_xml_size(xml_writer, env);
 
-        if (AXIS2_FALSE == sender->chunked)
+        if(AXIS2_FALSE == sender->chunked)
         {
             axis2_char_t tmp_buf[10];
-            if (!buffer)
+            if(!buffer)
             {
                 buffer_size = output_stream_size;
             }
 
-            if (buffer_size)
+            if(buffer_size)
             {
-                sprintf (tmp_buf, "%d", buffer_size);
-                axis2_http_sender_util_add_header (env,
-                                                   request,
-                                                   AXIS2_HTTP_HEADER_CONTENT_LENGTH,
-                                                   tmp_buf);
+                sprintf(tmp_buf, "%d", buffer_size);
+                axis2_http_sender_util_add_header(env, request, AXIS2_HTTP_HEADER_CONTENT_LENGTH,
+                    tmp_buf);
             }
         }
         else
         {
-            axis2_http_sender_util_add_header (env,
-                                               request,
-                                               AXIS2_HTTP_HEADER_TRANSFER_ENCODING,
-                                               AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED);
+            axis2_http_sender_util_add_header(env, request, AXIS2_HTTP_HEADER_TRANSFER_ENCODING,
+                AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED);
         }
 
-        if (!send_via_put && is_soap)
+        if(!send_via_put && is_soap)
         {
             /* HTTP POST */
-            if (doing_mtom)
+            if(doing_mtom)
             {
-                content_type =
-                    (axis2_char_t *) axiom_output_get_content_type (sender->
-                                                                    om_output,
-                                                                    env);
-                if (AXIS2_TRUE != axis2_msg_ctx_get_is_soap_11 (msg_ctx, env) &&
-                    axutil_strcmp (soap_action, ""))
+                content_type = (axis2_char_t *)axiom_output_get_content_type(sender-> om_output,
+                    env);
+                if(AXIS2_TRUE != axis2_msg_ctx_get_is_soap_11(msg_ctx, env) && axutil_strcmp(
+                    soap_action, ""))
                 {
                     /* handle SOAP action for SOAP 1.2 case */
                     axis2_char_t *temp_content_type = NULL;
-                    temp_content_type = axutil_stracat (env,
-                                                        content_type,
-                                                        AXIS2_CONTENT_TYPE_ACTION);
+                    temp_content_type
+                        = axutil_stracat(env, content_type, AXIS2_CONTENT_TYPE_ACTION);
                     content_type = temp_content_type;
-                    temp_content_type = axutil_stracat (env,
-                                                        content_type,
-                                                        soap_action);
-                    AXIS2_FREE (env->allocator, content_type);
+                    temp_content_type = axutil_stracat(env, content_type, soap_action);
+                    AXIS2_FREE(env->allocator, content_type);
                     content_type = temp_content_type;
-                    temp_content_type =
-                        axutil_stracat (env, content_type, 
-                                        AXIS2_ESC_DOUBLE_QUOTE_STR);
-                    AXIS2_FREE (env->allocator, content_type);
+                    temp_content_type = axutil_stracat(env, content_type,
+                        AXIS2_ESC_DOUBLE_QUOTE_STR);
+                    AXIS2_FREE(env->allocator, content_type);
                     content_type = temp_content_type;
                 }
                 else
@@ -730,78 +675,64 @@
                     content_type_deepl_copy = AXIS2_FALSE;
                 }
             }
-            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))
             {
                 /* SOAP 1.1 without MTOM */
                 axis2_char_t *temp_content_type = NULL;
-                content_type =
-                    (axis2_char_t *) AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML;
-                content_type = axutil_stracat (env, content_type, 
-                                               AXIS2_CONTENT_TYPE_CHARSET);
-                temp_content_type = axutil_stracat (env,
-                                                    content_type, char_set_enc);
-                AXIS2_FREE (env->allocator, content_type);
+                content_type = (axis2_char_t *)AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML;
+                content_type = axutil_stracat(env, content_type, AXIS2_CONTENT_TYPE_CHARSET);
+                temp_content_type = axutil_stracat(env, content_type, char_set_enc);
+                AXIS2_FREE(env->allocator, content_type);
                 content_type = temp_content_type;
             }
             else
             {
                 /* SOAP 1.2 without MTOM */
                 axis2_char_t *temp_content_type = NULL;
-                content_type =
-                    (axis2_char_t *) AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP;
-                content_type = axutil_stracat (env, content_type, 
-                                               AXIS2_CONTENT_TYPE_CHARSET);
-                temp_content_type = axutil_stracat (env,
-                                                    content_type, char_set_enc);
-                AXIS2_FREE (env->allocator, content_type);
+                content_type = (axis2_char_t *)AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP;
+                content_type = axutil_stracat(env, content_type, AXIS2_CONTENT_TYPE_CHARSET);
+                temp_content_type = axutil_stracat(env, content_type, char_set_enc);
+                AXIS2_FREE(env->allocator, content_type);
                 content_type = temp_content_type;
-                if (axutil_strcmp (soap_action, ""))
+                if(axutil_strcmp(soap_action, ""))
                 {
-                    temp_content_type = axutil_stracat (env,
-                                                        content_type,
-                                                        AXIS2_CONTENT_TYPE_ACTION);
-                    AXIS2_FREE (env->allocator, content_type);
+                    temp_content_type
+                        = axutil_stracat(env, content_type, AXIS2_CONTENT_TYPE_ACTION);
+                    AXIS2_FREE(env->allocator, content_type);
                     content_type = temp_content_type;
-                    temp_content_type = axutil_stracat (env,
-                                                        content_type,
-                                                        soap_action);
-                    AXIS2_FREE (env->allocator, content_type);
+                    temp_content_type = axutil_stracat(env, content_type, soap_action);
+                    AXIS2_FREE(env->allocator, content_type);
                     content_type = temp_content_type;
-                    temp_content_type =
-                        axutil_stracat (env, content_type, 
-                                        AXIS2_ESC_DOUBLE_QUOTE_STR);
-                    AXIS2_FREE (env->allocator, content_type);
+                    temp_content_type = axutil_stracat(env, content_type,
+                        AXIS2_ESC_DOUBLE_QUOTE_STR);
+                    AXIS2_FREE(env->allocator, content_type);
                     content_type = temp_content_type;
                 }
             }
         }
-        else if (is_soap)
+        else if(is_soap)
         {
-            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                             "Attempt to send SOAP message using HTTP PUT failed");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                "Attempt to send SOAP message using HTTP PUT failed");
             return AXIS2_FAILURE;
         }
         else
         {
-            content_type_property = (axutil_property_t *)
-                axis2_msg_ctx_get_property (msg_ctx,
-                                            env,
-                                            AXIS2_USER_DEFINED_HTTP_HEADER_CONTENT_TYPE);
-
-            if (content_type_property)
-            {
-                content_type_hash = (axutil_hash_t *)
-                    axutil_property_get_value (content_type_property, env);
-                if (content_type_hash)
+            content_type_property = (axutil_property_t *)axis2_msg_ctx_get_property(msg_ctx, env,
+                AXIS2_USER_DEFINED_HTTP_HEADER_CONTENT_TYPE);
+
+            if(content_type_property)
+            {
+                content_type_hash = (axutil_hash_t *)axutil_property_get_value(
+                    content_type_property, env);
+                if(content_type_hash)
                 {
-                    content_type_value =
-                        (char *) axutil_hash_get (content_type_hash,
-                                                  AXIS2_HTTP_HEADER_CONTENT_TYPE,
-                                                  AXIS2_HASH_KEY_STRING);
+                    content_type_value = (char *)axutil_hash_get(content_type_hash,
+                        AXIS2_HTTP_HEADER_CONTENT_TYPE, AXIS2_HASH_KEY_STRING);
                 }
             }
 
-            if (content_type_value)
+            if(content_type_value)
             {
                 content_type = content_type_value;
             }
@@ -813,195 +744,164 @@
             content_type_deepl_copy = AXIS2_FALSE;
         }
 
-        axis2_http_sender_util_add_header (env,
-                                           request,
-                                           AXIS2_HTTP_HEADER_CONTENT_TYPE,
-                                           content_type);
+        axis2_http_sender_util_add_header(env, request, AXIS2_HTTP_HEADER_CONTENT_TYPE,
+            content_type);
 
-        if (content_type_deepl_copy && content_type)
+        if(content_type_deepl_copy && content_type)
         {
-            AXIS2_FREE (env->allocator, content_type);
+            AXIS2_FREE(env->allocator, content_type);
             content_type = NULL;
         }
         /* Finished Processing PUT and POST */
     }
 
-    if (0 ==
-        axutil_strcasecmp (sender->http_version, AXIS2_HTTP_HEADER_PROTOCOL_11))
+    if(0 == axutil_strcasecmp(sender->http_version, AXIS2_HTTP_HEADER_PROTOCOL_11))
     {
         /* HTTP 1.1 */
         axis2_char_t *header = NULL;
         int host_len = 0;
-        host_len = axutil_strlen (axutil_url_get_host (url, env));
-        header = AXIS2_MALLOC (env->allocator,
-                               host_len + 10 * sizeof (axis2_char_t));
-        sprintf (header, "%s:%d",
-                 axutil_url_get_host (url, env), axutil_url_get_port (url,
-                                                                        env));
-        axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_HOST,
-                                           header);
-        AXIS2_FREE (env->allocator, header);
+        host_len = axutil_strlen(axutil_url_get_host(url, env));
+        header = AXIS2_MALLOC(env->allocator, host_len + 10 * sizeof(axis2_char_t));
+        sprintf(header, "%s:%d", axutil_url_get_host(url, env), axutil_url_get_port(url, env));
+        axis2_http_sender_util_add_header(env, request, AXIS2_HTTP_HEADER_HOST, header);
+        AXIS2_FREE(env->allocator, header);
         header = NULL;
     }
 
     /* If this is a normal invocation the buffer has the full SOAP message
-       which needs to be send. In the MTOM case instead of this buffer 
-       it has the mime_parts array_list */
+     which needs to be send. In the MTOM case instead of this buffer
+     it has the mime_parts array_list */
 
     if(!doing_mtom)
     {
-        axis2_http_simple_request_set_body_string (request,
-                                                   env, buffer, buffer_size);
+        axis2_http_simple_request_set_body_string(request, env, buffer, buffer_size);
     }
-    
 
     /* HTTPS request processing */
-    axis2_http_sender_configure_server_cert (sender, env, msg_ctx);
+    axis2_http_sender_configure_server_cert(sender, env, msg_ctx);
 
-    axis2_http_sender_configure_key_file (sender, env, msg_ctx);
-    
-    axis2_http_sender_get_timeout_values (sender, env, msg_ctx);
-    axis2_http_client_set_timeout (sender->client, env, sender->so_timeout);
-
-    ssl_pp_property = axis2_msg_ctx_get_property(msg_ctx, env,
-                                                 AXIS2_SSL_PASSPHRASE);
-    
-    if (ssl_pp_property)
+    axis2_http_sender_configure_key_file(sender, env, msg_ctx);
+
+    axis2_http_sender_get_timeout_values(sender, env, msg_ctx);
+    axis2_http_client_set_timeout(sender->client, env, sender->so_timeout);
+
+    ssl_pp_property = axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_SSL_PASSPHRASE);
+
+    if(ssl_pp_property)
     {
-            ssl_pp = (axis2_char_t *)
-                     axutil_property_get_value(ssl_pp_property, env);
+        ssl_pp = (axis2_char_t *)axutil_property_get_value(ssl_pp_property, env);
     }
     else
     {
-        ssl_pp_param = axis2_msg_ctx_get_parameter(msg_ctx,
-                                                   env, AXIS2_SSL_PASSPHRASE);
+        ssl_pp_param = axis2_msg_ctx_get_parameter(msg_ctx, env, AXIS2_SSL_PASSPHRASE);
 
-        if (ssl_pp_param)
+        if(ssl_pp_param)
         {
             ssl_pp = axutil_param_get_value(ssl_pp_param, env);
         }
     }
 
-    test_auth_property = (axutil_property_t *)
-        axis2_msg_ctx_get_property (msg_ctx, env,
-                                    AXIS2_TEST_PROXY_AUTH);
-    if (test_auth_property)
-    {
-        test_auth_property_value = 
-            (axis2_char_t *) axutil_property_get_value (test_auth_property,
-                                                        env);
+    test_auth_property = (axutil_property_t *)axis2_msg_ctx_get_property(msg_ctx, env,
+        AXIS2_TEST_PROXY_AUTH);
+    if(test_auth_property)
+    {
+        test_auth_property_value = (axis2_char_t *)axutil_property_get_value(test_auth_property,
+            env);
     }
 
-    if (test_auth_property_value && 
-        0 == axutil_strcmp (test_auth_property_value, AXIS2_VALUE_TRUE))
+    if(test_auth_property_value && 0 == axutil_strcmp(test_auth_property_value, AXIS2_VALUE_TRUE))
     {
         test_proxy_auth = AXIS2_TRUE;
     }
-    
+
     test_auth_property = NULL;
     test_auth_property_value = NULL;
 
-    test_auth_property = 
-        (axutil_property_t *) axis2_msg_ctx_get_property (msg_ctx, env,
-                                                          AXIS2_TEST_HTTP_AUTH);
-    if (test_auth_property)
-    {
-        test_auth_property_value = 
-            (axis2_char_t *) axutil_property_get_value (test_auth_property,
-                                                        env);
+    test_auth_property = (axutil_property_t *)axis2_msg_ctx_get_property(msg_ctx, env,
+        AXIS2_TEST_HTTP_AUTH);
+    if(test_auth_property)
+    {
+        test_auth_property_value = (axis2_char_t *)axutil_property_get_value(test_auth_property,
+            env);
     }
 
-    if (test_auth_property_value && 
-        0 == axutil_strcmp (test_auth_property_value,
-                            AXIS2_VALUE_TRUE))
+    if(test_auth_property_value && 0 == axutil_strcmp(test_auth_property_value, AXIS2_VALUE_TRUE))
     {
         test_http_auth = AXIS2_TRUE;
     }
 
-    if (!test_proxy_auth)
+    if(!test_proxy_auth)
     {
-        proxy_auth_property = 
-            (axutil_property_t *) axis2_msg_ctx_get_property (msg_ctx, env,
-                                                              AXIS2_FORCE_PROXY_AUTH);
+        proxy_auth_property = (axutil_property_t *)axis2_msg_ctx_get_property(msg_ctx, env,
+            AXIS2_FORCE_PROXY_AUTH);
     }
-    if (proxy_auth_property)
+    if(proxy_auth_property)
     {
-        proxy_auth_property_value = (axis2_char_t *) 
-            axutil_property_get_value (proxy_auth_property,
-                                       env); 
+        proxy_auth_property_value = (axis2_char_t *)axutil_property_get_value(proxy_auth_property,
+            env);
     }
 
-    if (proxy_auth_property_value && 
-        0 == axutil_strcmp (proxy_auth_property_value, AXIS2_VALUE_TRUE))
+    if(proxy_auth_property_value && 0 == axutil_strcmp(proxy_auth_property_value, AXIS2_VALUE_TRUE))
     {
         force_proxy_auth = AXIS2_TRUE;
     }
 
     proxy_auth_property = NULL;
     proxy_auth_property_value = NULL;
-    
-    if (force_proxy_auth)
+
+    if(force_proxy_auth)
     {
-        proxy_auth_property = (axutil_property_t *) 
-            axis2_msg_ctx_get_property (msg_ctx, env,
-                                        AXIS2_PROXY_AUTH_TYPE);
+        proxy_auth_property = (axutil_property_t *)axis2_msg_ctx_get_property(msg_ctx, env,
+            AXIS2_PROXY_AUTH_TYPE);
     }
 
-    if (proxy_auth_property)
+    if(proxy_auth_property)
     {
-        proxy_auth_property_value = (axis2_char_t *) 
-            axutil_property_get_value (proxy_auth_property,
-                                       env);
+        proxy_auth_property_value = (axis2_char_t *)axutil_property_get_value(proxy_auth_property,
+            env);
     }
 
-    if (proxy_auth_property_value && 
-        0 == axutil_strcmp (proxy_auth_property_value, 
-                            AXIS2_PROXY_AUTH_TYPE_DIGEST))
+    if(proxy_auth_property_value && 0 == axutil_strcmp(proxy_auth_property_value,
+        AXIS2_PROXY_AUTH_TYPE_DIGEST))
     {
         force_proxy_auth = AXIS2_FALSE;
         force_proxy_auth_with_head = AXIS2_TRUE;
     }
 
-    if (!test_http_auth)
+    if(!test_http_auth)
     {
-        http_auth_property = (axutil_property_t *) 
-            axis2_msg_ctx_get_property (msg_ctx, env,
-                                        AXIS2_FORCE_HTTP_AUTH);
+        http_auth_property = (axutil_property_t *)axis2_msg_ctx_get_property(msg_ctx, env,
+            AXIS2_FORCE_HTTP_AUTH);
     }
 
-    if (http_auth_property)
+    if(http_auth_property)
     {
-        http_auth_property_value = (axis2_char_t *) 
-            axutil_property_get_value (http_auth_property,
-                                       env);
+        http_auth_property_value = (axis2_char_t *)axutil_property_get_value(http_auth_property,
+            env);
     }
 
-    if (http_auth_property_value && 
-        0 == axutil_strcmp (http_auth_property_value, AXIS2_VALUE_TRUE))
+    if(http_auth_property_value && 0 == axutil_strcmp(http_auth_property_value, AXIS2_VALUE_TRUE))
     {
         force_http_auth = AXIS2_TRUE;
     }
 
     http_auth_property = NULL;
     http_auth_property_value = NULL;
-    
-    if (force_http_auth)
+
+    if(force_http_auth)
     {
-        http_auth_property = (axutil_property_t *) 
-            axis2_msg_ctx_get_property (msg_ctx, env,
-                                        AXIS2_HTTP_AUTH_TYPE);
+        http_auth_property = (axutil_property_t *)axis2_msg_ctx_get_property(msg_ctx, env,
+            AXIS2_HTTP_AUTH_TYPE);
     }
 
-    if (http_auth_property)
+    if(http_auth_property)
     {
-        http_auth_property_value = (axis2_char_t *) 
-            axutil_property_get_value (http_auth_property,
-                                       env);
+        http_auth_property_value = (axis2_char_t *)axutil_property_get_value(http_auth_property,
+            env);
     }
 
-    if (http_auth_property_value && 
-        0 == axutil_strcmp (http_auth_property_value, 
-                            AXIS2_HTTP_AUTH_TYPE_DIGEST))
+    if(http_auth_property_value && 0 == axutil_strcmp(http_auth_property_value,
+        AXIS2_HTTP_AUTH_TYPE_DIGEST))
     {
         force_http_auth = AXIS2_FALSE;
         force_http_auth_with_head = AXIS2_TRUE;
@@ -1009,181 +909,141 @@
 
     axis2_msg_ctx_set_auth_type(msg_ctx, env, NULL);
 
-    if (force_proxy_auth || force_proxy_auth_with_head)
+    if(force_proxy_auth || force_proxy_auth_with_head)
     {
-        status_code = 
-            AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL;
+        status_code = AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL;
     }
     else
     {
         /* NOT forcing proxy authentication  */
-        if (force_http_auth)
+        if(force_http_auth)
         {
             axis2_status_t auth_status;
-            auth_status = 
-                axis2_http_sender_configure_http_auth (sender,
-                                                       env,
-                                                       msg_ctx, request);
+            auth_status = axis2_http_sender_configure_http_auth(sender, env, msg_ctx, request);
 
-            if (auth_status != AXIS2_SUCCESS)
+            if(auth_status != AXIS2_SUCCESS)
             {
-                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                                 "Error in setting HTTP Authentication header");
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                    "Error in setting HTTP Authentication header");
             }
             http_auth_header_added = AXIS2_TRUE;
 
-            status_code = axis2_http_client_send (sender->client, 
-                                                  env, request, ssl_pp);
+            status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
 
-            status_code = axis2_http_client_recieve_header (sender->client, 
-                                                            env); 
+            status_code = axis2_http_client_recieve_header(sender->client, env);
         }
 
-        else if (force_http_auth_with_head)
+        else if(force_http_auth_with_head)
         {
             axis2_http_request_line_t *head_request_line = NULL;
             axis2_http_request_line_t *temp = NULL;
 
             temp = axis2_http_simple_request_get_request_line(request, env);
-            head_request_line = axis2_http_request_line_create(env, 
-                                                               AXIS2_HTTP_HEAD,
-                                 axis2_http_request_line_get_uri(temp, env),
-                                 axis2_http_request_line_get_http_version(temp, 
-                                                                          env));
-            axis2_http_simple_request_set_request_line(request, env, 
-                                                       head_request_line);
+            head_request_line = axis2_http_request_line_create(env, AXIS2_HTTP_HEAD,
+                axis2_http_request_line_get_uri(temp, env),
+                axis2_http_request_line_get_http_version(temp, env));
+            axis2_http_simple_request_set_request_line(request, env, head_request_line);
 
-            status_code = axis2_http_client_send (sender->client, env, 
-                                                  request, ssl_pp);
+            status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
 
-            status_code = axis2_http_client_recieve_header (sender->client, 
-                                                            env);
+            status_code = axis2_http_client_recieve_header(sender->client, env);
             axis2_http_simple_request_set_request_line(request, env, temp);
             axis2_http_request_line_free(head_request_line, env);
 
-            if (status_code == AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
+            if(status_code == AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
             {
                 axis2_status_t auth_status;
-                auth_status = axis2_http_sender_configure_http_auth (sender,
-                                                                     env,
-                                                                     msg_ctx, 
-                                                                     request);
+                auth_status = axis2_http_sender_configure_http_auth(sender, env, msg_ctx, request);
 
-                if (auth_status != AXIS2_SUCCESS)
+                if(auth_status != AXIS2_SUCCESS)
                 {
-                    AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                                     "Error in setting HTTP Authentication\
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                        "Error in setting HTTP Authentication\
  header");
                 }
                 http_auth_header_added = AXIS2_TRUE;
             }
 
-            if (status_code != 
-                AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL)
+            if(status_code != AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL)
             {
 
-                status_code = axis2_http_client_send (sender->client, env, 
-                                                      request, ssl_pp);
+                status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
 
-                status_code = axis2_http_client_recieve_header (sender->client, 
-                                                                env);
+                status_code = axis2_http_client_recieve_header(sender->client, env);
 
-                if (status_code == 
-                    AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
+                if(status_code == AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
                 {
                     http_auth_header_added = AXIS2_FALSE;
                     force_http_auth_with_head = AXIS2_FALSE;
                 }
             }
         }
-        else 
+        else
         {
-            status_code = axis2_http_client_send (sender->client, env, 
-                                                  request, ssl_pp);
+            status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
 
-            status_code = axis2_http_client_recieve_header (sender->client, 
-                                                            env);
+            status_code = axis2_http_client_recieve_header(sender->client, env);
         }
     }
 
-    if (AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == 
-        status_code && !test_proxy_auth)
+    if(AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == status_code
+        && !test_proxy_auth)
     {
-        if (force_proxy_auth_with_head)
+        if(force_proxy_auth_with_head)
         {
             axis2_http_request_line_t *head_request_line = NULL;
             axis2_http_request_line_t *temp = NULL;
 
             temp = axis2_http_simple_request_get_request_line(request, env);
-            head_request_line = axis2_http_request_line_create(env, 
-                                                               AXIS2_HTTP_HEAD,
-                                 axis2_http_request_line_get_uri(temp, env),
-                                 axis2_http_request_line_get_http_version(temp, 
-                                                                          env));
-            axis2_http_simple_request_set_request_line(request, env, 
-                                                       head_request_line);
-
-            status_code = axis2_http_client_send (sender->client, env, 
-                                                  request, ssl_pp);
-
-            status_code = axis2_http_client_recieve_header (sender->client, 
-                                                            env);
-            axis2_http_simple_request_set_request_line(request, env, 
-                                                       temp);
+            head_request_line = axis2_http_request_line_create(env, AXIS2_HTTP_HEAD,
+                axis2_http_request_line_get_uri(temp, env),
+                axis2_http_request_line_get_http_version(temp, env));
+            axis2_http_simple_request_set_request_line(request, env, head_request_line);
+
+            status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
+
+            status_code = axis2_http_client_recieve_header(sender->client, env);
+            axis2_http_simple_request_set_request_line(request, env, temp);
             axis2_http_request_line_free(head_request_line, env);
 
-            if (status_code == 
-                AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL)
+            if(status_code == AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL)
             {
                 axis2_status_t auth_status;
-                auth_status = axis2_http_sender_configure_proxy_auth (sender,
-                                                                      env,
-                                                                      msg_ctx, 
-                                                                      request);
+                auth_status = axis2_http_sender_configure_proxy_auth(sender, env, msg_ctx, request);
 
-                if (auth_status != AXIS2_SUCCESS)
+                if(auth_status != AXIS2_SUCCESS)
                 {
-                    AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                                     "Error in setting Proxy Authentication\
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                        "Error in setting Proxy Authentication\
  header");
                 }
 
-                if ((force_http_auth_with_head || force_http_auth) && 
-                    !http_auth_header_added)
+                if((force_http_auth_with_head || force_http_auth) && !http_auth_header_added)
                 {
-                     status_code = 
-                         AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL;
+                    status_code = AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL;
                 }
                 else
                 {
-                    status_code = axis2_http_client_send (sender->client, env, 
-                                                          request, ssl_pp);
+                    status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
 
-                    status_code = 
-                        axis2_http_client_recieve_header (sender->client, env);
+                    status_code = axis2_http_client_recieve_header(sender->client, env);
                 }
             }
-            else if (status_code != 
-                     AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
+            else if(status_code != AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
             {
 
-                status_code = axis2_http_client_send (sender->client, env, 
-                                                      request, ssl_pp);
+                status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
 
-                status_code = axis2_http_client_recieve_header (sender->client,
-                                                                env);
+                status_code = axis2_http_client_recieve_header(sender->client, env);
             }
 
             /* Proxies have no idea about HTTP Methods therefore, if
-             * it fails no need to re-check */ 
-            if (AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == 
-                status_code)
+             * it fails no need to re-check */
+            if(AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == status_code)
             {
-                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                                 "Proxy Authentication failed");
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Proxy Authentication failed");
                 axis2_msg_ctx_set_auth_failed(msg_ctx, env, AXIS2_TRUE);
-                axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, 
-                                                        AXIS2_FALSE);
+                axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, AXIS2_FALSE);
             }
         }
         else
@@ -1191,285 +1051,238 @@
 
             /* not forcing proxy auth with head */
             axis2_status_t auth_status;
-            auth_status = axis2_http_sender_configure_proxy_auth (sender,
-                                                                  env,
-                                                                  msg_ctx, 
-                                                                  request);
+            auth_status = axis2_http_sender_configure_proxy_auth(sender, env, msg_ctx, request);
 
-            if (auth_status != AXIS2_SUCCESS)
+            if(auth_status != AXIS2_SUCCESS)
             {
-                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                                 "Error in setting Proxy Authentication \
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                    "Error in setting Proxy Authentication \
 header");
             }
 
-            if ((force_http_auth_with_head || force_http_auth) && 
-                !http_auth_header_added)
+            if((force_http_auth_with_head || force_http_auth) && !http_auth_header_added)
             {
                 status_code = AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL;
             }
             else
             {
-                status_code = axis2_http_client_send (sender->client, env, 
-                                                      request, ssl_pp);
-    
-                status_code = axis2_http_client_recieve_header (sender->client, 
-                                                                env);
+                status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
+
+                status_code = axis2_http_client_recieve_header(sender->client, env);
 
-                if (AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL ==
-                    status_code)
+                if(AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == status_code)
                 {
-                    AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                                     "Proxy Authentication failed");
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Proxy Authentication failed");
                     axis2_msg_ctx_set_auth_failed(msg_ctx, env, AXIS2_TRUE);
-                    axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, 
-                                                            AXIS2_FALSE);
+                    axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, AXIS2_FALSE);
                 }
             }
         }
     }
-    else if (AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == 
-             status_code)
+    else if(AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == status_code)
     {
         axis2_msg_ctx_set_auth_failed(msg_ctx, env, AXIS2_TRUE);
         axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, AXIS2_FALSE);
-        axis2_http_sender_set_proxy_auth_type (sender, env, msg_ctx, request);
+        axis2_http_sender_set_proxy_auth_type(sender, env, msg_ctx, request);
     }
- 
-    if (AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL == status_code && 
-        !test_http_auth)
+
+    if(AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL == status_code && !test_http_auth)
     {
-        if (!http_auth_header_added)
+        if(!http_auth_header_added)
         {
-            if (force_proxy_auth_with_head)
+            if(force_proxy_auth_with_head)
             {
                 axis2_http_request_line_t *head_request_line = NULL;
                 axis2_http_request_line_t *temp = NULL;
 
                 temp = axis2_http_simple_request_get_request_line(request, env);
-                head_request_line = axis2_http_request_line_create(env, 
-                                                                   AXIS2_HTTP_HEAD,
-                                     axis2_http_request_line_get_uri(temp, env),
-                                     axis2_http_request_line_get_http_version(
-                                         temp, env));
-                axis2_http_simple_request_set_request_line(request, env, 
-                                                           head_request_line);
-
-                status_code = axis2_http_client_send (sender->client, env, 
-                                                      request, ssl_pp);
- 
-                status_code = axis2_http_client_recieve_header (sender->client,
-                                                                env);
-                axis2_http_simple_request_set_request_line(request, env, 
-                                                           temp);
+                head_request_line = axis2_http_request_line_create(env, AXIS2_HTTP_HEAD,
+                    axis2_http_request_line_get_uri(temp, env),
+                    axis2_http_request_line_get_http_version(temp, env));
+                axis2_http_simple_request_set_request_line(request, env, head_request_line);
+
+                status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
+
+                status_code = axis2_http_client_recieve_header(sender->client, env);
+                axis2_http_simple_request_set_request_line(request, env, temp);
                 axis2_http_request_line_free(head_request_line, env);
 
-                if (status_code == 
-                    AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
+                if(status_code == AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
                 {
                     axis2_status_t auth_status;
-                    auth_status = axis2_http_sender_configure_http_auth (sender,
-                                                                         env,
-                                                                         msg_ctx, 
-                                                                         request);
+                    auth_status = axis2_http_sender_configure_http_auth(sender, env, msg_ctx,
+                        request);
 
-                    if (auth_status != AXIS2_SUCCESS)
+                    if(auth_status != AXIS2_SUCCESS)
                     {
-                        AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                                         "Error in setting HTTP Authentication \
+                        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                            "Error in setting HTTP Authentication \
 header");
                     }
 
-                    status_code = axis2_http_client_send (sender->client,
-                                                          env, request, ssl_pp);
+                    status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
 
-                    status_code = 
-                        axis2_http_client_recieve_header (sender->client, 
-                                                          env);
-                    if (status_code == 
-                        AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
+                    status_code = axis2_http_client_recieve_header(sender->client, env);
+                    if(status_code == AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL)
                     {
                         axis2_status_t auth_status;
-                        auth_status = 
-                            axis2_http_sender_configure_http_auth (sender,
-                                                                   env,
-                                                                   msg_ctx, 
-                                                                   request);
+                        auth_status = axis2_http_sender_configure_http_auth(sender, env, msg_ctx,
+                            request);
 
-                        if (auth_status != AXIS2_SUCCESS)
+                        if(auth_status != AXIS2_SUCCESS)
                         {
-                            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                                             "Error in setting HTTP \
+                            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                                "Error in setting HTTP \
 Authentication header");
                         }
 
-                        status_code = axis2_http_client_send (sender->client,
-                                                              env, request, 
-                                                              ssl_pp);
+                        status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
 
-                        status_code = 
-                            axis2_http_client_recieve_header (sender->client, env);
+                        status_code = axis2_http_client_recieve_header(sender->client, env);
                     }
- 
+
                 }
             }
             else
             {
                 axis2_status_t auth_status;
-                auth_status = axis2_http_sender_configure_http_auth (sender,
-                                                                     env,
-                                                                     msg_ctx,
-                                                                     request);
+                auth_status = axis2_http_sender_configure_http_auth(sender, env, msg_ctx, request);
 
-                if (auth_status != AXIS2_SUCCESS)
+                if(auth_status != AXIS2_SUCCESS)
                 {
-                    AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                                     "Error in setting HTTP Authentication \
+                    AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+                        "Error in setting HTTP Authentication \
 header");
                 }
 
-                status_code = axis2_http_client_send (sender->client,
-                                                      env, request, ssl_pp);
+                status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
 
-                status_code = axis2_http_client_recieve_header (sender->client, 
-                                                                env);
+                status_code = axis2_http_client_recieve_header(sender->client, env);
             }
 
-            if (AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL == status_code)
+            if(AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL == status_code)
             {
-                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                                 "HTTP Authentication failed");
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "HTTP Authentication failed");
                 axis2_msg_ctx_set_auth_failed(msg_ctx, env, AXIS2_TRUE);
-                axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, 
-                                                        AXIS2_TRUE);
+                axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, AXIS2_TRUE);
             }
 
-            if (AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == 
-                status_code)
+            if(AXIS2_HTTP_RESPONSE_PROXY_AUTHENTICATION_REQUIRED_CODE_VAL == status_code)
             {
-                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                                 "Proxy Authentication failed");
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Proxy Authentication failed");
                 axis2_msg_ctx_set_auth_failed(msg_ctx, env, AXIS2_TRUE);
-                axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, 
-                                                        AXIS2_FALSE);
+                axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, AXIS2_FALSE);
             }
         }
         else
         {
-            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
-                             "HTTP Authentication failed");
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "HTTP Authentication failed");
             axis2_msg_ctx_set_auth_failed(msg_ctx, env, AXIS2_TRUE);
             axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, AXIS2_TRUE);
         }
     }
-    else if (AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL == 
-             status_code)
+    else if(AXIS2_HTTP_RESPONSE_HTTP_UNAUTHORIZED_CODE_VAL == status_code)
     {
         axis2_msg_ctx_set_auth_failed(msg_ctx, env, AXIS2_TRUE);
         axis2_msg_ctx_set_required_auth_is_http(msg_ctx, env, AXIS2_TRUE);
-        axis2_http_sender_set_http_auth_type (sender, env, msg_ctx, request);
+        axis2_http_sender_set_http_auth_type(sender, env, msg_ctx, request);
     }
 
-    axis2_http_simple_request_free (request, env);
+    axis2_http_simple_request_free(request, env);
     request = NULL;
 
     if(output_stream)
     {
-        AXIS2_FREE (env->allocator, output_stream);
+        AXIS2_FREE(env->allocator, output_stream);
         output_stream = NULL;
     }
 
-    if (status_code < 0)
+    if(status_code < 0)
     {
-        AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "status_code < 0");
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "status_code < 0");
         return AXIS2_FAILURE;
     }
 
-    axis2_msg_ctx_set_status_code (msg_ctx, env, status_code);
+    axis2_msg_ctx_set_status_code(msg_ctx, env, status_code);
 
     /* Start processing response */
-    response = axis2_http_client_get_response (sender->client, env);
-    if (!is_soap)
+    response = axis2_http_client_get_response(sender->client, env);
+    if(!is_soap)
     {
-        return axis2_http_sender_process_response (sender, env,
-                                                   msg_ctx, response);
+        return axis2_http_sender_process_response(sender, env, msg_ctx, response);
     }
-    else if (AXIS2_HTTP_RESPONSE_OK_CODE_VAL == status_code ||
-        AXIS2_HTTP_RESPONSE_ACK_CODE_VAL == status_code)
+    else if(AXIS2_HTTP_RESPONSE_OK_CODE_VAL == status_code || AXIS2_HTTP_RESPONSE_ACK_CODE_VAL
+        == status_code)
     {
-        return axis2_http_sender_process_response (sender, env,
-                                                   msg_ctx, response);
+        return axis2_http_sender_process_response(sender, env, msg_ctx, response);
     }
-    else if (AXIS2_HTTP_RESPONSE_INTERNAL_SERVER_ERROR_CODE_VAL == 
-             status_code)
+    else if(AXIS2_HTTP_RESPONSE_INTERNAL_SERVER_ERROR_CODE_VAL == status_code)
     {
         axis2_http_header_t *tmp_header = NULL;
         axis2_char_t *tmp_header_val = NULL;
         axis2_op_t *op = NULL;
 
-        op = axis2_msg_ctx_get_op (msg_ctx, env);
-        if (op)
+        op = axis2_msg_ctx_get_op(msg_ctx, env);
+        if(op)
         {
-            const axis2_char_t *mep = axis2_op_get_msg_exchange_pattern (op, env);
+            const axis2_char_t *mep = axis2_op_get_msg_exchange_pattern(op, env);
             AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_HTTP_CLIENT_TRANSPORT_ERROR, AXIS2_FAILURE);
             /* handle one way case */
 
-            if (!axutil_strcmp (mep, AXIS2_MEP_URI_OUT_ONLY))
+            if(!axutil_strcmp(mep, AXIS2_MEP_URI_OUT_ONLY))
             {
-                AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "mep is AXIS2_MEP_URI_OUT_ONLY");
+                AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "mep is AXIS2_MEP_URI_OUT_ONLY");
                 return AXIS2_FAILURE;
             }
         }
 
         /* set an error to indicate error code status */
-        tmp_header =
-            axis2_http_simple_response_get_first_header (response,
-                                                         env,
-                                                         AXIS2_HTTP_HEADER_CONTENT_TYPE);
-        if (tmp_header)
+        tmp_header = axis2_http_simple_response_get_first_header(response, env,
+            AXIS2_HTTP_HEADER_CONTENT_TYPE);
+        if(tmp_header)
         {
-            tmp_header_val = axis2_http_header_get_value (tmp_header, env);
+            tmp_header_val = axis2_http_header_get_value(tmp_header, env);
         }
 
-        if (tmp_header_val && (axutil_strstr (tmp_header_val,
-                                              AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP)
-                               || axutil_strstr (tmp_header_val,
-                                                 AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML)))
+        if(tmp_header_val && (axutil_strstr(tmp_header_val, AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP)
+            || axutil_strstr(tmp_header_val, AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML)))
         {
-            return axis2_http_sender_process_response (sender,
-                                                       env, msg_ctx, response);
+            return axis2_http_sender_process_response(sender, env, msg_ctx, response);
         }
     }
 
-    AXIS2_HANDLE_ERROR(env,
-                       AXIS2_ERROR_HTTP_CLIENT_TRANSPORT_ERROR, AXIS2_FAILURE);
+    AXIS2_HANDLE_ERROR(env, AXIS2_ERROR_HTTP_CLIENT_TRANSPORT_ERROR, AXIS2_FAILURE);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:axis2_http_sender_send");
     return AXIS2_FAILURE;
 }
 #endif
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_http_sender_set_chunked (axis2_http_sender_t * sender,
-                               const axutil_env_t * env, axis2_bool_t chunked)
+axis2_http_sender_set_chunked(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_bool_t chunked)
 {
     sender->chunked = chunked;
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_http_sender_set_om_output (axis2_http_sender_t * sender,
-                                 const axutil_env_t * env,
-                                 axiom_output_t * om_output)
+axis2_http_sender_set_om_output(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axiom_output_t * om_output)
 {
     sender->om_output = om_output;
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_http_sender_get_header_info (axis2_http_sender_t * sender,
-                                   const axutil_env_t * env,
-                                   axis2_msg_ctx_t * msg_ctx,
-                                   axis2_http_simple_response_t * response)
+axis2_http_sender_get_header_info(
+    axis2_http_sender_t * sender,
+    const axutil_env_t * env,
+    axis2_msg_ctx_t * msg_ctx,
+    axis2_http_simple_response_t * response)
 {
     axutil_array_list_t *headers = NULL;
     axis2_char_t *charset = NULL;
@@ -1480,207 +1293,186 @@
     axis2_char_t *content_type = NULL;
     int status_code = 0;
 
-    AXIS2_PARAM_CHECK (env->error, msg_ctx, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK (env->error, response, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK (env->error, sender, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, response, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, sender, AXIS2_FAILURE);
 
-    headers = axis2_http_simple_response_get_headers (response, env);
-    if (headers == NULL)
+    headers = axis2_http_simple_response_get_headers(response, env);
+    if(headers == NULL)
     {
         return AXIS2_SUCCESS;
     }
 
-    for (i = 0; i < axutil_array_list_size (headers, env); i++)
+    for(i = 0; i < axutil_array_list_size(headers, env); i++)
     {
-        axis2_http_header_t *header = axutil_array_list_get (headers, env, i);
-        axis2_char_t *name = axis2_http_header_get_name ((axis2_http_header_t *)
-                                                         header, env);
-        if (name)
-        {
-            if (0 == axutil_strcasecmp (name, AXIS2_HTTP_HEADER_TRANSFER_ENCODING)
-                && 0 ==
-                axutil_strcasecmp (axis2_http_header_get_value (header, env),
-                               AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
+        axis2_http_header_t *header = axutil_array_list_get(headers, env, i);
+        axis2_char_t *name = axis2_http_header_get_name((axis2_http_header_t *)header, env);
+        if(name)
+        {
+            if(0 == axutil_strcasecmp(name, AXIS2_HTTP_HEADER_TRANSFER_ENCODING) && 0
+                == axutil_strcasecmp(axis2_http_header_get_value(header, env),
+                    AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
             {
                 axis2_char_t *transfer_encoding = NULL;
-                transfer_encoding =
-                    axutil_strdup (env,
-                                   AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED);
+                transfer_encoding = axutil_strdup(env, AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED);
                 response_chunked = AXIS2_TRUE;
-                axis2_msg_ctx_set_transfer_encoding (msg_ctx,
-                                                     env, transfer_encoding);
+                axis2_msg_ctx_set_transfer_encoding(msg_ctx, env, transfer_encoding);
 
             }
-            if (0 != axutil_strcasecmp (name, AXIS2_HTTP_HEADER_CONTENT_TYPE))
+            if(0 != axutil_strcasecmp(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 (charset)
+                axis2_char_t *content_type = axis2_http_header_get_value(header, env);
+                tmp_charset = strstr(content_type, AXIS2_HTTP_CHAR_SET_ENCODING);
+                if(charset)
                 {
-                    charset = axutil_strdup (env, tmp_charset);
+                    charset = axutil_strdup(env, tmp_charset);
                     break;
                 }
             }
         }
     }
 
-    content_type =
-        (axis2_char_t *) axis2_http_simple_response_get_content_type (response,
-                                                                      env);
-    if (content_type)
+    content_type = (axis2_char_t *)axis2_http_simple_response_get_content_type(response, env);
+    if(content_type)
     {
-        if (strstr (content_type, AXIS2_HTTP_HEADER_ACCEPT_MULTIPART_RELATED)
-            && strstr (content_type, AXIS2_HTTP_HEADER_ACCEPT_XOP_XML))
+        if(strstr(content_type, AXIS2_HTTP_HEADER_ACCEPT_MULTIPART_RELATED) && strstr(content_type,
+            AXIS2_HTTP_HEADER_ACCEPT_XOP_XML))
         {
-            axis2_ctx_t *axis_ctx =
-                axis2_op_ctx_get_base (axis2_msg_ctx_get_op_ctx (msg_ctx, env),
-                                       env);
-            property = axutil_property_create (env);
-            axutil_property_set_scope (property, env, AXIS2_SCOPE_REQUEST);
-            axutil_property_set_value (property,
-                                       env, axutil_strdup (env, content_type));
-            axis2_ctx_set_property (axis_ctx,
-                                    env, MTOM_RECIVED_CONTENT_TYPE, property);
+            axis2_ctx_t *axis_ctx = axis2_op_ctx_get_base(axis2_msg_ctx_get_op_ctx(msg_ctx, env),
+                env);
+            property = axutil_property_create(env);
+            axutil_property_set_scope(property, env, AXIS2_SCOPE_REQUEST);
+            axutil_property_set_value(property, env, axutil_strdup(env, content_type));
+            axis2_ctx_set_property(axis_ctx, env, MTOM_RECIVED_CONTENT_TYPE, property);
         }
     }
 
-    if (charset)
+    if(charset)
     {
-        axis2_ctx_t *axis_ctx =
-            axis2_op_ctx_get_base (axis2_msg_ctx_get_op_ctx (msg_ctx, env), env);
-        if (axis_ctx)
+        axis2_ctx_t *axis_ctx = axis2_op_ctx_get_base(axis2_msg_ctx_get_op_ctx(msg_ctx, env), env);
+        if(axis_ctx)
         {
-            property = axutil_property_create (env);
-            axutil_property_set_scope (property, env, AXIS2_SCOPE_REQUEST);
-            axutil_property_set_value (property, env, charset);

[... 2494 lines stripped ...]


Mime
View raw message