Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 60112 invoked from network); 21 Nov 2006 08:38:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Nov 2006 08:38:34 -0000 Received: (qmail 29934 invoked by uid 500); 21 Nov 2006 08:38:43 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 29839 invoked by uid 500); 21 Nov 2006 08:38:43 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 29828 invoked by uid 500); 21 Nov 2006 08:38:43 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 29825 invoked by uid 99); 21 Nov 2006 08:38:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Nov 2006 00:38:43 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME,UPPERCASE_25_50 X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Nov 2006 00:38:31 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id C78AA1A9846; Tue, 21 Nov 2006 00:37:57 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r477577 - in /webservices/axis2/trunk/c: modules/core/context/msg_ctx.c modules/core/transport/http/sender/rest_sender.c samples/user_guide/clients/echo_rest.c Date: Tue, 21 Nov 2006 08:37:57 -0000 To: axis2-cvs@ws.apache.org From: dinesh@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061121083757.C78AA1A9846@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dinesh Date: Tue Nov 21 00:37:56 2006 New Revision: 477577 URL: http://svn.apache.org/viewvc?view=rev&rev=477577 Log: fixed:axis2c-417 echo -mGET sends post request Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/msg_ctx.c?view=diff&rev=477577&r1=477576&r2=477577 ============================================================================== --- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original) +++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Tue Nov 21 00:37:56 2006 @@ -2472,7 +2472,8 @@ axis2_options_t *options) { axis2_msg_ctx_impl_t *msg_ctx_impl = NULL; - axis2_char_t *rest_val = NULL; + axis2_property_t *rest_val = NULL; + axis2_char_t *value; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, options, AXIS2_FAILURE); @@ -2491,12 +2492,16 @@ AXIS2_CTX_SET_NON_PERSISTANT_MAP(msg_ctx_impl->base, env, AXIS2_OPTIONS_GET_PROPERTIES(options, env)); - rest_val = (axis2_char_t *)AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, + rest_val = (axis2_property_t *) AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env, AXIS2_ENABLE_REST, AXIS2_FALSE); if (rest_val) { - if (AXIS2_STRCMP(rest_val, AXIS2_VALUE_TRUE) == 0) - msg_ctx_impl->doing_rest = AXIS2_TRUE; + value = (axis2_char_t *)AXIS2_PROPERTY_GET_VALUE(rest_val, env); + if (value) + { + if (AXIS2_STRCMP(value, AXIS2_VALUE_TRUE) == 0) + AXIS2_MSG_CTX_SET_DOING_REST(msg_ctx, env, AXIS2_TRUE); + } } return AXIS2_SUCCESS; Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c?view=diff&rev=477577&r1=477576&r2=477577 ============================================================================== --- webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c (original) +++ webservices/axis2/trunk/c/modules/core/transport/http/sender/rest_sender.c Tue Nov 21 00:37:56 2006 @@ -207,7 +207,8 @@ const axis2_char_t *content_type = NULL; axis2_property_t *property = NULL; axis2_bool_t send_via_get = AXIS2_FALSE; - axis2_char_t *method = NULL; + axis2_property_t *method = NULL; + axis2_char_t *method_value = NULL; AXIS2_ENV_CHECK(env, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE); @@ -243,11 +244,13 @@ AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_HTTP_CLIENT, property, AXIS2_TRUE); - method = (axis2_char_t *)AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, 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 && 0 == AXIS2_STRCMP(method, AXIS2_HTTP_HEADER_GET)) + if (method_value && 0 == AXIS2_STRCMP(method_value, AXIS2_HTTP_HEADER_GET)) { send_via_get = AXIS2_TRUE; } 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?view=diff&rev=477577&r1=477576&r2=477577 ============================================================================== --- webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c (original) +++ webservices/axis2/trunk/c/samples/user_guide/clients/echo_rest.c Tue Nov 21 00:37:56 2006 @@ -32,6 +32,7 @@ axiom_node_t *ret_node = NULL; axis2_bool_t method_get = AXIS2_FALSE; axis2_property_t *rest_property = NULL; + axis2_property_t *get_property = NULL; /* Set up the environment */ env = axis2_env_create_all("echo_rest.log", AXIS2_LOG_LEVEL_TRACE); @@ -79,16 +80,15 @@ AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref); /* Enable REST at the client side */ rest_property = axis2_property_create(env); - AXIS2_PROPERTY_SET_VALUE(rest_property, env, axis2_strdup(AXIS2_VALUE_TRUE, env)); + AXIS2_PROPERTY_SET_VALUE(rest_property, env, axis2_strdup (AXIS2_VALUE_TRUE, env)); AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_ENABLE_REST, rest_property); - rest_property = NULL; if (AXIS2_TRUE == method_get) { - rest_property = axis2_property_create(env); - AXIS2_PROPERTY_SET_VALUE(rest_property, env, axis2_strdup(AXIS2_HTTP_HEADER_GET, env)); + get_property = axis2_property_create(env); + AXIS2_PROPERTY_SET_VALUE(get_property, env, axis2_strdup(AXIS2_HTTP_HEADER_GET, env)); AXIS2_OPTIONS_SET_PROPERTY(options, env, AXIS2_HTTP_METHOD, - rest_property); + get_property); } /* 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