axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From din...@apache.org
Subject svn commit: r509138 - in /webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender: http_sender.c libcurl/ libcurl/Makefile libcurl/Makefile.am libcurl/Makefile.in libcurl/axis2_libcurl.c libcurl/axis2_libcurl.h sender_util.c
Date Mon, 19 Feb 2007 09:17:51 GMT
Author: dinesh
Date: Mon Feb 19 01:17:50 2007
New Revision: 509138

URL: http://svn.apache.org/viewvc?view=rev&rev=509138
Log:
axis2c-523:transport sender refactoring

Added:
    webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/http_sender.c
    webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/
    webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile
    webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile.am
    webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile.in
    webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c
    webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.h
    webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/sender_util.c

Added: webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/http_sender.c?view=auto&rev=509138
==============================================================================
--- webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/http_sender.c (added)
+++ webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/http_sender.c Mon Feb 19 01:17:50 2007
@@ -0,0 +1,1080 @@
+/*
+ * 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.
+ */
+
+#include <axis2_http_sender.h>
+#include <axis2_soap_over_http_sender.h>
+#include <axis2_rest_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>
+#include <axis2_const.h>
+#include <axis2_util.h>
+#include <axiom_soap.h>
+
+#ifndef AXIS2_LIBCURL_ENABLED
+#include <libcurl/axis2_libcurl.h>
+#endif
+/**
+ * @brief SOAP over HTTP sender struct impl
+ *   Axis2 SOAP over HTTP sender impl
+ */
+
+typedef struct axis2_http_sender_impl
+{
+	axis2_http_sender_t sender;
+    axis2_char_t *http_version;
+    axis2_bool_t chunked;
+    int so_timeout;
+    int connection_timeout;
+    axiom_output_t *om_output;
+    axis2_http_client_t *client;
+	axis2_bool_t is_soap;
+}axis2_http_sender_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(sender)\
+	((axis2_http_sender_impl_t *)(sender))
+
+/***************************** Function headers *******************************/
+axis2_status_t AXIS2_CALL
+axis2_http_sender_get_header_info(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_http_simple_response_t *response);
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_process_response(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_http_simple_response_t *response);
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_get_timeout_values(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx);
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_send(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+	axiom_soap_envelope_t *out,
+    const axis2_char_t *str_url,
+    const axis2_char_t *soap_action);
+
+#ifdef AXIS2_LIBCURL_ENABLED
+axis2_status_t AXIS2_CALL
+axis2_libcurl_http_send(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+	axiom_soap_envelope_t *out,
+    const axis2_char_t *str_url,
+    const axis2_char_t *soap_action);
+
+#endif
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_set_chunked(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_bool_t chunked);
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_set_om_output(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axiom_output_t *om_output);
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_set_http_version(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_char_t *version);
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_configure_proxy(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx);
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_configure_server_cert(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx);
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_configure_key_file(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx);
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_free(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env);
+
+/***************************** End of function headers ************************/
+
+axis2_http_sender_t *AXIS2_CALL
+axis2_http_sender_create(
+    const axis2_env_t *env)
+{
+    axis2_http_sender_impl_t *sender_impl = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+
+    sender_impl = (axis2_http_sender_impl_t *)AXIS2_MALLOC
+		(env->allocator, sizeof(
+			axis2_http_sender_impl_t));
+
+    if (NULL == sender_impl)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    sender_impl->http_version = (axis2_char_t *)AXIS2_HTTP_HEADER_PROTOCOL_11;
+    sender_impl->so_timeout = AXIS2_HTTP_DEFAULT_SO_TIMEOUT;
+    sender_impl->connection_timeout = AXIS2_HTTP_DEFAULT_CONNECTION_TIMEOUT;
+    /* unlike the java impl we don't have a default om output
+     * it should be explicitly set and it's a MUST
+     */
+    sender_impl->om_output = NULL;
+    sender_impl->chunked = AXIS2_FALSE;
+    sender_impl->client = NULL;
+    sender_impl->sender.ops = AXIS2_MALLOC(env->allocator,
+										   sizeof(axis2_http_sender_ops_t));
+    if (NULL == sender_impl->sender.ops)
+    {
+        axis2_http_sender_free((axis2_http_sender_t *)
+							   sender_impl, env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    sender_impl->sender.ops->send =
+        axis2_http_sender_send;
+    sender_impl->sender.ops->set_chunked =
+        axis2_http_sender_set_chunked;
+    sender_impl->sender.ops->set_om_output =
+        axis2_http_sender_set_om_output;
+    sender_impl->sender.ops->set_http_version =
+        axis2_http_sender_set_http_version;
+    sender_impl->sender.ops->free =
+        axis2_http_sender_free;
+#ifdef AXIS2_LIBCURL_ENABLED
+	sender_impl->sender.ops->send_curl = axis2_libcurl_http_send;
+#endif
+    return &(sender_impl->sender);
+}
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_free(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env)
+{
+    axis2_http_sender_impl_t *sender_impl = NULL;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    sender_impl = AXIS2_INTF_TO_IMPL(sender);
+    if (sender_impl->http_version)
+    {
+        AXIS2_FREE(env->allocator, sender_impl->http_version);
+        sender_impl->http_version = NULL;
+    }
+    if (sender->ops)
+        AXIS2_FREE(env->allocator, sender->ops);
+
+    /* Do not free this here since it will be required in later processing
+     * of the response soap message
+     */
+    sender_impl->client = NULL;
+    AXIS2_FREE(env->allocator, sender_impl);
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_send(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+	axiom_soap_envelope_t *out,
+    const axis2_char_t *str_url,
+    const axis2_char_t *soap_action)
+{
+    axis2_http_simple_request_t *request = NULL;
+    axis2_http_request_line_t *request_line = NULL;
+    axis2_url_t *url = NULL;
+    axis2_http_sender_impl_t *sender_impl = NULL;
+    axiom_xml_writer_t *xml_writer = NULL;
+    axis2_char_t *buffer = NULL;
+    unsigned int buffer_size = 0;
+    const axis2_char_t *char_set_enc = NULL;
+    axis2_string_t *char_set_enc_str = NULL;
+    int status_code = -1;
+	axis2_http_simple_response_t *response = NULL;
+    axis2_char_t *content_type = NULL;
+    axis2_byte_t *output_stream = NULL;
+    int output_stream_size = 0;
+    axis2_bool_t doing_mtom = AXIS2_FALSE;
+    axis2_property_t *dump_property = NULL;
+    axis2_param_t *ssl_pp_param = NULL; /* ssl passphrase */
+    axis2_char_t *ssl_pp = NULL;
+	axis2_property_t *content_type_property = NULL;
+	axis2_hash_t *content_type_hash = NULL;
+	axis2_char_t *content_type_value = NULL;
+	axis2_property_t *method = NULL;
+	axis2_char_t *method_value = NULL;
+	axis2_bool_t send_via_get = AXIS2_FALSE;
+	axiom_node_t *data_out = NULL;
+	axiom_node_t *body_node = NULL;
+	axiom_soap_body_t *soap_body = NULL;
+	axis2_bool_t is_soap = AXIS2_TRUE;
+	soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(out, env);
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, out, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, str_url, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, soap_action, AXIS2_FAILURE);
+
+    if (AXIS2_TRUE == AXIS2_MSG_CTX_GET_DOING_REST(msg_ctx, env))
+		is_soap = AXIS2_FALSE;
+	else
+		is_soap = AXIS2_TRUE;
+
+    url = axis2_url_parse_string(env, str_url);
+    sender_impl = AXIS2_INTF_TO_IMPL(sender);
+
+	if (!is_soap)
+	{
+        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);
+
+		method = (axis2_property_t *)AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
+																AXIS2_HTTP_METHOD, AXIS2_FALSE);
+		if (method)
+			method_value = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE (method, env);
+
+		/* The default is POST */
+		if (method_value && 0 == AXIS2_STRCMP(method_value, AXIS2_HTTP_HEADER_GET))
+		{
+			send_via_get = AXIS2_TRUE;
+		}
+	}
+
+    if (NULL == url)
+    {
+        return AXIS2_FAILURE;
+    }
+
+    if (sender_impl->client)
+    {
+        AXIS2_HTTP_CLIENT_FREE(sender_impl->client, env);
+        sender_impl->client = NULL;
+    }
+
+    sender_impl->client = axis2_http_client_create(env, url);
+    if (NULL == sender_impl->client)
+    {
+        return AXIS2_FAILURE;
+    }
+	
+	/* configure proxy settings if we have set so
+	 */
+	
+	axis2_http_sender_configure_proxy(sender, env, msg_ctx);
+
+	if (!send_via_get)
+	{
+
+		/* We put the client into msg_ctx so that we can free it once the processing
+		 * is done at client side
+		 */
+		/*property = axis2_property_create(env);
+		  AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+		  AXIS2_PROPERTY_SET_FREE_FUNC(property, env,
+		  axis2_http_client_free_void_arg);
+		  AXIS2_PROPERTY_SET_VALUE(property, env, sender_impl->client);
+		  AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_HTTP_CLIENT,
+		  property, AXIS2_FALSE);*/
+
+		doing_mtom = AXIS2_MSG_CTX_GET_DOING_MTOM(msg_ctx, env);
+
+		if (NULL == sender_impl->om_output)
+		{
+			AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_OM_OUTPUT,
+							AXIS2_FAILURE);
+			return AXIS2_FAILURE;
+		}
+		xml_writer = AXIOM_OUTPUT_GET_XML_WRITER(sender_impl->om_output, env);
+    
+		char_set_enc_str = axis2_msg_ctx_get_charset_encoding(msg_ctx, env);
+		if (!char_set_enc_str)
+		{
+			char_set_enc = AXIS2_DEFAULT_CHAR_SET_ENCODING;
+		}
+		else
+		{
+			char_set_enc = axis2_string_get_buffer(char_set_enc_str, env);
+		}
+
+		if (is_soap)
+		{
+			dump_property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
+													   AXIS2_DUMP_INPUT_MSG_TRUE, AXIS2_FALSE);
+			if(dump_property)
+			{
+				axis2_char_t *dump_true = AXIS2_PROPERTY_GET_VALUE(dump_property, env);
+				if(0 == AXIS2_STRCMP(dump_true, AXIS2_VALUE_TRUE))
+				{
+					AXIS2_HTTP_CLIENT_SET_DUMP_INPUT_MSG(sender_impl->client, env, AXIS2_TRUE);
+				}
+			}
+
+			AXIOM_OUTPUT_SET_DO_OPTIMIZE(sender_impl->om_output, env,
+										 doing_mtom); 
+			AXIOM_SOAP_ENVELOPE_SERIALIZE(out, env, sender_impl->om_output,
+										  AXIS2_FALSE);
+		}
+		else
+		{
+			AXIOM_NODE_SERIALIZE(data_out, env, sender_impl->om_output);
+		}
+
+
+		if (doing_mtom)
+		{
+			AXIOM_OUTPUT_FLUSH(sender_impl->om_output, env, &output_stream,
+							   &output_stream_size);
+		}
+		else
+		{
+			buffer = AXIOM_XML_WRITER_GET_XML(xml_writer, env);
+		}
+
+		if (NULL == buffer && !doing_mtom)
+		{
+			AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "NULL xml returned"
+							"from xml writer");
+			return AXIS2_FAILURE;
+		}
+
+		request_line = axis2_http_request_line_create(env, "POST",
+													  AXIS2_URL_GET_PATH(url, env),
+													  sender_impl->http_version);
+	}
+	else
+	{
+		axis2_char_t *request_params = NULL;
+        axis2_char_t *path = NULL;
+
+        request_params = axis2_rest_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,
+													  sender_impl->http_version);
+	}
+
+    request = axis2_http_simple_request_create(env, request_line, NULL, 0,
+											   NULL);
+
+	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)
+        {
+            axis2_char_t *tmp_soap_action = NULL;
+            tmp_soap_action = AXIS2_MALLOC(env->allocator, (
+											   AXIS2_STRLEN(soap_action) + 5) * sizeof(axis2_char_t));
+            sprintf(tmp_soap_action, "\"%s\"", 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
+        {
+			axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_SOAP_ACTION, soap_action);
+        }
+    }
+
+	if (!send_via_get)
+		buffer_size = AXIOM_XML_WRITER_GET_XML_SIZE(xml_writer, env);
+
+    if (AXIS2_FALSE == sender_impl->chunked)
+    {
+        axis2_char_t tmp_buf[10];
+        if (!buffer)
+        {
+            buffer_size = output_stream_size;
+        }
+
+        sprintf(tmp_buf, "%d", buffer_size);
+		axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_CONTENT_LENGTH, tmp_buf);
+    }
+    else
+    {
+		axis2_http_sender_util_add_header (env, request, 
+										   AXIS2_HTTP_HEADER_TRANSFER_ENCODING, 
+										   AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED);
+    }
+    
+	if (is_soap)
+	{
+		if (doing_mtom)
+		{
+			content_type = (axis2_char_t *)AXIOM_OUTPUT_GET_CONTENT_TYPE(sender_impl->om_output,
+																		 env);
+			if (AXIS2_TRUE != AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env))
+			{
+				/* handle SOAP action for SOAP 1.2 case */
+				if (axis2_strcmp(soap_action, ""))
+				{
+					axis2_char_t *temp_content_type = NULL;
+					temp_content_type = AXIS2_STRACAT(content_type, ";action=", env);
+					AXIS2_FREE(env->allocator, content_type);
+					content_type = temp_content_type;
+					temp_content_type = AXIS2_STRACAT(content_type, soap_action, env);
+					AXIS2_FREE(env->allocator, content_type);
+					content_type = temp_content_type;
+				}
+			}
+		}
+		else if (AXIS2_TRUE == AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env))
+		{
+			axis2_char_t *temp_content_type = NULL;
+			content_type = (axis2_char_t *)AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML;
+			content_type = AXIS2_STRACAT(content_type, ";charset=", env);
+			temp_content_type = AXIS2_STRACAT(content_type, char_set_enc, env);
+			AXIS2_FREE(env->allocator, content_type);
+			content_type = temp_content_type;
+		}
+		else
+		{
+			axis2_char_t *temp_content_type = NULL;
+			content_type = (axis2_char_t *)AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP;
+			content_type = AXIS2_STRACAT(content_type, ";charset=", env);
+			temp_content_type = AXIS2_STRACAT(content_type, char_set_enc, env);
+			AXIS2_FREE(env->allocator, content_type);
+			content_type = temp_content_type;
+			if (axis2_strcmp(soap_action, ""))
+			{
+				temp_content_type = AXIS2_STRACAT(content_type, ";action=", env);
+				AXIS2_FREE(env->allocator, content_type);
+				content_type = temp_content_type;
+				temp_content_type = AXIS2_STRACAT(content_type, soap_action, env);
+				AXIS2_FREE(env->allocator, content_type);
+				content_type = temp_content_type;
+			}
+			temp_content_type = AXIS2_STRACAT(content_type, ";", env);
+			AXIS2_FREE(env->allocator, content_type);
+			content_type = temp_content_type;
+		}
+	}
+	else
+	{
+		content_type_property  = (axis2_property_t *)AXIS2_MSG_CTX_GET_PROPERTY(
+			msg_ctx, env,
+			AXIS2_USER_DEFINED_HTTP_HEADER_CONTENT_TYPE, 
+			AXIS2_FALSE);
+		
+		if (content_type_property)
+		{
+			content_type_hash = (axis2_hash_t *) AXIS2_PROPERTY_GET_VALUE (content_type_property, env);
+			if (content_type_hash)
+				content_type_value = (char *) axis2_hash_get (content_type_hash, 
+															  AXIS2_HTTP_HEADER_CONTENT_TYPE, 
+															  AXIS2_HASH_KEY_STRING);
+		}
+		if (content_type_value)
+			content_type = content_type_value;
+		else
+			content_type = AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML;
+	}
+	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;
+    }
+
+
+    if (0 == AXIS2_STRCMP(sender_impl->http_version,
+						  AXIS2_HTTP_HEADER_PROTOCOL_11))
+    {
+        axis2_char_t *header = NULL;
+        header = AXIS2_MALLOC(env->allocator, AXIS2_STRLEN(
+								  AXIS2_URL_GET_SERVER(url, env)) + 10 * sizeof(
+									  axis2_char_t));
+        sprintf(header, "%s:%d", AXIS2_URL_GET_SERVER(url, env),
+                AXIS2_URL_GET_PORT(url, env));
+		axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_HOST, header);
+        AXIS2_FREE(env->allocator, header);
+        header = NULL;
+    }
+
+    if (doing_mtom)
+    {
+        axis2_stream_t *stream = AXIS2_HTTP_SIMPLE_REQUEST_GET_BODY(request, env);
+        if (stream)
+        {
+            AXIS2_STREAM_WRITE(stream, env, output_stream, output_stream_size);
+        }
+    }
+    else
+    {
+        AXIS2_HTTP_SIMPLE_REQUEST_SET_BODY_STRING(request, env, buffer, buffer_size);
+    }
+
+	axis2_http_sender_configure_server_cert(sender, env, msg_ctx);
+	
+    axis2_http_sender_configure_key_file(sender, env, msg_ctx);
+
+    axis2_http_sender_get_timeout_values(sender, env, msg_ctx);
+    AXIS2_HTTP_CLIENT_SET_TIMEOUT(sender_impl->client, env,
+								  sender_impl->so_timeout);
+    
+    /* TODO: Load from property
+     * ssl_pp_property = AXIS2_MSG_CTX_GET_PROPERTY(AXIS2_SSL_PASSPHRASE);*/
+
+    ssl_pp_param = AXIS2_MSG_CTX_GET_PARAMETER(msg_ctx, env, AXIS2_SSL_PASSPHRASE);
+
+    if (ssl_pp_param)
+    {
+        ssl_pp = AXIS2_PARAM_GET_VALUE(ssl_pp_param, env);
+    }
+
+    status_code = AXIS2_HTTP_CLIENT_SEND(sender_impl->client, env, request, ssl_pp);
+
+
+    /*AXIS2_FREE(env->allocator, buffer);
+	  buffer = NULL;*/
+
+    AXIS2_HTTP_SIMPLE_REQUEST_FREE(request, env);
+    request = NULL;
+    
+    AXIS2_FREE(env->allocator, output_stream);
+    output_stream = NULL;
+
+    status_code = AXIS2_HTTP_CLIENT_RECIEVE_HEADER(sender_impl->client, env);
+
+    if (status_code < 0)
+    {
+        return AXIS2_FAILURE;
+    }
+    response = AXIS2_HTTP_CLIENT_GET_RESPONSE(sender_impl->client, env);
+    if (AXIS2_HTTP_RESPONSE_OK_CODE_VAL == status_code ||
+		AXIS2_HTTP_RESPONSE_ACK_CODE_VAL == status_code)
+    {
+        return axis2_http_sender_process_response(sender, env,
+												  msg_ctx, response);
+    }
+    else if (AXIS2_HTTP_RESPONSE_INTERNAL_SERVER_ERROR_CODE_VAL == status_code)
+    {
+        axis2_http_header_t *tmp_header = NULL;
+        axis2_char_t *tmp_header_val = NULL;
+        axis2_op_t *op = NULL;
+
+        op = AXIS2_MSG_CTX_GET_OP(msg_ctx, env);
+        if (op)
+        {
+            const axis2_char_t *mep = AXIS2_OP_GET_MSG_EXCHANGE_PATTERN(op, env);
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_HTTP_CLIENT_TRANSPORT_ERROR,
+							AXIS2_FAILURE);
+            /* handle one way case */
+            
+            if (AXIS2_STRCMP(mep, AXIS2_MEP_URI_OUT_ONLY) == 0 ||
+                AXIS2_STRCMP(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0)
+            {
+                return AXIS2_FAILURE;
+            }
+        }
+            
+        /* set an error to indicate error code status */
+        tmp_header = AXIS2_HTTP_SIMPLE_RESPONSE_GET_FIRST_HEADER(response, env,
+																 AXIS2_HTTP_HEADER_CONTENT_TYPE);
+        if (tmp_header)
+        {
+            tmp_header_val = AXIS2_HTTP_HEADER_GET_VALUE(tmp_header, env);
+        }
+        
+        
+        if (tmp_header_val && (AXIS2_STRSTR(tmp_header_val,
+											AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP) || AXIS2_STRSTR(
+												tmp_header_val, AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML)))
+        {
+            return axis2_http_sender_process_response(sender, env,
+													  msg_ctx, response);
+        }
+    }
+    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_HTTP_CLIENT_TRANSPORT_ERROR,
+					AXIS2_FAILURE);
+    return AXIS2_FAILURE;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_set_chunked(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_bool_t chunked)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(sender)->chunked = chunked;
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_set_om_output(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axiom_output_t *om_output)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(sender)->om_output = om_output;
+    return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_get_header_info(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_http_simple_response_t *response)
+{
+    axis2_array_list_t *headers = NULL;
+    axis2_char_t *charset = NULL;
+    axis2_http_sender_impl_t *sender_impl = NULL;
+    int i = 0;
+    axis2_bool_t response_chunked = AXIS2_FALSE;
+    int *content_length = NULL;
+    axis2_property_t *property = NULL;
+    axis2_char_t *content_type = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, response, AXIS2_FAILURE);
+
+    sender_impl = AXIS2_INTF_TO_IMPL(sender);
+
+    /*
+     * TODO MTOM support (MIME header)
+     */
+    headers = AXIS2_HTTP_SIMPLE_RESPONSE_GET_HEADERS(response, env);
+    if (headers == NULL)
+    {
+        return AXIS2_SUCCESS;
+    }
+    for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(headers, env); i++)
+    {
+        axis2_http_header_t *header = AXIS2_ARRAY_LIST_GET(headers, env, i);
+        axis2_char_t *name = AXIS2_HTTP_HEADER_GET_NAME((axis2_http_header_t *)
+														header, env);
+        if (name)
+        {
+            if (0 == AXIS2_STRCMP(name, AXIS2_HTTP_HEADER_TRANSFER_ENCODING) &&
+				0 == AXIS2_STRCMP(AXIS2_HTTP_HEADER_GET_VALUE(header
+															  , env), AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
+            {
+                axis2_char_t *transfer_encoding = NULL;
+
+                transfer_encoding =
+                    AXIS2_STRDUP(AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED,
+								 env);
+                property = axis2_property_create(env);
+                AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+                AXIS2_PROPERTY_SET_VALUE(property, env, transfer_encoding);
+                AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,
+										   AXIS2_HTTP_HEADER_TRANSFER_ENCODING,
+										   property,
+										   AXIS2_FALSE);
+                response_chunked = AXIS2_TRUE;
+            }
+            if (0 != AXIS2_STRCMP(name, AXIS2_HTTP_HEADER_CONTENT_TYPE))
+            {
+                axis2_char_t *tmp_charset = NULL;
+                axis2_char_t *content_type = AXIS2_HTTP_HEADER_GET_VALUE(header,
+																		 env);
+                tmp_charset = strstr(content_type, AXIS2_HTTP_CHAR_SET_ENCODING);
+                if (charset)
+                {
+                    charset = AXIS2_STRDUP(tmp_charset, env);
+                    break;
+                }
+            }
+        }
+    }
+    content_type = (axis2_char_t *)AXIS2_HTTP_SIMPLE_RESPONSE_GET_CONTENT_TYPE(
+		response, env);
+    if (content_type)
+    {
+        if (strstr(content_type, AXIS2_HTTP_HEADER_ACCEPT_MULTIPART_RELATED)
+			&& strstr(content_type, AXIS2_HTTP_HEADER_XOP_XML))
+        {
+            axis2_ctx_t *axis_ctx = AXIS2_OP_CTX_GET_BASE(
+				AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env), env);
+            property = axis2_property_create(env);
+            AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+            AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(content_type,
+																 env));
+            AXIS2_CTX_SET_PROPERTY(axis_ctx, env, MTOM_RECIVED_CONTENT_TYPE,
+								   property, AXIS2_FALSE);
+        }
+    }
+    if (charset)
+    {
+        axis2_ctx_t *axis_ctx = AXIS2_OP_CTX_GET_BASE(AXIS2_MSG_CTX_GET_OP_CTX(
+														  msg_ctx, env), env);
+        if (axis_ctx)
+        {
+            property = axis2_property_create(env);
+            AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+            AXIS2_PROPERTY_SET_VALUE(property, env, charset);
+            AXIS2_CTX_SET_PROPERTY(axis_ctx, env, AXIS2_CHARACTER_SET_ENCODING,
+								   property, AXIS2_FALSE);
+        }
+    }
+    if (AXIS2_FALSE == response_chunked)
+    {
+        int tmp_len = 0;
+        content_length = AXIS2_MALLOC(env->allocator, sizeof(int));
+        if (NULL == content_length)
+        {
+            return AXIS2_FAILURE;
+        }
+        tmp_len = AXIS2_HTTP_SIMPLE_RESPONSE_GET_CONTENT_LENGTH(response, env);
+        memcpy(content_length, &tmp_len, sizeof(int));
+        property = axis2_property_create(env);
+        AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+        AXIS2_PROPERTY_SET_VALUE(property, env, content_length);
+        AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,
+								   AXIS2_HTTP_HEADER_CONTENT_LENGTH, property,
+								   AXIS2_FALSE);
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_process_response(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+    axis2_http_simple_response_t *response)
+{
+    axis2_stream_t *in_stream = NULL;
+    axis2_property_t *property = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, response, AXIS2_FAILURE);
+
+    in_stream = AXIS2_HTTP_SIMPLE_RESPONSE_GET_BODY(response, env);
+    if (NULL == in_stream)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_STREAM_IN_RESPONSE_BODY,
+						AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
+
+    axis2_http_sender_get_header_info(sender, env, msg_ctx, response);
+    /*axis_ctx = AXIS2_OP_CTX_GET_BASE(AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env),
+	  env);*/
+    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, in_stream);
+    /*AXIS2_CTX_SET_PROPERTY(axis_ctx, env, AXIS2_TRANSPORT_IN, property,
+	  AXIS2_FALSE);*/
+    AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_IN, property,
+							   AXIS2_FALSE);
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_get_timeout_values(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx)
+{
+    axis2_char_t *so_str = NULL;
+    axis2_char_t *connection_str = NULL;
+    axis2_param_t *tmp_param = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+
+    tmp_param = AXIS2_MSG_CTX_GET_PARAMETER(msg_ctx,
+											env, AXIS2_HTTP_SO_TIMEOUT);
+
+    if (tmp_param)
+    {
+        so_str = (axis2_char_t *)AXIS2_PARAM_GET_VALUE(tmp_param, env);
+        if (so_str)
+        {
+            AXIS2_INTF_TO_IMPL(sender)->so_timeout = AXIS2_ATOI(so_str);
+        }
+    }
+    tmp_param = AXIS2_MSG_CTX_GET_PARAMETER(msg_ctx, env,
+											AXIS2_HTTP_CONNECTION_TIMEOUT);
+    if (tmp_param)
+    {
+        connection_str = (axis2_char_t *)AXIS2_PARAM_GET_VALUE(tmp_param, env);
+        if (connection_str)
+        {
+            AXIS2_INTF_TO_IMPL(sender)->connection_timeout =
+                AXIS2_ATOI(connection_str);
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_set_http_version(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_char_t *version)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(sender)->http_version =  AXIS2_STRDUP(version, env);
+    if (NULL == AXIS2_INTF_TO_IMPL(sender)->http_version)
+    {
+        return AXIS2_FAILURE;
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_configure_proxy(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx)
+{
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    axis2_conf_t *conf = NULL;
+    axis2_transport_out_desc_t *trans_desc = NULL;
+    axis2_param_t *proxy_param = NULL;
+    axis2_hash_t *transport_attrs = NULL;
+    axis2_http_sender_impl_t *sender_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+
+    sender_impl = AXIS2_INTF_TO_IMPL(sender);
+    conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, env);
+    if (NULL == conf_ctx)
+    {
+        return AXIS2_FAILURE;
+    }
+    conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
+    if (NULL == conf)
+    {
+        return AXIS2_FAILURE;
+    }
+    
+    trans_desc = AXIS2_CONF_GET_TRANSPORT_OUT(conf, env, AXIS2_TRANSPORT_ENUM_HTTP);
+    if (NULL == trans_desc)
+    {
+        return AXIS2_FAILURE;
+    }
+
+    proxy_param = AXIS2_PARAM_CONTAINER_GET_PARAM(trans_desc->param_container,
+												  env, AXIS2_HTTP_PROXY);
+    if (proxy_param)
+    {
+        transport_attrs = AXIS2_PARAM_GET_ATTRIBUTES(proxy_param, env);
+        if (transport_attrs)
+        {
+            axis2_generic_obj_t *obj = NULL;
+            axiom_attribute_t *host_attr = NULL;
+            axiom_attribute_t *port_attr = NULL;
+            axis2_char_t *proxy_host = NULL;
+            axis2_char_t *proxy_port = NULL;
+
+            obj = axis2_hash_get(transport_attrs, AXIS2_PROXY_HOST_NAME,
+								 AXIS2_HASH_KEY_STRING);
+            if (NULL == obj)
+            {
+                return AXIS2_FAILURE;
+            }
+            host_attr = (axiom_attribute_t *)AXIS2_GENERIC_OBJ_GET_VALUE(obj,
+																		 env);
+            if (NULL == host_attr)
+            {
+                return AXIS2_FAILURE;
+            }
+            proxy_host = AXIOM_ATTRIBUTE_GET_VALUE(host_attr, env);
+            if (NULL == proxy_host)
+            {
+                return AXIS2_FAILURE;
+            }
+            /* Now we get the port */
+            obj = NULL;
+
+            obj = axis2_hash_get(transport_attrs, AXIS2_PROXY_HOST_PORT,
+								 AXIS2_HASH_KEY_STRING);
+            port_attr = (axiom_attribute_t*)AXIS2_GENERIC_OBJ_GET_VALUE(obj,
+																		env);
+            if (NULL == port_attr)
+            {
+                return AXIS2_FAILURE;
+            }
+            proxy_port = AXIOM_ATTRIBUTE_GET_VALUE(port_attr, env);
+            if (NULL == proxy_port)
+            {
+                return AXIS2_FAILURE;
+            }
+            if (proxy_host && NULL != proxy_port)
+            {
+                AXIS2_HTTP_CLIENT_SET_PROXY(sender_impl->client, env, proxy_host,
+											AXIS2_ATOI(proxy_port));
+                return AXIS2_SUCCESS;
+            }
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_http_sender_configure_server_cert(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx)
+{
+	axis2_property_t *server_cert_property = NULL;
+	axis2_param_t *server_cert_param = NULL;
+	axis2_char_t *server_cert = NULL;
+	axis2_status_t status = AXIS2_FAILURE;
+    axis2_http_sender_impl_t *sender_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+
+    sender_impl = AXIS2_INTF_TO_IMPL(sender);
+
+    server_cert_property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
+													  AXIS2_SSL_SERVER_CERT, AXIS2_FALSE);
+    if(server_cert_property)
+    {
+		server_cert = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE(
+			server_cert_property, env);
+    }
+    else
+    {
+        server_cert_param = AXIS2_MSG_CTX_GET_PARAMETER(msg_ctx, env, 
+														AXIS2_SSL_SERVER_CERT);
+        if(server_cert_param)
+        {
+            server_cert = (axis2_char_t *) AXIS2_PARAM_GET_VALUE(
+				server_cert_param, env);
+        }
+    }
+    
+    if(server_cert)
+    {
+        status = AXIS2_HTTP_CLIENT_SET_SERVER_CERT(sender_impl->client, 
+												   env, server_cert);
+    }
+
+    return status;
+}
+axis2_status_t AXIS2_CALL
+axis2_http_sender_configure_key_file(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx)
+{
+	axis2_property_t *key_file_property = NULL;
+	axis2_param_t *key_file_param = NULL;
+    axis2_char_t *key_file = NULL;
+	axis2_status_t status = AXIS2_FAILURE;
+    axis2_http_sender_impl_t *sender_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
+
+    sender_impl = AXIS2_INTF_TO_IMPL(sender);
+
+    key_file_property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, 
+												   AXIS2_SSL_KEY_FILE, AXIS2_FALSE);
+    if(key_file_property)
+    {
+		key_file = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE(
+			key_file_property, env);
+    }
+    else
+    {
+        key_file_param = AXIS2_MSG_CTX_GET_PARAMETER(msg_ctx, env,
+													 AXIS2_SSL_KEY_FILE);
+        if(key_file_param)
+        {
+            key_file = (axis2_char_t *) AXIS2_PARAM_GET_VALUE(
+				key_file_param, env);
+        }
+    }
+
+    if (key_file)
+    {
+		status = AXIS2_HTTP_CLIENT_SET_KEY_FILE(sender_impl->client, 
+												env, key_file);
+    }
+
+	return status;
+}
+
+#ifdef AXIS2_LIBCURL_ENABLED
+axis2_status_t AXIS2_CALL
+axis2_libcurl_http_send(
+    axis2_http_sender_t *sender,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+	axiom_soap_envelope_t *out,
+    const axis2_char_t *str_url,
+    const axis2_char_t *soap_action)
+{
+	axis2_http_sender_impl_t *sender_impl =  AXIS2_INTF_TO_IMPL(sender);
+	return axis2_libcurl_send (sender_impl->om_output, env, msg_ctx, out, str_url, soap_action);
+}
+#endif

Added: webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile?view=auto&rev=509138
==============================================================================
--- webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile (added)
+++ webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile Mon Feb 19 01:17:50 2007
@@ -0,0 +1,338 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# modules/core/transport/http/sender/libcurl/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+srcdir = .
+top_srcdir = ../../../../../..
+
+pkgdatadir = $(datadir)/axis2c-src
+pkglibdir = $(libdir)/axis2c-src
+pkgincludedir = $(includedir)/axis2c-src
+top_builddir = ../../../../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = /usr/bin/install -c
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = i686-pc-linux-gnu
+host_triplet = i686-pc-linux-gnu
+target_triplet = i686-pc-linux-gnu
+subdir = modules/core/transport/http/sender/libcurl
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/dinesh/axis2c/missing --run aclocal-1.9
+AMDEP_FALSE = #
+AMDEP_TRUE = 
+AMTAR = ${SHELL} /home/dinesh/axis2c/missing --run tar
+APACHE2BUILD = apache2
+APACHE2INC = -I/usr/local/apache2/include
+APRINC = 
+AR = ar
+AUTOCONF = ${SHELL} /home/dinesh/axis2c/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/dinesh/axis2c/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/dinesh/axis2c/missing --run automake-1.9
+AWK = mawk
+AXIS2_LIBCURL_ENABLED_FALSE = #
+AXIS2_LIBCURL_ENABLED_TRUE = 
+AXIS2_SSL_ENABLED_FALSE = 
+AXIS2_SSL_ENABLED_TRUE = #
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g3 -O0 -D_LARGEFILE64_SOURCE -ansi -Wall -Wno-implicit-function-declaration -g -DAXIS2_SVR_MULTI_THREADED -DAXIS2_LIBCURL_ENABLED
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS = -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DICLIENT_DIR = diclient
+ECHO = echo
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+F77 = 
+FFLAGS = 
+GREP = /bin/grep
+GUTHTHILA_DIR = 
+GUTHTHILA_LIBS = 
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
+LDFLAGS =  -lpthread
+LIBOBJS = 
+LIBS = -lz -ldl 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/dinesh/axis2c/missing --run makeinfo
+OBJEXT = o
+PACKAGE = axis2c-src
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = axis2c-src
+PACKAGE_STRING = axis2c-src 0.96
+PACKAGE_TARNAME = axis2c-src
+PACKAGE_VERSION = 0.96
+PARSER_CFLAGS = 
+PARSER_DIR = 
+PARSER_LIBS = 
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+RAMPART_DIR = 
+RANLIB = ranlib
+SAMPLES = 
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+TESTDIR = 
+VERSION = 0.96
+WRAPPER_DIR = libxml2
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_F77 = 
+am__fastdepCC_FALSE = #
+am__fastdepCC_TRUE = 
+am__fastdepCXX_FALSE = #
+am__fastdepCXX_TRUE = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = tar --format=ustar -chf - "$$tardir"
+am__untar = tar -xf -
+bindir = ${exec_prefix}/bin
+build = i686-pc-linux-gnu
+build_alias = 
+build_cpu = i686
+build_os = linux-gnu
+build_vendor = pc
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = i686-pc-linux-gnu
+host_alias = 
+host_cpu = i686
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = /home/dinesh/axis2c/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = mkdir -p --
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /home/dinesh/axis2c/deploy
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+subdirs =  util axiom
+sysconfdir = ${prefix}/etc
+target = i686-pc-linux-gnu
+target_alias = 
+target_cpu = i686
+target_os = linux-gnu
+target_vendor = pc
+EXTRA_DIST = axis2_libcurl.h axis2_libcurl.c
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  modules/core/transport/http/sender/libcurl/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  modules/core/transport/http/sender/libcurl/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile.am?view=auto&rev=509138
==============================================================================
--- webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile.am (added)
+++ webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile.am Mon Feb 19 01:17:50 2007
@@ -0,0 +1,2 @@
+EXTRA_DIST= axis2_libcurl.h axis2_libcurl.c
+

Added: webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile.in
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile.in?view=auto&rev=509138
==============================================================================
--- webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile.in (added)
+++ webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/Makefile.in Mon Feb 19 01:17:50 2007
@@ -0,0 +1,338 @@
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005  Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../../../../..
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = modules/core/transport/http/sender/libcurl
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+APACHE2BUILD = @APACHE2BUILD@
+APACHE2INC = @APACHE2INC@
+APRINC = @APRINC@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+AXIS2_LIBCURL_ENABLED_FALSE = @AXIS2_LIBCURL_ENABLED_FALSE@
+AXIS2_LIBCURL_ENABLED_TRUE = @AXIS2_LIBCURL_ENABLED_TRUE@
+AXIS2_SSL_ENABLED_FALSE = @AXIS2_SSL_ENABLED_FALSE@
+AXIS2_SSL_ENABLED_TRUE = @AXIS2_SSL_ENABLED_TRUE@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DICLIENT_DIR = @DICLIENT_DIR@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+GREP = @GREP@
+GUTHTHILA_DIR = @GUTHTHILA_DIR@
+GUTHTHILA_LIBS = @GUTHTHILA_LIBS@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PARSER_CFLAGS = @PARSER_CFLAGS@
+PARSER_DIR = @PARSER_DIR@
+PARSER_LIBS = @PARSER_LIBS@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+RAMPART_DIR = @RAMPART_DIR@
+RANLIB = @RANLIB@
+SAMPLES = @SAMPLES@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TESTDIR = @TESTDIR@
+VERSION = @VERSION@
+WRAPPER_DIR = @WRAPPER_DIR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+EXTRA_DIST = axis2_libcurl.h axis2_libcurl.c
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  modules/core/transport/http/sender/libcurl/Makefile'; \
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu  modules/core/transport/http/sender/libcurl/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool
+uninstall-info-am:
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkdir_p) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	    fi; \
+	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || cp -p $$d/$$file $(distdir)/$$file \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
+	distclean distclean-generic distclean-libtool distdir dvi \
+	dvi-am html html-am info info-am install install-am \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:

Added: webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c?view=auto&rev=509138
==============================================================================
--- webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c (added)
+++ webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.c Mon Feb 19 01:17:50 2007
@@ -0,0 +1,238 @@
+#include <axis2_libcurl.h>
+#include <axiom_soap.h>
+#include <axis2_string.h>
+#include <axis2_http_transport.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>
+#include <axis2_const.h>
+#include <axis2_util.h>
+
+typedef struct axis2_libcurl_memory
+{
+	axis2_char_t *memory;
+	unsigned int size;
+}axis2_libcurl_memory_t;
+
+size_t
+axis2_libcurl_write_memory_callback(void *ptr, size_t size, size_t nmemb, void *data);
+
+void *myrealloc(void *ptr, size_t size)
+{
+	/* There might be a realloc() out there that doesn't like
+	 * reallocing
+     NULL pointers, so we take care of it here */
+	if(ptr)
+		return realloc(ptr, size);
+	else
+		return malloc(size);
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_libcurl_send (
+    axiom_output_t *om_output,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+	axiom_soap_envelope_t *out,
+    const axis2_char_t *str_url,
+    const axis2_char_t *soap_action)
+{
+
+	CURL *handler;
+	struct curl_slist *headers = NULL;
+	axiom_soap_body_t *soap_body;
+	axis2_bool_t is_soap = AXIS2_TRUE;
+	axis2_bool_t send_via_get = AXIS2_FALSE;
+	axis2_bool_t doing_mtom = AXIS2_FALSE;
+	axiom_node_t *body_node = NULL;
+	axiom_node_t *data_out = NULL;
+	axis2_property_t *method = NULL;
+	axis2_char_t *method_value = NULL;
+	axiom_xml_writer_t *xml_writer = NULL;
+	axis2_char_t *buffer = NULL;
+	unsigned int buffer_size = 0;
+	axis2_char_t *content_type;
+	const axis2_char_t *char_set_enc = NULL;
+	axis2_char_t *content = "Content-Type:";
+	axis2_libcurl_memory_t *data;
+	handler = curl_easy_init ();
+	
+    if (AXIS2_TRUE == AXIS2_MSG_CTX_GET_DOING_REST(msg_ctx, env))
+		is_soap = AXIS2_FALSE;
+	else
+		is_soap = AXIS2_TRUE;
+
+	if (!is_soap)
+	{
+		soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(out, env);
+        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);
+
+		method = (axis2_property_t *)AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
+																AXIS2_HTTP_METHOD, AXIS2_FALSE);
+		if (method)
+			method_value = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE (method, env);
+
+		/* The default is POST */
+		if (method_value && 0 == AXIS2_STRCMP(method_value, AXIS2_HTTP_HEADER_GET))
+		{
+			send_via_get = AXIS2_TRUE;
+		}
+	}
+
+	if (!send_via_get)
+	{
+		xml_writer = AXIOM_OUTPUT_GET_XML_WRITER(om_output, env);
+
+		/* char_set_enc_str = axis2_msg_ctx_get_charset_encoding(msg_ctx, env); */
+/* 		if (!char_set_enc_str) */
+/* 		{ */
+		char_set_enc = AXIS2_DEFAULT_CHAR_SET_ENCODING;
+/* 		} */
+/* 		else */
+/* 		{ */
+/* 			char_set_enc = axis2_string_get_buffer(char_set_enc_str, env); */
+/* 		} */
+
+		if (is_soap)
+		{
+			doing_mtom = AXIS2_MSG_CTX_GET_DOING_MTOM(msg_ctx, env);
+
+			AXIOM_OUTPUT_SET_DO_OPTIMIZE(om_output, env,
+										 doing_mtom); 
+			AXIOM_SOAP_ENVELOPE_SERIALIZE(out, env, om_output,
+										  AXIS2_FALSE);
+
+			if (doing_mtom)
+			{
+				content_type = (axis2_char_t *)AXIOM_OUTPUT_GET_CONTENT_TYPE(om_output,
+																			 env);
+				if (AXIS2_TRUE != AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env))
+				{
+					/* handle SOAP action for SOAP 1.2 case */
+					if (axis2_strcmp(soap_action, ""))
+					{
+						axis2_char_t *temp_content_type = NULL;
+						temp_content_type = AXIS2_STRACAT(content_type, ";action=", env);
+						AXIS2_FREE(env->allocator, content_type);
+						content_type = temp_content_type;
+						temp_content_type = AXIS2_STRACAT(content_type, soap_action, env);
+						AXIS2_FREE(env->allocator, content_type);
+						content_type = temp_content_type;
+					}
+				}
+			}
+			else if (AXIS2_TRUE == AXIS2_MSG_CTX_GET_IS_SOAP_11(msg_ctx, env))
+			{
+				axis2_char_t *temp_content_type = NULL;
+				content_type = (axis2_char_t *)AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML;
+				content_type = AXIS2_STRACAT(content_type, ";charset=", env);
+				temp_content_type = AXIS2_STRACAT(content_type, char_set_enc, env);
+				AXIS2_FREE(env->allocator, content_type);
+				content_type = temp_content_type;
+			}
+			else
+			{
+				axis2_char_t *temp_content_type = NULL;
+				content_type = (axis2_char_t *)AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP;
+				content_type = AXIS2_STRACAT(content_type, ";charset=", env);
+				temp_content_type = AXIS2_STRACAT(content_type, char_set_enc, env);
+				AXIS2_FREE(env->allocator, content_type);
+				content_type = temp_content_type;
+				if (axis2_strcmp(soap_action, ""))
+				{
+					temp_content_type = AXIS2_STRACAT(content_type, ";action=", env);
+					AXIS2_FREE(env->allocator, content_type);
+					content_type = temp_content_type;
+					temp_content_type = AXIS2_STRACAT(content_type, soap_action, env);
+					AXIS2_FREE(env->allocator, content_type);
+					content_type = temp_content_type;
+				}
+				temp_content_type = AXIS2_STRACAT(content_type, ";", env);
+				AXIS2_FREE(env->allocator, content_type);
+				content_type = temp_content_type;
+			}
+
+		}
+		else
+		{
+			axis2_property_t *content_type_property = NULL;
+			axis2_hash_t *content_type_hash = NULL;
+			axis2_char_t *content_type_value = NULL;
+
+			AXIOM_NODE_SERIALIZE(data_out, env, om_output);
+			content_type_property  = (axis2_property_t *)AXIS2_MSG_CTX_GET_PROPERTY(
+				msg_ctx, env,
+				AXIS2_USER_DEFINED_HTTP_HEADER_CONTENT_TYPE, 
+				AXIS2_FALSE);
+		
+			if (content_type_property)
+			{
+				content_type_hash = (axis2_hash_t *) AXIS2_PROPERTY_GET_VALUE (content_type_property, env);
+				if (content_type_hash)
+					content_type_value = (char *) axis2_hash_get (content_type_hash, 
+																  AXIS2_HTTP_HEADER_CONTENT_TYPE, 
+																  AXIS2_HASH_KEY_STRING);
+			}
+			if (content_type_value)
+				content_type = content_type_value;
+			else
+				content_type = AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML;
+
+		}
+
+		buffer = AXIOM_XML_WRITER_GET_XML(xml_writer, env);
+		buffer_size = AXIOM_XML_WRITER_GET_XML_SIZE(xml_writer, env);
+	}
+
+
+	headers = curl_slist_append (headers, "User-Agent:Axis2/C");
+	headers = curl_slist_append (headers, AXIS2_STRACAT (content,content_type, env));
+	headers = curl_slist_append (headers, "Accept:");
+	curl_easy_setopt (handler, CURLOPT_URL, str_url);
+	curl_easy_setopt (handler, CURLOPT_HTTPHEADER, headers);
+	curl_easy_setopt (handler, CURLOPT_POSTFIELDS, buffer);
+	curl_easy_setopt (handler, CURLOPT_POSTFIELDSIZE, buffer_size);
+	curl_easy_setopt (handler, CURLOPT_WRITEFUNCTION, axis2_libcurl_write_memory_callback);
+	curl_easy_setopt (handler, CURLOPT_WRITEDATA, (void *)data);
+	curl_easy_perform (handler);
+	curl_slist_free_all (headers);
+	curl_easy_cleanup (handler);
+	return AXIS2_SUCCESS;
+}
+
+size_t
+axis2_libcurl_write_memory_callback(void *ptr, size_t size, size_t nmemb, void *data)
+{
+	size_t realsize = size * nmemb;
+	axis2_libcurl_memory_t *mem = (axis2_libcurl_memory_t *)data;
+
+	mem->memory = (axis2_char_t *)myrealloc (mem->memory, mem->size + realsize + 1);
+	if (mem->memory) {
+		memcpy(&(mem->memory[mem->size]), ptr, realsize);
+		mem->size += realsize;
+		mem->memory[mem->size] = 0;
+	}
+	return realsize;
+}

Added: webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.h?view=auto&rev=509138
==============================================================================
--- webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.h (added)
+++ webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/libcurl/axis2_libcurl.h Mon Feb 19 01:17:50 2007
@@ -0,0 +1,24 @@
+#ifndef AXIS2_LIBCURL_H
+#define AXIS2_LIBCURL_H
+#include <curl/curl.h>
+#include <stdio.h>
+#include <string.h>
+#include <axis2_http_sender.h>
+#include <axis2_string.h>
+#include <axis2_types.h>
+#include <axis2_generic_obj.h>
+#include <axis2_const.h>
+#include <axis2_util.h>
+#include <axiom.h>
+
+axis2_status_t AXIS2_CALL
+axis2_libcurl_send (
+    axiom_output_t *om_output,
+    const axis2_env_t *env,
+    axis2_msg_ctx_t *msg_ctx,
+	axiom_soap_envelope_t *out,
+    const axis2_char_t *str_url,
+    const axis2_char_t *soap_action);
+
+
+#endif	/* AXIS2_LIBCURL_H */

Added: webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/sender_util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/sender_util.c?view=auto&rev=509138
==============================================================================
--- webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/sender_util.c (added)
+++ webservices/axis2/scratch/c/dinesh/532/c/modules/core/transport/http/sender/sender_util.c Mon Feb 19 01:17:50 2007
@@ -0,0 +1,33 @@
+#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>
+
+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);
+
+
+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)
+{
+	axis2_http_header_t *http_header;
+    http_header = axis2_http_header_create(env, header_name, header_value);
+    AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, http_header);
+}



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