You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2006/06/04 05:09:41 UTC

svn commit: r411506 [12/27] - in /webservices/axis2/trunk/c: axiom/include/ axiom/src/attachments/ axiom/src/om/ axiom/src/parser/guththila/ axiom/src/parser/libxml2/ axiom/src/soap/ axiom/test/om/ axiom/test/soap/ guththila/src/ include/ modules/core/...

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_simple_request.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_simple_request.c?rev=411506&r1=411505&r2=411506&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_simple_request.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_simple_request.c Sat Jun  3 20:09:08 2006
@@ -23,14 +23,14 @@
 
 /** 
  * @brief HTTP Simple Request struct impl
- *	Axis2 HTTP Simple Request impl  
+ *   Axis2 HTTP Simple Request impl  
  */
 typedef struct axis2_http_simple_request_impl axis2_http_simple_request_impl_t;  
   
 struct axis2_http_simple_request_impl
 {
-	axis2_http_simple_request_t simple_request;
-	axis2_http_request_line_t *request_line;
+   axis2_http_simple_request_t simple_request;
+   axis2_http_request_line_t *request_line;
     axis2_array_list_t *header_group;
     axis2_stream_t *stream;
     axis2_bool_t owns_stream;
@@ -100,7 +100,7 @@
 axis2_http_simple_request_get_body_bytes
                         (axis2_http_simple_request_t *simple_request, 
                         const axis2_env_t *env, char **buf);
-						
+                  
 axis2_status_t AXIS2_CALL 
 axis2_http_simple_request_set_body_string 
                     (axis2_http_simple_request_t *simple_request, 
@@ -109,7 +109,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_http_simple_request_free(axis2_http_simple_request_t *simple_request, 
                         const axis2_env_t *env);
-								
+                        
 /***************************** End of function headers ************************/
 
 axis2_http_simple_request_t * AXIS2_CALL 
@@ -127,12 +127,12 @@
     simple_request_impl = (axis2_http_simple_request_impl_t *)AXIS2_MALLOC 
                             (env->allocator, sizeof(
                             axis2_http_simple_request_impl_t));
-	
+   
     if(NULL == simple_request_impl)
-	{
-		AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+   {
+      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-	}
+   }
     simple_request_impl->request_line = request_line;
     simple_request_impl->stream = content;
     simple_request_impl->header_group = NULL;
@@ -169,12 +169,12 @@
     simple_request_impl->simple_request.ops = AXIS2_MALLOC(env->allocator,
         sizeof(axis2_http_simple_request_ops_t));
     if(NULL == simple_request_impl->simple_request.ops)
-	{
-		axis2_http_simple_request_free((axis2_http_simple_request_t*)
+   {
+      axis2_http_simple_request_free((axis2_http_simple_request_t*)
                         simple_request_impl, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-	}
+   }
     
     simple_request_impl->simple_request.ops->get_request_line = 
                         axis2_http_simple_request_get_request_line;
@@ -200,12 +200,12 @@
                         axis2_http_simple_request_get_body;
     simple_request_impl->simple_request.ops->get_body_bytes =
                         axis2_http_simple_request_get_body_bytes;
-	simple_request_impl->simple_request.ops->set_body_string =
-						axis2_http_simple_request_set_body_string;
+   simple_request_impl->simple_request.ops->set_body_string =
+                  axis2_http_simple_request_set_body_string;
     simple_request_impl->simple_request.ops->free = 
                         axis2_http_simple_request_free;
     
-	return &(simple_request_impl->simple_request);
+   return &(simple_request_impl->simple_request);
 }
 
 axis2_status_t AXIS2_CALL 
@@ -213,7 +213,7 @@
                         const axis2_env_t *env)
 {
     axis2_http_simple_request_impl_t *simple_request_impl = NULL;
-	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     
     simple_request_impl = AXIS2_INTF_TO_IMPL(simple_request);
     if(AXIS2_TRUE == simple_request_impl->owns_stream)
@@ -249,9 +249,9 @@
     if(NULL != simple_request->ops)
         AXIS2_FREE(env->allocator, simple_request->ops);
     
-	AXIS2_FREE(env->allocator, simple_request_impl);
+   AXIS2_FREE(env->allocator, simple_request_impl);
     
-	return AXIS2_SUCCESS;
+   return AXIS2_SUCCESS;
 }
 
 axis2_http_request_line_t* AXIS2_CALL 
@@ -507,49 +507,49 @@
                         (axis2_http_simple_request_t *simple_request, 
                         const axis2_env_t *env, char **buf)
 {
-	axis2_stream_t *body = NULL;
-	char *tmp_buf = NULL;
-	char *tmp_buf2 = NULL;
-	char *tmp_buf3 = NULL;
-	int length = 0;
-	int read_len = 0;
-	
+   axis2_stream_t *body = NULL;
+   char *tmp_buf = NULL;
+   char *tmp_buf2 = NULL;
+   char *tmp_buf3 = NULL;
+   int length = 0;
+   int read_len = 0;
+   
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-	
-	body = AXIS2_INTF_TO_IMPL(simple_request)->stream;
-	if(NULL == body)
-	{
-		*buf = (char*)AXIS2_MALLOC(env->allocator, 1);
-		*buf[0] = '\0';
-		return 0;
-	}
-	length = AXIS2_HTTP_SIMPLE_REQUEST_GET_CONTENT_LENGTH(simple_request, env);
-	if(length > 0)
-	{
-		*buf = (char*)AXIS2_MALLOC(env->allocator, length + 1);
-		read_len = AXIS2_STREAM_READ(body, env, *buf, length + 1);
-		return read_len;
-	}
-	tmp_buf2 = AXIS2_MALLOC(env->allocator, 128 * sizeof(char));
-	while(AXIS2_STREAM_READ(body, env, tmp_buf2, 128) > 0)
-	{
-		tmp_buf3 = AXIS2_STRACAT(tmp_buf, tmp_buf2, env);
-		if(NULL != tmp_buf)
-		{
-			AXIS2_FREE(env->allocator, tmp_buf);
-			tmp_buf = NULL;
-		}
-		tmp_buf = tmp_buf3;
-		
-	}
+   
+   body = AXIS2_INTF_TO_IMPL(simple_request)->stream;
+   if(NULL == body)
+   {
+      *buf = (char*)AXIS2_MALLOC(env->allocator, 1);
+      *buf[0] = '\0';
+      return 0;
+   }
+   length = AXIS2_HTTP_SIMPLE_REQUEST_GET_CONTENT_LENGTH(simple_request, env);
+   if(length > 0)
+   {
+      *buf = (char*)AXIS2_MALLOC(env->allocator, length + 1);
+      read_len = AXIS2_STREAM_READ(body, env, *buf, length + 1);
+      return read_len;
+   }
+   tmp_buf2 = AXIS2_MALLOC(env->allocator, 128 * sizeof(char));
+   while(AXIS2_STREAM_READ(body, env, tmp_buf2, 128) > 0)
+   {
+      tmp_buf3 = AXIS2_STRACAT(tmp_buf, tmp_buf2, env);
+      if(NULL != tmp_buf)
+      {
+         AXIS2_FREE(env->allocator, tmp_buf);
+         tmp_buf = NULL;
+      }
+      tmp_buf = tmp_buf3;
+      
+   }
     /*
         TODO :STREAM_READ => STREAM_READ_BYTES
     */
-	if(NULL != tmp_buf)
-	{
-		*buf = tmp_buf;
-		return AXIS2_STRLEN(tmp_buf);
-	}
+   if(NULL != tmp_buf)
+   {
+      *buf = tmp_buf;
+      return AXIS2_STRLEN(tmp_buf);
+   }
     return -1;    
 }
 
@@ -558,21 +558,21 @@
                     (axis2_http_simple_request_t *simple_request, 
                     const axis2_env_t *env, axis2_char_t *str)
 {
-	axis2_stream_t *body_stream = NULL;
+   axis2_stream_t *body_stream = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, str, AXIS2_FAILURE);
     
-	body_stream = AXIS2_INTF_TO_IMPL(simple_request)->stream;
-	if(NULL == body_stream)
-	{
-		body_stream = axis2_stream_create_basic(env);
-		if(NULL == body_stream)
-		{
-			return AXIS2_FAILURE;
-		}
-		AXIS2_INTF_TO_IMPL(simple_request)->stream = body_stream;
+   body_stream = AXIS2_INTF_TO_IMPL(simple_request)->stream;
+   if(NULL == body_stream)
+   {
+      body_stream = axis2_stream_create_basic(env);
+      if(NULL == body_stream)
+      {
+         return AXIS2_FAILURE;
+      }
+      AXIS2_INTF_TO_IMPL(simple_request)->stream = body_stream;
         AXIS2_INTF_TO_IMPL(simple_request)->owns_stream = AXIS2_TRUE;
-	}
-	AXIS2_STREAM_WRITE(body_stream, env, str, AXIS2_STRLEN(str));
+   }
+   AXIS2_STREAM_WRITE(body_stream, env, str, AXIS2_STRLEN(str));
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_simple_response.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_simple_response.c?rev=411506&r1=411505&r2=411506&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_simple_response.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_simple_response.c Sat Jun  3 20:09:08 2006
@@ -22,7 +22,7 @@
 
 /** 
  * @brief HTTP Simple Response struct impl
- *	Axis2 HTTP Simple Response impl  
+ *   Axis2 HTTP Simple Response impl  
  */
 #define READ_SIZE 32
 
@@ -32,8 +32,8 @@
 
 struct axis2_http_simple_response_impl
 {
-	axis2_http_simple_response_t simple_response;
-	axis2_http_status_line_t *status_line;
+   axis2_http_simple_response_t simple_response;
+   axis2_http_status_line_t *status_line;
     axis2_array_list_t *header_group;
     axis2_stream_t *stream;
 };
@@ -132,7 +132,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_http_simple_response_free (axis2_http_simple_response_t *simple_response, 
                     const axis2_env_t *env);
-								
+                        
 /***************************** End of function headers ************************/
 
 AXIS2_EXTERN axis2_http_simple_response_t * AXIS2_CALL
@@ -155,10 +155,10 @@
     simple_response_impl = AXIS2_INTF_TO_IMPL(ret);
     
     if(NULL == simple_response_impl)
-	{
-		AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+   {
+      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-	}
+   }
     simple_response_impl->status_line = status_line;
     if(http_hdr_count > 0 && NULL != http_headers)
     {   
@@ -191,16 +191,16 @@
     simple_response_impl->simple_response.ops = AXIS2_MALLOC(env->allocator,
                         sizeof(axis2_http_simple_response_ops_t));
     if(NULL == simple_response_impl->simple_response.ops)
-	{
-		axis2_http_simple_response_free((axis2_http_simple_response_t*)
+   {
+      axis2_http_simple_response_free((axis2_http_simple_response_t*)
                                         simple_response_impl, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-	}
-	simple_response_impl->status_line = NULL;
-	simple_response_impl->header_group = NULL;
-	simple_response_impl->stream = NULL;
-	
+   }
+   simple_response_impl->status_line = NULL;
+   simple_response_impl->header_group = NULL;
+   simple_response_impl->stream = NULL;
+   
     simple_response_impl->simple_response.ops->set_status_line = 
                         axis2_http_simple_response_set_status_line;
     simple_response_impl->simple_response.ops->get_phrase =
@@ -238,7 +238,7 @@
     simple_response_impl->simple_response.ops->free = 
                         axis2_http_simple_response_free;
     
-	return &(simple_response_impl->simple_response);
+   return &(simple_response_impl->simple_response);
 }
 
 axis2_status_t AXIS2_CALL 
@@ -246,7 +246,7 @@
                     const axis2_env_t *env)
 {
     axis2_http_simple_response_impl_t *simple_response_impl = NULL;
-	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     simple_response_impl = AXIS2_INTF_TO_IMPL(simple_response);
     
     if(NULL != simple_response_impl->status_line)
@@ -263,10 +263,10 @@
         {
             tmp = (axis2_http_header_t *)AXIS2_ARRAY_LIST_GET(
                             simple_response_impl->header_group, env, i);
-			if(NULL != tmp)
-			{
-            	AXIS2_HTTP_HEADER_FREE(tmp, env);        
-			}
+         if(NULL != tmp)
+         {
+               AXIS2_HTTP_HEADER_FREE(tmp, env);        
+         }
         }
         AXIS2_ARRAY_LIST_FREE(simple_response_impl->header_group, env);
         simple_response_impl->header_group = NULL;
@@ -274,11 +274,11 @@
     if(NULL != simple_response->ops)
         AXIS2_FREE(env->allocator, simple_response->ops);
     
-	AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(simple_response));
+   AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(simple_response));
     /* Stream is not freed
      * Assumption : stream doesn't belong to the response
      */
-	return AXIS2_SUCCESS;
+   return AXIS2_SUCCESS;
 }
 
 axis2_status_t AXIS2_CALL 
@@ -479,13 +479,13 @@
                     (axis2_http_simple_response_t *simple_response, 
                     const axis2_env_t *env, axis2_http_header_t* header)
 {
-	int i = 0;
-	int count = 0;
+   int i = 0;
+   int count = 0;
     axis2_http_header_t *tmp_header = NULL;
     axis2_char_t *tmp_name = NULL;
-	axis2_array_list_t *header_group = NULL;
-	axis2_http_simple_response_impl_t *simple_response_impl = NULL;
-	
+   axis2_array_list_t *header_group = NULL;
+   axis2_http_simple_response_impl_t *simple_response_impl = NULL;
+   
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, header, AXIS2_FAILURE);
     
@@ -518,8 +518,8 @@
             break;
         }
     }
