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 du...@apache.org on 2008/01/24 13:01:35 UTC
svn commit: r614857 -
/webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c
Author: dushshantha
Date: Thu Jan 24 04:01:32 2008
New Revision: 614857
URL: http://svn.apache.org/viewvc?rev=614857&view=rev
Log:
applied the patch for AXIS2C-929
Modified:
webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c
Modified: webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c?rev=614857&r1=614856&r2=614857&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c (original)
+++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c Thu Jan 24 04:01:32 2008
@@ -36,6 +36,7 @@
axiom_node_t *payload = NULL;
axiom_node_t *ret_node = NULL;
axis2_bool_t method_get = AXIS2_FALSE;
+ axis2_bool_t method_head = AXIS2_FALSE;
/* Set up the environment */
env = axutil_env_create_all("echo_rest.log", AXIS2_LOG_LEVEL_TRACE);
@@ -44,14 +45,19 @@
address = "http://localhost:9090/axis2/services/echo/echoString";
if (argc > 1)
{
- if (0 == strncmp(argv[1], "-mGET", 2))
+ if (0 == strncmp(argv[1], "-mGET", 4))
{
method_get = AXIS2_TRUE;
}
+ else if (0 == strncmp(argv[1], "-mHEAD", 4))
+ {
+ method_head = AXIS2_TRUE;
+ }
else if (0 == axutil_strcmp(argv[1], "-h"))
{
printf("Usage : %s [endpoint_url]", argv[0]);
- printf(" or %s -mGET for HTTP GET\n", argv[0]);
+ printf(" or either %s -mGET for HTTP GET", argv[0]);
+ printf(" or %s -mHEAD for HTTP HEAD\n", argv[0]);
printf("use -h for help\n");
return 0;
}
@@ -67,6 +73,10 @@
{
method_get = AXIS2_TRUE;
}
+ else if (0 == strncmp(argv[2], "-mHEAD", 2))
+ {
+ method_head = AXIS2_TRUE;
+ }
else
{
address = argv[2];
@@ -87,6 +97,10 @@
if (AXIS2_TRUE == method_get)
{
axis2_options_set_http_method(options, env, AXIS2_HTTP_GET);
+ }
+ else if (AXIS2_TRUE == method_head)
+ {
+ axis2_options_set_http_method(options, env, AXIS2_HTTP_HEAD);
}
/* Set up deploy folder. It is from the deploy folder, the configuration is picked up
* using the axis2.xml file.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org