axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From din...@apache.org
Subject svn commit: r513194 - in /webservices/axis2/trunk/c: ./ include/ modules/core/transport/http/sender/ modules/core/transport/http/sender/libcurl/ modules/core/transport/http/server/apache2/
Date Thu, 01 Mar 2007 06:49:56 GMT
Author: dinesh
Date: Wed Feb 28 22:49:55 2007
New Revision: 513194

URL: http://svn.apache.org/viewvc?view=rev&rev=513194
Log:
axis2c:523, transport sender refactoring, axis2c:487 implementing libcurl base transport

Added:
    webservices/axis2/trunk/c/include/axis2_http_sender.h
      - copied unchanged from r512857, webservices/axis2/scratch/c/dinesh/532/c/include/axis2_http_sender.h
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c
      - copied unchanged from r512857, webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/http_sender.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/libcurl/
      - copied from r512857, webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/
    webservices/axis2/trunk/c/modules/core/transport/http/sender/libcurl/Makefile.am
      - copied unchanged from r512857, webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile.am
    webservices/axis2/trunk/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c
      - copied unchanged from r512857, webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.h
      - copied unchanged from r512857, webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.h
    webservices/axis2/trunk/c/modules/core/transport/http/sender/libcurl/libcurl_stream.c
      - copied unchanged from r512857, webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/libcurl_stream.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/libcurl/libcurl_stream.h
      - copied unchanged from r512857, webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/libcurl_stream.h
    webservices/axis2/trunk/c/modules/core/transport/http/sender/sender_util.c
      - copied unchanged from r512857, webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/sender_util.c
Modified:
    webservices/axis2/trunk/c/   (props changed)
    webservices/axis2/trunk/c/configure.ac
    webservices/axis2/trunk/c/include/axis2_soap_over_http_sender.h
    webservices/axis2/trunk/c/modules/core/transport/http/sender/Makefile.am
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c
    webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c

Propchange: webservices/axis2/trunk/c/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Feb 28 22:49:55 2007
@@ -1 +1 @@
-/webservices/axis2/scratch/c/dinesh/532/c:1-509081
+/webservices/axis2/scratch/c/dinesh/532/c:1-513164

Modified: webservices/axis2/trunk/c/configure.ac
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/configure.ac?view=diff&rev=513194&r1=513193&r2=513194
==============================================================================
--- webservices/axis2/trunk/c/configure.ac (original)
+++ webservices/axis2/trunk/c/configure.ac Wed Feb 28 22:49:55 2007
@@ -279,6 +279,24 @@
   CFLAGS="$CFLAGS"
 )
 
+AC_MSG_CHECKING(whether to use libcurl)
+AC_ARG_ENABLE(libcurl, [  --enable-libcurl  enable libcurl. default=no],
+[ case "${enableval}" in
+  no)
+    AC_MSG_RESULT(no)
+    CFLAGS="$CFLAGS"
+    libcurl_enabled=false
+    ;;
+  *)
+    AC_MSG_RESULT(yes)
+    CFLAGS="$CFLAGS -DAXIS2_LIBCURL_ENABLED"
+    libcurl_enabled=true
+    ;;
+  esac ],
+  AC_MSG_RESULT(no)
+  CFLAGS="$CFLAGS"
+)
+
 
 AC_MSG_CHECKING(whether to build dynamic invocation client library)
 AC_ARG_ENABLE(diclient, [  --enable-diclient    build diclient library wrapper. default=no],
@@ -315,6 +333,7 @@
 AC_SUBST(RAMPART_DIR)
 AC_SUBST(GUTHTHILA_LIBS)
 AM_CONDITIONAL(AXIS2_SSL_ENABLED, test x$ssl_enabled = xtrue)
+AM_CONDITIONAL(AXIS2_LIBCURL_ENABLED, test x$libcurl_enabled = xtrue)
 #export PARSER_DIR
 export WRAPPER_DIR
 export prefix 
@@ -333,6 +352,7 @@
     modules/core/transport/http/util/Makefile \
     modules/core/transport/http/sender/Makefile \
     modules/core/transport/http/sender/ssl/Makefile \
+    modules/core/transport/http/sender/libcurl/Makefile \
     modules/core/transport/http/receiver/Makefile \
     modules/core/transport/http/server/simple_axis2_server/Makefile \
     modules/core/transport/http/server/Makefile \

Modified: webservices/axis2/trunk/c/include/axis2_soap_over_http_sender.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_soap_over_http_sender.h?view=diff&rev=513194&r1=513193&r2=513194
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_soap_over_http_sender.h (original)
+++ webservices/axis2/trunk/c/include/axis2_soap_over_http_sender.h Wed Feb 28 22:49:55 2007
@@ -220,3 +220,7 @@
 }
 #endif
 #endif /* AXIS2_SOAP_OVER_HTTP_SENDER_H */
