You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2006/01/09 07:26:05 UTC

svn commit: r367220 - /webservices/axis2/trunk/c/modules/core/transport/http/

Author: samisa
Date: Sun Jan  8 22:25:55 2006
New Revision: 367220

URL: http://svn.apache.org/viewcvs?rev=367220&view=rev
Log:
Changes for http_client, new stream

Modified:
    webservices/axis2/trunk/c/modules/core/transport/http/Makefile.am
    webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_header.c
    webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_request_line.c
    webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_simple_request.c
    webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_simple_response.c
    webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_transport_utils.c
    webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_worker.c
    webservices/axis2/trunk/c/modules/core/transport/http/axis2_soap_over_http_sender.c

Modified: webservices/axis2/trunk/c/modules/core/transport/http/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/Makefile.am?rev=367220&r1=367219&r2=367220&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/Makefile.am Sun Jan  8 22:25:55 2006
@@ -1,13 +1,17 @@
 lib_LTLIBRARIES = libaxis2_http_transport.la
 AM_CPPFLAGS = $(CPPFLAGS)
 libaxis2_http_transport_la_SOURCES = axis2_http_worker.c \
+                                     axis2_http_transport_utils.c\
                               	     axis2_simple_http_svr_conn.c\
                 				     axis2_http_simple_request.c\
                 				     axis2_http_simple_response.c\
 				                     axis2_http_response_writer.c\
 				                     axis2_http_request_line.c\
 				                     axis2_http_status_line.c\
-				                     axis2_http_header.c
+				                     axis2_http_header.c\
+                                     axis2_url.c\
+                                     axis2_http_out_transport_info.c\
+                                     axis2_http_client.c
 
 INCLUDES = -I$(top_builddir)/include \
            -I$(top_builddir)/modules/util \

Modified: webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_header.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_header.c?rev=367220&r1=367219&r2=367220&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_header.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_header.c Sun Jan  8 22:25:55 2006
@@ -16,6 +16,7 @@
  
 #include <axis2_http_header.h>
 #include <axis2_string.h>
