axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r434400 - in /webservices/axis2/trunk/c: include/axis2_http_transport_utils.h modules/core/transport/http/http_transport_utils.c
Date Thu, 24 Aug 2006 14:08:24 GMT
Author: pini
Date: Thu Aug 24 07:08:24 2006
New Revision: 434400

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

Modified:
    webservices/axis2/trunk/c/include/axis2_http_transport_utils.h
    webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c

Modified: webservices/axis2/trunk/c/include/axis2_http_transport_utils.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_http_transport_utils.h?rev=434400&r1=434399&r2=434400&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_transport_utils.h (original)
+++ webservices/axis2/trunk/c/include/axis2_http_transport_utils.h Thu Aug 24 07:08:24 2006
@@ -17,6 +17,11 @@
 #ifndef AXIS2_HTTP_TRANSPORT_UTILS_H
 #define AXIS2_HTTP_TRANSPORT_UTILS_H
 
+/**
+ * @ingroup axis2_core_transport_http
+ * @{
+ */
+
 
 /**
   * @file axis2_http_transport_utils.h
@@ -40,81 +45,86 @@
 {
 #endif
 
-/**
- * @ingroup axis2_core_transport_http
- * @{
- */
 
-/* 
- * struct to hold the callback information
- */   
-struct axis2_callback_info
-{
-   const axis2_env_t *env;
-   void *in_stream;
-   int content_length;
-   int unread_len;
-   axis2_http_chunked_stream_t *chunked_stream;
-};
-typedef struct axis2_callback_info axis2_callback_info_t;
-
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_http_transport_utils_process_http_post_request
-                        (const axis2_env_t *env, 
-                        axis2_msg_ctx_t *msg_ctx, 
-                        axis2_stream_t *in_stream, 
-                        axis2_stream_t *out_stream,
-                        const axis2_char_t *content_type, 
-                        const int content_length, 
-                        axis2_char_t *soap_action_header,
-                        const axis2_char_t *request_uri);
-    
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-axis2_http_transport_utils_process_http_get_request
-                        (const axis2_env_t *env, 
-                        axis2_msg_ctx_t *msg_ctx,
-                        axis2_stream_t *in_stream, 
-                        axis2_stream_t *out_stream,
-                        const axis2_char_t *content_type,
-                        axis2_char_t *soap_action_header, 
-                        const axis2_char_t *request_uri, 
-                        axis2_conf_ctx_t *conf_ctx, 
-                        axis2_hash_t *request_params);
-    
-AXIS2_EXTERN axiom_stax_builder_t* AXIS2_CALL
-axis2_http_transport_utils_select_builder_for_mime
-                        (const axis2_env_t *env, axis2_char_t *request_uri,
-                        axis2_msg_ctx_t *msg_ctx, axis2_stream_t *in_stream,
-                        axis2_char_t *content_type);
-   
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
-axis2_http_transport_utils_do_write_mtom(const axis2_env_t *env, 
-                                        axis2_msg_ctx_t *msg_ctx);
-                                                
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
-axis2_http_transport_utils_is_doing_rest(const axis2_env_t *env, 
-                                        axis2_msg_ctx_t *msg_ctx);
-                                                
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
-axis2_http_transport_utils_is_doing_rest_through_post
-                        (const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx);
-                  
-AXIS2_EXTERN axis2_hash_t * AXIS2_CALL
-axis2_http_transport_utils_get_request_params(const axis2_env_t *env, 
-                  axis2_char_t *request_uri);
-                  
-AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-axis2_http_transport_utils_get_services_html(const axis2_env_t *env, 
-                     axis2_conf_ctx_t *conf_ctx);
-
-AXIS2_EXTERN axis2_hash_t * AXIS2_CALL
-axis2_http_transport_utils_get_request_params(const axis2_env_t *env, 
-                  axis2_char_t *request_uri);
-
-AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
-axis2_http_transport_utils_create_soap_msg(const axis2_env_t *env, 
-                        axis2_msg_ctx_t *msg_ctx, 
-                        const axis2_char_t *soap_ns_uri);
+    /*
+     * struct to hold the callback information
+     */
+    struct axis2_callback_info
+    {
+        const axis2_env_t *env;
+        void *in_stream;
+        int content_length;
+        int unread_len;
+        axis2_http_chunked_stream_t *chunked_stream;
+    };
+    typedef struct axis2_callback_info axis2_callback_info_t;
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_http_transport_utils_process_http_post_request(
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *msg_ctx,
+        axis2_stream_t *in_stream,
+        axis2_stream_t *out_stream,
+        const axis2_char_t *content_type,
+        const int content_length,
+        axis2_char_t *soap_action_header,
+        const axis2_char_t *request_uri);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    axis2_http_transport_utils_process_http_get_request(
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *msg_ctx,
+        axis2_stream_t *in_stream,
+        axis2_stream_t *out_stream,
+        const axis2_char_t *content_type,
+        axis2_char_t *soap_action_header,
+        const axis2_char_t *request_uri,
+        axis2_conf_ctx_t *conf_ctx,
+        axis2_hash_t *request_params);
+
+    AXIS2_EXTERN axiom_stax_builder_t *AXIS2_CALL
+    axis2_http_transport_utils_select_builder_for_mime(
+        const axis2_env_t *env, 
+        axis2_char_t *request_uri,
+        axis2_msg_ctx_t *msg_ctx, 
+        axis2_stream_t *in_stream,
+        axis2_char_t *content_type);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    axis2_http_transport_utils_do_write_mtom(
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *msg_ctx);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    axis2_http_transport_utils_is_doing_rest(
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *msg_ctx);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    axis2_http_transport_utils_is_doing_rest_through_post(
+        const axis2_env_t *env, 
+        axis2_msg_ctx_t *msg_ctx);
+
+    AXIS2_EXTERN axis2_hash_t *AXIS2_CALL
+    axis2_http_transport_utils_get_request_params(
+        const axis2_env_t *env,
+        axis2_char_t *request_uri);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    axis2_http_transport_utils_get_services_html(
+        const axis2_env_t *env,
+        axis2_conf_ctx_t *conf_ctx);
+
+    AXIS2_EXTERN axis2_hash_t *AXIS2_CALL
+    axis2_http_transport_utils_get_request_params(
+        const axis2_env_t *env,
+        axis2_char_t *request_uri);
+
+    AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
+    axis2_http_transport_utils_create_soap_msg(
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *msg_ctx,
+        const axis2_char_t *soap_ns_uri);
 
 
 /** @} */

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c?rev=434400&r1=434399&r2=434400&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c Thu Aug 24 07:08:24 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #include <axis2_http_transport_utils.h>
 #include <string.h>
 #include <ctype.h>
@@ -46,100 +46,119 @@
 /***************************** Function headers *******************************/
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_http_transport_utils_process_http_post_request
-                        (const axis2_env_t *env, 
-                        axis2_msg_ctx_t *msg_ctx, 
-                        axis2_stream_t *in_stream, 
-                        axis2_stream_t *out_stream,
-                        const axis2_char_t *content_type, 
-                        const int content_length,
-                        axis2_char_t *soap_action_header,
-                        const axis2_char_t *request_uri);
-    
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
-axis2_http_transport_utils_process_http_get_request
-                        (const axis2_env_t *env, 
-                        axis2_msg_ctx_t *msg_ctx,
-                        axis2_stream_t *in_stream, 
-                        axis2_stream_t *out_stream,
-                        const axis2_char_t *content_type,
-                        axis2_char_t *soap_action_header, 
-                        const axis2_char_t *request_uri, 
-                        axis2_conf_ctx_t *conf_ctx, 
-                        axis2_hash_t *request_params);
-    
-AXIS2_EXTERN axiom_stax_builder_t*  AXIS2_CALL
-axis2_http_transport_utils_select_builder_for_mime
-                        (const axis2_env_t *env, axis2_char_t *request_uri,
-                        axis2_msg_ctx_t *msg_ctx, axis2_stream_t *in_stream,
-                        axis2_char_t *content_type);
-    
-AXIS2_EXTERN axis2_bool_t  AXIS2_CALL 
-axis2_http_transport_utils_is_optimized(const axis2_env_t *env, 
-                                        axiom_element_t *om_element);
-                                                
-AXIS2_EXTERN axis2_bool_t  AXIS2_CALL 
-axis2_http_transport_utils_do_write_mtom(const axis2_env_t *env, 
-                                        axis2_msg_ctx_t *msg_ctx);
-                                                
-AXIS2_EXTERN axis2_bool_t  AXIS2_CALL 
-axis2_http_transport_utils_is_doing_rest(const axis2_env_t *env, 
-                                        axis2_msg_ctx_t *msg_ctx);
-                                                
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
-axis2_http_transport_utils_is_doing_rest_through_post
-                        (const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx);
-                  
+axis2_http_transport_utils_process_http_post_request(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_stream_t *in_stream,
+    axis2_stream_t *out_stream,
+    const axis2_char_t *content_type,
+    const int content_length,
+    axis2_char_t *soap_action_header,
+    const axis2_char_t *request_uri);
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_http_transport_utils_process_http_get_request(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_stream_t *in_stream,
+    axis2_stream_t *out_stream,
+    const axis2_char_t *content_type,
+    axis2_char_t *soap_action_header,
+    const axis2_char_t *request_uri,
+    axis2_conf_ctx_t *conf_ctx,
+    axis2_hash_t *request_params);
+
+AXIS2_EXTERN axiom_stax_builder_t *AXIS2_CALL
+axis2_http_transport_utils_select_builder_for_mime(
+    const axis2_env_t *env, 
+    axis2_char_t *request_uri,
+    axis2_msg_ctx_t *msg_ctx, 
+    axis2_stream_t *in_stream,
+    axis2_char_t *content_type);
+
+AXIS2_EXTERN axis2_bool_t  AXIS2_CALL
+axis2_http_transport_utils_is_optimized(
+    const axis2_env_t *env,
+    axiom_element_t *om_element);
+
+AXIS2_EXTERN axis2_bool_t  AXIS2_CALL
+axis2_http_transport_utils_do_write_mtom(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx);
+
+AXIS2_EXTERN axis2_bool_t  AXIS2_CALL
+axis2_http_transport_utils_is_doing_rest(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx);
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_http_transport_utils_is_doing_rest_through_post(
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx);
+
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_http_transport_utils_strdecode(const axis2_env_t *env, axis2_char_t *dest, 
-                  axis2_char_t *src);
-                  
+axis2_http_transport_utils_strdecode(
+    const axis2_env_t *env, 
+    axis2_char_t *dest,
+    axis2_char_t *src);
+
 AXIS2_EXTERN int AXIS2_CALL
