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 na...@apache.org on 2007/03/07 05:47:14 UTC

svn commit: r515451 - in /webservices/axis2/trunk/c/modules/core/transport/http/sender: axis2_http_sender_util.h http_sender.c libcurl/axis2_libcurl.c

Author: nandika
Date: Tue Mar  6 20:47:13 2007
New Revision: 515451

URL: http://svn.apache.org/viewvc?view=rev&rev=515451
Log:
axis2c libcurl module compilation problems fixed for win32

Added:
    webservices/axis2/trunk/c/modules/core/transport/http/sender/axis2_http_sender_util.h
Modified:
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c

Added: webservices/axis2/trunk/c/modules/core/transport/http/sender/axis2_http_sender_util.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/axis2_http_sender_util.h?view=auto&rev=515451
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/axis2_http_sender_util.h (added)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/axis2_http_sender_util.h Tue Mar  6 20:47:13 2007
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_HTTP_SENDER_UTIL_H
+#define AXIS2_HTTP_SENDER_UTIL_H
+
+#include <axis2_soap_over_http_sender.h>
+#include <axis2_string.h>
+#include <axis2_http_transport.h>
+#include <string.h>
+#include <axiom_output.h>
+#include <axis2_op_ctx.h>
+#include <axis2_ctx.h>
+#include <axis2_conf_ctx.h>
+#include <axis2_http_client.h>
+#include <axiom_xml_writer.h>
+#include <axis2_property.h>
+#include <axis2_param.h>
+#include <axis2_types.h>
+#include <axis2_generic_obj.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+void
+axis2_http_sender_util_add_header (
+	const axis2_env_t *env,
+	axis2_http_simple_request_t *request,
+	axis2_char_t *header_name,
+	axis2_char_t *header_value);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* AXIS2_HTTP_SENDER_UTIL_H */

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c?view=diff&rev=515451&r1=515450&r2=515451
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_sender.c Tue Mar  6 20:47:13 2007
@@ -34,9 +34,10 @@
 #include <axis2_const.h>
 #include <axis2_util.h>
 #include <axiom_soap.h>
+#include "axis2_http_sender_util.h"
 
 #ifdef AXIS2_LIBCURL_ENABLED
-#include <libcurl/axis2_libcurl.h>
+#include "libcurl/axis2_libcurl.h"
 #endif
 /**
  * @brief SOAP over HTTP sender struct impl
@@ -79,11 +80,7 @@
     const axis2_env_t *env,
     axis2_msg_ctx_t *msg_ctx);
 
-axis2_char_t *AXIS2_CALL
-axis2_http_sender_get_param_string(
-    const axis2_env_t *env,
-    axis2_http_sender_t *sender,
-    axis2_msg_ctx_t *msg_ctx);
+
 
 static axis2_char_t *AXIS2_CALL
 axis2_url_encode (
@@ -426,7 +423,7 @@
 		axis2_char_t *request_params = NULL;
         axis2_char_t *path = NULL;
 
-        request_params = axis2_http_sender_get_param_string(env, sender, msg_ctx);
+        request_params = axis2_http_sender_get_param_string( sender, env, msg_ctx);
         path = axis2_strcat(env, AXIS2_URL_GET_PATH(url, env), "?",
 							request_params, NULL);
         request_line = axis2_http_request_line_create(env, "GET", path,
@@ -1109,8 +1106,8 @@
 
 axis2_char_t *AXIS2_CALL
 axis2_http_sender_get_param_string(
-    const axis2_env_t *env,
     axis2_http_sender_t *sender,
+    const axis2_env_t *env,
     axis2_msg_ctx_t *msg_ctx)
 {
     axiom_soap_envelope_t *soap_env = NULL;

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c?view=diff&rev=515451&r1=515450&r2=515451
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c Tue Mar  6 20:47:13 2007
@@ -1,4 +1,4 @@
-#include <axis2_libcurl.h>
+#include "axis2_libcurl.h"
 #include <axiom_soap.h>
 #include <axis2_string.h>
 #include <axis2_http_transport.h>
@@ -15,8 +15,9 @@
 #include <axis2_const.h>
 #include <axis2_util.h>
 #include <stdlib.h>
+#include <axis2_http_sender.h>
 #include <axis2_http_transport.h>
-#include <libcurl_stream.h>
+#include "libcurl_stream.h"
 
 typedef struct axis2_libcurl
 {
@@ -256,11 +257,12 @@
 		}
 		else
 			buffer_size = output_stream_size;
-
-		char tmp_buf[10];
-		sprintf (tmp_buf, "%d", buffer_size);
-		headers = curl_slist_append (headers, AXIS2_STRACAT (content_len, tmp_buf, env));
-		headers = curl_slist_append (headers, AXIS2_STRACAT (content,content_type, env));
+		{
+			char tmp_buf[10];
+			sprintf (tmp_buf, "%d", buffer_size);
+			headers = curl_slist_append (headers, AXIS2_STRACAT (content_len, tmp_buf, env));
+			headers = curl_slist_append (headers, AXIS2_STRACAT (content,content_type, env));
+		}
 		if (!doing_mtom)
 		{
 			curl_easy_setopt (handler, CURLOPT_POSTFIELDSIZE, buffer_size);
@@ -277,7 +279,7 @@
 	{
 		axis2_char_t *request_param;
 		axis2_char_t *url_encode;
-		request_param = (axis2_char_t *) axis2_http_sender_get_param_string(env, NULL, msg_ctx);
+		request_param = (axis2_char_t *) axis2_http_sender_get_param_string( NULL, env, msg_ctx);
 		url_encode = axis2_strcat(env, str_url, "?",
 								  request_param, NULL);
 		curl_easy_setopt (handler, CURLOPT_HTTPGET, 1);



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