+#include <axis2_http_transport.h>
 
 
 /** 
@@ -90,6 +91,35 @@
 	return &(http_header_impl->http_header);
 }
 
+AXIS2_DECLARE(axis2_http_header_t *) AXIS2_CALL
+axis2_http_header_create_by_str (axis2_env_t **env, axis2_char_t *str)
+{
+	axis2_char_t *tmp_str = NULL;
+	axis2_char_t *ch = NULL;
+	axis2_char_t *ch2 = NULL;
+	axis2_http_header_t *ret = NULL;
+	AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_FUNC_PARAM_CHECK(str, env, NULL);
+	
+	tmp_str = AXIS2_STRDUP(str, env);
+	if(NULL == tmp_str)
+	{
+		return NULL;
+	}
+	ch = strchr(tmp_str, ':');
+	if(NULL == ch)
+	{
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_HEADER, 
+						AXIS2_FAILURE);
+		AXIS2_FREE((*env)->allocator, tmp_str);
+		return NULL;
+	}
+	ch2 = ch + sizeof(axis2_char_t);
+	*ch = '\0';
+	ret = axis2_http_header_create(env, tmp_str, ch2);
+	AXIS2_FREE((*env)->allocator, tmp_str);
+	return ret;	
+}
 
 axis2_status_t AXIS2_CALL 
 axis2_http_header_free (axis2_http_header_t *header, axis2_env_t **env)
@@ -122,11 +152,11 @@
     AXIS2_FUNC_PARAM_CHECK(header, env, NULL);
     axis2_http_header_impl_t *http_header_impl = AXIS2_INTF_TO_IMPL(header);
     axis2_ssize_t len = AXIS2_STRLEN(http_header_impl->name) + 
-                AXIS2_STRLEN(http_header_impl->value) + 2;
+                AXIS2_STRLEN(http_header_impl->value) + 4;
     axis2_char_t *external_form = (axis2_char_t*) AXIS2_MALLOC((*env)->allocator,
                 len);
-    sprintf(external_form, "%s:%s", http_header_impl->name, 
-                http_header_impl->value);
+    sprintf(external_form, "%s:%s%s", http_header_impl->name, 
+                http_header_impl->value, AXIS2_HTTP_CRLF);
     return external_form;
 }
 

Modified: webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_request_line.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_request_line.c?rev=367220&r1=367219&r2=367220&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_request_line.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_request_line.c Sun Jan  8 22:25:55 2006
@@ -252,7 +252,7 @@
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE); 
         return NULL;
     }
-    sprintf(ret, "%s %s %s %s", req_line_impl->method, req_line_impl->uri, 
+    sprintf(ret, "%s %s %s%s", req_line_impl->method, req_line_impl->uri, 
                     req_line_impl->http_version, AXIS2_HTTP_CRLF);
     return ret;
 }

Modified: webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_simple_request.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_simple_request.c?rev=367220&r1=367219&r2=367220&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_simple_request.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_simple_request.c Sun Jan  8 22:25:55 2006
@@ -97,7 +97,7 @@
 axis2_ssize_t AXIS2_CALL 
 axis2_http_simple_request_get_body_bytes
                         (axis2_http_simple_request_t *simple_request, 
-                        axis2_env_t **env, axis2_char_t *buf);
+                        axis2_env_t **env, char **buf);
 
 axis2_status_t AXIS2_CALL 
 axis2_http_simple_request_free(axis2_http_simple_request_t *simple_request, 
@@ -452,11 +452,50 @@
 axis2_ssize_t AXIS2_CALL 
 axis2_http_simple_request_get_body_bytes
                         (axis2_http_simple_request_t *simple_request, 
-                        axis2_env_t **env, axis2_char_t *buf)
+                        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_FUNC_PARAM_CHECK(simple_request, 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);
+		read_len = AXIS2_STREAM_READ(body, env, buf, length);
+		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 dependent
+        TODO :STREAM_READ => STREAM_READ_BYTES
     */
+	if(NULL != tmp_buf)
+	{
+		*buf = tmp_buf;
+		return AXIS2_STRLEN(tmp_buf);
+	}
     return -1;    
 }