+
+
+
+

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/Makefile.am?view=diff&rev=513194&r1=513193&r2=513194
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/Makefile.am Wed Feb 28 22:49:55
2007
@@ -1,14 +1,27 @@
-SUBDIRS=ssl
+SUBDIRS=ssl libcurl
 lib_LTLIBRARIES = libaxis2_http_sender.la
 libaxis2_http_sender_la_SOURCES = http_transport_sender.c\
-                                  soap_over_http_sender.c\
-                                  rest_sender.c\
+                                  http_sender.c\
+                                  sender_util.c\
                                   http_client.c
 
 libaxis2_http_sender_la_LIBADD = $(top_builddir)/modules/core/transport/http/common/libaxis2_http_common.la\
-				 $(top_builddir)/modules/core/transport/http/util/libaxis2_http_util.la\
+                                 $(top_builddir)/modules/core/transport/http/util/libaxis2_http_util.la\
 				 $(top_builddir)/axiom/src/om/libaxis2_axiom.la\
-				 $(top_builddir)/util/src/libaxis2_util.la 
+				 $(top_builddir)/util/src/libaxis2_util.la
+
+
+if AXIS2_LIBCURL_ENABLED
+libaxis2_http_sender_la_SOURCES +=libcurl/axis2_libcurl.c\
+                                  libcurl/libcurl_stream.c
+
+libaxis2_http_sender_la_LIBADD +=-lssl\
+                                  -lcrypto\
+                                  -lcurl\
+	                          -ldl\
+	                          -lz
+endif
+
 
 if AXIS2_SSL_ENABLED
 libaxis2_http_sender_la_SOURCES += ssl/ssl_stream.c\
@@ -17,9 +30,11 @@
                                  -lcrypto
 endif
 
+
 INCLUDES = -I$(top_builddir)/include \
 	       -I$(top_builddir)/modules/core/transport\
-	       -I$(top_builddir)/modules/core/transport/http \
+           -I$(top_builddir)/modules/core/transport/http \
+           -I$(top_builddir)/modules/core/transport/http/sender/libcurl \
            -I$(top_builddir)/modules/core/description \
            -I$(top_builddir)/modules/core/context \
            -I$(top_builddir)/modules/core/phaseresolver \

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c?view=diff&rev=513194&r1=513193&r2=513194
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c Wed
Feb 28 22:49:55 2007
@@ -24,7 +24,7 @@
 #include <axis2_http_transport_utils.h>
 #include <axis2_http_out_transport_info.h>
 #include <axis2_http_transport.h>
-#include <axis2_soap_over_http_sender.h>
+#include <axis2_http_sender.h>
 #include <axiom_soap_body.h>
 #include <axis2_rest_sender.h>
 #include <axis2_types.h>