-	AXIS2_ARRAY_LIST_ADD(simple_response_impl->header_group, env, 
-						(void*)header);
+   AXIS2_ARRAY_LIST_ADD(simple_response_impl->header_group, env, 
+                  (void*)header);
     return AXIS2_SUCCESS;
 }
 
@@ -587,21 +587,21 @@
                     (axis2_http_simple_response_t *simple_response, 
                     const axis2_env_t *env, axis2_char_t *str)
 {
-	axis2_stream_t *body_stream = NULL;
+   axis2_stream_t *body_stream = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, str, AXIS2_FAILURE);
     
-	body_stream = AXIS2_INTF_TO_IMPL(simple_response)->stream;
-	if(NULL == body_stream)
-	{
-		body_stream = axis2_stream_create_basic(env);
-		if(NULL == body_stream)
-		{
-			return AXIS2_FAILURE;
-		}
-		AXIS2_INTF_TO_IMPL(simple_response)->stream = body_stream;
-	}
-	AXIS2_STREAM_WRITE(body_stream, env, str, AXIS2_STRLEN(str));
+   body_stream = AXIS2_INTF_TO_IMPL(simple_response)->stream;
+   if(NULL == body_stream)
+   {
+      body_stream = axis2_stream_create_basic(env);
+      if(NULL == body_stream)
+      {
+         return AXIS2_FAILURE;
+      }
+      AXIS2_INTF_TO_IMPL(simple_response)->stream = body_stream;
+   }
+   AXIS2_STREAM_WRITE(body_stream, env, str, AXIS2_STRLEN(str));
     return AXIS2_SUCCESS;
 }
     
