int wsf_util_engage_module ( axis2_conf_t * conf, axis2_char_t * module_name, axutil_env_t * env, axis2_svc_t * svc) { axis2_module_desc_t *module = NULL; axutil_qname_t *mod_qname = NULL; axis2_phase_resolver_t *phase_resolver = NULL; int status = AXIS2_FAILURE; mod_qname = axutil_qname_create (env, module_name, NULL, NULL); module = axis2_conf_get_module (conf, env, mod_qname); if (module) { status = axis2_svc_engage_module (svc, env, module, conf); if (!status) { phase_resolver = axis2_phase_resolver_create_with_config (env, conf); if (!phase_resolver) { AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, " [wsf-log] PHASE RESLOVER NULL"); return AXIS2_FAILURE; } status = axis2_phase_resolver_engage_module_to_svc (phase_resolver, env, svc, module); } } return status; }
AXIS2_EXTERN axis2_status_t AXIS2_CALL axis2_svc_engage_module( axis2_svc_t * svc, const axutil_env_t * env, axis2_module_desc_t * module_desc, axis2_conf_t * conf) { axis2_phase_resolver_t *phase_resolver = NULL; axis2_status_t status = AXIS2_FAILURE; const axis2_char_t *svcname = NULL; AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Entry:axis2_svc_engage_module"); AXIS2_PARAM_CHECK(env->error, module_desc, AXIS2_FAILURE); AXIS2_PARAM_CHECK(env->error, conf, AXIS2_FAILURE); svcname = axis2_svc_get_name(svc, env); phase_resolver = axis2_phase_resolver_create_with_config(env, conf); if (!phase_resolver) { AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Creating phase resolver failed for service %s", svcname); return AXIS2_FAILURE; } status = axis2_phase_resolver_engage_module_to_svc(phase_resolver, env, svc, module_desc); if (status) { const axutil_qname_t *qname = NULL; status = axutil_array_list_add(svc->engaged_module_list, env, module_desc); qname = axis2_module_desc_get_qname(module_desc, env); axis2_svc_add_module_qname(svc, env, qname); } if (phase_resolver) { axis2_phase_resolver_free(phase_resolver, env); } AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:axis2_svc_engage_module"); return status; }