-axis2_http_transport_utils_hexit(axis2_char_t c);
+axis2_http_transport_utils_hexit(
+    axis2_char_t c);
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_http_transport_utils_get_services_html(
+    const axis2_env_t *env,
+    axis2_conf_ctx_t *conf_ctx);
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_http_transport_utils_get_charset_enc(
+    const axis2_env_t *env,
+    const axis2_char_t *content_type);
 
-AXIS2_EXTERN axis2_char_t*  AXIS2_CALL
-axis2_http_transport_utils_get_services_html(const axis2_env_t *env, 
-                     axis2_conf_ctx_t *conf_ctx);
-                     
-AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-axis2_http_transport_utils_get_charset_enc(const axis2_env_t *env, 
-                  const axis2_char_t *content_type);
-                  
 int AXIS2_CALL
-axis2_http_transport_utils_on_data_request(char *buffer, int size, void *ctx);
+axis2_http_transport_utils_on_data_request(
+    char *buffer, 
+    int size, 
+    void *ctx);
+
+AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
+axis2_http_transport_utils_create_soap_msg(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    const axis2_char_t *soap_ns_uri);
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_http_transport_utils_get_value_from_content_type(
+    const axis2_env_t *env,
+    const axis2_char_t *content_type,
+    const axis2_char_t *key);
 
-AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
-axis2_http_transport_utils_create_soap_msg(const axis2_env_t *env, 
-                        axis2_msg_ctx_t *msg_ctx, 
-                        const axis2_char_t *soap_ns_uri);
-                        
-AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-axis2_http_transport_utils_get_value_from_content_type(const axis2_env_t *env, 
-                  const axis2_char_t *content_type, 
-                  const axis2_char_t *key);
-                  
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_http_transport_utils_dispatch_and_verify(const axis2_env_t *env,
-                        axis2_msg_ctx_t *msg_ctx);
+axis2_http_transport_utils_dispatch_and_verify(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx);
+
+AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
+axis2_http_transport_utils_handle_media_type_url_encoded(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_hash_t *param_map,
+    axis2_char_t *method,
+    xml_schema_element_t *schema_element);
 
-AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
-axis2_http_transport_utils_handle_media_type_url_encoded(const axis2_env_t *env,
-                        axis2_msg_ctx_t *msg_ctx, 
-                        axis2_hash_t *param_map, 
-                        axis2_char_t *method, 
-                        xml_schema_element_t *schema_element);
 /***************************** End of function headers ************************/
 
-AXIS2_EXTERN axis2_status_t  AXIS2_CALL 
-axis2_http_transport_utils_process_http_post_request
-                        (const axis2_env_t *env, 
-                        axis2_msg_ctx_t *msg_ctx, 
-                        axis2_stream_t *in_stream, 
-                        axis2_stream_t *out_stream,
-                        const axis2_char_t *content_type, 
-                        const int content_length, 
-                        axis2_char_t *soap_action_header,
-                        const axis2_char_t *request_uri)
+AXIS2_EXTERN axis2_status_t  AXIS2_CALL
+axis2_http_transport_utils_process_http_post_request(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_stream_t *in_stream,
+    axis2_stream_t *out_stream,
+    const axis2_char_t *content_type,
+    const int content_length,
+    axis2_char_t *soap_action_header,
+    const axis2_char_t *request_uri)
 {
     axiom_soap_envelope_t *soap_envelope = NULL;
     axiom_soap_builder_t *soap_builder = NULL;
@@ -156,36 +175,36 @@
     axis2_property_t *property = NULL;
     axis2_status_t status = AXIS2_FAILURE;
     axis2_hash_t *binary_data_map = NULL;
-   
+
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, in_stream, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, out_stream, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, content_type, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, request_uri, AXIS2_FAILURE);
-   
+
     conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
-   
+
     callback_ctx.in_stream = in_stream;
     callback_ctx.env = env;
     callback_ctx.content_length = content_length;
     callback_ctx.unread_len = content_length;
     callback_ctx.chunked_stream = NULL;
-   
-    if(NULL != soap_action_header && (strlen(soap_action_header) > 0) )   
+
+    if(NULL != soap_action_header && (strlen(soap_action_header) > 0) )
     {
         /* remove leading and trailing " s */
         if('"' == soap_action_header[0])
         {
-            memmove(soap_action_header, soap_action_header+sizeof(axis2_char_t),
-                        strlen(soap_action_header) + sizeof(axis2_char_t));
+            memmove(soap_action_header, soap_action_header + sizeof(axis2_char_t),
+                    strlen(soap_action_header) + sizeof(axis2_char_t));
         }
         if('"' == soap_action_header[strlen(soap_action_header) -1])
         {
             soap_action_header[strlen(soap_action_header) -1] = '\0';
         }
     }
-    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_HEADERS, 
-                        AXIS2_FALSE);
+    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_HEADERS,
+            AXIS2_FALSE);
     if(property)
     {
         headers = AXIS2_PROPERTY_GET_VALUE(property, env);
@@ -194,57 +213,57 @@
     if(NULL != headers)
     {
         axis2_http_header_t *encoding_header = NULL;
-        encoding_header = (axis2_http_header_t*)axis2_hash_get(headers, 
-                        AXIS2_HTTP_HEADER_TRANSFER_ENCODING,
-                        AXIS2_HASH_KEY_STRING);
+        encoding_header = (axis2_http_header_t *)axis2_hash_get(headers,
+                AXIS2_HTTP_HEADER_TRANSFER_ENCODING,
+                AXIS2_HASH_KEY_STRING);
         if(NULL != encoding_header)
         {
             axis2_char_t *encoding_value = NULL;
             encoding_value = AXIS2_HTTP_HEADER_GET_VALUE(encoding_header, env);
-            if(NULL != encoding_value && 0 == AXIS2_STRCASECMP(encoding_value, 
-                        AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
+            if(NULL != encoding_value && 0 == AXIS2_STRCASECMP(encoding_value,
+                    AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
             {
                 callback_ctx.chunked_stream = axis2_http_chunked_stream_create(
-                        env, in_stream);
+                            env, in_stream);
                 if(NULL == callback_ctx.chunked_stream)
                 {
                     AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Error occured in"
-                        " creating in chunked stream.");
-                    return AXIS2_FAILURE;            
+                            " creating in chunked stream.");
+                    return AXIS2_FAILURE;
                 }
                 AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "HTTP"
                         " stream chunked");
             }
         }
     }
-    
+
     if (NULL != strstr(content_type, AXIS2_HTTP_HEADER_ACCEPT_MULTIPART_RELATED))
     {
         /* get mime boundry */
-        axis2_char_t *mime_boundary = 
-            axis2_http_transport_utils_get_value_from_content_type(env, 
-                content_type, AXIS2_HTTP_HEADER_CONTENT_TYPE_MIME_BOUNDARY);
+        axis2_char_t *mime_boundary =
+            axis2_http_transport_utils_get_value_from_content_type(env,
+                    content_type, AXIS2_HTTP_HEADER_CONTENT_TYPE_MIME_BOUNDARY);
 
         if (mime_boundary)
         {
             axiom_mime_parser_t *mime_parser = NULL;
             axis2_stream_t *stream = NULL;
             int soap_body_len = 0;
-            axis2_char_t* soap_body_str = NULL;
-            
+            axis2_char_t *soap_body_str = NULL;
+
             mime_parser = axiom_mime_parser_create(env);
             if (mime_parser)
             {
-                binary_data_map = AXIOM_MIME_PARSER_PARSE(mime_parser, env, 
-                    axis2_http_transport_utils_on_data_request, 
-                    (void*)&callback_ctx, mime_boundary);
-                
+                binary_data_map = AXIOM_MIME_PARSER_PARSE(mime_parser, env,
+                        axis2_http_transport_utils_on_data_request,
+                        (void *) & callback_ctx, mime_boundary);
+
                 soap_body_len = AXIOM_MIME_PARSER_GET_SOAP_BODY_LENGTH(
-                    mime_parser, env);
+                            mime_parser, env);
                 soap_body_str = AXIOM_MIME_PARSER_GET_SOAP_BODY_STR(
-                    mime_parser, env);
+                            mime_parser, env);
             }
-            
+
             stream = axis2_stream_create_basic(env);
             if (stream)
             {
@@ -256,111 +275,111 @@
             }
         }
     }
-    
+
 
     /*TODO for MTOM:create a basic stream
     set callback_ctx.in_stream to this basic stream
     make callback_ctx.chunked_stream null but keep the referance */
 
-   AXIS2_MSG_CTX_SET_WSA_ACTION(msg_ctx, env, soap_action_header);
-   AXIS2_MSG_CTX_SET_SOAP_ACTION(msg_ctx, env, soap_action_header);
-   AXIS2_MSG_CTX_SET_TO(msg_ctx, env, axis2_endpoint_ref_create(env, 
-               request_uri));
-    
-   AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
-   
-   char_set = axis2_http_transport_utils_get_charset_enc(env,content_type);
-   xml_reader = axiom_xml_reader_create_for_io(env, 
-                  axis2_http_transport_utils_on_data_request,NULL, 
-                  (void *)&callback_ctx, char_set);
-
-   if(NULL == xml_reader)
-   {
-      return AXIS2_FAILURE;
-   }
+    AXIS2_MSG_CTX_SET_WSA_ACTION(msg_ctx, env, soap_action_header);
+    AXIS2_MSG_CTX_SET_SOAP_ACTION(msg_ctx, env, soap_action_header);
+    AXIS2_MSG_CTX_SET_TO(msg_ctx, env, axis2_endpoint_ref_create(env,
+            request_uri));
+
+    AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
+
+    char_set = axis2_http_transport_utils_get_charset_enc(env, content_type);
+    xml_reader = axiom_xml_reader_create_for_io(env,
+            axis2_http_transport_utils_on_data_request, NULL,
+            (void *) & callback_ctx, char_set);
+
+    if(NULL == xml_reader)
+    {
+        return AXIS2_FAILURE;
+    }
 
     property = axis2_property_create(env);
     AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
     AXIS2_PROPERTY_SET_VALUE(property, env, char_set);