@@ -637,47 +637,47 @@
                         (axis2_http_simple_response_t *simple_response, 
                         const axis2_env_t *env, axis2_char_t **buffer)
 {
-	axis2_http_simple_response_impl_t *response_impl = NULL;
-	axis2_stream_t *tmp_stream = NULL;
-	int return_size = -1;
-	
-	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-	
-	
-	response_impl = AXIS2_INTF_TO_IMPL(simple_response);
+   axis2_http_simple_response_impl_t *response_impl = NULL;
+   axis2_stream_t *tmp_stream = NULL;
+   int return_size = -1;
+   
+   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+   
+   
+   response_impl = AXIS2_INTF_TO_IMPL(simple_response);
     if(NULL == response_impl->stream)
-	{
-		AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_BODY, AXIS2_FAILURE);
-		return -1;
-	}
-	tmp_stream = axis2_stream_create_basic(env);
-	while(1)
-	{
-		int read = 0;
-		int write = 0;
-	/*	int READ_SIZE = 32; */
-		char buf[READ_SIZE];
-		read = AXIS2_STREAM_READ(response_impl->stream, env, buf, READ_SIZE);
-		if(read < 0)
-		{
-			break;
-		}
-		write = AXIS2_STREAM_WRITE(tmp_stream, env, buf, read);
-		if(read < (READ_SIZE -1))
-		{
-			break;
-		}
-	}
-	return_size = AXIS2_STREAM_BASIC_GET_LEN(tmp_stream, env);
-	
-	if(return_size > 0)
-	{
-		*buffer = (char *)AXIS2_MALLOC(env->allocator, sizeof(char)*
-						(return_size +1));
-		return_size = AXIS2_STREAM_READ(tmp_stream, env, *buffer, 
-						return_size + 1);
-	}
-	AXIS2_STREAM_FREE(tmp_stream, env);
+   {
+      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_BODY, AXIS2_FAILURE);
+      return -1;
+   }
+   tmp_stream = axis2_stream_create_basic(env);
+   while(1)
+   {
+      int read = 0;
+      int write = 0;
+   /*   int READ_SIZE = 32; */
+      char buf[READ_SIZE];
+      read = AXIS2_STREAM_READ(response_impl->stream, env, buf, READ_SIZE);
+      if(read < 0)
+      {
+         break;
+      }
+      write = AXIS2_STREAM_WRITE(tmp_stream, env, buf, read);
+      if(read < (READ_SIZE -1))
+      {
+         break;
+      }
+   }
+   return_size = AXIS2_STREAM_BASIC_GET_LEN(tmp_stream, env);
+   
+   if(return_size > 0)
+   {
+      *buffer = (char *)AXIS2_MALLOC(env->allocator, sizeof(char)*
+                  (return_size +1));
+      return_size = AXIS2_STREAM_READ(tmp_stream, env, *buffer, 
+                  return_size + 1);
+   }
+   AXIS2_STREAM_FREE(tmp_stream, env);
     return return_size;    
 }
 
