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 di...@apache.org on 2007/07/16 18:43:11 UTC
svn commit: r556666 [7/7] - in /webservices/axis2/scratch/c/dinesh/602/c: ./
build/win32/ guththila/ guththila/include/ guththila/src/ ides/vc/axis2c/
ides/vc/axis2c/axis2_engine/ ides/vc/axis2c/clients/echo_blocking/
ides/vc/axis2c/clients/echo_blocki...
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/sender/http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/sender/http_sender.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/sender/http_sender.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/sender/http_sender.c Mon Jul 16 09:42:53 2007
@@ -16,7 +16,6 @@
*/
#include <axis2_http_sender.h>
-#include <axis2_svc_client.h>
#include <axutil_string.h>
#include <axis2_http_transport.h>
#include <string.h>
@@ -60,6 +59,11 @@
is_safe_or_unreserve (
char c);
+static void
+axis2_http_sender_add_header_list (axis2_http_simple_request_t *request,
+ const axutil_env_t *env,
+ axutil_array_list_t *array_list);
+
#ifndef AXIS2_LIBCURL_ENABLED
static axis2_status_t
axis2_http_sender_configure_proxy(
@@ -172,6 +176,8 @@
axiom_node_t *body_node = NULL;
axiom_soap_body_t *soap_body = NULL;
axis2_bool_t is_soap = AXIS2_TRUE;
+ axutil_property_t *http_property = NULL;
+ axutil_array_list_t *array_list;
soap_body = axiom_soap_envelope_get_body(out, env);
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -209,7 +215,8 @@
method = (axutil_property_t *) axis2_msg_ctx_get_property(msg_ctx, env,
AXIS2_HTTP_METHOD);
if (method)
- method_value = (axis2_char_t *) axutil_property_get_value (method, env);
+ method_value = (axis2_char_t *) axutil_property_get_value (method,
+ env);
/* The default is POST */
if (method_value && 0 == axutil_strcmp(method_value, AXIS2_HTTP_GET))
@@ -251,7 +258,8 @@
*/
property = axutil_property_create(env);
axutil_property_set_scope(property, env, AXIS2_SCOPE_REQUEST);
- axutil_property_set_free_func(property, env, axis2_http_client_free_void_arg);
+ axutil_property_set_free_func(property, env,
+ axis2_http_client_free_void_arg);
axutil_property_set_value(property, env, sender->client);
axis2_msg_ctx_set_property(msg_ctx, env, AXIS2_HTTP_CLIENT, property);
@@ -281,10 +289,13 @@
AXIS2_DUMP_INPUT_MSG_TRUE);
if(dump_property)
{
- axis2_char_t *dump_true = axutil_property_get_value(dump_property, env);
+ axis2_char_t *dump_true =
+ axutil_property_get_value(dump_property, env);
if(0 == axutil_strcmp(dump_true, AXIS2_VALUE_TRUE))
{
- axis2_http_client_set_dump_input_msg(sender->client, env, AXIS2_TRUE);
+ axis2_http_client_set_dump_input_msg(sender->client,
+ env,
+ AXIS2_TRUE);
}
}
@@ -316,18 +327,24 @@
return AXIS2_FAILURE;
}
- request_line = axis2_http_request_line_create(env, "POST",
- axutil_url_get_path(url, env),
- sender->http_version);
+ request_line =
+ axis2_http_request_line_create(env, "POST",
+ axutil_url_get_path(url, env),
+ sender->http_version);
}
else
{
axis2_char_t *request_params = NULL;
axis2_char_t *path = NULL;
- request_params = axis2_http_sender_get_param_string( sender, env, msg_ctx);
- path = axutil_strcat(env, axutil_url_get_path(url, env), "?",
- request_params, NULL);
+ request_params = axis2_http_sender_get_param_string(sender,
+ env,
+ msg_ctx);
+ path = axutil_strcat(env,
+ axutil_url_get_path(url, env),
+ "?",
+ request_params, NULL);
+
request_line = axis2_http_request_line_create(env, "GET", path,
sender->http_version);
}
@@ -335,21 +352,41 @@
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");
+ axis2_http_sender_util_add_header (env,
+ request,
+ AXIS2_HTTP_HEADER_USER_AGENT,
+ "Axis2/C");
+ http_property =
+ axis2_msg_ctx_get_property (msg_ctx,
+ env,
+ AXIS2_TRANSPORT_HEADER_PROPERTY);
+ if (http_property)
+ {
+ array_list = (axutil_array_list_t *)
+ axutil_property_get_value (http_property, env);
+ axis2_http_sender_add_header_list (request, env, array_list);
+ }
+
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, (axutil_strlen(soap_action) + 5) * sizeof(axis2_char_t));
+ tmp_soap_action =
+ AXIS2_MALLOC(env->allocator,
+ (axutil_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_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_sender_util_add_header (env,
+ request,
AXIS2_HTTP_HEADER_SOAP_ACTION,
(const axis2_char_t *)soap_action);
}
@@ -370,34 +407,46 @@
if (buffer_size)
{
sprintf(tmp_buf, "%d", buffer_size);
- axis2_http_sender_util_add_header (env, request, AXIS2_HTTP_HEADER_CONTENT_LENGTH, tmp_buf);
+ 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);
+ 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->om_output,
- env);
+ content_type =
+ (axis2_char_t *) axiom_output_get_content_type(sender->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 (axutil_strcmp(soap_action, ""))
{
axis2_char_t *temp_content_type = NULL;
- temp_content_type = axutil_stracat(env, content_type, ";action=\"");
+ temp_content_type = axutil_stracat(env,
+ content_type,
+ ";action=\"");
AXIS2_FREE(env->allocator, content_type);
content_type = temp_content_type;
- temp_content_type = axutil_stracat(env, content_type, soap_action);
+ temp_content_type = axutil_stracat(env,
+ content_type,
+ soap_action);
AXIS2_FREE(env->allocator, content_type);
content_type = temp_content_type;
- temp_content_type = axutil_stracat(env, content_type, "\"");
+ temp_content_type = axutil_stracat(env,
+ content_type,
+ "\"");
AXIS2_FREE(env->allocator, content_type);
content_type = temp_content_type;
}
@@ -408,7 +457,9 @@
axis2_char_t *temp_content_type = NULL;
content_type = (axis2_char_t *)AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML;
content_type = axutil_stracat(env, content_type, ";charset=");
- temp_content_type = axutil_stracat(env, content_type, char_set_enc);
+ temp_content_type = axutil_stracat(env,
+ content_type,
+ char_set_enc);
AXIS2_FREE(env->allocator, content_type);
content_type = temp_content_type;
}
@@ -416,50 +467,68 @@
{
axis2_char_t *temp_content_type = NULL;
content_type = (axis2_char_t *)AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP;
- content_type = axutil_stracat(env, content_type, ";charset=");
- temp_content_type = axutil_stracat(env, content_type, char_set_enc);
+ content_type = axutil_stracat(env,
+ content_type,
+ ";charset=");
+ temp_content_type = axutil_stracat(env,
+ content_type,
+ char_set_enc);
AXIS2_FREE(env->allocator, content_type);
content_type = temp_content_type;
if (axutil_strcmp(soap_action, ""))
{
- temp_content_type = axutil_stracat(env, content_type, ";action=\"");
+ temp_content_type = axutil_stracat(env,
+ content_type,
+ ";action=\"");
AXIS2_FREE(env->allocator, content_type);
content_type = temp_content_type;
- temp_content_type = axutil_stracat(env, content_type, soap_action);
+ temp_content_type = axutil_stracat(env,
+ content_type,
+ soap_action);
AXIS2_FREE(env->allocator, content_type);
content_type = temp_content_type;
- temp_content_type = axutil_stracat(env, content_type, "\"");
+ temp_content_type = axutil_stracat(env,
+ content_type,
+ "\"");
AXIS2_FREE(env->allocator, content_type);
content_type = temp_content_type;
}
- temp_content_type = axutil_stracat(env, content_type, ";");
+ /*temp_content_type = axutil_stracat(env, content_type, ";");
AXIS2_FREE(env->allocator, content_type);
- content_type = temp_content_type;
+ content_type = temp_content_type;*/
}
}
else
{
- content_type_property = (axutil_property_t *) axis2_msg_ctx_get_property(
- msg_ctx, env,
- AXIS2_USER_DEFINED_HTTP_HEADER_CONTENT_TYPE);
+ content_type_property = (axutil_property_t *)
+ axis2_msg_ctx_get_property(msg_ctx,
+ env,
+ AXIS2_USER_DEFINED_HTTP_HEADER_CONTENT_TYPE);
if (content_type_property)
{
- content_type_hash = (axutil_hash_t *) axutil_property_get_value (content_type_property, env);
+ content_type_hash = (axutil_hash_t *)
+ axutil_property_get_value (content_type_property, env);
if (content_type_hash)
- content_type_value = (char *) axutil_hash_get (content_type_hash,
- AXIS2_HTTP_HEADER_CONTENT_TYPE,
- AXIS2_HASH_KEY_STRING);
+ {
+ content_type_value =
+ (char *) axutil_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;
-
+
content_type_deepl_copy = AXIS2_FALSE;
}
- axis2_http_sender_util_add_header (env, request, 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_deepl_copy && content_type)
{
@@ -472,30 +541,44 @@
AXIS2_HTTP_HEADER_PROTOCOL_11))
{
axis2_char_t *header = NULL;
- header = AXIS2_MALLOC(env->allocator, axutil_strlen(
- axutil_url_get_server(url, env)) + 10 * sizeof(
- axis2_char_t));
- sprintf(header, "%s:%d", axutil_url_get_server(url, env),
+ int server_len = 0;
+ server_len = axutil_strlen(axutil_url_get_server(url, env));
+ header = AXIS2_MALLOC(env->allocator,
+ server_len + 10 * sizeof(axis2_char_t));
+ sprintf(header, "%s:%d",
+ axutil_url_get_server(url, env),
axutil_url_get_port(url, env));
- axis2_http_sender_util_add_header (env, request, 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;
}
if (doing_mtom)
{
- axutil_stream_t *stream = axis2_http_simple_request_get_body(request, env);
+ axutil_stream_t *stream = axis2_http_simple_request_get_body(request,
+ env);
if (stream)
{
- axutil_stream_write(stream, env, output_stream, output_stream_size);
+ axutil_stream_write(stream,
+ env,
+ output_stream,
+ output_stream_size);
}
}
else
{
- axis2_http_simple_request_set_body_string(request, env, buffer, buffer_size);
+ 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_server_cert(sender,
+ env,
+ msg_ctx);
axis2_http_sender_configure_key_file(sender, env, msg_ctx);
@@ -503,14 +586,19 @@
axis2_http_client_set_timeout(sender->client, env,
sender->so_timeout);
- ssl_pp_param = axis2_msg_ctx_get_parameter(msg_ctx, env, AXIS2_SSL_PASSPHRASE);
+ ssl_pp_param = axis2_msg_ctx_get_parameter(msg_ctx,
+ env,
+ AXIS2_SSL_PASSPHRASE);
if (ssl_pp_param)
{
ssl_pp = axutil_param_get_value(ssl_pp_param, env);
}
- status_code = axis2_http_client_send(sender->client, env, request, ssl_pp);
+ status_code = axis2_http_client_send(sender->client,
+ env,
+ request,
+ ssl_pp);
/*AXIS2_FREE(env->allocator, buffer);
buffer = NULL;*/
@@ -545,7 +633,8 @@
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_ERROR_SET(env->error,
+ AXIS2_ERROR_HTTP_CLIENT_TRANSPORT_ERROR,
AXIS2_FAILURE);
/* handle one way case */
@@ -553,14 +642,17 @@
axutil_strcmp(mep, AXIS2_MEP_URI_ROBUST_OUT_ONLY) == 0)
{
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "mep is AXIS2_MEP_URI_OUT_ONLY or AXIS2_MEP_URI_ROBUST_OUT_ONLY");
+ "mep is AXIS2_MEP_URI_OUT_ONLY or"
+ "AXIS2_MEP_URI_ROBUST_OUT_ONLY");
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);
+ 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);
@@ -568,14 +660,18 @@
if (tmp_header_val && (axutil_strstr(tmp_header_val,
- AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP) || axutil_strstr(
- tmp_header_val, AXIS2_HTTP_HEADER_ACCEPT_TEXT_XML)))
- {
- return axis2_http_sender_process_response(sender, env,
- msg_ctx, response);
+ AXIS2_HTTP_HEADER_ACCEPT_APPL_SOAP) ||
+ axutil_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_ERROR_SET(env->error,
+ AXIS2_ERROR_HTTP_CLIENT_TRANSPORT_ERROR,
AXIS2_FAILURE);
return AXIS2_FAILURE;
#endif
@@ -636,15 +732,17 @@
if (name)
{
if (0 == axutil_strcmp(name, AXIS2_HTTP_HEADER_TRANSFER_ENCODING) &&
- 0 == axutil_strcmp(axis2_http_header_get_value(header
- , env), AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
+ 0 == axutil_strcmp(axis2_http_header_get_value(header,env),
+ AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED))
{
axis2_char_t *transfer_encoding = NULL;
- transfer_encoding =
+ transfer_encoding =
axutil_strdup(env,
- AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED);
+ AXIS2_HTTP_HEADER_TRANSFER_ENCODING_CHUNKED);
response_chunked = AXIS2_TRUE;
- axis2_msg_ctx_set_transfer_encoding(msg_ctx, env, transfer_encoding);
+ axis2_msg_ctx_set_transfer_encoding(msg_ctx,
+ env,
+ transfer_encoding);
}
if (0 != axutil_strcmp(name, AXIS2_HTTP_HEADER_CONTENT_TYPE))
@@ -652,7 +750,8 @@
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);
+ tmp_charset = strstr(content_type,
+ AXIS2_HTTP_CHAR_SET_ENCODING);
if (charset)
{
charset = axutil_strdup(env, tmp_charset);
@@ -672,15 +771,19 @@
axis2_msg_ctx_get_op_ctx(msg_ctx, env), env);
property = axutil_property_create(env);
axutil_property_set_scope(property, env, AXIS2_SCOPE_REQUEST);
- axutil_property_set_value(property, env, axutil_strdup(env, content_type));
- axis2_ctx_set_property(axis_ctx, env, MTOM_RECIVED_CONTENT_TYPE,
+ axutil_property_set_value(property,
+ env,
+ axutil_strdup(env, content_type));
+ axis2_ctx_set_property(axis_ctx,
+ env,
+ MTOM_RECIVED_CONTENT_TYPE,
property);
}
}
if (charset)
{
- axis2_ctx_t *axis_ctx = axis2_op_ctx_get_base( axis2_msg_ctx_get_op_ctx(
- msg_ctx, env), env);
+ axis2_ctx_t *axis_ctx =
+ axis2_op_ctx_get_base(axis2_msg_ctx_get_op_ctx(msg_ctx, env), env);
if (axis_ctx)
{
property = axutil_property_create(env);
@@ -743,6 +846,7 @@
return AXIS2_SUCCESS;
}
+
AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_http_sender_get_timeout_values(
axis2_http_sender_t *sender,
@@ -826,7 +930,9 @@
return AXIS2_FAILURE;
}
- trans_desc = axis2_conf_get_transport_out(conf, env, AXIS2_TRANSPORT_ENUM_HTTP);
+ trans_desc = axis2_conf_get_transport_out(conf,
+ env,
+ AXIS2_TRANSPORT_ENUM_HTTP);
if (! trans_desc)
{
return AXIS2_FAILURE;
@@ -844,7 +950,7 @@
axiom_attribute_t *host_attr = NULL;
axiom_attribute_t *port_attr = NULL;
- obj = axutil_hash_get(transport_attrs, AXIS2_PROXY_HOST_NAME,
+ obj = axutil_hash_get(transport_attrs, AXIS2_HTTP_PROXY_HOST,
AXIS2_HASH_KEY_STRING);
if (! obj)
{
@@ -864,7 +970,7 @@
/* Now we get the port */
obj = NULL;
- obj = axutil_hash_get(transport_attrs, AXIS2_PROXY_HOST_PORT,
+ obj = axutil_hash_get(transport_attrs, AXIS2_HTTP_PROXY_PORT,
AXIS2_HASH_KEY_STRING);
port_attr = (axiom_attribute_t*) axutil_generic_obj_get_value(obj,
env);
@@ -889,25 +995,48 @@
transport_attrs = axutil_param_get_attributes(proxy_param, env);
if (transport_attrs)
{
-
- proxy_host = (axis2_char_t *)axutil_hash_get(transport_attrs, AXIS2_PROXY_HOST_NAME,
- AXIS2_HASH_KEY_STRING);
- if (!proxy_host)
+ axutil_generic_obj_t *obj = NULL;
+ axiom_attribute_t *host_attr = NULL;
+ axiom_attribute_t *port_attr = NULL;
+
+ obj = axutil_hash_get(transport_attrs, AXIS2_HTTP_PROXY_HOST,
+ AXIS2_HASH_KEY_STRING);
+ if (! obj)
{
return AXIS2_FAILURE;
}
+ host_attr = (axiom_attribute_t *) axutil_generic_obj_get_value(obj,
+ env);
+ if (! host_attr)
+ {
+ return AXIS2_FAILURE;
+ }
+ proxy_host = axiom_attribute_get_localname(host_attr, env);
+ if (! proxy_host)
+ {
+ return AXIS2_FAILURE;
+ }
/* Now we get the port */
+ obj = NULL;
- proxy_port = (axis2_char_t *)axutil_hash_get(transport_attrs, AXIS2_PROXY_HOST_PORT,
+ obj = axutil_hash_get(transport_attrs, AXIS2_HTTP_PROXY_PORT,
AXIS2_HASH_KEY_STRING);
- if (!proxy_port)
+ port_attr = (axiom_attribute_t*) axutil_generic_obj_get_value(obj,
+ env);
+ if (! port_attr)
{
return AXIS2_FAILURE;
}
+
+ proxy_port = axiom_attribute_get_localname(port_attr, env);
+ if (! proxy_port)
+ {
+ return AXIS2_FAILURE;
+ }
+
}
- }
-
- }
+ }
+ }
if (proxy_port && proxy_host)
{
axis2_http_client_set_proxy(sender->client, env, proxy_host,
@@ -941,8 +1070,9 @@
}
else
{
- server_cert_param = axis2_msg_ctx_get_parameter(msg_ctx, env,
- AXIS2_SSL_SERVER_CERT);
+ server_cert_param = axis2_msg_ctx_get_parameter(msg_ctx,
+ env,
+ AXIS2_SSL_SERVER_CERT);
if(server_cert_param)
{
server_cert = (axis2_char_t *) axutil_param_get_value(
@@ -1014,7 +1144,12 @@
const axis2_char_t *str_url,
const axis2_char_t *soap_action)
{
- return axis2_libcurl_send (sender->om_output, env, msg_ctx, out, str_url, soap_action);
+ return axis2_libcurl_send (sender->om_output,
+ env,
+ msg_ctx,
+ out,
+ str_url,
+ soap_action);
}
#endif
@@ -1177,4 +1312,20 @@
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);
+}
+
+static void
+axis2_http_sender_add_header_list (axis2_http_simple_request_t *request,
+ const axutil_env_t *env,
+ axutil_array_list_t *array_list)
+{
+ int ii = 0;
+ int kk = 0;
+ axis2_http_header_t *http_header = NULL;
+ ii = axutil_array_list_size (array_list, env);
+ for (; kk < ii; kk++)
+ {
+ http_header = (axis2_http_header_t *)axutil_array_list_get (array_list, env, kk);
+ axis2_http_simple_request_add_header (request, env, http_header);
+ }
}
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/apache2/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/apache2/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/apache2/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/apache2/Makefile.am Mon Jul 16 09:42:53 2007
@@ -18,6 +18,8 @@
$(PARSER_LIBS) \
$(LIBXML2_LIBS)
+libmod_axis2_la_LDFLAGS = -version-info $(VERSION_NO)
+
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/src/core/transport/http \
-I$(top_builddir)/src/core/description \
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/simple_axis2_server/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/simple_axis2_server/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/simple_axis2_server/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/simple_axis2_server/Makefile.am Mon Jul 16 09:42:53 2007
@@ -17,6 +17,7 @@
$(top_builddir)/src/core/engine/libaxis2_engine.la \
$(top_builddir)/src/core/transport/http/sender/libaxis2_http_sender.la \
$(top_builddir)/src/core/transport/http/receiver/libaxis2_http_receiver.la \
+ $(top_builddir)/neethi/src/libneethi.la \
-lpthread
INCLUDES = -I$(top_builddir)/include \
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/simple_axis2_server/http_server_main.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/simple_axis2_server/http_server_main.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/simple_axis2_server/http_server_main.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/server/simple_axis2_server/http_server_main.c Mon Jul 16 09:42:53 2007
@@ -30,6 +30,7 @@
axutil_env_t *system_env = NULL;
axis2_transport_receiver_t *server = NULL;
+AXIS2_IMPORT extern int axis2_http_socket_read_timeout;
/***************************** Function headers *******************************/
axutil_env_t *
init_syetem_env(
@@ -81,7 +82,7 @@
}
/*axutil_allocator_free(allocator);*/
axiom_xml_reader_cleanup();
- _exit(status);
+ exit(status);
}
int main(
@@ -98,7 +99,6 @@
int port = 9090;
const axis2_char_t *repo_path = "../";
- axis2_http_socket_read_timeout = AXIS2_HTTP_DEFAULT_SO_TIMEOUT;
while ((c = AXIS2_GETOPT(argc, argv, ":p:r:ht:l:f:")) != -1)
{
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/util/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/util/http_transport_utils.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/util/http_transport_utils.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/core/transport/http/util/http_transport_utils.c Mon Jul 16 09:42:53 2007
@@ -1161,7 +1161,9 @@
axis2_char_t *mime_boundary = NULL;
axis2_msg_ctx_set_doing_mtom(msg_ctx, env, AXIS2_TRUE);
/* get mime boundry */
- mime_boundary = axis2_http_transport_utils_get_value_from_content_type(env, content_type, AXIS2_HTTP_HEADER_CONTENT_TYPE_MIME_BOUNDARY);
+ mime_boundary = axis2_http_transport_utils_get_value_from_content_type(
+ env, content_type,
+ AXIS2_HTTP_HEADER_CONTENT_TYPE_MIME_BOUNDARY);
if (mime_boundary)
{
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_addr/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_addr/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_addr/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_addr/Makefile.am Mon Jul 16 09:42:53 2007
@@ -6,22 +6,11 @@
addr_out_handler.c \
mod_addr.c
-libaxis2_mod_addr_la_LIBADD = $(top_builddir)/src/core/engine/libaxis2_engine.la \
- $(top_builddir)/axiom/src/om/libaxis2_axiom.la \
+libaxis2_mod_addr_la_LIBADD = $(top_builddir)/axiom/src/om/libaxis2_axiom.la \
$(top_builddir)/util/src/libaxutil.la
-lib_LTLIBRARIES = libaxis2.la
-libaxis2_la_SOURCES = addr_in_handler.c \
- addr_out_handler.c \
- mod_addr.c
-
-libaxis2_la_LIBADD = $(top_builddir)/src/core/engine/libaxis2_engine.la \
- $(top_builddir)/axiom/src/om/libaxis2_axiom.la \
- $(top_builddir)/src/core/transport/http/util/libaxis2_http_util.la \
- $(top_builddir)/src/core/transport/http/common/libaxis2_http_common.la \
- $(top_builddir)/axiom/src/parser/${WRAPPER_DIR}/libaxis2_parser.la
-
+libaxis2_mod_addr_la_LDFLAGS = -version-info $(VERSION_NO)
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/src/core/description \
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_addr/module.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_addr/module.xml?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_addr/module.xml (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_addr/module.xml Mon Jul 16 09:42:53 2007
@@ -1,7 +1,7 @@
<module name="addressing" class="axis2_mod_addr">
<inflow>
<handler name="AddressingInHandler" class="axis2_mod_addr">
- <order phase="PreDispatch"/>
+ <order phase="Transport" before="addressing_based_dispatcher"/>
</handler>
</inflow>
Modified: webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_log/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_log/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_log/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/src/modules/mod_log/Makefile.am Mon Jul 16 09:42:53 2007
@@ -7,9 +7,10 @@
mod_log.c
libaxis2_mod_log_la_LIBADD = \
- $(top_builddir)/src/core/engine/libaxis2_engine.la \
$(top_builddir)/util/src/libaxutil.la \
$(top_builddir)/axiom/src/om/libaxis2_axiom.la
+
+libaxis2_mod_log_la_LDFLAGS = -version-info $(VERSION_NO)
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/src/core/description \
Modified: webservices/axis2/scratch/c/dinesh/602/c/test/core/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/test/core/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/test/core/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/test/core/Makefile.am Mon Jul 16 09:42:53 2007
@@ -1,2 +1,3 @@
TESTS =
SUBDIRS = description context engine deployment addr transport clientapi
+
Modified: webservices/axis2/scratch/c/dinesh/602/c/test/core/addr/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/test/core/addr/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/test/core/addr/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/test/core/addr/Makefile.am Mon Jul 16 09:42:53 2007
@@ -9,6 +9,7 @@
../../../util/src/libaxutil.la \
../../../axiom/src/om/libaxis2_axiom.la \
../../../axiom/src/parser/$(WRAPPER_DIR)/libaxis2_parser.la \
+ $(top_builddir)/neethi/src/libneethi.la \
$(top_builddir)/src/core/engine/libaxis2_engine.la \
$(top_builddir)/src/core/transport/http/common/libaxis2_http_common.la \
-L$(top_builddir)$(GUTHTHILA_LIBS) \
Modified: webservices/axis2/scratch/c/dinesh/602/c/test/core/clientapi/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/test/core/clientapi/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/test/core/clientapi/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/test/core/clientapi/Makefile.am Mon Jul 16 09:42:53 2007
@@ -10,6 +10,7 @@
../../../util/src/libaxutil.la \
../../../axiom/src/om/libaxis2_axiom.la \
../../../axiom/src/parser/$(WRAPPER_DIR)/libaxis2_parser.la \
+ $(top_builddir)/neethi/src/libneethi.la \
-lpthread \
$(top_builddir)/src/core/engine/libaxis2_engine.la \
$(top_builddir)/src/core/transport/http/sender/libaxis2_http_sender.la \
@@ -20,6 +21,7 @@
../../../util/src/libaxutil.la \
../../../axiom/src/om/libaxis2_axiom.la \
../../../axiom/src/parser/$(WRAPPER_DIR)/libaxis2_parser.la \
+ $(top_builddir)/neethi/src/libneethi.la \
-lpthread \
$(top_builddir)/src/core/engine/libaxis2_engine.la \
$(top_builddir)/src/core/transport/http/sender/libaxis2_http_sender.la \
@@ -35,5 +37,6 @@
-I$(top_builddir)/src/core/engine \
-I$(top_builddir)/src/core/clientapi \
-I ../../../util/include \
+ -I ../../../neethi/include \
-I ../../../axiom/include
Modified: webservices/axis2/scratch/c/dinesh/602/c/test/core/context/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/test/core/context/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/test/core/context/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/test/core/context/Makefile.am Mon Jul 16 09:42:53 2007
@@ -11,6 +11,7 @@
../../../axiom/src/parser/$(WRAPPER_DIR)/libaxis2_parser.la \
$(top_builddir)/src/core/engine/libaxis2_engine.la \
$(top_builddir)/src/core/transport/http/common/libaxis2_http_common.la \
+ $(top_builddir)/neethi/src/libneethi.la \
-L$(top_builddir)$(GUTHTHILA_LIBS) \
$(LIBXML2_LIBS)
Modified: webservices/axis2/scratch/c/dinesh/602/c/test/core/deployment/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/test/core/deployment/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/test/core/deployment/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/test/core/deployment/Makefile.am Mon Jul 16 09:42:53 2007
@@ -8,6 +8,7 @@
../../../util/src/libaxutil.la \
../../../axiom/src/om/libaxis2_axiom.la \
../../../axiom/src/parser/$(WRAPPER_DIR)/libaxis2_parser.la \
+ $(top_builddir)/neethi/src/libneethi.la \
$(top_builddir)/src/core/engine/libaxis2_engine.la \
$(top_builddir)/src/core/transport/http/common/libaxis2_http_common.la \
-L$(top_builddir)$(GUTHTHILA_LIBS) \
@@ -22,5 +23,6 @@
-I$(top_builddir)/src/core/clientapi \
-I$(top_builddir)/src/core/util \
-I ../../../util/include \
- -I ../../../axiom/include
+ -I ../../../axiom/include \
+ -I ../../../neethi/include
Modified: webservices/axis2/scratch/c/dinesh/602/c/test/core/description/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/test/core/description/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/test/core/description/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/test/core/description/Makefile.am Mon Jul 16 09:42:53 2007
@@ -9,6 +9,7 @@
../../../axiom/src/om/libaxis2_axiom.la \
../../../axiom/src/parser/$(WRAPPER_DIR)/libaxis2_parser.la \
-lpthread \
+ $(top_builddir)/neethi/src/libneethi.la \
$(top_builddir)/src/core/engine/libaxis2_engine.la \
$(top_builddir)/src/core/transport/http/common/libaxis2_http_common.la \
$(LIBXML2_LIBS)
Modified: webservices/axis2/scratch/c/dinesh/602/c/test/core/engine/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/test/core/engine/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/test/core/engine/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/test/core/engine/Makefile.am Mon Jul 16 09:42:53 2007
@@ -12,6 +12,7 @@
../../../axiom/src/parser/$(WRAPPER_DIR)/libaxis2_parser.la \
$(top_builddir)/src/core/engine/libaxis2_engine.la \
$(top_builddir)/src/core/transport/http/common/libaxis2_http_common.la \
+ $(top_builddir)/neethi/src/libneethi.la \
-L$(top_builddir)$(GUTHTHILA_LIBS) \
$(LIBXML2_LIBS)
@@ -21,5 +22,6 @@
-I$(top_builddir)/src/core/deployment \
-I$(top_builddir)/src/core/engine \
-I ../../../util/include \
- -I ../../../axiom/include
+ -I ../../../axiom/include \
+ -I ../../../neethi/include
Modified: webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/Makefile.am Mon Jul 16 09:42:53 2007
@@ -1,2 +1 @@
-TESTS =
SUBDIRS = http
Modified: webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/http/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/http/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/http/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/http/Makefile.am Mon Jul 16 09:42:53 2007
@@ -9,6 +9,7 @@
$(LDFLAGS) \
../../../../util/src/libaxutil.la \
../../../../axiom/src/om/libaxis2_axiom.la \
+ $(top_builddir)/neethi/src/libneethi.la \
../../../../axiom/src/parser/$(WRAPPER_DIR)/libaxis2_parser.la \
$(top_builddir)/src/core/engine/libaxis2_engine.la \
$(top_builddir)/src/core/transport/http/sender/libaxis2_http_sender.la \
Modified: webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/http/test_http_transport.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/http/test_http_transport.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/http/test_http_transport.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/test/core/transport/http/test_http_transport.c Mon Jul 16 09:42:53 2007
@@ -191,43 +191,46 @@
NULL, 0, NULL);
url = axutil_url_create(env, "https", "localhost", 9090,
NULL);
- /* Add an ssl certificate variable */
- /*setenv("AXIS2_SSL_CA_FILE", "cert.pem", 1);*/
+
header = axis2_http_header_create(env, "Host", axutil_url_get_server(url, env));
- AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, env, header);
+ axis2_http_simple_request_add_header(request, env, header);
client = axis2_http_client_create(env, url);
/* if you weant to test the proxy uncomment following */
- /*AXIS2_HTTP_CLIENT_SET_PROXY(client, env, "127.0.0.1", 8080);*/
+ /*axis2_http_client_set_proxy(client, env, "127.0.0.1", 8080);*/
+
+ /* Add CA/Server certificate */
+ status = axis2_http_client_set_server_cert(client, env,
+ "/home/dummy/dummyCA/demoCA/cacert.pem");
- status = AXIS2_HTTP_CLIENT_SEND(client, env, request);
+ status = axis2_http_client_send(client, env, request, NULL);
if (status < 0)
{
printf("Test FAILED .........Can't send the request. Status :%d\n", status);
return;
}
- status = AXIS2_HTTP_CLIENT_RECIEVE_HEADER(client, env);
+ status = axis2_http_client_recieve_header(client, env);
if (status < 0)
{
printf("Test FAILED ......... Can't recieve. Status: %d\n", status);
return;
}
- response = AXIS2_HTTP_CLIENT_GET_RESPONSE(client, env);
+ response = axis2_http_client_get_response(client, env);
if (! response)
{
printf("Test Failed : NULL response");
return;
}
- printf("Content Type :%s\n", AXIS2_HTTP_SIMPLE_RESPONSE_GET_CONTENT_TYPE(
+ printf("Content Type :%s\n", axis2_http_simple_response_get_content_type(
response, env));
- printf("Content Length :%d\n", AXIS2_HTTP_SIMPLE_RESPONSE_GET_CONTENT_LENGTH(
+ printf("Content Length :%d\n", axis2_http_simple_response_get_content_length(
response, env));
printf("Status code :%d\n", status);
- body_bytes_len = AXIS2_HTTP_SIMPLE_RESPONSE_GET_BODY_BYTES(response, env, &body_bytes);
+ body_bytes_len = axis2_http_simple_response_get_body_bytes(response, env, &body_bytes);
- AXIS2_HTTP_CLIENT_FREE(client, env);
- AXIS2_HTTP_SIMPLE_REQUEST_FREE(request, env);
- AXIS2_STREAM_FREE(request_body, env);
+ axis2_http_client_free(client, env);
+ axis2_http_simple_request_free(request, env);
+ axutil_stream_free(request_body, env);
AXIS2_FREE(env->allocator, body_bytes);
printf("Finished https_client tests ..........\n\n");
#endif
Modified: webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/Makefile.am Mon Jul 16 09:42:53 2007
@@ -1,4 +1,5 @@
-SUBDIRS = src $(TESTDIR)
-includedir=$(prefix)/include/axis2-1.0
+SUBDIRS = src
+includedir=$(prefix)/include/axis2-1.1
include_HEADERS=$(top_builddir)/include/*.h
data_DATA= INSTALL README AUTHORS NEWS LICENSE COPYING
+EXTRA_DIST=LICENSE
Modified: webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/configure.ac
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/configure.ac?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/configure.ac (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/configure.ac Mon Jul 16 09:42:53 2007
@@ -12,7 +12,7 @@
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
-AM_PROG_LIBTOOL
+AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
Modified: webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/Makefile.am?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/Makefile.am (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/Makefile.am Mon Jul 16 09:42:53 2007
@@ -1,35 +1,20 @@
-prglibdir=$(prefix)/lib
prgbindir=$(prefix)/bin/tools
-prglib_LTLIBRARIES = \
- libaxis2_tcpmon.la
+prgbin_PROGRAMS = tcpmon
-libaxis2_tcpmon_la_SOURCES = \
+tcpmon_SOURCES = tcpmon.c \
entry.c \
session.c \
- util.c \
- $(NULL)
-
-libaxis2_tcpmon_la_LIBADD = \
- ../../../util/src/libaxutil.la \
- ../../../axiom/src/om/libaxis2_axiom.la \
- ../../../axiom/src/parser/$(WRAPPER_DIR)/libaxis2_parser.la \
- $(NULL)
+ util.c
-prgbin_PROGRAMS = tcpmon
-
-tcpmon_SOURCES = tcpmon.c
tcpmon_LDADD = \
- $(top_builddir)/src/libaxis2_tcpmon.la \
../../../util/src/libaxutil.la \
../../../axiom/src/om/libaxis2_axiom.la \
- ../../../axiom/src/parser/$(WRAPPER_DIR)/libaxis2_parser.la \
- $(NULL)
-
+ ../../../axiom/src/parser/$(WRAPPER_DIR)/libaxis2_parser.la
INCLUDES = -I$(top_builddir)/include \
- -I ../../../util/include \
- -I ../../../axiom/include \
- -I ../../../include \
- $(NULL)
+ -I ../../../util/include \
+ -I ../../../axiom/include \
+ -I ../../../include
+EXTRA_DIST=tcpmon_entry_local.h tcpmon_session_local.h
Modified: webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/session.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/session.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/session.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/session.c Mon Jul 16 09:42:53 2007
@@ -156,7 +156,7 @@
session_impl -> on_new_entry_funct = NULL;
session_impl -> on_trans_fault_funct = NULL;
- session_impl -> entries = axutil_array_list_create(env, 10);
+ session_impl -> entries = axutil_array_list_create(env, AXIS2_ARRAY_LIST_DEFAULT_CAPACITY);
session_impl->session.ops =
AXIS2_MALLOC(env->allocator, sizeof(tcpmon_session_ops_t));
Modified: webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/tcpmon.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/tcpmon.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/tcpmon.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/tcpmon.c Mon Jul 16 09:42:53 2007
@@ -22,17 +22,23 @@
#include <tcpmon_session.h>
#include <tcpmon_entry.h>
#include <tcpmon_util.h>
-#include <platforms/axutil_platform_auto_sense.h>
-#include <axutil_string.h>
+#include <stdio.h>
#define SIZE 1024
+axis2_char_t *tcpmon_traffic_log = "tcpmon_traffic.log";
int on_new_entry(const axutil_env_t *env,
tcpmon_entry_t* entry,
int status);
+int on_new_entry_to_file(const axutil_env_t *env,
+ tcpmon_entry_t* entry,
+ int status);
int on_error_func(const axutil_env_t *env,
char* error_message);
+char *str_replace(char *str, const char *search, const char *replace);
+
+
int main(int argc, char** argv)
{
axutil_env_t* env = NULL;
@@ -60,8 +66,13 @@
if (!axutil_strcmp(argv[1], "-h"))
{
- printf("Usage : %s [OPTIONS] -lp LISTEN_PORT -tp TARGET_PORT -th [TARGET_HOST]\n", argv[0]);
- printf("use -h for help\n");
+ printf("Usage : %s [-lp LISTEN_PORT] [-tp TARGET_PORT] [-th TARGET_HOST] [-f LOG_FILE]\n", argv[0]);
+ fprintf(stdout, " Options :\n");
+ fprintf(stdout, "\t-lp LISTEN_PORT \t port number to listen on, default is 9090\n");
+ fprintf(stdout, "\t-tp TARGET_PORT \t port number to connect and re-direct messages, default is 8080\n");
+ fprintf(stdout, "\t-th TARGET_HOST \t target host to connect, default is localhost\n");
+ fprintf(stdout, "\t-f LOG_FILE \t file to write the messages to, default is %s\n", tcpmon_traffic_log);
+ fprintf(stdout, " Help :\n\t-h \t display this help screen.\n\n");
return 0;
}
@@ -74,7 +85,7 @@
if (listen_port == 0)
{
printf("INVALID value for listen port\n");
- printf("use -h for help\n");
+ printf("Use -h for help\n");
return 0;
}
@@ -86,7 +97,7 @@
if (target_port == 0)
{
printf("INVALID value for target port\n");
- printf("use -h for help\n");
+ printf("Use -h for help\n");
return 0;
}
}
@@ -105,12 +116,17 @@
ii++;
format_bit = 1;
}
+ else if (!strcmp ("-f", argv[ii]))
+ {
+ ii++;
+ tcpmon_traffic_log = argv[ii++];
+ }
else
- {
+ {
printf("INVALID value for tcpmon \n");
- printf("use -h for help\n");
+ printf("Use -h for help\n");
return 0;
- }
+ }
}
if (!(listen_port && target_port && target_host))
@@ -128,7 +144,9 @@
TCPMON_SESSION_SET_TARGET_PORT(session, env, target_port);
TCPMON_SESSION_SET_TARGET_HOST(session, env, target_host);
TCPMON_SESSION_ON_TRANS_FAULT(session, env, on_error_func);
- TCPMON_SESSION_ON_NEW_ENTRY(session, env, on_new_entry);
+
+ TCPMON_SESSION_ON_NEW_ENTRY(session, env, on_new_entry_to_file);
+
TCPMON_SESSION_SET_TEST_BIT (session, env, test_bit);
TCPMON_SESSION_SET_FORMAT_BIT(session, env, format_bit);
TCPMON_SESSION_START(session, env);
@@ -147,6 +165,105 @@
return 0;
}
+
+int on_new_entry_to_file(const axutil_env_t *env,
+ tcpmon_entry_t* entry,
+ int status)
+{
+ char* plain_buffer = NULL;
+ char* formated_buffer = NULL;
+ int format = 0;
+ FILE *file;
+ char *convert = NULL;
+
+ file = fopen(tcpmon_traffic_log, "a+");
+
+ if(NULL == file) {
+ printf("\ncould not create or open log-file\n");
+ return -1;
+ }
+
+ fprintf(file, "\n= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =\n");
+
+ format = TCPMON_ENTRY_GET_FORMAT_BIT(entry, env);
+
+ if (status == 0)
+ {
+ plain_buffer = TCPMON_ENTRY_SENT_DATA(entry, env);
+ if (plain_buffer) /* this can be possible as no xml present */
+ {
+ formated_buffer = tcpmon_util_format_as_xml
+ (env, plain_buffer, format);
+ }
+ else
+ {
+ formated_buffer = "";
+ }
+ /* 2 screen */
+ printf("%s\n", "SENDING DATA..");
+ printf("/* sending time = %s*/\n", TCPMON_ENTRY_SENT_TIME(entry, env));
+ printf("---------------------\n");
+
+ printf("%s\n\n%s\n\n", TCPMON_ENTRY_SENT_HEADERS(entry, env), formated_buffer);
+
+ /* 2 file */
+ fprintf(file, "%s\n", "SENDING DATA..");
+ fprintf(file, "/* sending time = %s*/\n", TCPMON_ENTRY_SENT_TIME(entry, env));
+ fprintf(file, "---------------------\n");
+
+ convert = TCPMON_ENTRY_SENT_HEADERS(entry, env);
+ convert = str_replace(convert, "; ", ";\n\t");
+ fprintf(file, "%s", convert);
+
+ convert = formated_buffer;
+ convert = str_replace(convert, "; ", ";\n\t");
+ convert = str_replace(convert, "><", ">\n<");
+ fprintf(file, "%s", convert);
+
+
+ }
+ if (status == 1)
+ {
+ plain_buffer = TCPMON_ENTRY_ARRIVED_DATA(entry, env);
+ if (plain_buffer) /* this can be possible as no xml present */
+ {
+ formated_buffer = tcpmon_util_format_as_xml
+ (env, plain_buffer, format);
+ }
+ else
+ {
+ formated_buffer = "";
+ }
+ /* 2 screen */
+ printf("%s\n", "RETRIEVING DATA..");
+ printf("/* retrieving time = %s*/\n", TCPMON_ENTRY_ARRIVED_TIME(entry, env));
+ printf("/* time throughput = %s*/\n", TCPMON_ENTRY_TIME_DIFF(entry, env));
+ printf("---------------------\n");
+
+ printf("%s\n\n%s\n\n", TCPMON_ENTRY_ARRIVED_HEADERS(entry, env), formated_buffer);
+
+ /* 2 file */
+ fprintf(file, "%s\n", "RETRIEVING DATA..");
+ fprintf(file, "/* retrieving time = %s*/\n", TCPMON_ENTRY_ARRIVED_TIME(entry, env));
+ fprintf(file, "/* time throughput = %s*/\n", TCPMON_ENTRY_TIME_DIFF(entry, env));
+ fprintf(file, "---------------------\n");
+
+ convert = TCPMON_ENTRY_ARRIVED_HEADERS(entry, env);
+ convert = str_replace(convert, "; ", ";\n\t");
+ fprintf(file, "%s", convert);
+
+ convert = formated_buffer;
+ convert = str_replace(convert, "; ", ";\n\t");
+ convert = str_replace(convert, "><", ">\n<");
+ fprintf(file, "%s", convert);
+ }
+
+ fclose(file);
+
+ return 0;
+}
+
+
int on_new_entry(const axutil_env_t *env,
tcpmon_entry_t* entry,
int status)
@@ -173,8 +290,7 @@
printf("/* sending time = %s*/\n", TCPMON_ENTRY_SENT_TIME(entry, env));
printf("---------------------\n");
- printf("%s\n\n%s\n\n", TCPMON_ENTRY_SENT_HEADERS(entry, env),
- formated_buffer);
+ printf("%s\n\n%s\n\n", TCPMON_ENTRY_SENT_HEADERS(entry, env), formated_buffer);
}
if (status == 1)
{
@@ -199,6 +315,8 @@
return 0;
}
+
+
int on_error_func(const axutil_env_t *env,
char* error_message)
{
@@ -207,6 +325,47 @@
}
+
+
+char *str_replace(char *str, const char *search, const char *replace) {
+ int size = strlen(str) * 2;
+ int addmem = size;
+ int diff = strlen(replace)-strlen(search);
+
+ char *str_return = (char *) malloc(size *sizeof(char));
+ char *str_tmp = (char *) malloc(size * sizeof(char));
+ char *str_relic;
+
+ if(str_return == NULL || str_tmp == NULL) {
+ free(str_return);
+ free(str_tmp);
+ return "function str_replace : gimme more memory";
+ }
+
+ strcpy(str_return, str);
+
+ while( (str_relic = strstr(str_return, search)) != NULL) {
+ if( strlen(str_return) + diff >= addmem) {
+ str_return = (char *) realloc(str_return, addmem+=size);
+ str_tmp = (char *) realloc(str_tmp, addmem);
+
+ if(str_return == NULL || str_tmp == NULL) {
+ free(str_return);
+ free(str_tmp);
+ return "function str_replace : gimme more memory";
+ }
+ }
+
+ strcpy(str_tmp, replace);
+ strcat(str_tmp, (str_relic+strlen(search)) );
+ *str_relic = '\0';
+
+ strcat(str_return, str_tmp);
+ }
+
+ free(str_tmp);
+ return(str_return);
+}
Modified: webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/util.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/util.c?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/util.c (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/tools/tcpmon/src/util.c Mon Jul 16 09:42:53 2007
@@ -16,12 +16,7 @@
*/
#include <tcpmon_util.h>
-#include <axutil_string.h>
#include <axiom.h>
-#include <axis2_util.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#define START_ELEMENT 1
#define CHAR_VALUE 2
@@ -48,9 +43,8 @@
axis2_char_t c,
int turns);
*/
-
-axis2_char_t*
-tcpmon_util_format_as_xml(const axutil_env_t* env, axis2_char_t* data, int format)
+axis2_char_t*
+tcpmon_util_format_as_xml(const axutil_env_t *env, axis2_char_t *data, int format)
{
if(format)
{
Modified: webservices/axis2/scratch/c/dinesh/602/c/xdocs/docs/axis2c_manual.html
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/xdocs/docs/axis2c_manual.html?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/xdocs/docs/axis2c_manual.html (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/xdocs/docs/axis2c_manual.html Mon Jul 16 09:42:53 2007
@@ -2862,7 +2862,7 @@
</tr>
<tr>
<td>const int soap_version</td>
- <td>SOAP version, either AXIOM_SOAP_11 or AXIOM_SOAP_12.</td>
+ <td>SOAP version, either AXIOM_SOAP11 or AXIOM_SOAP12.</td>
</tr>
</tbody>
</table>
Modified: webservices/axis2/scratch/c/dinesh/602/c/xdocs/download.html
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/xdocs/download.html?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/xdocs/download.html (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/xdocs/download.html Mon Jul 16 09:42:53 2007
@@ -13,6 +13,15 @@
binary. For more information on Apache software releases, please see <a
href="http://www.apache.org/dev/release.html">Apache Releases FAQ</a>.</p>
</div>
+<!-- we have a issue with this google analytics code with maven 1.x. see
+https://issues.apache.org/jira/browse/AXIS2-2790 -->
+<script src="http://www.google-analytics.com/urchin.js"
+ type="text/javascript">
+</script>
+<script type="text/javascript">
+ _uacct = "UA-1954378-10";
+ urchinTracker();
+</script>
<div align="center">
@@ -31,7 +40,8 @@
<td>MS Windows Distribution<br>
- Binary Distribution <a
href="[preferred]/ws/axis2/c/1_0_0/axis2c-bin-1.0.0-win32.zip"
- title="[preferred]/ws/axis2/1_0_0/axis2c-bin-1.0.0-win32.zip">zip</a>
+ title="[preferred]/ws/axis2/1_0_0/axis2c-bin-1.0.0-win32.zip"
+ onClick="javascript:urchinTracker ('/downloads/axis2c-bin-1.0.0-win32.zip');">zip</a>
<a
href="http://www.apache.org/dist/ws/axis2/c/1_0_0/axis2c-bin-1.0.0-win32.zip.md5"
title="http://www.apache.org/dist/ws/axis2/c/1_0_0/axis2c-bin-1.0.0-win32.zip.md5">MD5</a>
@@ -41,7 +51,9 @@
<br>
- Source Distribution <a
href="[preferred]/ws/axis2/c/1_0_0/axis2c-src-1.0.0.zip"
- title="[preferred]/ws/axis2/c/1_0_0/axis2c-src-1.0.0.zip">zip</a> <a
+ title="[preferred]/ws/axis2/c/1_0_0/axis2c-src-1.0.0.zip"
+ onClick="javascript:urchinTracker ('/downloads/axis2c-src-1.0.0.zip');">zip</a>
+ <a
href="http://www.apache.org/dist/ws/axis2/c/1_0_0/axis2c-src-1.0.0.zip.md5"
title="http://www.apache.org/dist/ws/axis2/c/1_0_0/axis2c-src-1.0.0.zip.md5">MD5</a>
<a
@@ -51,7 +63,8 @@
Linux Distribution <br>
- Binary Distribution <a
href="[preferred]/ws/axis2/c/1_0_0/axis2c-bin-1.0.0-linux.tar.gz"
- title="[preferred]/ws/axis2/c/1_0_0/axis2c-bin-1.0.0-linux.tar.gz">tar.gz</a>
+ title="[preferred]/ws/axis2/c/1_0_0/axis2c-bin-1.0.0-linux.tar.gz"
+ onClick="javascript:urchinTracker ('/downloads/axis2c-bin-1.0.0-linux.tar.gz');">tar.gz</a>
<a
href="http://www.apache.org/dist/ws/axis2/c/1_0_0/axis2c-bin-1.0.0-linux.tar.gz.md5"
title="http://www.apache.org/dist/ws/axis2/c/1_0_0/axis2c-bin-1.0.0-linux.tar.gz.md5">MD5</a>
@@ -61,7 +74,8 @@
<br>
- Source Distribution <a
href="[preferred]/ws/axis2/c/1_0_0/axis2c-src-1.0.0.tar.gz"
- title="[preferred]/ws/axis2/c/1_0_0/axis2c-src-1.0.0.tar.gz">tar.gz</a>
+ title="[preferred]/ws/axis2/c/1_0_0/axis2c-src-1.0.0.tar.gz"
+ onClick="javascript:urchinTracker ('/downloads/axis2c-src-1.0.0.tar.gz');">tar.gz</a>
<a
href="http://www.apache.org/dist/ws/axis2/c/1_0_0/axis2c-src-1.0.0.tar.gz.md5"
title="http://www.apache.org/dist/ws/axis2/c/1_0_0/axis2c-src-1.0.0.tar.gz.md5">MD5</a>
Modified: webservices/axis2/scratch/c/dinesh/602/c/xdocs/index.html
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/xdocs/index.html?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/xdocs/index.html (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/xdocs/index.html Mon Jul 16 09:42:53 2007
@@ -15,16 +15,43 @@
architecture</a> in C. Apache Axis2/C can be used to provide and consume Web
Services.</p>
-<h2>Background and Motivation</h2>
+<p>Apache Axis2/C supports <a
+href="http://www.w3.org/TR/2000/NOTE-SOAP-20000508/">SOAP 1.1</a> and <a
+href="http://www.w3.org/TR/soap12-part1/">SOAP 1.2</a>, as well as <a
+href="http://www.xfront.com/REST-Web-Services.html">REST</a> style of Web
+services. A single service could be exposed both as a SOAP style interface as
+well as a REST style interface simultaneously. It also has built in <a
+href="http://www.w3.org/TR/soap12-mtom/">MTOM</a> support, that can be used
+to exchange binary data.</p>
-<p>This implementation provides the C language option in consuming and
-providing Web Services. Apache Axis2/C is looking at broadening its horizon
-by its ability to plug in and embed into other software systems.</p>
+<p>Apache Axis2/C is efficient, modular and is designed with extensibility.
+This allows it to support the full WS-* stack with the concept of modules.
+The following WS-* specifications are supported, either as built in modules
+or as separate Apache projects:</p>
+<ul>
+ <li><a href="http://www.w3.org/Submission/ws-addressing/">WS-Addressing</a>
+ - Built in to Axis2/C</li>
+ <li><a href="http://www.w3.org/Submission/WS-Policy/">WS-Policy</a> - Built
+ in to Axis2/C</li>
+ <li><a
+ href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wss">WS-Security</a>
+ - Implemented by <a
+ href="http://ws.apache.org/axis2/modules/rampart/1_2/security-module.html">Apache
+ Rampart/C</a> project</li>
+ <li><a
+ href="http://specs.xmlsoap.org/ws/2005/07/securitypolicy/ws-securitypolicy.pdf">WS-SecurityPolicy</a>
+ - Built in to Axis2/C</li>
+ <li><a
+ href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=wsrm">WS-ReliableMessaging</a>
+ - Implemented by <a
+ href="http://ws.apache.org/sandesha/sandesha2/c">Apache Sandesha2/C</a>
+ project</li>
+</ul>
<h2>Latest Release</h2>
<h3>06th May 2007 - Apache Axis2/C Version 1.0.0 Released</h3>
-<a href="download.cgi">Download 1.0.0</a>
+<a href="http://ws.apache.org/axis2/c/download.cgi">Download 1.0.0</a>
<h4>Key Features</h4>
<ol>
Modified: webservices/axis2/scratch/c/dinesh/602/c/xdocs/navigation.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/602/c/xdocs/navigation.xml?view=diff&rev=556666&r1=556665&r2=556666
==============================================================================
--- webservices/axis2/scratch/c/dinesh/602/c/xdocs/navigation.xml (original)
+++ webservices/axis2/scratch/c/dinesh/602/c/xdocs/navigation.xml Mon Jul 16 09:42:53 2007
@@ -10,7 +10,7 @@
<item name="Installation Guide" href="docs/installationguide.html"/>
<item name="Axis2/C manual" href="docs/axis2c_manual.html"/>
</item>
- <item name="Get Involved" href="list.html">
+ <item name="Get Involved" href="lists_issues.html">
<item name="Mailing Lists & Issue Tracking" href="lists_issues.html"/>
<item name="Checkout Source Code" href="svn.html"/>
</item>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org