-   AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_CHARACTER_SET_ENCODING,
-               property, AXIS2_TRUE);
+    AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_CHARACTER_SET_ENCODING,
+            property, AXIS2_TRUE);
 
-   om_builder = axiom_stax_builder_create(env, xml_reader);
-   if(NULL == om_builder)
-   {
-      AXIOM_XML_READER_FREE(xml_reader, env);
-      xml_reader = NULL;
-      return AXIS2_FAILURE;
-   }
-
-   if(NULL != strstr(content_type, AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP))
-   {
-      is_soap11 = AXIS2_FALSE;
-      soap_builder = axiom_soap_builder_create(env, om_builder, 
-                    AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
-      if(NULL == soap_builder)
-      {
-         /* We should not be freeing om_builder here as it is done by
-            axiom_soap_builder_create in case of error - Samisa*/
-            /*AXIOM_STAX_BUILDER_FREE(om_builder, env);*/
-         om_builder = NULL;
-         xml_reader = NULL;
-         return AXIS2_FAILURE;
-      }
-
-      soap_envelope = AXIOM_SOAP_BUILDER_GET_SOAP_ENVELOPE(soap_builder,
-               env);
-      if(NULL == soap_envelope)
-      {
-         AXIOM_STAX_BUILDER_FREE(om_builder, env);
-         om_builder = NULL;
-         xml_reader = NULL;
-         AXIOM_SOAP_BUILDER_FREE(soap_builder, env);
-         soap_builder = NULL;
-         return AXIS2_FAILURE;
-      }
-   }
-   else if(NULL != strstr(content_type, AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML))
-   {
-      is_soap11 = AXIS2_TRUE;
-      if(NULL != soap_action_header)
-      {
-         soap_builder = axiom_soap_builder_create(env, om_builder, 
-                  AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI);
-         if(NULL == soap_builder)
-         {
-             /* We should not be freeing om_builder here as it is done by
-                axiom_soap_builder_create in case of error - Samisa*/
+    om_builder = axiom_stax_builder_create(env, xml_reader);
+    if(NULL == om_builder)
+    {
+        AXIOM_XML_READER_FREE(xml_reader, env);
+        xml_reader = NULL;
+        return AXIS2_FAILURE;
+    }
+
+    if(NULL != strstr(content_type, AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP))
+    {
+        is_soap11 = AXIS2_FALSE;
+        soap_builder = axiom_soap_builder_create(env, om_builder,
+                AXIOM_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
+        if(NULL == soap_builder)
+        {
+            /* We should not be freeing om_builder here as it is done by
+               axiom_soap_builder_create in case of error - Samisa*/
             /*AXIOM_STAX_BUILDER_FREE(om_builder, env);*/
             om_builder = NULL;
             xml_reader = NULL;
             return AXIS2_FAILURE;
-         }
-         soap_envelope = AXIOM_SOAP_BUILDER_GET_SOAP_ENVELOPE(
-               soap_builder, env);
-         if(NULL == soap_envelope)
-         {
-            AXIOM_SOAP_BUILDER_FREE(soap_builder, env);
+        }
+
+        soap_envelope = AXIOM_SOAP_BUILDER_GET_SOAP_ENVELOPE(soap_builder,
+                env);
+        if(NULL == soap_envelope)
+        {
+            AXIOM_STAX_BUILDER_FREE(om_builder, env);
             om_builder = NULL;
             xml_reader = NULL;
+            AXIOM_SOAP_BUILDER_FREE(soap_builder, env);
             soap_builder = NULL;
             return AXIS2_FAILURE;
-         }
+        }
     }
+    else if(NULL != strstr(content_type, AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML))
+    {
+        is_soap11 = AXIS2_TRUE;
+        if(NULL != soap_action_header)
+        {
+            soap_builder = axiom_soap_builder_create(env, om_builder,
+                    AXIOM_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI);
+            if(NULL == soap_builder)
+            {
+                /* We should not be freeing om_builder here as it is done by
+                   axiom_soap_builder_create in case of error - Samisa*/
+                /*AXIOM_STAX_BUILDER_FREE(om_builder, env);*/
+                om_builder = NULL;
+                xml_reader = NULL;
+                return AXIS2_FAILURE;
+            }
+            soap_envelope = AXIOM_SOAP_BUILDER_GET_SOAP_ENVELOPE(
+                        soap_builder, env);
+            if(NULL == soap_envelope)
+            {
+                AXIOM_SOAP_BUILDER_FREE(soap_builder, env);
+                om_builder = NULL;
+                xml_reader = NULL;
+                soap_builder = NULL;
+                return AXIS2_FAILURE;
+            }
+        }
         else
         {
             /* REST support */
             axis2_param_t *rest_param = AXIS2_MSG_CTX_GET_PARAMETER(msg_ctx, env
-                        , AXIS2_ENABLE_REST);
-            if(NULL != rest_param && 0 == AXIS2_STRCMP(AXIS2_VALUE_TRUE, 
-                        AXIS2_PARAM_GET_VALUE(rest_param, env)))
+                    , AXIS2_ENABLE_REST);
+            if(NULL != rest_param && 0 == AXIS2_STRCMP(AXIS2_VALUE_TRUE,
+                    AXIS2_PARAM_GET_VALUE(rest_param, env)))
             {
                 /* TODO we have to check for NULLs */
                 axiom_soap_body_t *def_body = NULL;
                 axiom_document_t *om_doc = NULL;
                 axiom_node_t *root_node = NULL;
                 soap_envelope = axiom_soap_envelope_create_default_soap_envelope
-                            (env, AXIOM_SOAP11);
+                        (env, AXIOM_SOAP11);
                 def_body = AXIOM_SOAP_ENVELOPE_GET_BODY(soap_envelope, env);
                 om_doc = AXIOM_STAX_BUILDER_GET_DOCUMENT(om_builder, env);
                 root_node = AXIOM_DOCUMENT_BUILD_ALL(om_doc, env);
@@ -368,51 +387,51 @@
                 AXIS2_MSG_CTX_SET_DOING_REST(msg_ctx, env, AXIS2_TRUE);
             }
         }
-             
+
     }
-    
+
     if (binary_data_map)
     {
-        AXIOM_SOAP_BUILDER_SET_MIME_BODY_PARTS(soap_builder, env, 
-            binary_data_map);
+        AXIOM_SOAP_BUILDER_SET_MIME_BODY_PARTS(soap_builder, env,
+                binary_data_map);
     }
-        
-   /* xml_char_set = AXIOM_DOCUMENT_GET_CHARSET_ENC(
-    *               AXIOM_STAX_BUILDER_GET_DOCUMENT(env om_builder),
-    *               env);
-    *
-    *if(0 != AXIS2_STRCMP(char_set, xml_char_set))
-    *{
-    *   AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CHARSET_MISMATCH, 
-    *               AXIS2_FAILURE);
-    *   AXIOM_SOAP_ENVELOPE_FREE(envelope, env);
-    *   envelope = NULL;
-    *   AXIOM_XML_READER_FREE(xml_reader, env);
-    *   xml_reader = NULL;
-    *   AXIOM_STAX_BUILDER_FREE(om_builder, env);
-    *   om_builder = NULL;
-    *   if(NULL != soap_builder)
-    *   {
-    *       AXIOM_SOAP_BUILDER_FREE(soap_builder, env);
-    *       soap_builder = NULL;
-    *   }
-    *   return AXIS2_FAILURE;
-    *}
-    */
-   
+
+    /* xml_char_set = AXIOM_DOCUMENT_GET_CHARSET_ENC(
+     *               AXIOM_STAX_BUILDER_GET_DOCUMENT(env om_builder),
+     *               env);
+     *
+     *if(0 != AXIS2_STRCMP(char_set, xml_char_set))
+     *{
+     *   AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CHARSET_MISMATCH, 
+     *               AXIS2_FAILURE);
+     *   AXIOM_SOAP_ENVELOPE_FREE(envelope, env);
+     *   envelope = NULL;
+     *   AXIOM_XML_READER_FREE(xml_reader, env);
+     *   xml_reader = NULL;
+     *   AXIOM_STAX_BUILDER_FREE(om_builder, env);
+     *   om_builder = NULL;
+     *   if(NULL != soap_builder)
+     *   {
+     *       AXIOM_SOAP_BUILDER_FREE(soap_builder, env);
+     *       soap_builder = NULL;
+     *   }
+     *   return AXIS2_FAILURE;
+     *}
+     */
+
     AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, soap_envelope);
-   
+
     engine = axis2_engine_create(env, conf_ctx);
-    
+
     if (!soap_envelope)
         return AXIS2_FAILURE;
-    
-    soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(soap_envelope, 
-                  env);
-    
+
+    soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(soap_envelope,
+            env);
+
     if (NULL == soap_body)
         return AXIS2_FAILURE;
-    
+
     if(AXIS2_TRUE == AXIOM_SOAP_BODY_HAS_FAULT(soap_body, env))
     {
         status = AXIS2_ENGINE_RECEIVE_FAULT(engine, env, msg_ctx);
@@ -421,73 +440,73 @@
     {
         status = AXIS2_ENGINE_RECEIVE(engine, env, msg_ctx);
     }
-    if(NULL == AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env) && 
-                  AXIS2_FALSE == is_soap11)
+    if(NULL == AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env) &&
+            AXIS2_FALSE == is_soap11)
     {
-        axiom_soap_envelope_t *def_envelope = 
-                        axiom_soap_envelope_create_default_soap_envelope(env, 
-                        AXIOM_SOAP12);
+        axiom_soap_envelope_t *def_envelope =
+            axiom_soap_envelope_create_default_soap_envelope(env,
+                    AXIOM_SOAP12);
         AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, def_envelope);
     }
     if(NULL != engine)
     {
         AXIS2_ENGINE_FREE(engine, env);
     }