@@ -687,11 +687,11 @@
                     const axis2_env_t *env, axis2_char_t *name)
 {
     axis2_char_t *header_name = NULL;
-	axis2_http_simple_response_impl_t *simple_response_impl = NULL;
-	int count = 0;
-	int i = 0;
-	
-	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+   axis2_http_simple_response_impl_t *simple_response_impl = NULL;
+   int count = 0;
+   int i = 0;
+   
+   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, name, AXIS2_FAILURE);
     simple_response_impl = AXIS2_INTF_TO_IMPL(
                         simple_response);                 

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_status_line.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_status_line.c?rev=411506&r1=411505&r2=411506&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_status_line.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_status_line.c Sat Jun  3 20:09:08 2006
@@ -22,15 +22,15 @@
 
 /** 
  * @brief HTTP Status Line struct impl
- *	Axis2 HTTP Status Line impl  
+ *   Axis2 HTTP Status Line impl  
  */
 typedef struct axis2_http_status_line_impl axis2_http_status_line_impl_t;  
   
 struct axis2_http_status_line_impl
 {
-	axis2_http_status_line_t status_line;
+   axis2_http_status_line_t status_line;
     axis2_char_t *line;
-	axis2_char_t *http_version;
+   axis2_char_t *http_version;
     axis2_char_t *status_code;
     axis2_char_t *reason_phrase;
 };
@@ -61,7 +61,7 @@
 
 axis2_status_t AXIS2_CALL 
 axis2_http_status_line_free (axis2_http_status_line_t *status_line, 
-                                    const axis2_env_t *env);	
+                                    const axis2_env_t *env);   
 /***************************** End of function headers ************************/
 
 AXIS2_EXTERN axis2_http_status_line_t * AXIS2_CALL
@@ -80,12 +80,12 @@
     status_line_impl = (axis2_http_status_line_impl_t *)AXIS2_MALLOC 
                         (env->allocator, sizeof(
                         axis2_http_status_line_impl_t));
-	
+   
     if(NULL == status_line_impl)
-	{
-		AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+   {
+      AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-	}
+   }
     status_line_impl->status_line.ops = NULL;
     status_line_impl->line = (axis2_char_t *)AXIS2_STRDUP(str, env);
     status_line_impl->http_version = NULL;
@@ -164,12 +164,12 @@
     status_line_impl->status_line.ops = AXIS2_MALLOC(env->allocator,
                         sizeof(axis2_http_status_line_ops_t));
     if(NULL == status_line_impl->status_line.ops)
-	{
-		axis2_http_status_line_free((axis2_http_status_line_t*)
+   {
+      axis2_http_status_line_free((axis2_http_status_line_t*)
                          status_line_impl, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
-	}
+   }
     
     status_line_impl->status_line.ops->get_status_code =
                         axis2_http_status_line_get_status_code;
@@ -183,7 +183,7 @@
                         axis2_http_status_line_to_string;
     status_line_impl->status_line.ops->free =
                         axis2_http_status_line_free;
-	return &(status_line_impl->status_line);
+   return &(status_line_impl->status_line);
 }
 
 axis2_status_t AXIS2_CALL 
@@ -191,7 +191,7 @@
                                     const axis2_env_t *env)
 {
     axis2_http_status_line_impl_t *status_line_impl = NULL;
-	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+   AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     status_line_impl = AXIS2_INTF_TO_IMPL(status_line);
     
     if(NULL != status_line_impl->line)
@@ -217,8 +217,8 @@
     if(NULL != status_line->ops)
         AXIS2_FREE(env->allocator, status_line->ops);
     
-	AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(status_line));
-	return AXIS2_SUCCESS;
+   AXIS2_FREE(env->allocator, AXIS2_INTF_TO_IMPL(status_line));
+   return AXIS2_SUCCESS;
 }
 
 

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=411506&r1=411505&r2=411506&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 Sat Jun  3 20:09:08 2006
@@ -42,7 +42,7 @@
 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,
-						axis2_char_t *content_type, int content_length,
+                  axis2_char_t *content_type, int content_length,
                         axis2_char_t *soap_action_header,
                         axis2_char_t *request_uri);
     
@@ -50,7 +50,7 @@
 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,
