From 414a8fbfc7ecea342766854d3094e34f26d9fb77 Mon Sep 17 00:00:00 2001 From: nandika Date: Sat, 20 Feb 2010 18:03:49 +0000 Subject: axis2_msg_ctx_get_doing_mtom method updated git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@912168 13f79535-47bb-0310-9956-ffa450edef68 --- src/core/context/msg_ctx.c | 48 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/context/msg_ctx.c b/src/core/context/msg_ctx.c index c2342c4..02bfdf3 100644 --- a/src/core/context/msg_ctx.c +++ b/src/core/context/msg_ctx.c @@ -1554,14 +1554,56 @@ axis2_msg_ctx_get_doing_mtom( axis2_msg_ctx_t * msg_ctx, const axutil_env_t * env) { - AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FALSE); - + axutil_param_t *param = NULL; + if(msg_ctx->doing_mtom) + return msg_ctx->doing_mtom; + if(msg_ctx->op) + { + param = axis2_op_get_param(msg_ctx->op, env, AXIS2_ENABLE_MTOM); + if(param) + { + axis2_char_t *value = axutil_param_get_value(param, env); + if(value) + { + if(axutil_strcmp(value,"false") == 0) + { + msg_ctx->doing_mtom = AXIS2_FALSE; + return msg_ctx->doing_mtom; + } + if(axutil_strcmp(value,"true") == 0) + { + msg_ctx->doing_mtom = AXIS2_TRUE; + return msg_ctx->doing_mtom; + } + } + } + } + if(msg_ctx->svc) + { + param = axis2_svc_get_param(msg_ctx->svc, env, AXIS2_ENABLE_MTOM); + if(param) + { + axis2_char_t *value = axutil_param_get_value(param, env); + if(value) + { + if(axutil_strcmp(value,"false") == 0) + { + msg_ctx->doing_mtom = AXIS2_FALSE; + return msg_ctx->doing_mtom; + } + if(axutil_strcmp(value,"true") == 0) + { + msg_ctx->doing_mtom = AXIS2_TRUE; + return msg_ctx->doing_mtom; + } + } + } + } if(!(msg_ctx->doing_mtom) && msg_ctx->conf_ctx) { axis2_conf_t *conf = axis2_conf_ctx_get_conf(msg_ctx->conf_ctx, env); msg_ctx->doing_mtom = axis2_conf_get_enable_mtom(conf, env); } - return msg_ctx->doing_mtom; } -- cgit v1.1-32-gdbae