-   return status;
+    return status;
 }
 
 
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
-axis2_http_transport_utils_process_http_get_request
-                        (const axis2_env_t *env, 
-                        axis2_msg_ctx_t *msg_ctx,
-                        axis2_stream_t *in_stream, 
-                        axis2_stream_t *out_stream,
-                        const axis2_char_t *content_type,
-                        axis2_char_t *soap_action_header, 
-                        const axis2_char_t *request_uri, 
-                        axis2_conf_ctx_t *conf_ctx, 
-                        axis2_hash_t *request_params)
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_http_transport_utils_process_http_get_request(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_stream_t *in_stream,
+    axis2_stream_t *out_stream,
+    const axis2_char_t *content_type,
+    axis2_char_t *soap_action_header,
+    const axis2_char_t *request_uri,
+    axis2_conf_ctx_t *conf_ctx,
+    axis2_hash_t *request_params)
 {
     axiom_soap_envelope_t *soap_envelope = NULL;
     axis2_engine_t *engine = NULL;
     axis2_property_t *property = NULL;
     axis2_op_t *op = NULL;
     xml_schema_element_t *schema_element = NULL;
-    
+
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, in_stream, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, out_stream, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, content_type, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, request_uri, AXIS2_FALSE);
     AXIS2_PARAM_CHECK(env->error, request_params, AXIS2_FALSE);
-   
-    
-    AXIS2_MSG_CTX_SET_TO(msg_ctx, env, axis2_endpoint_ref_create(env, 
-                        request_uri));
-    
+
+
+    AXIS2_MSG_CTX_SET_TO(msg_ctx, env, axis2_endpoint_ref_create(env,
+            request_uri));
+
     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, out_stream);
-    AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, 
-               AXIS2_TRANSPORT_OUT, property, AXIS2_FALSE);
+    AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,
+            AXIS2_TRANSPORT_OUT, property, AXIS2_FALSE);
 
     AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
-    if(AXIS2_SUCCESS != axis2_http_transport_utils_dispatch_and_verify(env, 
-                        msg_ctx))
+    if(AXIS2_SUCCESS != axis2_http_transport_utils_dispatch_and_verify(env,
+            msg_ctx))
     {
         return AXIS2_FALSE;
     }
     op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env);
     if(NULL != op)
     {
-        axis2_msg_t *msg = NULL;        
+        axis2_msg_t *msg = NULL;
         msg = AXIS2_OP_GET_MSG(op, env, AXIS2_MSG_IN);
         schema_element = AXIS2_MSG_GET_SCHEMA_ELEMENT(msg, env);
     }
     soap_envelope = axis2_http_transport_utils_handle_media_type_url_encoded(
-                env, msg_ctx, request_params, AXIS2_HTTP_HEADER_GET, 
+                env, msg_ctx, request_params, AXIS2_HTTP_HEADER_GET,
                 schema_element);
     if(NULL == soap_envelope)
     {
@@ -504,47 +523,48 @@
     return AXIS2_FALSE;
 }
 
-
-AXIS2_EXTERN axiom_stax_builder_t*  AXIS2_CALL
-axis2_http_transport_utils_select_builder_for_mime
-                        (const axis2_env_t *env, axis2_char_t *request_uri,
-                        axis2_msg_ctx_t *msg_ctx, axis2_stream_t *in_stream,
-                        axis2_char_t *content_type)
+AXIS2_EXTERN axiom_stax_builder_t *AXIS2_CALL
+axis2_http_transport_utils_select_builder_for_mime(
+    const axis2_env_t *env, 
+    axis2_char_t *request_uri,
+    axis2_msg_ctx_t *msg_ctx, 
+    axis2_stream_t *in_stream,
+    axis2_char_t *content_type)
 {
-   /*
-        TODO implement when MTOM support is added
-    */
+    /*
+         TODO implement when MTOM support is added
+     */
     return NULL;
 }
 
-
-AXIS2_EXTERN axis2_bool_t  AXIS2_CALL 
-axis2_http_transport_utils_is_optimized(const axis2_env_t *env, 
-                                        axiom_element_t *om_element)
+AXIS2_EXTERN axis2_bool_t  AXIS2_CALL
+axis2_http_transport_utils_is_optimized(
+    const axis2_env_t *env,
+    axiom_element_t *om_element)
 {
-   /*
-        TODO implement when MTOM support is added
-    */
+    /*
+         TODO implement when MTOM support is added
+     */
     return AXIS2_FALSE;
 }
 
-
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
-axis2_http_transport_utils_do_write_mtom(const axis2_env_t *env, 
-                                        axis2_msg_ctx_t *msg_ctx)
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_http_transport_utils_do_write_mtom(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx)
 {
     axis2_property_t *property = NULL;
     axis2_param_t *param = NULL;
     axis2_char_t *value = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);    
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
 
     param = AXIS2_MSG_CTX_GET_PARAMETER(msg_ctx, env, AXIS2_ENABLE_MTOM);
     if(NULL != param)
         value = AXIS2_PARAM_GET_VALUE(param, env);
-    
+
     property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
-        AXIS2_ENABLE_MTOM, AXIS2_FALSE);
+            AXIS2_ENABLE_MTOM, AXIS2_FALSE);
     if(NULL != property)
         value = (axis2_char_t *)AXIS2_PROPERTY_GET_VALUE(property, env);
 
@@ -556,9 +576,10 @@
 }
 
 
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
-axis2_http_transport_utils_is_doing_rest(const axis2_env_t *env, 
-                                        axis2_msg_ctx_t *msg_ctx)
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_http_transport_utils_is_doing_rest(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx)
 {
     /*
         TODO implement when REST support is added
@@ -567,9 +588,10 @@
 }
 
 
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL 
-axis2_http_transport_utils_is_doing_rest_through_post
-                        (const axis2_env_t *env, axis2_msg_ctx_t *msg_ctx)
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_http_transport_utils_is_doing_rest_through_post(
+    const axis2_env_t *env, 
+    axis2_msg_ctx_t *msg_ctx)
 {
     /*
         TODO implement when REST support is added
@@ -577,320 +599,329 @@
     return AXIS2_FALSE;
 }
 
-AXIS2_EXTERN axis2_hash_t * AXIS2_CALL
-axis2_http_transport_utils_get_request_params(const axis2_env_t *env, 
-                  axis2_char_t *request_uri)
+AXIS2_EXTERN axis2_hash_t *AXIS2_CALL
+axis2_http_transport_utils_get_request_params(
+    const axis2_env_t *env,
+    axis2_char_t *request_uri)
 {
-   
-   
-   axis2_char_t *query_str = NULL;
-   axis2_char_t *tmp = strchr(request_uri, '?');
-   axis2_char_t *tmp2 = NULL;
-   axis2_char_t *tmp_name = NULL;
-   axis2_char_t *tmp_value = NULL;
-   axis2_hash_t *ret = NULL;
-   
-   AXIS2_PARAM_CHECK(env->error, request_uri, AXIS2_FAILURE);
-   
-   if(NULL == tmp || '\0' == *(tmp +1))
-   {
-      return NULL;
-   }
-   query_str = AXIS2_STRDUP(tmp+1, env);
-      
-   for(tmp2 = tmp = query_str; *tmp != '\0'; ++tmp)
-   {
-      if('=' == *tmp)
-      {
-         *tmp = '\0';
-         tmp_name = AXIS2_STRDUP(tmp2, env);
-         axis2_http_transport_utils_strdecode(env, tmp_name, tmp_name);
-         tmp2 = tmp +1;         
-      }
-      if('&' == *tmp)
-      {
-         *tmp = '\0';
-         tmp_value = AXIS2_STRDUP(tmp2, env);
-         axis2_http_transport_utils_strdecode(env, tmp_value, tmp_value);
-         tmp2 = tmp +1;
-      }
-      if(NULL != tmp_name && NULL != tmp_value)
-      {
-         if(NULL == ret)
-         {
+
+
+    axis2_char_t *query_str = NULL;
+    axis2_char_t *tmp = strchr(request_uri, '?');
+    axis2_char_t *tmp2 = NULL;
+    axis2_char_t *tmp_name = NULL;
+    axis2_char_t *tmp_value = NULL;
+    axis2_hash_t *ret = NULL;
+
+    AXIS2_PARAM_CHECK(env->error, request_uri, AXIS2_FAILURE);
+
+    if(NULL == tmp || '\0' == *(tmp + 1))
+    {
+        return NULL;
+    }
+    query_str = AXIS2_STRDUP(tmp + 1, env);
+
+    for(tmp2 = tmp = query_str; *tmp != '\0'; ++tmp)
+    {
+        if('=' == *tmp)
+        {
+            *tmp = '\0';
+            tmp_name = AXIS2_STRDUP(tmp2, env);
+            axis2_http_transport_utils_strdecode(env, tmp_name, tmp_name);
+            tmp2 = tmp + 1;
+        }
+        if('&' == *tmp)
+        {
+            *tmp = '\0';
+            tmp_value = AXIS2_STRDUP(tmp2, env);
+            axis2_http_transport_utils_strdecode(env, tmp_value, tmp_value);
+            tmp2 = tmp + 1;
+        }
+        if(NULL != tmp_name && NULL != tmp_value)
+        {
+            if(NULL == ret)
+            {
+                ret = axis2_hash_make(env);
+            }
+            axis2_hash_set(ret, tmp_name, AXIS2_HASH_KEY_STRING, tmp_value);
+            tmp_name = NULL;
+            tmp_value = NULL;
+        }
+    }
+    if(NULL != tmp_name && '\0' != *tmp2)
+    {
+        if(NULL == ret)
+        {
             ret = axis2_hash_make(env);
-         }
-         axis2_hash_set(ret, tmp_name, AXIS2_HASH_KEY_STRING, tmp_value);
-         tmp_name = NULL;
-         tmp_value = NULL;
-      }
-   }
-   if(NULL != tmp_name && '\0' != *tmp2)
-   {
-      if(NULL == ret)
-      {
-         ret = axis2_hash_make(env);
-      }
-      tmp_value = AXIS2_STRDUP(tmp2, env);
-      axis2_http_transport_utils_strdecode(env, tmp_value, tmp_value);
-      axis2_hash_set(ret, tmp_name, AXIS2_HASH_KEY_STRING, tmp_value);
-   }
-   
-   return ret;
+        }
+        tmp_value = AXIS2_STRDUP(tmp2, env);
+        axis2_http_transport_utils_strdecode(env, tmp_value, tmp_value);
+        axis2_hash_set(ret, tmp_name, AXIS2_HASH_KEY_STRING, tmp_value);
+    }
+
+    return ret;
 }
 
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_http_transport_utils_strdecode(const axis2_env_t *env, axis2_char_t *dest, 
-                  axis2_char_t *src)
+axis2_http_transport_utils_strdecode(
+    const axis2_env_t *env, 
+    axis2_char_t *dest,
+    axis2_char_t *src)
 {
-   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, dest, AXIS2_FAILURE);
-   AXIS2_PARAM_CHECK(env->error, src, AXIS2_FAILURE);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, dest, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, src, AXIS2_FAILURE);
 
     for ( ; *src != '\0'; ++dest, ++src )
     {
-      if ( src[0] == '%' && isxdigit( src[1] ) && isxdigit( src[2] ) )
-      {
-         *dest = axis2_http_transport_utils_hexit( src[1] ) * 16 + 
-                     axis2_http_transport_utils_hexit( src[2] );
-         src += 2;
-      }
-      else
-      {
-         *dest = *src;
-      }
+        if ( src[0] == '%' && isxdigit( src[1] ) && isxdigit( src[2] ) )
+        {
+            *dest = axis2_http_transport_utils_hexit( src[1] ) * 16 +
+                    axis2_http_transport_utils_hexit( src[2] );
+            src += 2;
+        }
+        else
+        {
+            *dest = *src;
+        }
     }
     *dest = '\0';
-   
-   return AXIS2_SUCCESS;
+
+    return AXIS2_SUCCESS;
 }
 
 
 AXIS2_EXTERN int  AXIS2_CALL
-axis2_http_transport_utils_hexit(axis2_char_t c)
+axis2_http_transport_utils_hexit(
+    axis2_char_t c)
 {
-   if ( c >= '0' && c <= '9' )
-   {
-      return c - '0';
-   }
-   if ( c >= 'a' && c <= 'f' )
-   {
-      return c - 'a' + 10;
-   }
-   if ( c >= 'A' && c <= 'F' )
-   {
-      return c - 'A' + 10;
-   }
-   return 0;           /* shouldn't happen, we're guarded by isxdigit() */
+    if ( c >= '0' && c <= '9' )
+    {
+        return c - '0';
+    }
+    if ( c >= 'a' && c <= 'f' )
+    {
+        return c - 'a' + 10;
+    }
+    if ( c >= 'A' && c <= 'F' )
+    {
+        return c - 'A' + 10;
+    }
+    return 0;           /* shouldn't happen, we're guarded by isxdigit() */
 }
 
-AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-axis2_http_transport_utils_get_services_html(const axis2_env_t *env, 
-                     axis2_conf_ctx_t *conf_ctx)
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_http_transport_utils_get_services_html(
+    const axis2_env_t *env,
+    axis2_conf_ctx_t *conf_ctx)
 {
-   axis2_hash_t *services_map = NULL;
-   axis2_hash_t *errorneous_svc_map = NULL;
-   axis2_char_t *ret = NULL;
-   axis2_char_t *tmp2 = (axis2_char_t *)"<h2>Deployed Services</h2>";
-   axis2_hash_index_t *hi = NULL;
-   axis2_bool_t svcs_exists = AXIS2_FALSE;
-   
-   AXIS2_ENV_CHECK(env, NULL);
-   AXIS2_PARAM_CHECK(env->error, conf_ctx, NULL);
-   
-   services_map = AXIS2_CONF_GET_ALL_SVCS(AXIS2_CONF_CTX_GET_CONF(conf_ctx,env),
-                     env);
-   errorneous_svc_map = AXIS2_CONF_GET_ALL_FAULTY_SVCS(AXIS2_CONF_CTX_GET_CONF(
-                     conf_ctx,env), env);
-   if(NULL != services_map && 0 != axis2_hash_count(services_map))
-   {
-      void *service = NULL;
-      axis2_char_t *sname = NULL;
-      axis2_hash_t *ops = NULL;
-      svcs_exists = AXIS2_TRUE;
-      
-      for (hi = axis2_hash_first (services_map, env);
-                         NULL != hi; hi = axis2_hash_next (env, hi))
-      {
-         axis2_hash_this(hi, NULL, NULL, &service);
-         sname= AXIS2_QNAME_GET_LOCALPART(AXIS2_SVC_GET_QNAME(
-                     ((axis2_svc_t *)service), env), env);
-         ret = AXIS2_STRACAT(tmp2, "<h3>", env);
-            tmp2 = ret;
-         ret = AXIS2_STRACAT(tmp2, sname, env);
-         AXIS2_FREE(env->allocator, tmp2);
+    axis2_hash_t *services_map = NULL;
+    axis2_hash_t *errorneous_svc_map = NULL;
+    axis2_char_t *ret = NULL;
+    axis2_char_t *tmp2 = (axis2_char_t *)"<h2>Deployed Services</h2>";
+    axis2_hash_index_t *hi = NULL;
+    axis2_bool_t svcs_exists = AXIS2_FALSE;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, conf_ctx, NULL);
+
+    services_map = AXIS2_CONF_GET_ALL_SVCS(AXIS2_CONF_CTX_GET_CONF(conf_ctx, env),
+            env);
+    errorneous_svc_map = AXIS2_CONF_GET_ALL_FAULTY_SVCS(AXIS2_CONF_CTX_GET_CONF(
+                conf_ctx, env), env);
+    if(NULL != services_map && 0 != axis2_hash_count(services_map))
+    {
+        void *service = NULL;
+        axis2_char_t *sname = NULL;
+        axis2_hash_t *ops = NULL;
+        svcs_exists = AXIS2_TRUE;
+
+        for (hi = axis2_hash_first (services_map, env);
+                NULL != hi; hi = axis2_hash_next (env, hi))
+        {
+            axis2_hash_this(hi, NULL, NULL, &service);
+            sname = AXIS2_QNAME_GET_LOCALPART(AXIS2_SVC_GET_QNAME(
+                        ((axis2_svc_t *)service), env), env);
+            ret = AXIS2_STRACAT(tmp2, "<h3>", env);
             tmp2 = ret;
-         ret  = AXIS2_STRACAT(tmp2, "</h3>", env);
-         AXIS2_FREE(env->allocator, tmp2);
+            ret = AXIS2_STRACAT(tmp2, sname, env);
+            AXIS2_FREE(env->allocator, tmp2);
             tmp2 = ret;
-         ops = AXIS2_SVC_GET_OPS(((axis2_svc_t *)service), env);
-         if(NULL != ops && 0 != axis2_hash_count(ops))
-         {
-            axis2_hash_index_t *hi2 = NULL;
-            void *op = NULL;
-            axis2_char_t *oname = NULL;
-            
-            ret = AXIS2_STRACAT(tmp2, "<i>Available Operations</i> <ul>", 
-                  env);
+            ret  = AXIS2_STRACAT(tmp2, "</h3>", env);
             AXIS2_FREE(env->allocator, tmp2);
-                tmp2 = ret;
-            for(hi2 = axis2_hash_first(ops, env); NULL != hi2;
-                     hi2 = axis2_hash_next(env, hi2))
+            tmp2 = ret;
+            ops = AXIS2_SVC_GET_OPS(((axis2_svc_t *)service), env);
+            if(NULL != ops && 0 != axis2_hash_count(ops))
             {
-               axis2_hash_this(hi2, NULL, NULL, &op);
-               oname = AXIS2_QNAME_GET_LOCALPART(AXIS2_OP_GET_QNAME(
-                     ((axis2_op_t *)op), env), env);
-               ret = AXIS2_STRACAT(tmp2, "<li>", env);
-               AXIS2_FREE(env->allocator, tmp2);
+                axis2_hash_index_t *hi2 = NULL;
+                void *op = NULL;
+                axis2_char_t *oname = NULL;
+
+                ret = AXIS2_STRACAT(tmp2, "<i>Available Operations</i> <ul>",
+                        env);
+                AXIS2_FREE(env->allocator, tmp2);
+                tmp2 = ret;
+                for(hi2 = axis2_hash_first(ops, env); NULL != hi2;
+                        hi2 = axis2_hash_next(env, hi2))
+                {
+                    axis2_hash_this(hi2, NULL, NULL, &op);
+                    oname = AXIS2_QNAME_GET_LOCALPART(AXIS2_OP_GET_QNAME(
+                                ((axis2_op_t *)op), env), env);
+                    ret = AXIS2_STRACAT(tmp2, "<li>", env);
+                    AXIS2_FREE(env->allocator, tmp2);
                     tmp2 = ret;
 
-               ret = AXIS2_STRACAT(tmp2, oname, env);
-               AXIS2_FREE(env->allocator, tmp2);
+                    ret = AXIS2_STRACAT(tmp2, oname, env);
+                    AXIS2_FREE(env->allocator, tmp2);
                     tmp2 = ret;
-               ret = AXIS2_STRACAT(tmp2, "</li>", env);
-               AXIS2_FREE(env->allocator, tmp2);                    
-               tmp2 = ret;
-            }
-            ret = AXIS2_STRACAT(tmp2, "</ul>", env);
-            AXIS2_FREE(env->allocator, tmp2);
+                    ret = AXIS2_STRACAT(tmp2, "</li>", env);
+                    AXIS2_FREE(env->allocator, tmp2);
+                    tmp2 = ret;
+                }
+                ret = AXIS2_STRACAT(tmp2, "</ul>", env);
+                AXIS2_FREE(env->allocator, tmp2);
                 tmp2 = ret;
-         }
-         else
-         {
-            ret = AXIS2_STRACAT(tmp2, "No operations Available", env);
-            /*AXIS2_FREE(env->allocator, tmp);*/
+            }
+            else
+            {
+                ret = AXIS2_STRACAT(tmp2, "No operations Available", env);
+                /*AXIS2_FREE(env->allocator, tmp);*/
                 tmp2 = ret;
-         }         
-      }
-   }
-   if(NULL != errorneous_svc_map && 0 != axis2_hash_count(errorneous_svc_map))
-   {
-      void *fsname = NULL;
-      svcs_exists = AXIS2_TRUE;
-      ret = AXIS2_STRACAT(tmp2, "<hr><h2><font color=\"red\">Faulty \
-                  Services</font></h2>"
-                     , env);
-      AXIS2_FREE(env->allocator, tmp2);
+            }
+        }
+    }
+    if(NULL != errorneous_svc_map && 0 != axis2_hash_count(errorneous_svc_map))
+    {
+        void *fsname = NULL;
+        svcs_exists = AXIS2_TRUE;
+        ret = AXIS2_STRACAT(tmp2, "<hr><h2><font color=\"red\">Faulty \
+                Services</font></h2>"
+                , env);
+        AXIS2_FREE(env->allocator, tmp2);
         tmp2 = ret;
-      
-      for(hi = axis2_hash_first(errorneous_svc_map, env); NULL != hi;
-                     axis2_hash_next(env, hi))
-      {
-         axis2_hash_this(hi, (const void **)&fsname, NULL, NULL);
-         ret = AXIS2_STRACAT(tmp2, "<h3><font color=\"red\">", env);
-         AXIS2_FREE(env->allocator, tmp2);
+
+        for(hi = axis2_hash_first(errorneous_svc_map, env); NULL != hi;
+                axis2_hash_next(env, hi))
+        {
+            axis2_hash_this(hi, (const void **)&fsname, NULL, NULL);
+            ret = AXIS2_STRACAT(tmp2, "<h3><font color=\"red\">", env);
+            AXIS2_FREE(env->allocator, tmp2);
             tmp2 = ret;
-         ret = AXIS2_STRACAT(tmp2, (axis2_char_t*)fsname, env);
-         AXIS2_FREE(env->allocator, tmp2);
+            ret = AXIS2_STRACAT(tmp2, (axis2_char_t *)fsname, env);
+            AXIS2_FREE(env->allocator, tmp2);
             tmp2 = ret;
-         ret = AXIS2_STRACAT(tmp2, "</font></h3>", env);
-         AXIS2_FREE(env->allocator, tmp2);
+            ret = AXIS2_STRACAT(tmp2, "</font></h3>", env);
+            AXIS2_FREE(env->allocator, tmp2);
             tmp2 = ret;
-      }
-   }
-   if(AXIS2_FALSE == svcs_exists)
-   {
-      ret = AXIS2_STRDUP("<h2>There are no services deployed</h2>", env);
-   }
-   ret = AXIS2_STRACAT("<html><head><title>Axis2C :: Services</title></head>"
-                  "<body><font face=\"courier\">" 
-                  , tmp2, env);
-   /*AXIS2_FREE(env->allocator, tmp2);*/
+        }
+    }
+    if(AXIS2_FALSE == svcs_exists)
+    {
+        ret = AXIS2_STRDUP("<h2>There are no services deployed</h2>", env);
+    }
+    ret = AXIS2_STRACAT("<html><head><title>Axis2C :: Services</title></head>"
+            "<body><font face=\"courier\">"
+            , tmp2, env);
+    /*AXIS2_FREE(env->allocator, tmp2);*/
     tmp2 = ret;