-						axis2_char_t *content_type,
+                  axis2_char_t *content_type,
                         axis2_char_t *soap_action_header, 
                         axis2_char_t *request_uri, axis2_conf_ctx_t *conf_ctx, 
                         axis2_hash_t *request_params);
@@ -81,20 +81,20 @@
 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_char_t *src);
+                  
 AXIS2_EXTERN int AXIS2_CALL
 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_conf_ctx_t *conf_ctx);
 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
 axis2_http_transport_utils_get_charset_enc(const axis2_env_t *env, 
-						axis2_char_t *content_type);
+                  axis2_char_t *content_type);
 int AXIS2_CALL
 axis2_http_transport_utils_on_data_request(char *buffer, int size, void *ctx);
 
@@ -103,93 +103,93 @@
                         axis2_msg_ctx_t *msg_ctx, 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, 
-						axis2_char_t *content_type, axis2_char_t *key);
+                  axis2_char_t *content_type, axis2_char_t *key);
 /***************************** 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,
-						axis2_char_t *content_type, int content_length, 
+                  axis2_char_t *content_type, int content_length, 
                         axis2_char_t *soap_action_header,
                         axis2_char_t *request_uri)
 {
-	axis2_soap_envelope_t *soap_envelope = NULL;
-	axis2_soap_builder_t *soap_builder = NULL;
-	axis2_om_stax_builder_t *om_builder = NULL;
-	axis2_bool_t is_soap11 = AXIS2_FALSE;
-	axis2_xml_reader_t *xml_reader = NULL;
-	axis2_char_t *char_set = NULL;
-	/*axis2_char_t *xml_char_set = NULL;*/
-	axis2_conf_ctx_t *conf_ctx = NULL;
-	axis2_callback_info_t callback_ctx;
-	axis2_hash_t *headers = NULL;
-	axis2_engine_t *engine = NULL;
-	axis2_soap_body_t *soap_body = NULL;
+   axis2_soap_envelope_t *soap_envelope = NULL;
+   axis2_soap_builder_t *soap_builder = NULL;
+   axis2_om_stax_builder_t *om_builder = NULL;
+   axis2_bool_t is_soap11 = AXIS2_FALSE;
+   axis2_xml_reader_t *xml_reader = NULL;
+   axis2_char_t *char_set = NULL;
+   /*axis2_char_t *xml_char_set = NULL;*/
+   axis2_conf_ctx_t *conf_ctx = NULL;
+   axis2_callback_info_t callback_ctx;
+   axis2_hash_t *headers = NULL;
+   axis2_engine_t *engine = NULL;
+   axis2_soap_body_t *soap_body = NULL;
     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) )	
-	{
-		/* 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));
-		}
-		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);
+   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) )   
+   {
+      /* 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));
+      }
+      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);
     if(property)
     {
         headers = AXIS2_PROPERTY_GET_VALUE(property, env);
         property = NULL;
     }
-	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);
-		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))
-			{
-				callback_ctx.chunked_stream = axis2_http_chunked_stream_create(
-							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;				
-				}
-				AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "HTTP"
-						" stream chunked");
-			}
-		}
-	}
+   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);
+      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))
+         {
+            callback_ctx.chunked_stream = axis2_http_chunked_stream_create(
+                     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;            
+            }
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "HTTP"
+                  " stream chunked");
+         }
+      }
+   }
     
     if (NULL != strstr(content_type, AXIS2_HTTP_HEADER_ACCEPT_MULTIPART_RELATED))
     {
@@ -235,91 +235,91 @@
     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_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 = axis2_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_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
+   
+   char_set = axis2_http_transport_utils_get_charset_enc(env,content_type);
+   xml_reader = axis2_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 = axis2_om_stax_builder_create(env, xml_reader);
-	if(NULL == om_builder)
-	{
-		AXIS2_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 = axis2_soap_builder_create(env, om_builder, 
+   om_builder = axis2_om_stax_builder_create(env, xml_reader);
+   if(NULL == om_builder)
+   {
+      AXIS2_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 = axis2_soap_builder_create(env, om_builder, 
                     AXIS2_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI);
-		if(NULL == soap_builder)
-		{
-			/* We should not be freeing om_builder here as it is done by
+      if(NULL == soap_builder)
+      {
+         /* We should not be freeing om_builder here as it is done by
             axis2_soap_builder_create in case of error - Samisa*/
             /*AXIS2_OM_STAX_BUILDER_FREE(om_builder, env);*/
-			om_builder = NULL;
-			xml_reader = NULL;
-			return AXIS2_FAILURE;
-		}
-
-		soap_envelope = AXIS2_SOAP_BUILDER_GET_SOAP_ENVELOPE(soap_builder,
-					env);
-		if(NULL == soap_envelope)
-		{
-			AXIS2_OM_STAX_BUILDER_FREE(om_builder, env);
-			om_builder = NULL;
-			xml_reader = NULL;
-			AXIS2_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 = axis2_soap_builder_create(env, om_builder, 
-						AXIS2_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI);
-			if(NULL == soap_builder)
-			{
-			    /* We should not be freeing om_builder here as it is done by
+         om_builder = NULL;
+         xml_reader = NULL;
+         return AXIS2_FAILURE;
+      }
+
+      soap_envelope = AXIS2_SOAP_BUILDER_GET_SOAP_ENVELOPE(soap_builder,
+               env);
+      if(NULL == soap_envelope)
+      {
+         AXIS2_OM_STAX_BUILDER_FREE(om_builder, env);
+         om_builder = NULL;
+         xml_reader = NULL;
+         AXIS2_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 = axis2_soap_builder_create(env, om_builder, 
+                  AXIS2_SOAP11_SOAP_ENVELOPE_NAMESPACE_URI);
+         if(NULL == soap_builder)
+         {
+             /* We should not be freeing om_builder here as it is done by
                 axis2_soap_builder_create in case of error - Samisa*/
-				/*AXIS2_OM_STAX_BUILDER_FREE(om_builder, env);*/
-				om_builder = NULL;
-				xml_reader = NULL;
-				return AXIS2_FAILURE;
-			}
-			soap_envelope = AXIS2_SOAP_BUILDER_GET_SOAP_ENVELOPE(
-					soap_builder, env);
-			if(NULL == soap_envelope)
-			{
-				AXIS2_SOAP_BUILDER_FREE(soap_builder, env);
-				om_builder = NULL;
-				xml_reader = NULL;
-				soap_builder = NULL;
-				return AXIS2_FAILURE;
-			}
-		}
+            /*AXIS2_OM_STAX_BUILDER_FREE(om_builder, env);*/
+            om_builder = NULL;
+            xml_reader = NULL;
+            return AXIS2_FAILURE;
+         }
+         soap_envelope = AXIS2_SOAP_BUILDER_GET_SOAP_ENVELOPE(
+               soap_builder, env);
+         if(NULL == soap_envelope)
+         {
+            AXIS2_SOAP_BUILDER_FREE(soap_builder, env);
+            om_builder = NULL;
+            xml_reader = NULL;
+            soap_builder = NULL;
+            return AXIS2_FAILURE;
+         }
+      }
         else
         {
             /* REST support */
@@ -341,8 +341,8 @@
                 AXIS2_MSG_CTX_SET_DOING_REST(msg_ctx, env, AXIS2_TRUE);
             }
         }