@@ -543,12 +543,12 @@
 {
     const axis2_char_t *soap_action = NULL;
     const axis2_char_t *url = NULL;
-    axis2_soap_over_http_sender_t *sender = NULL;
+    axis2_http_sender_t *sender = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 	const axis2_char_t *soap_ns_uri = NULL;
 	axiom_soap_envelope_t *response_envelope = NULL;
 	axis2_op_t *op = NULL;
-    axis2_http_client_t *client = NULL;
+/*     axis2_http_client_t *client = NULL; */
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
@@ -563,70 +563,37 @@
     {
         soap_action = "";
     }
-    
-    if (AXIS2_TRUE == AXIS2_MSG_CTX_GET_DOING_REST(msg_ctx, env))
-    {
-        axiom_node_t *data_out = NULL;
-        axiom_node_t *body_node = NULL;
-        axiom_soap_body_t *soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(out, env);
-        axis2_rest_sender_t *sender = NULL;
 
-        if (NULL == soap_body)
-        {
-            AXIS2_ERROR_SET(env->error,
-                    AXIS2_ERROR_SOAP_ENVELOPE_OR_SOAP_BODY_NULL,
-                    AXIS2_FAILURE);
-            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "%s",
-                    AXIS2_ERROR_GET_MESSAGE(env->error));
-            return AXIS2_FAILURE;
-        }
-        body_node = AXIOM_SOAP_BODY_GET_BASE_NODE(soap_body, env);
-        if (NULL == body_node)
-        {
-            return AXIS2_FAILURE;
-        }
-        data_out = AXIOM_NODE_GET_FIRST_ELEMENT(body_node, env);
-        if (NULL == data_out || AXIOM_NODE_GET_NODE_TYPE(data_out, env)
-                != AXIOM_ELEMENT)
-        {
-            return AXIS2_FAILURE;
-        }
-        sender = axis2_rest_sender_create(env);
-        AXIS2_REST_SENDER_SET_CHUNKED(sender, env,
-                AXIS2_INTF_TO_IMPL(transport_sender)->chunked);
-        AXIS2_REST_SENDER_SET_OM_OUTPUT(sender, env, om_output);
-        AXIS2_REST_SENDER_SET_HTTP_VERSION(sender, env,
-                AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
-        status = AXIS2_REST_SENDER_SEND(sender, env, msg_ctx, data_out, url);
+	sender = axis2_http_sender_create(env);
 
-        AXIS2_REST_SENDER_FREE(sender, env);
-    }
-    else
-    {
-        sender = axis2_soap_over_http_sender_create(env);
+	if (NULL == sender)
+	{
+		return AXIS2_FAILURE;
+	}
 
-        if (NULL == sender)
-        {
-            return AXIS2_FAILURE;
-        }
-        AXIS2_SOAP_OVER_HTTP_SENDER_SET_CHUNKED(sender, env,
-                AXIS2_INTF_TO_IMPL(transport_sender)->chunked);
-        AXIS2_SOAP_OVER_HTTP_SENDER_SET_OM_OUTPUT(sender, env, om_output);
-        AXIOM_SOAP_OVER_SENDER_SET_HTTP_VERSION(sender, env,
-                AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
-        status = AXIS2_SOAP_OVER_HTTP_SENDER_SEND(sender, env, msg_ctx, out, url
-                , soap_action);
 
         /* Get the client used to send.  We will own this, and free it after
          * having read the response */
-        client = AXIS2_SOAP_OVER_HTTP_SENDER_GET_CLIENT(sender, env);
+/*         client = AXIS2_SOAP_OVER_HTTP_SENDER_GET_CLIENT(sender, env); */
 
 		/*
          * TODO check for errors
          */
-        AXIS2_SOAP_OVER_HTTP_SENDER_FREE(sender, env);
-        sender = NULL;
-    }
+/*         AXIS2_SOAP_OVER_HTTP_SENDER_FREE(sender, env); */
+/*         sender = NULL; */
+/*     } */
+	AXIS2_HTTP_SENDER_SET_CHUNKED(sender, env,
+								  AXIS2_INTF_TO_IMPL(transport_sender)->chunked);
+	AXIS2_HTTP_SENDER_SET_OM_OUTPUT(sender, env, om_output);
+	AXIOM_SENDER_SET_HTTP_VERSION(sender, env,
+								  AXIS2_INTF_TO_IMPL(transport_sender)->http_version);
+	status = AXIS2_HTTP_SENDER_SEND(sender, env, msg_ctx, out, url, soap_action);
+
+	/*
+	 * TODO check for errors
+	 */
+	AXIS2_HTTP_SENDER_FREE(sender, env);
+	sender = NULL;
 
     op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env);
     if (op)
@@ -651,13 +618,12 @@
     			AXIS2_MSG_CTX_SET_RESPONSE_SOAP_ENVELOPE (msg_ctx, env, response_envelope);
 		}
     }