-   ret = AXIS2_STRACAT(tmp2, "</font></body></html>\r\n", env);
-   /*AXIS2_FREE(env->allocator, tmp);*/
-   
-   return ret;
+    ret = AXIS2_STRACAT(tmp2, "</font></body></html>\r\n", env);
+    /*AXIS2_FREE(env->allocator, tmp);*/
+
+    return ret;
 }
 
-AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-axis2_http_transport_utils_get_charset_enc(const axis2_env_t *env, 
-                  const axis2_char_t *content_type)
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_http_transport_utils_get_charset_enc(
+    const axis2_env_t *env,
+    const axis2_char_t *content_type)
 {
-   axis2_char_t *tmp = NULL;
-   axis2_char_t *tmp_content_type = NULL;
-   axis2_char_t *tmp2 = NULL;
-   
-   AXIS2_ENV_CHECK(env, NULL);
-   AXIS2_PARAM_CHECK(env->error, content_type, NULL);
-   
-   tmp_content_type = AXIS2_STRDUP(content_type, env);
-   if(NULL == tmp_content_type)
-   {
-      return AXIS2_STRDUP(AXIS2_HTTP_HEADER_DEFAULT_CHAR_ENCODING, env);
-   }
-   tmp = strstr(tmp_content_type, AXIS2_HTTP_CHAR_SET_ENCODING);
-   if(NULL == tmp)
-   {
+    axis2_char_t *tmp = NULL;
+    axis2_char_t *tmp_content_type = NULL;
+    axis2_char_t *tmp2 = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, content_type, NULL);
+
+    tmp_content_type = AXIS2_STRDUP(content_type, env);
+    if(NULL == tmp_content_type)
+    {
+        return AXIS2_STRDUP(AXIS2_HTTP_HEADER_DEFAULT_CHAR_ENCODING, env);
+    }
+    tmp = strstr(tmp_content_type, AXIS2_HTTP_CHAR_SET_ENCODING);
+    if(NULL == tmp)
+    {
         AXIS2_FREE(env->allocator, tmp_content_type);
-      return AXIS2_STRDUP(AXIS2_HTTP_HEADER_DEFAULT_CHAR_ENCODING, env);
-   }
-   tmp = strchr(tmp, '=');
-   tmp2 = strchr(tmp, ';');
-   if(NULL != tmp2)
-   {
+        return AXIS2_STRDUP(AXIS2_HTTP_HEADER_DEFAULT_CHAR_ENCODING, env);
+    }
+    tmp = strchr(tmp, '=');
+    tmp2 = strchr(tmp, ';');
+    if(NULL != tmp2)
+    {
         if('\'' == *(tmp2 - sizeof(axis2_char_t)) ||
-                        '\"' == *(tmp2 - sizeof(axis2_char_t)))
+                '\"' == *(tmp2 - sizeof(axis2_char_t)))
         {
-           tmp2 -= sizeof(axis2_char_t); 
+            tmp2 -= sizeof(axis2_char_t);
         }
-      *tmp2 = '\0';
-   }
-   if(NULL == tmp)
-   {
+        *tmp2 = '\0';
+    }
+    if(NULL == tmp)
+    {
         AXIS2_FREE(env->allocator, tmp_content_type);
-      return AXIS2_STRDUP(AXIS2_HTTP_HEADER_DEFAULT_CHAR_ENCODING, env);
-   }
+        return AXIS2_STRDUP(AXIS2_HTTP_HEADER_DEFAULT_CHAR_ENCODING, env);
+    }
     /* Following formats are acceptable
      * charset="UTF-8"
      * charser='UTF-8'
      * charset=UTF-8
      * But for our requirements charset we get should be UTF-8
      */
-    if('\'' == *(tmp + sizeof(axis2_char_t)) || '\"' == *(tmp + 
-                        sizeof(axis2_char_t)))
+    if('\'' == *(tmp + sizeof(axis2_char_t)) || '\"' == *(tmp +
+            sizeof(axis2_char_t)))
     {
-       tmp += 2*sizeof(axis2_char_t); 
+        tmp += 2 * sizeof(axis2_char_t);
     }
     else
     {
         tmp += sizeof(axis2_char_t);
     }
-   tmp2 =  AXIS2_STRDUP(tmp, env);
-   AXIS2_FREE(env->allocator, tmp_content_type);
-   return tmp2;
+    tmp2 =  AXIS2_STRDUP(tmp, env);
+    AXIS2_FREE(env->allocator, tmp_content_type);
+    return tmp2;
 }
 
 int AXIS2_CALL
-axis2_http_transport_utils_on_data_request(char *buffer, int size, void *ctx)
+axis2_http_transport_utils_on_data_request(
+    char *buffer, 
+    int size, 
+    void *ctx)
 {
-   const axis2_env_t *env = NULL;
-   int len = -1;
-    axis2_callback_info_t *cb_ctx = (axis2_callback_info_t*)ctx;
-    
-   if(NULL == buffer || NULL == ctx)
-   {
-      return 0;
-   }
-   env = ((axis2_callback_info_t*)ctx)->env;
-   if(cb_ctx->unread_len <= 0 && -1 != cb_ctx->content_length)
-   {
-      return 0;
-   }
-   if(cb_ctx->chunked_stream != NULL)
-   {
-      len = AXIS2_HTTP_CHUNKED_STREAM_READ(cb_ctx->chunked_stream, env, 
-                  buffer, size);
+    const axis2_env_t *env = NULL;
+    int len = -1;
+    axis2_callback_info_t *cb_ctx = (axis2_callback_info_t *)ctx;
+
+    if(NULL == buffer || NULL == ctx)
+    {
+        return 0;
+    }
+    env = ((axis2_callback_info_t *)ctx)->env;
+    if(cb_ctx->unread_len <= 0 && -1 != cb_ctx->content_length)
+    {
+        return 0;
+    }
+    if(cb_ctx->chunked_stream != NULL)
+    {
+        len = AXIS2_HTTP_CHUNKED_STREAM_READ(cb_ctx->chunked_stream, env,
+                buffer, size);
         buffer[len] = '\0';
-      return len;
-   }
-   else
-   {
-      axis2_stream_t *in_stream = NULL;
+        return len;
+    }
+    else
+    {
+        axis2_stream_t *in_stream = NULL;
         int read_len = 0;
-        in_stream = (axis2_stream_t *)((axis2_callback_info_t*)ctx)->in_stream;
-        /* For managed streams such as Apache2 streams we do not need to 
+        in_stream = (axis2_stream_t *)((axis2_callback_info_t *)ctx)->in_stream;
+        /* For managed streams such as Apache2 streams we do not need to
          * calculate lenghts
          */
         if(AXIS2_STREAM_MANAGED == AXIS2_STREAM_GET_TYPE(in_stream, env))
@@ -899,10 +930,10 @@
         }
         else
         {
-            if(size > ((axis2_callback_info_t*)ctx)->unread_len && 
-                        -1 != ((axis2_callback_info_t*)ctx)->unread_len)
+            if(size > ((axis2_callback_info_t *)ctx)->unread_len &&
+                    -1 != ((axis2_callback_info_t *)ctx)->unread_len)
             {
-                read_len = ((axis2_callback_info_t*)ctx)->unread_len;
+                read_len = ((axis2_callback_info_t *)ctx)->unread_len;
             }
             else
             {
@@ -915,18 +946,19 @@
             buffer[len] = '\0';
             if(AXIS2_STREAM_MANAGED != AXIS2_STREAM_GET_TYPE(in_stream, env))
             {
-                ((axis2_callback_info_t*)ctx)->unread_len -= len;
-            }            
+                ((axis2_callback_info_t *)ctx)->unread_len -= len;
+            }
         }
         return len;
     }
-   return 0;   
+    return 0;
 }
 
-AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
-axis2_http_transport_utils_create_soap_msg(const axis2_env_t *env, 
-                        axis2_msg_ctx_t *msg_ctx, 
-                        const axis2_char_t *soap_ns_uri)
+AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
+axis2_http_transport_utils_create_soap_msg(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    const axis2_char_t *soap_ns_uri)
 {
     axis2_op_ctx_t *op_ctx = NULL;
     const axis2_char_t *char_set_enc = NULL;
@@ -941,10 +973,10 @@
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, NULL);
     AXIS2_PARAM_CHECK(env->error, soap_ns_uri, NULL);
-    
-    
-    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
-        AXIS2_TRANSPORT_IN, AXIS2_FALSE);
+
+
+    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
+            AXIS2_TRANSPORT_IN, AXIS2_FALSE);
     if(property)
     {
         in_stream = AXIS2_PROPERTY_GET_VALUE(property, env);
@@ -962,9 +994,9 @@
     callback_ctx->content_length = -1;
     callback_ctx->unread_len = -1;
     callback_ctx->chunked_stream = NULL;
-   
-    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
-                  AXIS2_HTTP_HEADER_CONTENT_LENGTH, AXIS2_FALSE);
+
+    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
+            AXIS2_HTTP_HEADER_CONTENT_LENGTH, AXIS2_FALSE);
     if(property)
     {
         content_length = AXIS2_PROPERTY_GET_VALUE(property, env);
@@ -978,28 +1010,28 @@
     if(NULL == in_stream)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_IN_STREAM_IN_MSG_CTX,
-                        AXIS2_FAILURE);
+                AXIS2_FAILURE);
         return NULL;
     }
-    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
-                  AXIS2_HTTP_HEADER_TRANSFER_ENCODING, AXIS2_FALSE);
+    property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
+            AXIS2_HTTP_HEADER_TRANSFER_ENCODING, AXIS2_FALSE);
     if(property)
     {
         trans_enc = AXIS2_PROPERTY_GET_VALUE(property, env);
         property = NULL;
     }
-    if(NULL != trans_enc && 0 == AXIS2_STRCMP(trans_enc, 
-                  AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
+    if(NULL != trans_enc && 0 == AXIS2_STRCMP(trans_enc,
+            AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
     {
-        callback_ctx->chunked_stream = axis2_http_chunked_stream_create(env, 
-                  in_stream);
+        callback_ctx->chunked_stream = axis2_http_chunked_stream_create(env,
+                in_stream);
         if(NULL == callback_ctx->chunked_stream)
         {
             return NULL;
         }
     }
-   
-    
+
+
     op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
     if(NULL != op_ctx)
     {
@@ -1007,20 +1039,20 @@
         if (NULL != ctx)
         {
             property = AXIS2_CTX_GET_PROPERTY(ctx, env,
-                        AXIS2_CHARACTER_SET_ENCODING, AXIS2_FALSE);
+                    AXIS2_CHARACTER_SET_ENCODING, AXIS2_FALSE);
             if(property)
             {
                 char_set_enc = AXIS2_PROPERTY_GET_VALUE(property, env);
                 property = NULL;
             }
-            property = AXIS2_CTX_GET_PROPERTY(ctx, env, 
-                        MTOM_RECIVED_CONTENT_TYPE, AXIS2_FALSE);
+            property = AXIS2_CTX_GET_PROPERTY(ctx, env,
+                    MTOM_RECIVED_CONTENT_TYPE, AXIS2_FALSE);
             if(property)
             {
                 content_type = AXIS2_PROPERTY_GET_VALUE(property, env);
                 property = NULL;
             }
-            
+
         }
     }
     if(NULL == char_set_enc)
@@ -1039,21 +1071,21 @@
             axiom_mime_parser_t *mime_parser = NULL;
             axis2_stream_t *stream = NULL;
             int soap_body_len = 0;
-            axis2_char_t* soap_body_str = NULL;
-            
+            axis2_char_t *soap_body_str = NULL;
+
             mime_parser = axiom_mime_parser_create(env);
             if (mime_parser)
             {
-                binary_data_map = AXIOM_MIME_PARSER_PARSE(mime_parser, env, 
-                    axis2_http_transport_utils_on_data_request, 
-                    (void*)callback_ctx, mime_boundary);
-                
+                binary_data_map = AXIOM_MIME_PARSER_PARSE(mime_parser, env,
+                        axis2_http_transport_utils_on_data_request,
+                        (void *)callback_ctx, mime_boundary);
+
                 soap_body_len = AXIOM_MIME_PARSER_GET_SOAP_BODY_LENGTH(
-                    mime_parser, env);
+                            mime_parser, env);
                 soap_body_str = AXIOM_MIME_PARSER_GET_SOAP_BODY_STR(
-                    mime_parser, env);
+                            mime_parser, env);
             }
-            
+
             stream = axis2_stream_create_basic(env);
             if (stream)
             {
@@ -1068,17 +1100,17 @@
          * TODO MTOM stuff - create builder and get envelope
          */
     }
-    
+
     if(AXIS2_TRUE != AXIS2_MSG_CTX_GET_DOING_REST(msg_ctx, env))
     {
         axiom_xml_reader_t *xml_reader = NULL;
         axiom_stax_builder_t *om_builder = NULL;
         axiom_soap_builder_t *soap_builder = NULL;
         axiom_soap_envelope_t *soap_envelope = NULL;
-        
+
         xml_reader = axiom_xml_reader_create_for_io(env,
-                        axis2_http_transport_utils_on_data_request,NULL,
-                        (void *)callback_ctx, char_set_enc);
+                axis2_http_transport_utils_on_data_request, NULL,
+                (void *)callback_ctx, char_set_enc);
         if(NULL == xml_reader)
         {
             return NULL;
@@ -1091,29 +1123,29 @@
             return NULL;
         }
         soap_builder = axiom_soap_builder_create(env, om_builder,
-                        soap_ns_uri);
+                soap_ns_uri);
         if(NULL == soap_builder)
         {
-         /* We should not be freeing om_builder here as it is done by
-            axiom_soap_builder_create in case of error - Samisa*/
+            /* We should not be freeing om_builder here as it is done by
+               axiom_soap_builder_create in case of error - Samisa*/
             /*AXIOM_STAX_BUILDER_FREE(om_builder, env);*/
             om_builder = NULL;
             xml_reader = NULL;
             return NULL;
         }
-        
+
         soap_envelope = AXIOM_SOAP_BUILDER_GET_SOAP_ENVELOPE(soap_builder, env);
-        
+
         if (binary_data_map)
         {
-            AXIOM_SOAP_BUILDER_SET_MIME_BODY_PARTS(soap_builder, env, 
-                binary_data_map);
+            AXIOM_SOAP_BUILDER_SET_MIME_BODY_PARTS(soap_builder, env,
+                    binary_data_map);
         }
-        
+
         if (soap_envelope && content_type)
         {
             /* hack to get around MTOM problem */
-            axiom_soap_body_t *soap_body = 
+            axiom_soap_body_t *soap_body =
                 AXIOM_SOAP_ENVELOPE_GET_BODY(soap_envelope, env);
 
             if (soap_body)
@@ -1121,7 +1153,7 @@
                 AXIOM_SOAP_BODY_HAS_FAULT(soap_body, env);
             }
         }
-        
+
         return soap_envelope;
     }
     else
@@ -1134,8 +1166,8 @@
         axiom_node_t *root_node = NULL;
 
         xml_reader = axiom_xml_reader_create_for_io(env,
-                        axis2_http_transport_utils_on_data_request,NULL,
-                        (void *)callback_ctx, char_set_enc);
+                axis2_http_transport_utils_on_data_request, NULL,
+                (void *)callback_ctx, char_set_enc);
         if(NULL == xml_reader)
         {
             return NULL;
@@ -1148,7 +1180,7 @@
             return NULL;
         }
         soap_envelope = axiom_soap_envelope_create_default_soap_envelope
-                            (env, AXIOM_SOAP11);
+                (env, AXIOM_SOAP11);
         def_body = AXIOM_SOAP_ENVELOPE_GET_BODY(soap_envelope, env);
         om_doc = AXIOM_STAX_BUILDER_GET_DOCUMENT(om_builder, env);
         root_node = AXIOM_DOCUMENT_BUILD_ALL(om_doc, env);
@@ -1160,96 +1192,98 @@
 }
 
 
-AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-axis2_http_transport_utils_get_value_from_content_type(const axis2_env_t *env, 
-                  const axis2_char_t *content_type, 
-                  const axis2_char_t *key)
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_http_transport_utils_get_value_from_content_type(
+    const axis2_env_t *env,
+    const axis2_char_t *content_type,
+    const axis2_char_t *key)
 {
-   axis2_char_t *tmp = NULL;
-   axis2_char_t *tmp_content_type = NULL;
-   axis2_char_t *tmp2 = NULL;
-   
-   AXIS2_ENV_CHECK(env, NULL);
-   AXIS2_PARAM_CHECK(env->error, content_type, NULL);
+    axis2_char_t *tmp = NULL;
+    axis2_char_t *tmp_content_type = NULL;
+    axis2_char_t *tmp2 = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, content_type, NULL);
     AXIS2_PARAM_CHECK(env->error, key, NULL);