-		 		
-	}
+             
+   }
     
     if (binary_data_map)
     {
@@ -350,62 +350,62 @@
             binary_data_map);
     }
         
-	/* xml_char_set = AXIS2_OM_DOCUMENT_GET_CHARSET_ENC(
-	 *					AXIS2_OM_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);
-	 *	AXIS2_SOAP_ENVELOPE_FREE(envelope, env);
-	 *	envelope = NULL;
-	 *	AXIS2_XML_READER_FREE(xml_reader, env);
-	 *	xml_reader = NULL;
-	 *	AXIS2_OM_STAX_BUILDER_FREE(om_builder, env);
-	 *	om_builder = NULL;
-	 *	if(NULL != soap_builder)
-	 *	{
-	 *	 	AXIS2_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);
+   /* xml_char_set = AXIS2_OM_DOCUMENT_GET_CHARSET_ENC(
+    *               AXIS2_OM_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);
+    *   AXIS2_SOAP_ENVELOPE_FREE(envelope, env);
+    *   envelope = NULL;
+    *   AXIS2_XML_READER_FREE(xml_reader, env);
+    *   xml_reader = NULL;
+    *   AXIS2_OM_STAX_BUILDER_FREE(om_builder, env);
+    *   om_builder = NULL;
+    *   if(NULL != soap_builder)
+    *   {
+    *       AXIS2_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 = AXIS2_SOAP_ENVELOPE_GET_BODY(soap_envelope, 
-						env);
+                  env);
     
     if (NULL == soap_body)
         return AXIS2_FAILURE;
     
-	if(AXIS2_TRUE == AXIS2_SOAP_BODY_HAS_FAULT(soap_body, env))
-	{
-		status = AXIS2_ENGINE_RECEIVE_FAULT(engine, env, msg_ctx);
-	}
-	else
-	{
-		status = AXIS2_ENGINE_RECEIVE(engine, env, msg_ctx);
-	}
-	if(NULL == AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env) && 
-						AXIS2_FALSE == is_soap11)
-	{
-		axis2_soap_envelope_t *def_envelope = 
+   if(AXIS2_TRUE == AXIS2_SOAP_BODY_HAS_FAULT(soap_body, env))
+   {
+      status = AXIS2_ENGINE_RECEIVE_FAULT(engine, env, msg_ctx);
+   }
+   else
+   {
+      status = AXIS2_ENGINE_RECEIVE(engine, env, msg_ctx);
+   }
+   if(NULL == AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env) && 
+                  AXIS2_FALSE == is_soap11)
+   {
+      axis2_soap_envelope_t *def_envelope = 
             axis2_soap_envelope_create_default_soap_envelope(env, AXIS2_SOAP12);
-		AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, def_envelope);
-	}
+      AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, def_envelope);
+   }
     if(NULL != engine)
     {
         AXIS2_ENGINE_FREE(engine, env);
     }
-	return status;
+   return status;
 }
 
 
@@ -413,63 +413,63 @@
 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,
-						axis2_char_t *content_type,
+                  axis2_char_t *content_type,
                         axis2_char_t *soap_action_header, 
                         axis2_char_t *request_uri, axis2_conf_ctx_t *conf_ctx, 
                         axis2_hash_t *request_params)
 {
-	axis2_soap_envelope_t *soap_envelope = NULL;
-	axis2_engine_t *engine = NULL;
+   axis2_soap_envelope_t *soap_envelope = NULL;
+   axis2_engine_t *engine = NULL;
     axis2_property_t *property = 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);
-	
-	if(NULL != soap_action_header)	
-	{
-		/* 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));
-		}
-		if('"' == soap_action_header[strlen(soap_action_header) -1])
-		{
-			soap_action_header[strlen(soap_action_header) -1] = '\0';
-		}
-	}
-	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_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);
+   
+   if(NULL != soap_action_header)   
+   {
+      /* 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));
+      }
+      if('"' == soap_action_header[strlen(soap_action_header) -1])
+      {
+         soap_action_header[strlen(soap_action_header) -1] = '\0';
+      }
+   }
+   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));
     
     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);
-	
-	soap_envelope = axis2_http_transport_utils_create_envelope_from_get_request(
-					env, request_uri, request_params);
-	if(NULL == soap_envelope)
-	{
-		return AXIS2_FALSE;
-	}
-	else
-	{
-		AXIS2_MSG_CTX_SET_DOING_REST(msg_ctx, env, AXIS2_TRUE);
-		AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, soap_envelope);
-		engine = axis2_engine_create(env, conf_ctx);
-		AXIS2_ENGINE_RECEIVE(engine, env, msg_ctx);
-		return AXIS2_TRUE;
-	}
+   AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
+   
+   soap_envelope = axis2_http_transport_utils_create_envelope_from_get_request(
+               env, request_uri, request_params);
+   if(NULL == soap_envelope)
+   {
+      return AXIS2_FALSE;
+   }
+   else
+   {
+      AXIS2_MSG_CTX_SET_DOING_REST(msg_ctx, env, AXIS2_TRUE);
+      AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, soap_envelope);
+      engine = axis2_engine_create(env, conf_ctx);
+      AXIS2_ENGINE_RECEIVE(engine, env, msg_ctx);
+      return AXIS2_TRUE;
+   }
     return AXIS2_FALSE;
 }
 
@@ -479,62 +479,62 @@
                         (const axis2_env_t *env, axis2_char_t *request_uri,
                         axis2_hash_t *request_params)
 {
-	axis2_char_t **values = NULL;
-	axis2_soap_envelope_t *envelope = NULL;
-	axis2_om_namespace_t *om_ns = NULL;
-	axis2_om_namespace_t *def_om_ns = NULL;
-	axis2_om_node_t *document_node = NULL;
-	axis2_om_node_t *op_node = NULL;
-	axis2_om_element_t *op_ele = NULL;
-	axis2_hash_index_t *hi = NULL;
-	AXIS2_PARAM_CHECK(env->error, request_uri, NULL);
-	AXIS2_PARAM_CHECK(env->error, request_params, NULL);
-	
-	values = axis2_parse_request_url_for_svc_and_op(env, request_uri);
-	if(NULL == values)
-	{
-		return NULL;
-	}
-	if(NULL == values[0] && NULL != values[1])
-	{
-		AXIS2_FREE(env->allocator, values[1]);
-		AXIS2_FREE(env->allocator, values);
-		return NULL;
-	}
-	if(NULL != values[0] && NULL == values[1])
-	{
-		AXIS2_FREE(env->allocator, values[0]);
-		AXIS2_FREE(env->allocator, values);
-		return NULL;
-	}
-	if(NULL == values[0] && NULL == values[1])
-	{
-		AXIS2_FREE(env->allocator, values);
-		return NULL;
-	}
-	envelope = axis2_soap_envelope_create_default_soap_envelope(env, AXIS2_SOAP12);
+   axis2_char_t **values = NULL;
+   axis2_soap_envelope_t *envelope = NULL;
+   axis2_om_namespace_t *om_ns = NULL;
+   axis2_om_namespace_t *def_om_ns = NULL;
+   axis2_om_node_t *document_node = NULL;
+   axis2_om_node_t *op_node = NULL;
+   axis2_om_element_t *op_ele = NULL;
+   axis2_hash_index_t *hi = NULL;
+   AXIS2_PARAM_CHECK(env->error, request_uri, NULL);
+   AXIS2_PARAM_CHECK(env->error, request_params, NULL);
+   
+   values = axis2_parse_request_url_for_svc_and_op(env, request_uri);
+   if(NULL == values)
+   {
+      return NULL;
+   }
+   if(NULL == values[0] && NULL != values[1])
+   {
+      AXIS2_FREE(env->allocator, values[1]);
+      AXIS2_FREE(env->allocator, values);
+      return NULL;
+   }
+   if(NULL != values[0] && NULL == values[1])
+   {
+      AXIS2_FREE(env->allocator, values[0]);
+      AXIS2_FREE(env->allocator, values);
+      return NULL;
+   }
+   if(NULL == values[0] && NULL == values[1])
+   {
+      AXIS2_FREE(env->allocator, values);
+      return NULL;
+   }
+   envelope = axis2_soap_envelope_create_default_soap_envelope(env, AXIS2_SOAP12);
     
-	om_ns = axis2_om_namespace_create(env, values[0], "services");
-	
+   om_ns = axis2_om_namespace_create(env, values[0], "services");
+   
     def_om_ns = axis2_om_namespace_create(env, "", NULL);
-	
+   
     document_node = AXIS2_SOAP_BODY_GET_BASE_NODE(AXIS2_SOAP_ENVELOPE_GET_BODY(
-						envelope, env), env);
-	op_ele = axis2_om_element_create(env, document_node, values[1], om_ns, 
-						&op_node);
-	
-	for(hi = axis2_hash_first(request_params, env); NULL != hi; 
-						axis2_hash_next(env, hi))
-	{
-		void *name = NULL;
-		void *value = NULL;
-		axis2_om_element_t *tmp_ele = NULL;
-		axis2_om_node_t *tmp_node = NULL;
-		axis2_hash_this(hi, (const void **)&name, NULL, (void**)&value);
-		tmp_ele = axis2_om_element_create(env, op_node, (axis2_char_t*)name,
-						def_om_ns, &tmp_node);
-		AXIS2_OM_ELEMENT_SET_TEXT(tmp_ele, env, (axis2_char_t*)value, tmp_node);
-	}
+                  envelope, env), env);
+   op_ele = axis2_om_element_create(env, document_node, values[1], om_ns, 
+                  &op_node);
+   
+   for(hi = axis2_hash_first(request_params, env); NULL != hi; 
+                  axis2_hash_next(env, hi))
+   {
+      void *name = NULL;
+      void *value = NULL;
+      axis2_om_element_t *tmp_ele = NULL;
+      axis2_om_node_t *tmp_node = NULL;
+      axis2_hash_this(hi, (const void **)&name, NULL, (void**)&value);
+      tmp_ele = axis2_om_element_create(env, op_node, (axis2_char_t*)name,
+                  def_om_ns, &tmp_node);
+      AXIS2_OM_ELEMENT_SET_TEXT(tmp_ele, env, (axis2_char_t*)value, tmp_node);
+   }
     return envelope;
 }
 
@@ -545,7 +545,7 @@
                         axis2_msg_ctx_t *msg_ctx, axis2_stream_t *in_stream,
                         axis2_char_t *content_type)
 {
-	/*
+   /*
         TODO implement when MTOM support is added
     */
     return NULL;
