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 sa...@apache.org on 2007/01/24 11:26:59 UTC
svn commit: r499343 - in /webservices/axis2/trunk/c: include/
modules/core/context/ modules/core/engine/ modules/core/transport/http/
modules/core/transport/http/sender/ modules/core/transport/http/server/IIS/
modules/core/transport/http/server/apache2...
Author: samisa
Date: Wed Jan 24 02:26:58 2007
New Revision: 499343
URL: http://svn.apache.org/viewvc?view=rev&rev=499343
Log:
Dropped one more property setting from message context
Modified:
webservices/axis2/trunk/c/include/axis2_msg_ctx.h
webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
webservices/axis2/trunk/c/modules/core/engine/engine.c
webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c
webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c
webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
webservices/axis2/trunk/c/modules/core/transport/http/server/IIS/axis2_iis_worker.c
webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c
webservices/axis2/trunk/c/modules/core/util/core_utils.c
Modified: webservices/axis2/trunk/c/include/axis2_msg_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_msg_ctx.h?view=diff&rev=499343&r1=499342&r2=499343
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_ctx.h Wed Jan 24 02:26:58 2007
@@ -47,6 +47,7 @@
#include <axis2_param.h>
#include <axis2_handler_desc.h>
#include <axis2_qname.h>
+#include <axis2_stream.h>
#include <axis2_msg_info_headers.h>
#ifdef __cplusplus
@@ -1393,6 +1394,18 @@
const axis2_env_t *env,
axis2_string_t *str);
+ AXIS2_EXTERN axis2_stream_t *AXIS2_CALL
+ axis2_msg_ctx_get_transport_out_stream(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_set_transport_out_stream(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ axis2_stream_t *stream);
+
+ AXIS2_EXTERN axis2_status_t AXIS2_CALL
+ axis2_msg_ctx_reset_transport_out_stream(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env);
/** Gets base context struct. */
#define AXIS2_MSG_CTX_GET_BASE(msg_ctx, env) \
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=499343&r1=499342&r2=499343
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Wed Jan 24 02:26:58 2007
@@ -143,6 +143,7 @@
struct axis2_svc *svc);
axis2_string_t *charset_encoding;
+ axis2_stream_t *transport_out_stream;
};
AXIS2_EXTERN axis2_msg_ctx_t *AXIS2_CALL
@@ -206,6 +207,7 @@
msg_ctx->current_phase_index = 0;
msg_ctx->paused_phase_index = 0;
msg_ctx->charset_encoding = NULL;
+ msg_ctx->transport_out_stream = NULL;
msg_ctx->base = axis2_ctx_create(env);
if (!(msg_ctx->base))
@@ -344,7 +346,12 @@
axis2_string_free(msg_ctx->charset_encoding, env);
msg_ctx->charset_encoding = NULL;
}
-
+
+ if (msg_ctx->transport_out_stream)
+ {
+ axis2_stream_free(msg_ctx->transport_out_stream, env);
+ }
+
AXIS2_FREE(env->allocator, msg_ctx);
msg_ctx = NULL;
@@ -1952,4 +1959,55 @@
return AXIS2_SUCCESS;
}
+AXIS2_EXTERN axis2_stream_t *AXIS2_CALL
+axis2_msg_ctx_get_transport_out_stream(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env)
+{
+ if (msg_ctx)
+ {
+ return msg_ctx->transport_out_stream;
+ }
+ else
+ {
+ return NULL;
+ }
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_msg_ctx_set_transport_out_stream(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env,
+ axis2_stream_t *stream)
+{
+ if (msg_ctx)
+ {
+ if (msg_ctx->transport_out_stream)
+ {
+ axis2_stream_free(msg_ctx->transport_out_stream, env);
+ }
+
+ msg_ctx->transport_out_stream = stream;
+ }
+ else
+ {
+ return AXIS2_FAILURE;
+ }
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_msg_ctx_reset_transport_out_stream(axis2_msg_ctx_t *msg_ctx,
+ const axis2_env_t *env)
+{
+ if (msg_ctx)
+ {
+ msg_ctx->transport_out_stream = NULL;
+ }
+ else
+ {
+ return AXIS2_FAILURE;
+ }
+
+ return AXIS2_SUCCESS;
+}
Modified: webservices/axis2/trunk/c/modules/core/engine/engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/engine/engine.c?view=diff&rev=499343&r1=499342&r2=499343
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/engine.c Wed Jan 24 02:26:58 2007
@@ -566,6 +566,7 @@
axis2_engine_impl_t *engine_impl = NULL;
axis2_endpoint_ref_t *fault_to = NULL;
axis2_endpoint_ref_t *reply_to = NULL;
+ axis2_stream_t *stream = NULL;
axis2_property_t *property = NULL;
axiom_soap_envelope_t *envelope = NULL;
const axis2_char_t *wsa_action = NULL;
@@ -620,20 +621,18 @@
}
- property = AXIS2_MSG_CTX_GET_PROPERTY(processing_context, env,
- AXIS2_TRANSPORT_OUT, AXIS2_FALSE);
- if (property)
+ stream = axis2_msg_ctx_get_transport_out_stream(processing_context, env);
+
+ if (stream)
{
- AXIS2_MSG_CTX_SET_PROPERTY(fault_ctx, env, AXIS2_TRANSPORT_OUT, property,
- AXIS2_FALSE);
+ axis2_msg_ctx_set_transport_out_stream(fault_ctx, env, stream);
}
- if (!fault_to && !property)
+ if (!fault_to && !stream)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NOWHERE_TO_SEND_FAULT, AXIS2_FAILURE);
return NULL;
}
- property = NULL;
/* set WSA action */
msg_info_headers = AXIS2_MSG_CTX_GET_MSG_INFO_HEADERS(processing_context, env);
Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c?view=diff&rev=499343&r1=499342&r2=499343
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c Wed Jan 24 02:26:58 2007
@@ -522,7 +522,6 @@
{
axiom_soap_envelope_t *soap_envelope = NULL;
axis2_engine_t *engine = NULL;
- axis2_property_t *property = NULL;
axis2_op_t *op = NULL;
xml_schema_element_t *schema_element = NULL;
@@ -537,12 +536,7 @@
AXIS2_MSG_CTX_SET_TO(msg_ctx, env, axis2_endpoint_ref_create(env,
request_uri));
- property = axis2_property_create(env);
- AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
- AXIS2_PROPERTY_SET_FREE_FUNC(property, env, axis2_stream_free_void_arg);
- AXIS2_PROPERTY_SET_VALUE(property, env, out_stream);
- AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,
- AXIS2_TRANSPORT_OUT, property, AXIS2_FALSE);
+ axis2_msg_ctx_set_transport_out_stream(msg_ctx, env, out_stream);
AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
if (AXIS2_SUCCESS != axis2_http_transport_utils_dispatch_and_verify(env,
Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c?view=diff&rev=499343&r1=499342&r2=499343
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c Wed Jan 24 02:26:58 2007
@@ -260,12 +260,8 @@
path);
url_external_form = AXIS2_URL_TO_EXTERNAL_FORM(request_url, 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, out_stream);
- AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_OUT, property,
- AXIS2_FALSE);
+
+ axis2_msg_ctx_set_transport_out_stream(msg_ctx, env, out_stream);
property = axis2_property_create(env);
AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c?view=diff&rev=499343&r1=499342&r2=499343
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c Wed Jan 24 02:26:58 2007
@@ -290,15 +290,8 @@
if (!epr)
{
- axis2_stream_t *out_stream = NULL;
-
- property = AXIS2_MSG_CTX_GET_PROPERTY(msg_ctx, env,
- AXIS2_TRANSPORT_OUT, AXIS2_FALSE);
- if (property)
- {
- out_stream = AXIS2_PROPERTY_GET_VALUE(property, env);
- property = NULL;
- }
+ axis2_stream_t *out_stream = axis2_msg_ctx_get_transport_out_stream(msg_ctx, env);
+
if (AXIS2_TRUE == AXIS2_MSG_CTX_GET_SERVER_SIDE(msg_ctx, env))
{
axis2_op_ctx_t *op_ctx = NULL;
Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/IIS/axis2_iis_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/IIS/axis2_iis_worker.c?view=diff&rev=499343&r1=499342&r2=499343
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/IIS/axis2_iis_worker.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/IIS/axis2_iis_worker.c Wed Jan 24 02:26:58 2007
@@ -249,11 +249,7 @@
msg_ctx = axis2_msg_ctx_create(env, conf_ctx, in_desc, out_desc);
AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
- 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, out_stream);
- AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_OUT, property, AXIS2_FALSE);
+ axis2_msg_ctx_set_transport_out_stream(msg_ctx, env, out_stream);
ctx_uuid = axis2_uuid_gen(env);
AXIS2_MSG_CTX_SET_SVC_GRP_CTX_ID(msg_ctx, env, ctx_uuid);
Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c?view=diff&rev=499343&r1=499342&r2=499343
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c Wed Jan 24 02:26:58 2007
@@ -211,12 +211,7 @@
msg_ctx = axis2_msg_ctx_create(env, conf_ctx, in_desc, out_desc);
AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
- property = axis2_property_create(env);
- AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
- AXIS2_PROPERTY_SET_FREE_FUNC(property, env, axis2_stream_free_void_arg);
- AXIS2_PROPERTY_SET_VALUE(property, env, out_stream);
- AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_OUT, property,
- AXIS2_FALSE);
+ axis2_msg_ctx_set_transport_out_stream(msg_ctx, env, out_stream);
/*AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_HEADERS,
axis2_apache2_worker_get_headers(apache2_worker, env,
Modified: webservices/axis2/trunk/c/modules/core/util/core_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/util/core_utils.c?view=diff&rev=499343&r1=499342&r2=499343
==============================================================================
--- webservices/axis2/trunk/c/modules/core/util/core_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/util/core_utils.c Wed Jan 24 02:26:58 2007
@@ -51,6 +51,7 @@
axis2_svc_grp_ctx_t *svc_grp_ctx = NULL;
/*axis2_property_t *property = NULL;*/
axis2_char_t *msg_uuid = NULL;
+ axis2_stream_t *out_stream = NULL;
AXIS2_PARAM_CHECK(env->error, in_msg_ctx, NULL);
@@ -132,6 +133,8 @@
}
}
+ out_stream = axis2_msg_ctx_get_transport_out_stream(in_msg_ctx, env);
+ axis2_msg_ctx_set_transport_out_stream(new_msg_ctx, env, out_stream);
/*property = AXIS2_MSG_CTX_GET_PROPERTY(in_msg_ctx, env,
AXIS2_TRANSPORT_OUT, AXIS2_FALSE);
if (property)
@@ -214,6 +217,7 @@
AXIS2_MSG_CTX_SET_OP_CTX(out_msg_ctx, env, NULL);
AXIS2_MSG_CTX_SET_SVC_CTX(out_msg_ctx, env, NULL);
+ axis2_msg_ctx_reset_transport_out_stream(out_msg_ctx, env);
/*AXIS2_MSG_CTX_SET_PROPERTY(out_msg_ctx, env, AXIS2_TRANSPORT_OUT, NULL,
AXIS2_FALSE);
AXIS2_MSG_CTX_SET_PROPERTY(out_msg_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO,
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org