Modified: webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_simple_response.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_simple_response.c?rev=367220&r1=367219&r2=367220&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_simple_response.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_simple_response.c Sun Jan  8 22:25:55 2006
@@ -123,7 +123,7 @@
 axis2_ssize_t AXIS2_CALL 
 axis2_http_simple_response_get_body_bytes 
                     (axis2_http_simple_response_t *simple_response, 
-                    axis2_env_t **env, axis2_char_t *buf);
+                    axis2_env_t **env, axis2_char_t **buf);
 
 axis2_status_t AXIS2_CALL 
 axis2_http_simple_response_free (axis2_http_simple_response_t *simple_response, 
@@ -191,6 +191,10 @@
         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->simple_response.ops->set_status_line = 
                         axis2_http_simple_response_set_status_line;
     simple_response_impl->simple_response.ops->get_phrase =
@@ -250,9 +254,12 @@
         for(i = 0; i< AXIS2_ARRAY_LIST_SIZE(simple_response_impl->header_group, 
                         env); i++)
         {
-            tmp = (axis2_http_header_t *)AXIS2_ARRAY_LIST_REMOVE(
+            tmp = (axis2_http_header_t *)AXIS2_ARRAY_LIST_GET(
                             simple_response_impl->header_group, env, i);
-            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;
@@ -262,7 +269,7 @@
     
 	AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(simple_response));
     /* Stream is not freed
-     * Assumption : stream doesn't belong to the reaponse
+     * Assumption : stream doesn't belong to the response
      */
 	return AXIS2_SUCCESS;
 }
@@ -456,6 +463,12 @@
                     (axis2_http_simple_response_t *simple_response, 
                     axis2_env_t **env, axis2_http_header_t* header)
 {
+	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_FUNC_PARAM_CHECK(simple_response, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, header, AXIS2_FAILURE);
     
@@ -464,7 +477,7 @@
     
     if(NULL == simple_response_impl->header_group)
     {
-        simple_response_impl->header_group = axis2_array_list_create(env, 1);
+        simple_response_impl->header_group = axis2_array_list_create(env, 10);
         AXIS2_ARRAY_LIST_ADD(simple_response_impl->header_group, env, header);
         return AXIS2_SUCCESS;
     }
@@ -472,12 +485,9 @@
     /* If a header with the same name exists
      * search and remove the old header
      */
-    axis2_array_list_t *header_group = AXIS2_INTF_TO_IMPL(simple_response)->
-                        header_group;
-    int i = 0;
-    axis2_http_header_t *tmp_header = NULL;
-    axis2_char_t *tmp_name = NULL;
-    int count = AXIS2_ARRAY_LIST_SIZE(header_group, env);
+    header_group = AXIS2_INTF_TO_IMPL(simple_response)->header_group;
+    
+    count = AXIS2_ARRAY_LIST_SIZE(header_group, env);
     for(i = 0; i < count; i++)
     {
         tmp_header = (axis2_http_header_t *)AXIS2_ARRAY_LIST_GET(header_group, 
@@ -491,7 +501,8 @@
             break;
         }
     }
-    AXIS2_ARRAY_LIST_ADD(simple_response_impl->header_group, env, header);
+	AXIS2_ARRAY_LIST_ADD(simple_response_impl->header_group, env, 
+						(void*)header);
     return AXIS2_SUCCESS;
 }
 
@@ -558,12 +569,21 @@
                     (axis2_http_simple_response_t *simple_response, 
                     axis2_env_t **env, axis2_char_t *str)
 {
+	axis2_stream_t *body_stream = NULL;
     AXIS2_FUNC_PARAM_CHECK(simple_response, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, str, AXIS2_FAILURE);
-    /*
-        TODO stream dependent
-    */
     
+	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;
 }
     
@@ -573,7 +593,6 @@
                     axis2_env_t **env, axis2_stream_t *stream)
 {
     AXIS2_FUNC_PARAM_CHECK(simple_response, env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, stream, AXIS2_FAILURE);
     /*
      * TODO do we have to free the existing stream
      * Problem in freeing is most of the time the stream doesn't belong
@@ -598,11 +617,81 @@
 axis2_ssize_t AXIS2_CALL 
 axis2_http_simple_response_get_body_bytes
                         (axis2_http_simple_response_t *simple_response, 
-                        axis2_env_t **env, axis2_char_t *buf)
+                        axis2_env_t **env, axis2_char_t **buffer)
 {
-    AXIS2_FUNC_PARAM_CHECK(simple_response, env, AXIS2_FAILURE);
-    /*
-        TODO stream dependent
-    */
-    return -1;    
+	axis2_http_simple_response_impl_t *response_impl = NULL;
+	axis2_stream_t *tmp_stream = NULL;
+	AXIS2_FUNC_PARAM_CHECK(simple_response, env, AXIS2_FAILURE);
+	int return_size = -1;
+	
+	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)
+		{
+			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;    
+}
+
+axis2_bool_t AXIS2_CALL 
+axis2_http_simple_response_contains_header 
+                    (axis2_http_simple_response_t *simple_response, 
+                    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_FUNC_PARAM_CHECK(simple_response, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, name, AXIS2_FAILURE);
+    simple_response_impl = AXIS2_INTF_TO_IMPL(
+                        simple_response);                 
+    if(NULL == simple_response_impl->header_group)
+    {
+        return AXIS2_FALSE;
+    }
+    count = AXIS2_ARRAY_LIST_SIZE(simple_response_impl->header_group, env);
+    if(0 == count)
+    {
+        return AXIS2_FALSE;
+    }
+        
+    for(i = 0; i < count; i++)
+    {
+        header_name = AXIS2_HTTP_HEADER_GET_NAME((axis2_http_header_t *)
+                        AXIS2_ARRAY_LIST_GET(simple_response_impl->header_group,
+                        env, i), env);
+        if(0 == AXIS2_STRCASECMP(name,header_name))
+            return AXIS2_TRUE;            
+    }
+    return AXIS2_FALSE;
 }