@@ -556,7 +556,7 @@
 axis2_http_transport_utils_is_optimized(const axis2_env_t *env, 
                                         axis2_om_element_t *om_element)
 {
-	/*
+   /*
         TODO implement when MTOM support is added
     */
     return AXIS2_FALSE;
@@ -609,269 +609,269 @@
 
 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 *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)
-			{
-				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;
+   
+   
+   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);
+      }
+      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_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)
 {
-	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_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 = "<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_SVCS(AXIS2_CONF_CTX_GET_CONF(conf_ctx,env),
-							env);
-	errorneous_svc_map = AXIS2_CONF_GET_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);
+   axis2_hash_t *services_map = NULL;
+   axis2_hash_t *errorneous_svc_map = NULL;
+   axis2_char_t *ret = NULL;
+   axis2_char_t *tmp2 = "<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_SVCS(AXIS2_CONF_CTX_GET_CONF(conf_ctx,env),
+                     env);
+   errorneous_svc_map = AXIS2_CONF_GET_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);
+         ret = AXIS2_STRACAT(tmp2, sname, env);
+         AXIS2_FREE(env->allocator, tmp2);
             tmp2 = ret;
-			ret  = AXIS2_STRACAT(tmp2, "</h3>", env);
-			AXIS2_FREE(env->allocator, tmp2);
+         ret  = AXIS2_STRACAT(tmp2, "</h3>", 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);
-				AXIS2_FREE(env->allocator, tmp2);
+         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);
+            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);
+            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, 
-						axis2_char_t *content_type)
+                  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 = '\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'
@@ -887,37 +887,37 @@
     {
         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)
 {
-	const axis2_env_t *env = NULL;
-	int len = -1;
+   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);
+   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 
@@ -950,7 +950,7 @@
         }
         return len;
     }