-   
-   tmp_content_type = AXIS2_STRDUP(content_type, env);
-   if(NULL == tmp_content_type)
-   {
-      return NULL;
-   }
-   tmp = strstr(tmp_content_type, key);
-   if(NULL == tmp)
-   {
+
+    tmp_content_type = AXIS2_STRDUP(content_type, env);
+    if(NULL == tmp_content_type)
+    {
+        return NULL;
+    }
+    tmp = strstr(tmp_content_type, key);
+    if(NULL == tmp)
+    {
         AXIS2_FREE(env->allocator, tmp_content_type);
-      return NULL;
-   }
+        return NULL;
+    }
+
+    tmp = strchr(tmp, '=');
+    tmp2 = strchr(tmp, ';');
 
-   tmp = strchr(tmp, '=');
-   tmp2 = strchr(tmp, ';');
-   
     if(NULL != tmp2)
-   {
-      *tmp2 = '\0';
-   }
-   if(NULL == tmp)
-   {
+    {
+        *tmp2 = '\0';
+    }
+    if(NULL == tmp)
+    {
         AXIS2_FREE(env->allocator, tmp_content_type);
-      return NULL;
-   }
-   tmp2 =  AXIS2_STRDUP(tmp + 1, env);
-   AXIS2_FREE(env->allocator, tmp_content_type);
-   return tmp2;
+        return NULL;
+    }
+    tmp2 =  AXIS2_STRDUP(tmp + 1, env);
+    AXIS2_FREE(env->allocator, tmp_content_type);
+    return tmp2;
 }
 
-AXIS2_EXTERN axiom_soap_envelope_t* AXIS2_CALL
-axis2_http_transport_utils_handle_media_type_url_encoded(const axis2_env_t *env,
-                        axis2_msg_ctx_t *msg_ctx, 
-                        axis2_hash_t *param_map, 
-                        axis2_char_t *method, 
-                        xml_schema_element_t *schema_element)
+AXIS2_EXTERN axiom_soap_envelope_t *AXIS2_CALL
+axis2_http_transport_utils_handle_media_type_url_encoded(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_hash_t *param_map,
+    axis2_char_t *method,
+    xml_schema_element_t *schema_element)
 {
     axiom_soap_envelope_t *soap_env = NULL;
     axiom_soap_body_t *soap_body = NULL;
-    
+
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, NULL);
     AXIS2_PARAM_CHECK(env->error, method, NULL);
-    
-    
-    soap_env = axiom_soap_envelope_create_default_soap_envelope(env, 
-                        AXIOM_SOAP11);
+
+
+    soap_env = axiom_soap_envelope_create_default_soap_envelope(env,
+            AXIOM_SOAP11);
     soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(soap_env, env);
     if(NULL == soap_body)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SOAP_ENVELOPE_OR_SOAP_BODY_NULL,
-                        AXIS2_FAILURE);
+                AXIS2_FAILURE);
         return NULL;
     }
     if(NULL == schema_element)
     {
         axiom_element_t *body_child = NULL;
         axiom_node_t *body_child_node = NULL;
-        
-        body_child = axiom_element_create_with_qname(env, NULL, 
-                        AXIS2_OP_GET_QNAME(AXIS2_MSG_CTX_GET_OP(msg_ctx, env), 
+
+        body_child = axiom_element_create_with_qname(env, NULL,
+                AXIS2_OP_GET_QNAME(AXIS2_MSG_CTX_GET_OP(msg_ctx, env),
                         env), &body_child_node);
         AXIOM_SOAP_BODY_ADD_CHILD(soap_body, env, body_child_node);
         if(NULL != param_map)
         {
             axis2_hash_index_t *hi = NULL;
-            for(hi = axis2_hash_first(param_map, env); hi != NULL; 
-                        hi = axis2_hash_next(env, hi))
+            for(hi = axis2_hash_first(param_map, env); hi != NULL;
+                    hi = axis2_hash_next(env, hi))
             {
                 void *name = NULL;
                 void *value = NULL;
                 axiom_node_t *node = NULL;
                 axiom_element_t *element = NULL;
-                
-                axis2_hash_this(hi, (const void **)&name, NULL,(void **)&value);
-                element = axiom_element_create(env, NULL, (axis2_char_t*)name, 
-         NULL, &node);
-                AXIOM_ELEMENT_SET_TEXT(element, env, (axis2_char_t*)value, node);
+
+                axis2_hash_this(hi, (const void **)&name, NULL, (void **)&value);
+                element = axiom_element_create(env, NULL, (axis2_char_t *)name,
+                        NULL, &node);
+                AXIOM_ELEMENT_SET_TEXT(element, env, (axis2_char_t *)value, node);
                 AXIOM_NODE_ADD_CHILD(body_child_node, env, node);
             }
         }
@@ -1260,36 +1294,36 @@
         axis2_qname_t *bfc_qname = NULL;
         axiom_element_t *body_child = NULL;
         axiom_node_t *body_child_node = NULL;
-        
+
         target_ns = AXIS2_QNAME_GET_URI(XML_SCHEMA_ELEMENT_GET_QNAME(
-                        schema_element, env), env);
+                    schema_element, env), env);
         bfc_qname = axis2_qname_create(env, XML_SCHEMA_ELEMENT_GET_NAME(
-                        schema_element, env), target_ns, NULL);
-        
-        body_child = axiom_element_create_with_qname(env, NULL, bfc_qname, 
-                        &body_child_node);
+                    schema_element, env), target_ns, NULL);
+
+        body_child = axiom_element_create_with_qname(env, NULL, bfc_qname,
+                &body_child_node);
         AXIOM_SOAP_BODY_ADD_CHILD(soap_body, env, body_child_node);
-        if(0 == AXIS2_STRCMP(method, AXIS2_HTTP_HEADER_GET) || 
-                        0 == AXIS2_STRCMP(method, AXIS2_HTTP_HEADER_POST))
+        if(0 == AXIS2_STRCMP(method, AXIS2_HTTP_HEADER_GET) ||
+                0 == AXIS2_STRCMP(method, AXIS2_HTTP_HEADER_POST))
         {
             xml_schema_type_t *schema_type = NULL;
-            schema_type = XML_SCHEMA_ELEMENT_GET_SCHEMA_TYPE(schema_element, 
-                        env);
-            if(XML_SCHEMA_COMPLEX_TYPE == XML_SCHEMA_TYPE_GET_TYPE(schema_type, 
-                        env))
+            schema_type = XML_SCHEMA_ELEMENT_GET_SCHEMA_TYPE(schema_element,
+                    env);
+            if(XML_SCHEMA_COMPLEX_TYPE == XML_SCHEMA_TYPE_GET_TYPE(schema_type,
+                    env))
             {
                 xml_schema_particle_t *schema_particle = NULL;
                 schema_particle = XML_SCHEMA_COMPLEX_TYPE_GET_PARTICLE(
-                        schema_type, env);
-                if(XML_SCHEMA_SEQUENCE == 
+                            schema_type, env);
+                if(XML_SCHEMA_SEQUENCE ==
                         XML_SCHEMA_PARTICLE_GET_TYPE(schema_particle, env))
                 {
                     xml_schema_group_base_t *sequence = NULL;
                     xml_schema_obj_collection_t *seq_items = NULL;
                     int count = 0;
                     int i = 0;
-                    
-                    sequence = (xml_schema_group_base_t*)schema_particle;
+
+                    sequence = (xml_schema_group_base_t *)schema_particle;
                     seq_items = XML_SCHEMA_GROUP_BASE_GET_ITEMS(sequence, env);
                     count = XML_SCHEMA_OBJ_COLLECTION_GET_COUNT(seq_items, env);
                     for(i = 0; i < count; i++)
@@ -1299,24 +1333,24 @@
                         axis2_char_t *param_val = NULL;
                         axiom_element_t *om_element = NULL;
                         axiom_node_t *om_node = NULL;
-                        
-                        inner_element = (xml_schema_element_t*)
-                            XML_SCHEMA_OBJ_COLLECTION_GET_ITEM(seq_items, env,
-                            i);
+
+                        inner_element = (xml_schema_element_t *)
+                                XML_SCHEMA_OBJ_COLLECTION_GET_ITEM(seq_items, env,
+                                        i);
                         element_name = XML_SCHEMA_ELEMENT_GET_NAME(inner_element,
-                            env);
+                                env);
                         param_val = axis2_hash_get(param_map, element_name,
-                            AXIS2_HASH_KEY_STRING);
+                                AXIS2_HASH_KEY_STRING);
                         if(NULL == param_val)
                         {
-                            AXIS2_ERROR_SET(env->error, 
-                                AXIS2_ERROR_REQD_PARAM_MISSING, AXIS2_FAILURE);
+                            AXIS2_ERROR_SET(env->error,
+                                    AXIS2_ERROR_REQD_PARAM_MISSING, AXIS2_FAILURE);
                             return NULL;
                         }
                         om_element = axiom_element_create(env, body_child_node,
-                            element_name, NULL, &om_node);
+                                element_name, NULL, &om_node);
                         AXIOM_ELEMENT_SET_TEXT(om_element, env, param_val,
-                            om_node);
+                                om_node);
                     }
                 }
             }
@@ -1332,24 +1366,25 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_http_transport_utils_dispatch_and_verify(const axis2_env_t *env,
-                        axis2_msg_ctx_t *msg_ctx)
+axis2_http_transport_utils_dispatch_and_verify(
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx)
 {
     axis2_disp_t *req_uri_disp = NULL;
     axis2_handler_t *handler = NULL;
-    
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
-    
+
     req_uri_disp = axis2_req_uri_disp_create(env);
     handler = AXIS2_DISP_GET_BASE(req_uri_disp, env);
     AXIS2_HANDLER_INVOKE(handler, env, msg_ctx);
-    
-    if(NULL == AXIS2_MSG_CTX_GET_SVC(msg_ctx, env) || NULL == 
-                        AXIS2_MSG_CTX_GET_OP(msg_ctx, env))
+
+    if(NULL == AXIS2_MSG_CTX_GET_SVC(msg_ctx, env) || NULL ==
+            AXIS2_MSG_CTX_GET_OP(msg_ctx, env))
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_OR_OP_NOT_FOUND, 
-                        AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_OR_OP_NOT_FOUND,
+                AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
     return AXIS2_SUCCESS;



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