Modified: webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_transport_utils.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_transport_utils.c?rev=367220&r1=367219&r2=367220&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_transport_utils.c Sun Jan  8 22:25:55 2006
@@ -20,13 +20,15 @@
 #include <axis2_conf.h>
 #include <axis2_op.h>
 #include <axis2_qname.h>
+#include <axis2_http_transport.h>
 
 /***************************** Function headers *******************************/
 
-axis2_status_t AXIS2_CALL
+axis2_status_t AXIS2_CALL 
 axis2_http_transport_utils_process_http_post_request
                         (axis2_env_t **env, axis2_msg_ctx_t *msg_ctx, 
-                        axis2_stream_t *stream, axis2_char_t *content_type, 
+                        axis2_stream_t *in_stream, axis2_stream_t *out_stream,
+						axis2_char_t *content_type, 
                         axis2_char_t *soap_action_header,
                         axis2_char_t *request_uri);
     
@@ -81,11 +83,39 @@
 axis2_status_t AXIS2_CALL 
 axis2_http_transport_utils_process_http_post_request
                         (axis2_env_t **env, axis2_msg_ctx_t *msg_ctx, 
-                        axis2_stream_t *stream, axis2_char_t *content_type, 
+                        axis2_stream_t *in_stream, axis2_stream_t *out_stream,
+						axis2_char_t *content_type, 
                         axis2_char_t *soap_action_header,
                         axis2_char_t *request_uri)
 {
-    /*
+    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);
+	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_MSG_CTX_SET_PROPERTY(msg_ctx, env, 
+						AXIS2_TRANSPORT_OUT, out_stream, AXIS2_FALSE);
+		AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
+		
+		
+	}
+	/*
         TODO code
     */
     return AXIS2_SUCCESS;
@@ -371,4 +401,26 @@
 	AXIS2_FREE((*env)->allocator, tmp);
 	
 	return tmp2;
+}
+
+axis2_char_t* AXIS2_CALL
+axis2_http_transport_utils_get_charset_enc(axis2_env_t **env, 
+						axis2_char_t *content_type)
+{
+	axis2_char_t *tmp = NULL;
+		
+	AXIS2_ENV_CHECK(env, NULL);
+	AXIS2_PARAM_CHECK((*env)->error, content_type, NULL);
+	
+	tmp = strstr(content_type, AXIS2_HTTP_CHAR_SET_ENCODING);
+	if(NULL == tmp)
+	{
+		return AXIS2_STRDUP(AXIS2_HTTP_HEADER_DEFAULT_CHAR_ENCODING, env);
+	}
+	tmp = strchr(tmp, '=');
+	if(NULL == tmp)
+	{
+		return AXIS2_STRDUP(AXIS2_HTTP_HEADER_DEFAULT_CHAR_ENCODING, env);
+	}
+	return AXIS2_STRDUP(tmp, env);
 }

Modified: webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_worker.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_worker.c?rev=367220&r1=367219&r2=367220&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_worker.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/axis2_http_worker.c Sun Jan  8 22:25:55 2006
@@ -128,8 +128,7 @@
 	axis2_conf_ctx_t *conf_ctx = http_worker_impl->conf_ctx;
 	axis2_msg_ctx_t *msg_ctx = NULL;
 	axis2_stream_t *request_body = NULL;
