You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2006/10/13 06:26:41 UTC
svn commit: r463558 - in /webservices/axis2/trunk/c: include/
modules/core/clientapi/ modules/core/description/
modules/core/transport/http/sender/ samples/client/dynamic_client/
util/include/
Author: damitha
Date: Thu Oct 12 21:26:37 2006
New Revision: 463558
URL: http://svn.apache.org/viewvc?view=rev&rev=463558
Log:
Please refer the mail to axis-c-dev list with topic
[Axis2][Fwd: Changes in files]
Modified:
webservices/axis2/trunk/c/include/axis2_http_client.h
webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
webservices/axis2/trunk/c/modules/core/description/client_utils.c
webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c
webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c
webservices/axis2/trunk/c/samples/client/dynamic_client/dynamic_client.c
webservices/axis2/trunk/c/util/include/axis2_utils.h
Modified: webservices/axis2/trunk/c/include/axis2_http_client.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_http_client.h?view=diff&rev=463558&r1=463557&r2=463558
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_http_client.h (original)
+++ webservices/axis2/trunk/c/include/axis2_http_client.h Thu Oct 12 21:26:37 2006
@@ -147,6 +147,12 @@
get_proxy)(
const axis2_http_client_t *client,
const axis2_env_t *env);
+
+ axis2_status_t (AXIS2_CALL *
+ set_dump_input_msg) (
+ axis2_http_client_t *client,
+ const axis2_env_t *env,
+ axis2_bool_t dump_input_msg);
/**
* @param client pointer to client
@@ -237,6 +243,11 @@
@sa axis2_http_client_ops#get_proxy */
#define AXIS2_HTTP_CLIENT_GET_PROXY(client, env) \
((client)->ops->get_proxy(client, env))
+
+/** Set dump_input_msg true.
+ @sa axis2_http_client_ops#set_dump_input_msg */
+#define AXIS2_HTTP_CLIENT_SET_DUMP_INPUT_MSG(client, env, dump_input_msg) \
+ ((client)->ops->set_dump_input_msg(client, env, dump_input_msg))
/** Frees the http client.
@sa axis2_http_client_ops#free */
Modified: webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/op_client.c?view=diff&rev=463558&r1=463557&r2=463558
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/op_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/op_client.c Thu Oct 12 21:26:37 2006
@@ -405,7 +405,13 @@
if (!transport_out)
{
axis2_endpoint_ref_t *to_epr = NULL;
- to_epr = AXIS2_OPTIONS_GET_TO(op_client_impl->options, env);
+ axis2_property_t *property = NULL;
+ property = AXIS2_OPTIONS_GET_PROPERTY(op_client_impl->options, env,
+ AXIS2_TARGET_EPR);
+ if(property)
+ to_epr = AXIS2_PROPERTY_GET_VALUE(property, env);
+ if(!to_epr)
+ to_epr = AXIS2_OPTIONS_GET_TO(op_client_impl->options, env);
if (!to_epr)
to_epr = AXIS2_MSG_CTX_GET_TO(msg_ctx, env);
transport_out = AXIS2_MEP_CLIENT_INFER_TRANSPORT(op_client_impl->base, env, to_epr);
@@ -723,18 +729,4 @@
AXIS2_INTF_TO_IMPL(op_client)->callback_recv = callback_recv;
return AXIS2_SUCCESS;
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Modified: webservices/axis2/trunk/c/modules/core/description/client_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/client_utils.c?view=diff&rev=463558&r1=463557&r2=463558
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/client_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/client_utils.c Thu Oct 12 21:26:37 2006
@@ -287,7 +287,8 @@
AXIS2_FREE(env->allocator, localname);
AXIS2_QNAME_FREE(temp_svc_qname, env);
}
- endpoints = WODEN_WSDL10_SVC_GET_ENDPOINTS(wsdl_svc, env);
+ if(wsdl_svc)
+ endpoints = WODEN_WSDL10_SVC_GET_ENDPOINTS(wsdl_svc, env);
if (endpoints)
no_of_endpoints = AXIS2_ARRAY_LIST_SIZE(endpoints, env);
for (i = 0; i < no_of_endpoints; i++)
Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c?view=diff&rev=463558&r1=463557&r2=463558
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_client.c Thu Oct 12 21:26:37 2006
@@ -48,6 +48,7 @@
axis2_char_t *proxy_host;
int proxy_port;
axis2_char_t *proxy_host_port;
+ axis2_bool_t dump_input_msg;
}
axis2_http_client_impl_t;
@@ -114,6 +115,12 @@
int port);
axis2_status_t AXIS2_CALL
+axis2_http_client_set_dump_input_msg(
+ axis2_http_client_t *client,
+ const axis2_env_t *env,
+ axis2_bool_t dump_input_msg);
+
+axis2_status_t AXIS2_CALL
axis2_http_client_free(
axis2_http_client_t *client,
const axis2_env_t *env);
@@ -152,6 +159,7 @@
http_client_impl->proxy_port = 0;
http_client_impl->proxy_host = NULL;
http_client_impl->proxy_host_port = NULL;
+ http_client_impl->dump_input_msg = AXIS2_FALSE;
http_client_impl->http_client.ops = AXIS2_MALLOC(env->allocator,
sizeof(axis2_http_client_ops_t));
@@ -177,6 +185,8 @@
axis2_http_client_set_proxy;
http_client_impl->http_client.ops->get_proxy =
axis2_http_client_get_proxy;
+ http_client_impl->http_client.ops->set_dump_input_msg =
+ axis2_http_client_set_dump_input_msg;
http_client_impl->http_client.ops->free = axis2_http_client_free;
return &(http_client_impl->http_client);
@@ -247,6 +257,16 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
client_impl = AXIS2_INTF_TO_IMPL(client);
+ body_size = AXIS2_HTTP_SIMPLE_REQUEST_GET_BODY_BYTES(request, env,
+ &str_body);
+ if(client_impl->dump_input_msg == AXIS2_TRUE)
+ {
+ /* We just print the input message and return */
+ printf("----------------Input message--------------:\n");
+ printf("%s\n", str_body);
+ return AXIS2_SUCCESS;
+ }
+
if (NULL == client_impl->url)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NULL_URL, AXIS2_FAILURE);
@@ -399,8 +419,6 @@
wire_format = NULL;
written = AXIS2_STREAM_WRITE(client_impl->data_stream, env, AXIS2_HTTP_CRLF,
2);
- body_size = AXIS2_HTTP_SIMPLE_REQUEST_GET_BODY_BYTES(request, env,
- &str_body);
if (body_size > 0 && str_body)
{
if (AXIS2_FALSE == chunking_enabled)
@@ -786,3 +804,19 @@
AXIS2_STREAM_FREE(tmp_stream, env);
return AXIS2_SUCCESS;
}
+
+axis2_status_t AXIS2_CALL
+axis2_http_client_set_dump_input_msg(
+ axis2_http_client_t *client,
+ const axis2_env_t *env,
+ axis2_bool_t dump_input_msg)
+{
+ axis2_http_client_impl_t *client_impl = NULL;
+
+ client_impl = AXIS2_INTF_TO_IMPL(client);
+
+ client_impl->dump_input_msg = dump_input_msg;
+
+ return AXIS2_SUCCESS;
+}
+
Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c?view=diff&rev=463558&r1=463557&r2=463558
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/soap_over_http_sender.c Thu Oct 12 21:26:37 2006
@@ -209,6 +209,7 @@
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_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
@@ -234,6 +235,18 @@
{
return AXIS2_FAILURE;
}
+
+ 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);
+ }
+ }
+
/* configure proxy settings if we have set so
*/
axis2_soap_over_http_sender_configure_proxy(sender, env, msg_ctx);
Modified: webservices/axis2/trunk/c/samples/client/dynamic_client/dynamic_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/dynamic_client/dynamic_client.c?view=diff&rev=463558&r1=463557&r2=463558
==============================================================================
--- webservices/axis2/trunk/c/samples/client/dynamic_client/dynamic_client.c (original)
+++ webservices/axis2/trunk/c/samples/client/dynamic_client/dynamic_client.c Thu Oct 12 21:26:37 2006
@@ -64,7 +64,7 @@
return 1;
}
wsdl_uri_str = argv[1];
- if (strstr(wsdl_uri_str, "Calculator"))
+ if (strstr(wsdl_uri_str, "cal_1.1"))
{
printf("Calculator\n");
process_for_wsdl1(env, wsdl_uri_str);
@@ -165,12 +165,12 @@
if (!client_home)
client_home = "../../deploy";
- wsdl_svc_qname = axis2_qname_create(env, "Calculator",
- "http://localhost/axis/Calculator", NULL);
+ wsdl_svc_qname = axis2_qname_create(env, "reservationService",
+ "http://greath.example.com/2004/wsdl/resSvc", NULL);
wsdl_uri = axis2_uri_parse_string(env, wsdl_uri_str);
svc_client =
axis2_svc_client_create_for_dynamic_invocation(
- env, NULL, wsdl_uri, wsdl_svc_qname, "Calculator", client_home);
+ env, NULL, wsdl_uri, wsdl_svc_qname, "reservationService", client_home);
if (!svc_client)
{
printf("Service client is NULL \n");
Modified: webservices/axis2/trunk/c/util/include/axis2_utils.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_utils.h?view=diff&rev=463558&r1=463557&r2=463558
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_utils.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_utils.h Thu Oct 12 21:26:37 2006
@@ -132,6 +132,9 @@
#define AXIS2_REQUEST_URL_PREFIX "/services"
+#define AXIS2_TARGET_EPR "target_epr"
+#define AXIS2_DUMP_INPUT_MSG_TRUE "dump"
+
/**
* This function allows users to reolve the service and op from the
* url. It returns an array of 2 elements of axis2_char_t arrays (strings).
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org