-
     /* Free the client */
-    if (client)
-    {
-        AXIS2_HTTP_CLIENT_FREE(client, env);
-        client = NULL;
-    }
+/*     if (client) */
+/*     { */
+/*         AXIS2_HTTP_CLIENT_FREE(client, env); */
+/*         client = NULL; */
+/*     } */
 
     return status;
 }

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c?view=diff&rev=513194&r1=513193&r2=513194
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c Wed Feb 28
22:49:55 2007
@@ -116,12 +116,6 @@
     const axis2_env_t *env,
     axis2_msg_ctx_t *msg_ctx);
 
-static axis2_char_t *AXIS2_CALL
-axis2_url_encode (
-	const axis2_env_t *env,
-	axis2_char_t *dest,
-	axis2_char_t *src,
-	int strlen);
 
 axis2_status_t AXIS2_CALL
 axis2_rest_sender_configure_server_cert(
@@ -129,8 +123,6 @@
     const axis2_env_t *env,
     axis2_msg_ctx_t *msg_ctx);
 
-static int AXIS2_CALL
-is_safe_or_unreserve (char c);
 
 /***************************** End of function headers ************************/
 
@@ -669,149 +661,6 @@
     return AXIS2_SUCCESS;
 }
 
-axis2_char_t *AXIS2_CALL
-axis2_rest_sender_get_param_string(
-    axis2_rest_sender_t *sender,
-    const axis2_env_t *env,
-    axis2_msg_ctx_t *msg_ctx)
-{
-    axiom_soap_envelope_t *soap_env = NULL;
-    axiom_node_t *body_node = NULL;
-    axiom_node_t *data_node = NULL;
-    axiom_element_t *data_element = NULL;
-    axiom_child_element_iterator_t *iterator = NULL;
-    axis2_array_list_t *param_list = NULL;
-    axis2_char_t *param_string = NULL;
-    int i = 0;
-
-    AXIS2_ENV_CHECK(env, NULL);
-    AXIS2_PARAM_CHECK(env->error, msg_ctx, NULL);
-
-    soap_env = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
-    if (NULL == soap_env)
-    {
-        return NULL;
-    }
-    body_node = AXIOM_SOAP_BODY_GET_BASE_NODE(
-                AXIOM_SOAP_ENVELOPE_GET_BODY(soap_env, env), env);
-    data_node = AXIOM_NODE_GET_FIRST_CHILD(body_node, env);
-    if (NULL == data_node)
-    {
-        return NULL;
-    }
-    param_list = axis2_array_list_create(env, AXIS2_ARRAY_LIST_DEFAULT_CAPACITY);
-    data_element = AXIOM_NODE_GET_DATA_ELEMENT(data_node, env);
-    iterator = AXIOM_ELEMENT_GET_CHILD_ELEMENTS(data_element, env, data_node);
-    while (AXIS2_TRUE == AXIOM_CHILD_ELEMENT_ITERATOR_HAS_NEXT(iterator, env))
-    {
-        axiom_node_t *node = NULL;
-        axiom_element_t *element = NULL;
-        axis2_char_t *name = NULL;
-        axis2_char_t *value = NULL;
-		axis2_char_t *encoded_value = NULL;
- 
-        node = AXIOM_CHILD_ELEMENT_ITERATOR_NEXT(iterator, env);
-        element = AXIOM_NODE_GET_DATA_ELEMENT(node, env);
-        name = AXIOM_ELEMENT_GET_LOCALNAME(element, env);
-        value = AXIOM_ELEMENT_GET_TEXT(element, env, node);
-
-		encoded_value = (axis2_char_t *) AXIS2_MALLOC (env->allocator, strlen (value));
-		memset (encoded_value, 0, strlen (value));
-		encoded_value = axis2_url_encode (env, encoded_value, value, strlen (value));
-
-        AXIS2_ARRAY_LIST_ADD(param_list, env, axis2_strcat(env, name, "=",
-                encoded_value, NULL));
-    }
-    for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(param_list, env); i++)
-    {
-        axis2_char_t *tmp_string = NULL;
-        axis2_char_t *pair = NULL;
-
-        pair = AXIS2_ARRAY_LIST_GET(param_list, env, i);
-		if(i ==0)
-			tmp_string = AXIS2_STRACAT(param_string, pair, env);
-		else
-		tmp_string = axis2_strcat(env, param_string, "&", pair, NULL);				
-
-        if (param_string)
-        {
-            AXIS2_FREE(env->allocator, param_string);
-            param_string = NULL;
-        }
-        AXIS2_FREE(env->allocator, pair);
-        param_string = tmp_string;
-    }
-    AXIS2_ARRAY_LIST_FREE(param_list, env);
-    return param_string;
-}
-
-static axis2_char_t *AXIS2_CALL
-axis2_url_encode (
-	const axis2_env_t *env, 
-	axis2_char_t *dest, 
-	axis2_char_t *buff, 
-	int len)
-{
-	axis2_char_t string[4];
-	axis2_char_t *expand_buffer;
-    int i;
-    for (i = 0; i < len  && buff[i]; i++)
-    {
-        if (isalnum (buff[i]) || is_safe_or_unreserve (buff[i]))
-        {
-            sprintf (string,"%c", buff[i]);
-        }
-        else
-        {
-            sprintf (string, "%%%x", buff[i]);
-        }
-
-		if ((strlen (dest) + 4) > len)
-		{
-			expand_buffer = (axis2_char_t *) AXIS2_MALLOC (env->allocator, len*2);
-			memset (expand_buffer, 0, len*2);
-			len *= 2;
-			dest = memmove (expand_buffer, dest, len);
-		}
-		strcat (dest, string);
-    }
-    return dest;
-}
-
-static int AXIS2_CALL
-is_safe_or_unreserve (
-	char c)
-{
-    char safe [] = {'$' , '-' , '_' , '.' , '+'};
-    char reserve [] = {';', '/', '?' ,':', '@',  '&', '='};
-
-/* reserved       = ";" | "/" | "?" | ":" | "@" | "&" | "="
-   safe           = "$" | "-" | "_" | "." | "+" */
-
-    int flag = 0;
-    int i = 0;
-
-    int size = sizeof (safe)/sizeof (safe[0]);
-    for (i = 0; i < size; i++)
-    {
-        if (c == safe[i])
-        {
-            flag = 1;
-            return flag;
-        }
-    }
-
-    size = sizeof (reserve)/sizeof (reserve[0]);
-    for (i = 0; i < size; i++)
-    {
-        if (c == reserve[i])
-        {
-            flag = 0;
-            return flag;
-        }
-    }
-    return flag;
-}
 
 axis2_status_t AXIS2_CALL
 axis2_rest_sender_configure_server_cert(

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c?view=diff&rev=513194&r1=513193&r2=513194
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c Wed
Feb 28 22:49:55 2007
@@ -225,8 +225,7 @@
     const axis2_char_t *char_set_enc = NULL;
     axis2_string_t *char_set_enc_str = NULL;
     int status_code = -1;
-    axis2_http_header_t *http_header = NULL;
-    axis2_http_simple_response_t *response = NULL;
+	axis2_http_simple_response_t *response = NULL;
     axis2_char_t *content_type = NULL;
     axis2_byte_t *output_stream = NULL;
     int output_stream_size = 0;
@@ -343,9 +342,7 @@
     request = axis2_http_simple_request_create(env, request_line, NULL, 0,
             NULL);
 
-    http_header = axis2_http_header_create(env, AXIS2_HTTP_HEADER_USER_AGENT,
-            "Axis2/C");
-    AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+	axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_USER_AGENT, "Axis2/C");
     if (AXIS2_TRUE == AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env))
     {
         if ('\"' != *soap_action)
@@ -354,16 +351,13 @@
             tmp_soap_action = AXIS2_MALLOC(env->allocator, (
                         AXIS2_STRLEN(soap_action) + 5) * sizeof(axis2_char_t));
             sprintf(tmp_soap_action, "\"%s\"", soap_action);
-            http_header = axis2_http_header_create(env,
-                    AXIS2_HTTP_HEADER_SOAP_ACTION, tmp_soap_action);
+			axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_SOAP_ACTION, tmp_soap_action);
             AXIS2_FREE(env->allocator, tmp_soap_action);
         }
         else
         {
-            http_header = axis2_http_header_create(env,
-                    AXIS2_HTTP_HEADER_SOAP_ACTION, soap_action);
+			axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_SOAP_ACTION, soap_action);
         }