-	axis2_stream_t *out_stream = axis2_stream_create(env, (*env)->allocator, 
-						NULL);
+	axis2_stream_t *out_stream = axis2_stream_create_basic(env);
 	axis2_http_simple_response_t *response = NULL;
 	axis2_transport_out_desc_t *out_desc = NULL;
 	axis2_transport_in_desc_t *in_desc = NULL;
@@ -232,7 +231,7 @@
 						simple_request, env), env), AXIS2_HTTP_HEADER_POST))
 	{
 		processed = axis2_http_transport_utils_process_http_post_request
-                        (env, msg_ctx, request_body, 
+                        (env, msg_ctx, request_body, out_stream,
 						AXIS2_HTTP_SIMPLE_REQUEST_GET_CONTENT_TYPE(
 						simple_request, env) ,soap_action,
 						AXIS2_HTTP_REQUEST_LINE_GET_URI
@@ -257,7 +256,7 @@
 	}
 	AXIS2_HTTP_SIMPLE_RESPONSE_SET_BODY_STREAM(response, env, out_stream);
 	axis2_http_worker_set_response_headers(http_worker, env, svr_conn, 
-						simple_request, response, AXIS2_STREAM_GET_LEN(
+						simple_request, response, AXIS2_STREAM_BASIC_GET_LEN(
 						out_stream, env));
 	
     /*

Modified: webservices/axis2/trunk/c/modules/core/transport/http/axis2_soap_over_http_sender.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/axis2_soap_over_http_sender.c?rev=367220&r1=367219&r2=367220&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/axis2_soap_over_http_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/axis2_soap_over_http_sender.c Sun Jan  8 22:25:55 2006
@@ -63,7 +63,7 @@
 axis2_soap_over_http_sender_send 
 						(axis2_soap_over_http_sender_t *sender, 
 						axis2_env_t **env, axis2_msg_ctx_t *msg_ctx,
-						axis2_om_node_t *output, axis2_char_t *url, 
+						axis2_om_node_t *output, axis2_char_t *str_url, 
 						axis2_char_t *soap_action);
 
 axis2_status_t AXIS2_CALL 
@@ -157,18 +157,39 @@
 axis2_soap_over_http_sender_send 
 						(axis2_soap_over_http_sender_t *sender, 
 						axis2_env_t **env, axis2_msg_ctx_t *msg_ctx,
-						axis2_om_node_t *output, axis2_char_t *url, 
+						axis2_om_node_t *output, axis2_char_t *str_url, 
 						axis2_char_t *soap_action)
 {
+	axis2_http_client_t *client = NULL;
+	axis2_http_simple_request_t *request = NULL;
+	axis2_http_request_line_t *requst_line = NULL;
+	axis2_url_t *url = NULL;
+	axis2_soap_over_http_sender_impl_t *sender_impl = NULL;
+	
     AXIS2_FUNC_PARAM_CHECK(sender, env, AXIS2_FAILURE);
 	AXIS2_PARAM_CHECK((*env)->error, msg_ctx, AXIS2_FAILURE);
 	AXIS2_PARAM_CHECK((*env)->error, output, AXIS2_FAILURE);
 	AXIS2_PARAM_CHECK((*env)->error, url, AXIS2_FAILURE);
 	AXIS2_PARAM_CHECK((*env)->error, soap_action, AXIS2_FAILURE);
 	
+	url = axis2_url_parse_string(env, str_url);
+	sender_impl = AXIS2_INTF_TO_IMPL(sender);
+	if(NULL == url)
+	{
+		reuturn AXIS2_FAILURE;
+	}
+	client = axis2_http_client_create(env, url);
+	if(NULL == client)
+	{
+		return AXIS2_FAILURE;
+	}
+	axis2_soap_over_http_sender_get_timeout_values(sender, env, msg_ctx);
+	AXIS2_HTTP_CLIENT_SET_TIMEOUT(client, env, sender_impl->so_timeout);
+	
 	/*
 	 * TODO create the http client and send 
-	 */	
+	 */
+		
 	return AXIS2_SUCCESS;
     
 }