summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorGravatar nandika2010-02-20 18:03:49 +0000
committerGravatar nandika2010-02-20 18:03:49 +0000
commit414a8fbfc7ecea342766854d3094e34f26d9fb77 (patch)
treeb308039524a40e19fab7d4fd0ed0ee0399632ca6 /src/core
parent2e6a3a1b76fcb42c106900486b8b4f633891b904 (diff)
downloadaxis2c-414a8fbfc7ecea342766854d3094e34f26d9fb77.tar.gz
axis2c-414a8fbfc7ecea342766854d3094e34f26d9fb77.tar.bz2
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
Diffstat (limited to 'src/core')
-rw-r--r--src/core/context/msg_ctx.c48
1 files changed, 45 insertions, 3 deletions
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;
}