diff options
| author | 2010-02-16 12:09:36 +0000 | |
|---|---|---|
| committer | 2010-02-16 12:09:36 +0000 | |
| commit | 950c199823fa924aadcabd05d581384bfb71544d (patch) | |
| tree | cb602064d3fa8e8d3b5ee8107af473a0963c9159 /src/core/description/op.c | |
| parent | b1d21c3f63bfd09d642aa1cc56bfbc4784e4e6c5 (diff) | |
| download | axis2c-950c199823fa924aadcabd05d581384bfb71544d.tar.gz axis2c-950c199823fa924aadcabd05d581384bfb71544d.tar.bz2 | |
is_module_engaged method added
git-svn-id: http://svn.apache.org/repos/asf/axis/axis2/c/core/trunk@910493 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/core/description/op.c')
| -rw-r--r-- | src/core/description/op.c | 40 | 
1 files changed, 40 insertions, 0 deletions
| diff --git a/src/core/description/op.c b/src/core/description/op.c index 0cf926c..75affce 100644 --- a/src/core/description/op.c +++ b/src/core/description/op.c @@ -1381,3 +1381,43 @@ axis2_op_get_base(      return op->base;  } +AXIS2_EXTERN axis2_bool_t AXIS2_CALL +axis2_op_is_module_engaged( +	const axis2_op_t *op, +	const axutil_env_t *env, +	const axutil_qname_t *mod_qname) +{ +	int index = 0; +    int size = 0; +    axutil_array_list_t *collection_module = NULL; +    axis2_module_desc_t *module_desc = NULL; +    axis2_char_t *opname = NULL; +    axis2_char_t *modname = NULL; + +    opname = axutil_qname_get_localpart(axis2_op_get_qname(op, env), env); +    collection_module = op->engaged_module_list; +    if(collection_module) +    { +        size = axutil_array_list_size(collection_module, env); +    } +    for(index = 0; index < size; index++) +    { +        const axutil_qname_t *qname1 = NULL; + +        module_desc = (axis2_module_desc_t *)axutil_array_list_get(collection_module, env, index); +        if(!module_desc) +        { +            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, +                "Retrieving a module failed from operation %s engaged module" +                    " list", opname); +            return AXIS2_FAILURE; +        } +        qname1 = axis2_module_desc_get_qname(module_desc, env); +        if(axutil_qname_equals(qname1, env, mod_qname)) +        { +			return AXIS2_TRUE; +        } +    } +	return AXIS2_FALSE; +} + | 