-        AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
     }
 
     buffer_size = AXIOM_XML_WRITER_GET_XML_SIZE(xml_writer, env);
@@ -376,16 +370,13 @@
         }
 
         sprintf(tmp_buf, "%d", buffer_size);
-        http_header = axis2_http_header_create(env,
-                AXIS2_HTTP_HEADER_CONTENT_LENGTH, tmp_buf);
-        AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+		axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_CONTENT_LENGTH, tmp_buf);
     }
     else
     {
-        http_header = axis2_http_header_create(env,
-                AXIS2_HTTP_HEADER_TRANSFER_ENCODING,
-                AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED);
-        AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+		axis2_http_sender_util_add_header (env, request, 
+										   AXIS2_HTTP_HEADER_TRANSFER_ENCODING, 
+										   AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED);
     }
     
     if (doing_mtom)
@@ -438,15 +429,13 @@
         content_type = temp_content_type;
     }
 
-    http_header = axis2_http_header_create(env, AXIS2_HTTP_HEADER_CONTENT_TYPE,
-            content_type);
+	axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_CONTENT_TYPE, content_type);
     if (content_type)
     {
         AXIS2_FREE(env->allocator, content_type);
         content_type = NULL;
     }
 
-    AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
 
     if (0 == AXIS2_STRCMP(sender_impl->http_version,
             AXIS2_HTTP_HEADER_PROTOCOL_11))
@@ -457,12 +446,9 @@
                     axis2_char_t));
         sprintf(header, "%s:%d", AXIS2_URL_GET_SERVER(url, env),
                 AXIS2_URL_GET_PORT(url, env));
-        http_header = axis2_http_header_create(env,
-                AXIS2_HTTP_HEADER_HOST,
-                header);
+		axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_HOST, header);
         AXIS2_FREE(env->allocator, header);
         header = NULL;
-        AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
     }
 
     if (doing_mtom)

Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c?view=diff&rev=513194&r1=513193&r2=513194
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c
(original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c
Wed Feb 28 22:49:55 2007
@@ -379,3 +379,10 @@
     return buffer;
 }
 
+
+
+
+
+
+
+



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


Mime
View raw message