-	return 0;	
+   return 0;   
 }
 
 AXIS2_EXTERN axis2_soap_envelope_t* AXIS2_CALL
@@ -962,11 +962,11 @@
     axis2_char_t *content_type = NULL;
     axis2_stream_t *in_stream = NULL;
     axis2_callback_info_t *callback_ctx = NULL;
-	axis2_char_t *trans_enc = NULL;
-	int *content_length = NULL;
-	axis2_property_t *property = NULL;
+   axis2_char_t *trans_enc = NULL;
+   int *content_length = NULL;
+   axis2_property_t *property = NULL;
     AXIS2_ENV_CHECK(env, NULL);
-	AXIS2_PARAM_CHECK(env->error, msg_ctx, NULL);
+   AXIS2_PARAM_CHECK(env->error, msg_ctx, NULL);
     AXIS2_PARAM_CHECK(env->error, soap_ns_uri, NULL);
     
     
@@ -984,24 +984,24 @@
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-	callback_ctx->in_stream = in_stream;
-	callback_ctx->env = env;
-	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);
+   callback_ctx->in_stream = in_stream;
+   callback_ctx->env = env;
+   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);
     if(property)
     {
         content_length = AXIS2_PROPERTY_GET_VALUE(property, env);
         property = NULL;
     }
-	if(content_length != NULL)
-	{
-		callback_ctx->content_length = *content_length;
-		callback_ctx->unread_len = *content_length;
-	}
+   if(content_length != NULL)
+   {
+      callback_ctx->content_length = *content_length;
+      callback_ctx->unread_len = *content_length;
+   }
     if(NULL == in_stream)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_IN_STREAM_IN_MSG_CTX,
@@ -1009,23 +1009,23 @@
         return NULL;
     }
     property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
-						AXIS2_HTTP_HEADER_TRANSFER_ENCODING, AXIS2_FALSE);
+                  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))
-	{
-		callback_ctx->chunked_stream = axis2_http_chunked_stream_create(env, 
-						in_stream);
-		if(NULL == callback_ctx->chunked_stream)
-		{
-			return NULL;
-		}
-	}
-	
+   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);
+      if(NULL == callback_ctx->chunked_stream)
+      {
+         return NULL;
+      }
+   }
+   
     
     op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
     if(NULL != op_ctx)
@@ -1086,7 +1086,7 @@
                         soap_ns_uri);
         if(NULL == soap_builder)
         {
-			/* We should not be freeing om_builder here as it is done by
+         /* We should not be freeing om_builder here as it is done by
             axis2_soap_builder_create in case of error - Samisa*/
             /*AXIS2_OM_STAX_BUILDER_FREE(om_builder, env);*/
             om_builder = NULL;
@@ -1133,41 +1133,41 @@
 
 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
 axis2_http_transport_utils_get_value_from_content_type(const axis2_env_t *env, 
-						axis2_char_t *content_type, axis2_char_t *key)
+                  axis2_char_t *content_type, 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;
 }



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