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/03/15 14:16:11 UTC
svn commit: r518623 [12/17] - in /webservices/axis2/trunk/c: build/win32/
include/ modules/core/clientapi/ modules/core/deployment/
modules/core/engine/ modules/core/phaseresolver/ modules/core/receivers/
modules/core/transport/http/receiver/ modules/c...
Modified: webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c?view=diff&rev=518623&r1=518622&r2=518623
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Thu Mar 15 06:16:07 2007
@@ -30,14 +30,8 @@
#include <axis2_core_utils.h>
#include <axis2_module.h>
-/**
- * @brief DLL Description struct impl
- * Axis2 DLL Description impl
- */
-typedef struct axis2_dep_engine_impl
+struct axis2_dep_engine
{
- axis2_dep_engine_t dep_engine;
-
axis2_arch_file_data_t *curr_file;
axis2_arch_reader_t *arch_reader;
/**
@@ -74,110 +68,24 @@
axis2_repos_listener_t *repos_listener; /*Added this here to help with feeing memory allocated for this - Samisa*/
axis2_conf_builder_t *conf_builder;
axis2_svc_builder_t *svc_builder;
-}
-axis2_dep_engine_impl_t;
-
-#define AXIS2_INTF_TO_IMPL(dep_engine) ((axis2_dep_engine_impl_t *) dep_engine)
-
-/*************************** Function headers *********************************/
-
-axis2_status_t AXIS2_CALL
-axis2_dep_engine_free(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_dep_engine_add_module(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_qname_t *module_qname);
-
-axis2_module_desc_t *AXIS2_CALL
-axis2_dep_engine_get_module(
- const axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_qname_t *module_name);
-
-axis2_arch_file_data_t *AXIS2_CALL
-axis2_dep_engine_get_current_file_item(
- const axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_dep_engine_set_current_file_item(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_arch_file_data_t *file_data);
-
-axis2_status_t AXIS2_CALL
-axis2_dep_engine_set_arch_reader(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_arch_reader_t *arch_reader);
-
-axis2_status_t AXIS2_CALL
-axis2_dep_engine_add_ws_to_deploy(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_arch_file_data_t *file);
-
-axis2_status_t AXIS2_CALL
-axis2_dep_engine_add_ws_to_undeploy(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_ws_info_t *file);
+};
-axis2_phases_info_t *AXIS2_CALL
-axis2_dep_engine_get_phases_info(
- const axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env);
-
-/**
- * @return AxisConfiguration <code>AxisConfiguration</code>
- */
-axis2_conf_t *AXIS2_CALL
-axis2_dep_engine_get_axis_conf(
- const axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env);
-
-/**
- * To set hotDeployment and hot update
- */
static axis2_status_t
axis2_dep_engine_set_dep_features(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env);
-axis2_conf_t *AXIS2_CALL
-axis2_dep_engine_load(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env);
-
-axis2_conf_t *AXIS2_CALL
-axis2_dep_engine_load_client(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- const axis2_char_t *client_home);
-
static axis2_status_t
axis2_dep_engine_check_client_home(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
const axis2_char_t *client_home);
-/**
- * This methode used to check the modules referd by server.xml
- * are exist , or they have deployed
- */
static axis2_status_t
axis2_dep_engine_engage_modules(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env);
-/**
- * This method is to check wether some one has change the system pre defined phases for all the
- * flows if some one has done so will set an error code
- */
static axis2_status_t
axis2_dep_engine_validate_system_predefined_phases(
axis2_dep_engine_t *dep_engine,
@@ -189,16 +97,6 @@
const axis2_env_t *env,
axis2_svc_grp_t *svc_metadata);
-/**
- * This method is used to fill the axis service , it dose loading service class and also the provider class
- * and it will also load the service handlers
- */
-/*static axis2_status_t
-axis2_dep_engine_load_svc_props(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_svc_t *svc);*/
-
static axis2_status_t
axis2_dep_engine_load_module_dll(
axis2_dep_engine_t *dep_engine,
@@ -212,198 +110,92 @@
axis2_flow_t *flow,
axis2_hash_t *handler_create_func_map);
-/*static axis2_status_t
-axis2_dep_engine_add_flow_handlers(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_flow_t *flow);*/
-
-void *AXIS2_CALL
-axis2_dep_engine_get_handler_dll(
- const axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_char_t *dll_name);
-
static axis2_status_t
axis2_dep_engine_add_new_module(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
axis2_module_desc_t *module_metadata);
-axis2_status_t AXIS2_CALL
-axis2_dep_engine_do_deploy(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_dep_engine_undeploy(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env);
-
-axis2_bool_t AXIS2_CALL
-axis2_dep_engine_is_hot_update(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env);
-
-/**
- * This method is used to retrive service name form the arechive file name
- * if the archive file name is service1.aar , then axis service name would be service1
- */
static axis2_char_t *
axis2_dep_engine_get_axis_svc_name(
const axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
axis2_char_t *file_name);
-axis2_status_t AXIS2_CALL
-axis2_dep_engine_set_phases_info(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_phases_info_t *phases_info);
-
-/**
- * This method is used to fill a axisservice object using services.xml , first it should create
- * an axisservice object using WSDL and then fill that using given servic.xml and load all the requed
- * class and build the chains , finally add the servicecontext to EngineContext and axisservice into
- */
-axis2_svc_t *AXIS2_CALL
-axis2_dep_engine_build_svc(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_svc_t *svc,
- axis2_char_t *file_name);
-
-/**
- * This method can be used to build ModuleDescription for a given module archiev file
- */
-axis2_module_desc_t *AXIS2_CALL
-axis2_dep_engine_build_module(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_file_t *module_archive,
- axis2_conf_t *conf);
-
-axis2_char_t *AXIS2_CALL
-axis2_dep_engine_get_repos_path(
- const axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env);
-
-/************************* End of function headers ****************************/
-
-axis2_dep_engine_t *AXIS2_CALL
+AXIS2_EXTERN axis2_dep_engine_t *AXIS2_CALL
axis2_dep_engine_create(
const axis2_env_t *env)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
+ axis2_dep_engine_t *dep_engine = NULL;
AXIS2_ENV_CHECK(env, NULL);
- dep_engine_impl = (axis2_dep_engine_impl_t *) AXIS2_MALLOC(env->allocator
- , sizeof(axis2_dep_engine_impl_t));
+ dep_engine = (axis2_dep_engine_t *) AXIS2_MALLOC(env->allocator
+ , sizeof(axis2_dep_engine_t));
- if (NULL == dep_engine_impl)
+ if (NULL == dep_engine)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- dep_engine_impl->conf = NULL;
- dep_engine_impl->axis2_repos = NULL;
- dep_engine_impl->curr_file = NULL;
- dep_engine_impl->arch_reader = NULL;
- dep_engine_impl->ws_to_deploy = NULL;
- dep_engine_impl->ws_to_undeploy = NULL;
- dep_engine_impl->phases_info = NULL;
- dep_engine_impl->module_list = NULL;
- dep_engine_impl->folder_name = NULL;
- dep_engine_impl->conf_name = NULL;
- dep_engine_impl->dep_engine.ops = NULL;
- dep_engine_impl->repos_listener = NULL;
- dep_engine_impl->conf_builder = NULL;
- dep_engine_impl->svc_builder = NULL;
+ dep_engine->conf = NULL;
+ dep_engine->axis2_repos = NULL;
+ dep_engine->curr_file = NULL;
+ dep_engine->arch_reader = NULL;
+ dep_engine->ws_to_deploy = NULL;
+ dep_engine->ws_to_undeploy = NULL;
+ dep_engine->phases_info = NULL;
+ dep_engine->module_list = NULL;
+ dep_engine->folder_name = NULL;
+ dep_engine->conf_name = NULL;
+ dep_engine->repos_listener = NULL;
+ dep_engine->conf_builder = NULL;
+ dep_engine->svc_builder = NULL;
- dep_engine_impl->ws_to_deploy = axis2_array_list_create(env, 0);
- if (!(dep_engine_impl->ws_to_deploy))
+ dep_engine->ws_to_deploy = axis2_array_list_create(env, 0);
+ if (!(dep_engine->ws_to_deploy))
{
- axis2_dep_engine_free(&(dep_engine_impl->dep_engine), env);
+ axis2_dep_engine_free(dep_engine, env);
return NULL;
}
- dep_engine_impl->phases_info = axis2_phases_info_create(env);
- if (!(dep_engine_impl->phases_info))
+ dep_engine->phases_info = axis2_phases_info_create(env);
+ if (!(dep_engine->phases_info))
{
- axis2_dep_engine_free(&(dep_engine_impl->dep_engine), env);
+ axis2_dep_engine_free(dep_engine, env);
return NULL;
}
- dep_engine_impl->dep_engine.ops = (axis2_dep_engine_ops_t *) AXIS2_MALLOC(
- env->allocator, sizeof(axis2_dep_engine_ops_t));
-
- if (NULL == dep_engine_impl->dep_engine.ops)
- {
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- axis2_dep_engine_free(&(dep_engine_impl->dep_engine), env);
- return NULL;
- }
-
- dep_engine_impl->dep_engine.ops->free = axis2_dep_engine_free;
- dep_engine_impl->dep_engine.ops->add_module = axis2_dep_engine_add_module;
- dep_engine_impl->dep_engine.ops->get_module = axis2_dep_engine_get_module;
- dep_engine_impl->dep_engine.ops->get_current_file_item =
- axis2_dep_engine_get_current_file_item;
- dep_engine_impl->dep_engine.ops->add_ws_to_deploy =
- axis2_dep_engine_add_ws_to_deploy;
- dep_engine_impl->dep_engine.ops->add_ws_to_undeploy =
- axis2_dep_engine_add_ws_to_undeploy;
- dep_engine_impl->dep_engine.ops->get_phases_info =
- axis2_dep_engine_get_phases_info;
-
- dep_engine_impl->dep_engine.ops->get_axis_conf = axis2_dep_engine_get_axis_conf;
- dep_engine_impl->dep_engine.ops->load = axis2_dep_engine_load;
- dep_engine_impl->dep_engine.ops->load_client = axis2_dep_engine_load_client;
- dep_engine_impl->dep_engine.ops->get_handler_dll =
- axis2_dep_engine_get_handler_dll;
- dep_engine_impl->dep_engine.ops->do_deploy = axis2_dep_engine_do_deploy;
- dep_engine_impl->dep_engine.ops->undeploy = axis2_dep_engine_undeploy;
- dep_engine_impl->dep_engine.ops->is_hot_update = axis2_dep_engine_is_hot_update;
- dep_engine_impl->dep_engine.ops->set_phases_info =
- axis2_dep_engine_set_phases_info;
- dep_engine_impl->dep_engine.ops->build_svc = axis2_dep_engine_build_svc;
- dep_engine_impl->dep_engine.ops->build_module = axis2_dep_engine_build_module;
- dep_engine_impl->dep_engine.ops->get_repos_path = axis2_dep_engine_get_repos_path;
- dep_engine_impl->dep_engine.ops->set_current_file_item =
- axis2_dep_engine_set_current_file_item;
- dep_engine_impl->dep_engine.ops->set_arch_reader =
- axis2_dep_engine_set_arch_reader;
-
- return &(dep_engine_impl->dep_engine);
+ return dep_engine;
}
-axis2_dep_engine_t *AXIS2_CALL
+
+AXIS2_EXTERN axis2_dep_engine_t *AXIS2_CALL
axis2_dep_engine_create_with_repos_name(
const axis2_env_t *env,
const axis2_char_t *repos_path)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
+ axis2_dep_engine_t *dep_engine = NULL;
AXIS2_ENV_CHECK(env, NULL);
- dep_engine_impl = (axis2_dep_engine_impl_t *)
+ dep_engine = (axis2_dep_engine_t *)
axis2_dep_engine_create_with_repos_name_and_svr_xml_file(env,
repos_path, AXIS2_SERVER_XML_FILE);
- if (!dep_engine_impl)
+ if (!dep_engine)
{
return NULL;
}
- return &(dep_engine_impl->dep_engine);
+ return dep_engine;
}
-axis2_dep_engine_t *AXIS2_CALL
+AXIS2_EXTERN axis2_dep_engine_t *AXIS2_CALL
axis2_dep_engine_create_with_repos_name_and_svr_xml_file(
const axis2_env_t *env,
const axis2_char_t *repos_path,
const axis2_char_t *svr_xml_file)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
+ axis2_dep_engine_t *dep_engine = NULL;
axis2_char_t *conf_file_l = NULL;
axis2_status_t status = AXIS2_FAILURE;
@@ -417,9 +209,9 @@
return NULL;
}
- dep_engine_impl = (axis2_dep_engine_impl_t *) axis2_dep_engine_create(env);
+ dep_engine = (axis2_dep_engine_t *) axis2_dep_engine_create(env);
- if (NULL == dep_engine_impl)
+ if (NULL == dep_engine)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -428,207 +220,185 @@
status = axis2_file_handler_access(repos_path, AXIS2_F_OK);
if (AXIS2_SUCCESS != status)
{
- axis2_dep_engine_free(&(dep_engine_impl->dep_engine), env);
+ axis2_dep_engine_free(dep_engine, env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPOSITORY_NOT_EXIST,
AXIS2_FAILURE);
return NULL;
}
- dep_engine_impl->folder_name = AXIS2_STRDUP(repos_path, env);
- if (NULL == dep_engine_impl->folder_name)
+ dep_engine->folder_name = AXIS2_STRDUP(repos_path, env);
+ if (NULL == dep_engine->folder_name)
{
- axis2_dep_engine_free(&(dep_engine_impl->dep_engine), env);
+ axis2_dep_engine_free(dep_engine, env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- dep_engine_impl->axis2_repos = AXIS2_STRDUP(repos_path, env);
- if (NULL == dep_engine_impl->axis2_repos)
+ dep_engine->axis2_repos = AXIS2_STRDUP(repos_path, env);
+ if (NULL == dep_engine->axis2_repos)
{
- axis2_dep_engine_free(&(dep_engine_impl->dep_engine), env);
+ axis2_dep_engine_free(dep_engine, env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
conf_file_l = AXIS2_STRACAT(repos_path, AXIS2_PATH_SEP_STR, env);
- dep_engine_impl->conf_name = AXIS2_STRACAT(conf_file_l, svr_xml_file, env);
+ dep_engine->conf_name = AXIS2_STRACAT(conf_file_l, svr_xml_file, env);
AXIS2_FREE(env->allocator, conf_file_l);
- if (!dep_engine_impl->conf_name)
+ if (!dep_engine->conf_name)
{
- axis2_dep_engine_free(&(dep_engine_impl->dep_engine), env);
+ axis2_dep_engine_free(dep_engine, env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPO_CAN_NOT_BE_NULL , AXIS2_FAILURE);
return NULL;
}
- status = axis2_file_handler_access(dep_engine_impl->conf_name, AXIS2_F_OK);
+ status = axis2_file_handler_access(dep_engine->conf_name, AXIS2_F_OK);
if (AXIS2_SUCCESS != status)
{
- axis2_dep_engine_free(&(dep_engine_impl->dep_engine), env);
+ axis2_dep_engine_free(dep_engine, env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND,
AXIS2_FAILURE);
return NULL;
}
- return &(dep_engine_impl->dep_engine);
+ return dep_engine;
}
/******************************************************************************/
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_dep_engine_free(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
-
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
-
- if (dep_engine_impl->curr_file)
+ if (dep_engine->curr_file)
{
- AXIS2_ARCH_FILE_DATA_FREE(dep_engine_impl->curr_file, env);
- dep_engine_impl->curr_file = NULL;
+ AXIS2_ARCH_FILE_DATA_FREE(dep_engine->curr_file, env);
}
- if (dep_engine_impl->phases_info)
+ if (dep_engine->phases_info)
{
- AXIS2_PHASES_INFO_FREE(dep_engine_impl->phases_info, env);
- dep_engine_impl->phases_info = NULL;
+ AXIS2_PHASES_INFO_FREE(dep_engine->phases_info, env);
}
- if (dep_engine_impl->conf_builder)
+ if (dep_engine->conf_builder)
{
- AXIS2_CONF_BUILDER_FREE(dep_engine_impl->conf_builder, env);
- dep_engine_impl->conf_builder = NULL;
+ AXIS2_CONF_BUILDER_FREE(dep_engine->conf_builder, env);
}
- if (dep_engine_impl->arch_reader)
+ if (dep_engine->arch_reader)
{
- AXIS2_ARCH_READER_FREE(dep_engine_impl->arch_reader, env);
- dep_engine_impl->arch_reader = NULL;
+ AXIS2_ARCH_READER_FREE(dep_engine->arch_reader, env);
}
- if (dep_engine_impl->svc_builder)
+ if (dep_engine->svc_builder)
{
- AXIS2_SVC_BUILDER_FREE(dep_engine_impl->svc_builder, env);
- dep_engine_impl->svc_builder = NULL;
+ AXIS2_SVC_BUILDER_FREE(dep_engine->svc_builder, env);
}
- if (dep_engine_impl->ws_to_deploy)
+ if (dep_engine->ws_to_deploy)
{
int i = 0;
int size = 0;
- size = axis2_array_list_size(dep_engine_impl->ws_to_deploy, env);
+ size = axis2_array_list_size(dep_engine->ws_to_deploy, env);
for (i = 0; i < size; i++)
{
axis2_arch_file_data_t *file_data = NULL;
file_data = (axis2_arch_file_data_t *)
- axis2_array_list_get(dep_engine_impl->ws_to_deploy, env, i);
+ axis2_array_list_get(dep_engine->ws_to_deploy, env, i);
AXIS2_ARCH_FILE_DATA_FREE(file_data, env);
}
- axis2_array_list_free(dep_engine_impl->ws_to_deploy, env);
- dep_engine_impl->ws_to_deploy = NULL;
+ axis2_array_list_free(dep_engine->ws_to_deploy, env);
+ dep_engine->ws_to_deploy = NULL;
}
- if (dep_engine_impl->ws_to_undeploy)
+ if (dep_engine->ws_to_undeploy)
{
int i = 0;
int size = 0;
- size = axis2_array_list_size(dep_engine_impl->ws_to_undeploy, env);
+ size = axis2_array_list_size(dep_engine->ws_to_undeploy, env);
+
for (i = 0; i < size; i++)
{
axis2_arch_file_data_t *file_data = NULL;
file_data = (axis2_arch_file_data_t *)
- axis2_array_list_get(dep_engine_impl->ws_to_undeploy, env, i);
+ axis2_array_list_get(dep_engine->ws_to_undeploy, env, i);
AXIS2_ARCH_FILE_DATA_FREE(file_data, env);
}
- axis2_array_list_free(dep_engine_impl->ws_to_undeploy, env);
- dep_engine_impl->ws_to_undeploy = NULL;
+ axis2_array_list_free(dep_engine->ws_to_undeploy, env);
+ dep_engine->ws_to_undeploy = NULL;
}
- if (dep_engine_impl->module_list)
+ if (dep_engine->module_list)
{
int size = 0;
int i = 0;
- size = axis2_array_list_size(dep_engine_impl->module_list, env);
+ size = axis2_array_list_size(dep_engine->module_list, env);
+
for (i = 0; i < size; i++)
{
axis2_qname_t *qname = NULL;
- qname = axis2_array_list_get(dep_engine_impl->module_list, env, i);
+ qname = axis2_array_list_get(dep_engine->module_list, env, i);
if (qname)
{
AXIS2_QNAME_FREE(qname, env);
- qname = NULL;
}
}
- axis2_array_list_free(dep_engine_impl->module_list, env);
- dep_engine_impl->module_list = NULL;
- }
- if (dep_engine_impl->folder_name)
- {
- AXIS2_FREE(env->allocator, dep_engine_impl->folder_name);
- dep_engine_impl->folder_name = NULL;
+ axis2_array_list_free(dep_engine->module_list, env);
}
- if (dep_engine_impl->conf_name)
+ if (dep_engine->folder_name)
{
- AXIS2_FREE(env->allocator, dep_engine_impl->conf_name);
- dep_engine_impl->conf_name = NULL;
+ AXIS2_FREE(env->allocator, dep_engine->folder_name);
}
- if (dep_engine_impl->axis2_repos)
+ if (dep_engine->conf_name)
{
- AXIS2_FREE(env->allocator, dep_engine_impl->axis2_repos);
- dep_engine_impl->axis2_repos = NULL;
+ AXIS2_FREE(env->allocator, dep_engine->conf_name);
}
-
- if (dep_engine_impl->repos_listener)
+ if (dep_engine->axis2_repos)
{
- AXIS2_REPOS_LISTENER_FREE(dep_engine_impl->repos_listener, env);
- dep_engine_impl->repos_listener = NULL;
+ AXIS2_FREE(env->allocator, dep_engine->axis2_repos);
}
- if (dep_engine->ops)
+ if (dep_engine->repos_listener)
{
- AXIS2_FREE(env->allocator, dep_engine->ops);
- dep_engine->ops = NULL;
+ AXIS2_REPOS_LISTENER_FREE(dep_engine->repos_listener, env);
}
- if (dep_engine_impl)
+ if (dep_engine)
{
- AXIS2_FREE(env->allocator, dep_engine_impl);
- dep_engine_impl = NULL;
+ AXIS2_FREE(env->allocator, dep_engine);
}
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_dep_engine_add_module(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
axis2_qname_t *module_qname)
{
axis2_qname_t *qname = NULL;
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, module_qname, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
qname = AXIS2_QNAME_CLONE(module_qname, env);
- if (!dep_engine_impl->module_list)
+ if (!dep_engine->module_list)
{
- dep_engine_impl->module_list = axis2_array_list_create(env, 0);
- if (!dep_engine_impl->module_list)
+ dep_engine->module_list = axis2_array_list_create(env, 0);
+ if (!dep_engine->module_list)
{
AXIS2_QNAME_FREE(qname, env);
return AXIS2_FAILURE;
}
}
- return axis2_array_list_add(dep_engine_impl->module_list, env, qname);
+ return axis2_array_list_add(dep_engine->module_list, env, qname);
}
struct axis2_module_desc *AXIS2_CALL
@@ -637,73 +407,63 @@
const axis2_env_t *env,
axis2_qname_t *module_name)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
-
- AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, module_name, NULL);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- return AXIS2_CONF_GET_MODULE(dep_engine_impl->conf, env, module_name);
+ return AXIS2_CONF_GET_MODULE(dep_engine->conf, env, module_name);
}
-struct axis2_arch_file_data *AXIS2_CALL
+AXIS2_EXTERN struct axis2_arch_file_data *AXIS2_CALL
axis2_dep_engine_get_current_file_item(
const axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
- AXIS2_ENV_CHECK(env, NULL);
-
- return AXIS2_INTF_TO_IMPL(dep_engine)->curr_file;
+ return dep_engine->curr_file;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_dep_engine_add_ws_to_deploy(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
axis2_arch_file_data_t *file)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, file, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- return axis2_array_list_add(dep_engine_impl->ws_to_deploy, env, file);
+ return axis2_array_list_add(dep_engine->ws_to_deploy, env, file);
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_dep_engine_add_ws_to_undeploy(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
axis2_ws_info_t *file)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, file, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- if (!(dep_engine_impl->ws_to_undeploy))
+ if (!(dep_engine->ws_to_undeploy))
{
- dep_engine_impl->ws_to_undeploy = axis2_array_list_create(env, 0);
+ dep_engine->ws_to_undeploy = axis2_array_list_create(env, 0);
}
- return axis2_array_list_add(dep_engine_impl->ws_to_undeploy, env, file);
+ return axis2_array_list_add(dep_engine->ws_to_undeploy, env, file);
}
-axis2_phases_info_t *AXIS2_CALL
+AXIS2_EXTERN axis2_phases_info_t *AXIS2_CALL
axis2_dep_engine_get_phases_info(
const axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
AXIS2_ENV_CHECK(env, NULL);
- return AXIS2_INTF_TO_IMPL(dep_engine)->phases_info;
+ return dep_engine->phases_info;
}
-axis2_conf_t *AXIS2_CALL
+AXIS2_EXTERN axis2_conf_t *AXIS2_CALL
axis2_dep_engine_get_axis_conf(
const axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
AXIS2_ENV_CHECK(env, NULL);
- return AXIS2_INTF_TO_IMPL(dep_engine)->conf;
+ return dep_engine->conf;
}
/**
@@ -714,18 +474,16 @@
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
axis2_char_t *value = NULL;
axis2_param_t *para_hot_dep = NULL;
axis2_param_t *para_hot_update = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- para_hot_dep = AXIS2_CONF_GET_PARAM(dep_engine_impl->conf, env,
+ para_hot_dep = AXIS2_CONF_GET_PARAM(dep_engine->conf, env,
AXIS2_HOTDEPLOYMENT);
- para_hot_update = AXIS2_CONF_GET_PARAM(dep_engine_impl->conf, env,
+ para_hot_update = AXIS2_CONF_GET_PARAM(dep_engine->conf, env,
AXIS2_HOTUPDATE);
if (para_hot_dep)
@@ -733,7 +491,7 @@
value = (axis2_char_t *) AXIS2_PARAM_GET_VALUE(para_hot_dep, env);
if (0 == AXIS2_STRCASECMP("false", value))
{
- dep_engine_impl->hot_dep = AXIS2_FALSE;
+ dep_engine->hot_dep = AXIS2_FALSE;
}
}
if (para_hot_update)
@@ -741,50 +499,48 @@
value = (axis2_char_t *) AXIS2_PARAM_GET_VALUE(para_hot_update, env);
if (0 == AXIS2_STRCASECMP("false", value))
{
- dep_engine_impl->hot_update = AXIS2_FALSE;
+ dep_engine->hot_update = AXIS2_FALSE;
}
}
return AXIS2_SUCCESS;
}
-axis2_conf_t *AXIS2_CALL
+AXIS2_EXTERN axis2_conf_t *AXIS2_CALL
axis2_dep_engine_load(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
axis2_status_t status = AXIS2_FAILURE;
axis2_array_list_t *out_fault_phases = NULL;
axis2_array_list_t *new_out_fault_phases = NULL;
AXIS2_ENV_CHECK(env, NULL);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- if (NULL == dep_engine_impl->conf_name)
+ if (NULL == dep_engine->conf_name)
{
AXIS2_ERROR_SET(env->error, AXIS2_PATH_TO_CONFIG_CAN_NOT_BE_NULL,
AXIS2_FAILURE);
return NULL;
}
- dep_engine_impl->conf = axis2_conf_create(env);
+ dep_engine->conf = axis2_conf_create(env);
- if (!dep_engine_impl->conf)
+ if (!dep_engine->conf)
{
return NULL;
}
- dep_engine_impl->conf_builder = axis2_conf_builder_create_with_file_and_dep_engine_and_conf(env,
- dep_engine_impl->conf_name, dep_engine, dep_engine_impl->conf);
- if (!(dep_engine_impl->conf_builder))
+ dep_engine->conf_builder = axis2_conf_builder_create_with_file_and_dep_engine_and_conf(env,
+ dep_engine->conf_name, dep_engine, dep_engine->conf);
+ if (!(dep_engine->conf_builder))
{
- AXIS2_CONF_FREE(dep_engine_impl->conf, env);
- dep_engine_impl->conf = NULL;
+ AXIS2_CONF_FREE(dep_engine->conf, env);
+ dep_engine->conf = NULL;
}
- status = AXIS2_CONF_BUILDER_POPULATE_CONF(dep_engine_impl->conf_builder, env);
+ status = AXIS2_CONF_BUILDER_POPULATE_CONF(dep_engine->conf_builder, env);
if (AXIS2_SUCCESS != status)
{
- AXIS2_CONF_FREE(dep_engine_impl->conf, env);
- dep_engine_impl->conf = NULL;
+ AXIS2_CONF_FREE(dep_engine->conf, env);
+ dep_engine->conf = NULL;
return NULL;
}
status = axis2_dep_engine_set_dep_features(dep_engine, env);
@@ -801,78 +557,76 @@
else
{
*/
- if (dep_engine_impl->repos_listener)
+ if (dep_engine->repos_listener)
{
- AXIS2_REPOS_LISTENER_FREE(dep_engine_impl->repos_listener, env);
+ AXIS2_REPOS_LISTENER_FREE(dep_engine->repos_listener, env);
}
- dep_engine_impl->repos_listener =
+ dep_engine->repos_listener =
axis2_repos_listener_create_with_folder_name_and_dep_engine(env,
- dep_engine_impl->folder_name, dep_engine);
- if (!dep_engine_impl->repos_listener)
+ dep_engine->folder_name, dep_engine);
+ if (!dep_engine->repos_listener)
{
- AXIS2_CONF_FREE(dep_engine_impl->conf, env);
+ AXIS2_CONF_FREE(dep_engine->conf, env);
return NULL;
}
- AXIS2_CONF_SET_REPO(dep_engine_impl->conf, env, dep_engine_impl->axis2_repos);
+ AXIS2_CONF_SET_REPO(dep_engine->conf, env, dep_engine->axis2_repos);
axis2_core_utils_calculate_default_module_version(env,
- AXIS2_CONF_GET_ALL_MODULES(dep_engine_impl->conf, env),
- dep_engine_impl->conf);
+ AXIS2_CONF_GET_ALL_MODULES(dep_engine->conf, env),
+ dep_engine->conf);
status = axis2_dep_engine_validate_system_predefined_phases(dep_engine, env);
if (AXIS2_SUCCESS != status)
{
- AXIS2_REPOS_LISTENER_FREE(dep_engine_impl->repos_listener, env);
- AXIS2_CONF_FREE(dep_engine_impl->conf, env);
+ AXIS2_REPOS_LISTENER_FREE(dep_engine->repos_listener, env);
+ AXIS2_CONF_FREE(dep_engine->conf, env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_VALIDATION_FAILED,
AXIS2_FAILURE);
return NULL;
}
- status = AXIS2_CONF_SET_PHASES_INFO(dep_engine_impl->conf, env,
- dep_engine_impl->phases_info);
+ status = AXIS2_CONF_SET_PHASES_INFO(dep_engine->conf, env,
+ dep_engine->phases_info);
out_fault_phases = AXIS2_PHASES_INFO_GET_OP_OUT_FAULTPHASES(
- dep_engine_impl->phases_info, env);
+ dep_engine->phases_info, env);
new_out_fault_phases = axis2_phases_info_copy_flow(env, out_fault_phases);
if (out_fault_phases)
axis2_array_list_free(out_fault_phases, env);
- AXIS2_CONF_SET_OUT_FAULT_PHASES(dep_engine_impl->conf, env, new_out_fault_phases);
+ AXIS2_CONF_SET_OUT_FAULT_PHASES(dep_engine->conf, env, new_out_fault_phases);
if (AXIS2_SUCCESS != status)
{
- AXIS2_REPOS_LISTENER_FREE(dep_engine_impl->repos_listener, env);
- AXIS2_CONF_FREE(dep_engine_impl->conf, env);
+ AXIS2_REPOS_LISTENER_FREE(dep_engine->repos_listener, env);
+ AXIS2_CONF_FREE(dep_engine->conf, env);
return NULL;
}
status = axis2_dep_engine_engage_modules(dep_engine, env);
if (AXIS2_SUCCESS != status)
{
- AXIS2_REPOS_LISTENER_FREE(dep_engine_impl->repos_listener, env);
- AXIS2_CONF_FREE(dep_engine_impl->conf, env);
+ AXIS2_REPOS_LISTENER_FREE(dep_engine->repos_listener, env);
+ AXIS2_CONF_FREE(dep_engine->conf, env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_VALIDATION_FAILED,
AXIS2_FAILURE);
return NULL;
}
/*}*/
- return dep_engine_impl->conf;
+ return dep_engine->conf;
}
-axis2_conf_t *AXIS2_CALL
+AXIS2_EXTERN axis2_conf_t *AXIS2_CALL
axis2_dep_engine_load_client(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
const axis2_char_t *client_home)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
axis2_bool_t is_repos_exist = AXIS2_FALSE;
axis2_status_t status = AXIS2_FAILURE;
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, client_home, NULL);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- dep_engine_impl->axis2_repos = AXIS2_STRDUP(client_home, env);
- if (!dep_engine_impl->axis2_repos)
+ dep_engine->axis2_repos = AXIS2_STRDUP(client_home, env);
+ if (!dep_engine->axis2_repos)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -887,65 +641,65 @@
}
else
{
- dep_engine_impl->conf_name = AXIS2_STRDUP(AXIS2_CONFIGURATION_RESOURCE,
+ dep_engine->conf_name = AXIS2_STRDUP(AXIS2_CONFIGURATION_RESOURCE,
env);
- if (!dep_engine_impl->conf_name)
+ if (!dep_engine->conf_name)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
}
- dep_engine_impl->conf = axis2_conf_create(env);
- if (!dep_engine_impl->conf)
+ dep_engine->conf = axis2_conf_create(env);
+ if (!dep_engine->conf)
{
return NULL;
}
- dep_engine_impl->conf_builder =
+ dep_engine->conf_builder =
axis2_conf_builder_create_with_file_and_dep_engine_and_conf(env,
- dep_engine_impl->conf_name, dep_engine, dep_engine_impl->conf);
- if (!(dep_engine_impl->conf_builder))
+ dep_engine->conf_name, dep_engine, dep_engine->conf);
+ if (!(dep_engine->conf_builder))
{
- AXIS2_CONF_FREE(dep_engine_impl->conf, env);
- dep_engine_impl->conf = NULL;
+ AXIS2_CONF_FREE(dep_engine->conf, env);
+ dep_engine->conf = NULL;
}
- status = AXIS2_CONF_BUILDER_POPULATE_CONF(dep_engine_impl->conf_builder, env);
+ status = AXIS2_CONF_BUILDER_POPULATE_CONF(dep_engine->conf_builder, env);
if (AXIS2_SUCCESS != status)
{
- AXIS2_CONF_FREE(dep_engine_impl->conf, env);
- dep_engine_impl->conf = NULL;
+ AXIS2_CONF_FREE(dep_engine->conf, env);
+ dep_engine->conf = NULL;
return NULL;
}
if (AXIS2_TRUE == is_repos_exist)
{
- dep_engine_impl->hot_dep = AXIS2_FALSE;
- dep_engine_impl->hot_update = AXIS2_FALSE;
- if (dep_engine_impl->repos_listener)
+ dep_engine->hot_dep = AXIS2_FALSE;
+ dep_engine->hot_update = AXIS2_FALSE;
+ if (dep_engine->repos_listener)
{
- AXIS2_REPOS_LISTENER_FREE(dep_engine_impl->repos_listener, env);
+ AXIS2_REPOS_LISTENER_FREE(dep_engine->repos_listener, env);
}
- dep_engine_impl->repos_listener =
+ dep_engine->repos_listener =
axis2_repos_listener_create_with_folder_name_and_dep_engine(env,
- dep_engine_impl->folder_name, dep_engine);
+ dep_engine->folder_name, dep_engine);
}
- AXIS2_CONF_SET_REPO(dep_engine_impl->conf, env, dep_engine_impl->axis2_repos);
+ AXIS2_CONF_SET_REPO(dep_engine->conf, env, dep_engine->axis2_repos);
axis2_core_utils_calculate_default_module_version(env,
- AXIS2_CONF_GET_ALL_MODULES(dep_engine_impl->conf, env),
- dep_engine_impl->conf);
- AXIS2_CONF_SET_PHASES_INFO(dep_engine_impl->conf, env, dep_engine_impl->
+ AXIS2_CONF_GET_ALL_MODULES(dep_engine->conf, env),
+ dep_engine->conf);
+ AXIS2_CONF_SET_PHASES_INFO(dep_engine->conf, env, dep_engine->
phases_info);
status = axis2_dep_engine_engage_modules(dep_engine, env);
if (AXIS2_FAILURE == status)
{
- AXIS2_REPOS_LISTENER_FREE(dep_engine_impl->repos_listener, env);
- AXIS2_CONF_FREE(dep_engine_impl->conf, env);
+ AXIS2_REPOS_LISTENER_FREE(dep_engine->repos_listener, env);
+ AXIS2_CONF_FREE(dep_engine->conf, env);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_VALIDATION_FAILED,
AXIS2_FAILURE);
return NULL;
}
- return dep_engine_impl->conf;
+ return dep_engine->conf;
}
@@ -955,32 +709,29 @@
const axis2_env_t *env,
const axis2_char_t *client_home)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
axis2_char_t *path_l = NULL;
axis2_status_t status = AXIS2_FAILURE;
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
-
- dep_engine_impl->folder_name = AXIS2_STRDUP(client_home, env);
- if (!dep_engine_impl->folder_name)
+ dep_engine->folder_name = AXIS2_STRDUP(client_home, env);
+ if (!dep_engine->folder_name)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
path_l = AXIS2_STRACAT(client_home, AXIS2_PATH_SEP_STR, env);
- dep_engine_impl->conf_name = AXIS2_STRACAT(path_l, AXIS2_SERVER_XML_FILE, env);
+ dep_engine->conf_name = AXIS2_STRACAT(path_l, AXIS2_SERVER_XML_FILE, env);
AXIS2_FREE(env->allocator, path_l);
- if (!dep_engine_impl->conf_name)
+ if (!dep_engine->conf_name)
{
- dep_engine_impl->conf_name = AXIS2_STRDUP(AXIS2_CONFIGURATION_RESOURCE, env);
- if (!dep_engine_impl->conf_name)
+ dep_engine->conf_name = AXIS2_STRDUP(AXIS2_CONFIGURATION_RESOURCE, env);
+ if (!dep_engine->conf_name)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND,
AXIS2_FAILURE)
return AXIS2_FAILURE;
}
}
- status = axis2_file_handler_access(dep_engine_impl->conf_name, AXIS2_F_OK);
+ status = axis2_file_handler_access(dep_engine->conf_name, AXIS2_F_OK);
if (AXIS2_SUCCESS != status)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND,
@@ -996,28 +747,27 @@
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
int size = 0;
int i = 0;
axis2_status_t status = AXIS2_FAILURE;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- if (!dep_engine_impl->module_list)
+ if (!dep_engine->module_list)
{
/* there are no modules */
return AXIS2_SUCCESS;
}
- size = axis2_array_list_size(dep_engine_impl->module_list, env);
+ size = axis2_array_list_size(dep_engine->module_list, env);
+
for (i = 0; i < size; i++)
{
axis2_qname_t *qname = NULL;
qname = (axis2_qname_t *) axis2_array_list_get(
- dep_engine_impl->module_list, env, i);
- if (qname && dep_engine_impl->conf)
+ dep_engine->module_list, env, i);
+ if (qname && dep_engine->conf)
{
- status = AXIS2_CONF_ENGAGE_MODULE(dep_engine_impl->conf, env, qname);
+ status = AXIS2_CONF_ENGAGE_MODULE(dep_engine->conf, env, qname);
if (AXIS2_SUCCESS != status)
{
return status;
@@ -1032,7 +782,6 @@
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
axis2_array_list_t *in_phases = NULL;
axis2_char_t *phase0 = NULL;
axis2_char_t *phase1 = NULL;
@@ -1040,9 +789,8 @@
axis2_char_t *phase3 = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- in_phases = AXIS2_PHASES_INFO_GET_IN_PHASES(dep_engine_impl->phases_info, env);
+ in_phases = AXIS2_PHASES_INFO_GET_IN_PHASES(dep_engine->phases_info, env);
/* TODO condition checking should be otherway since null value can occur */
if (in_phases)
{
@@ -1069,16 +817,14 @@
const axis2_env_t *env,
axis2_svc_grp_t *svc_metadata)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
axis2_array_list_t *svcs = NULL;
int sizei = 0;
int i = 0;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, svc_metadata, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- svcs = AXIS2_ARCH_FILE_DATA_GET_DEPLOYABLE_SVCS(dep_engine_impl->curr_file,
+ svcs = AXIS2_ARCH_FILE_DATA_GET_DEPLOYABLE_SVCS(dep_engine->curr_file,
env);
if (svcs)
sizei = axis2_array_list_size(svcs, env);
@@ -1098,7 +844,7 @@
svc = (axis2_svc_t *) axis2_array_list_get(svcs, env, i);
/*axis2_dep_engine_load_svc_props(dep_engine, env, svc);*/
- file = AXIS2_ARCH_FILE_DATA_GET_FILE(dep_engine_impl->curr_file, env);
+ file = AXIS2_ARCH_FILE_DATA_GET_FILE(dep_engine->curr_file, env);
file_name = axis2_file_get_name(file, env);
AXIS2_SVC_SET_FILE_NAME(svc, env, file_name);
@@ -1113,11 +859,11 @@
qmodulename = (axis2_qname_t *) axis2_array_list_get(grp_modules,
env, j);
- module_desc = AXIS2_CONF_GET_MODULE(dep_engine_impl->conf, env,
+ module_desc = AXIS2_CONF_GET_MODULE(dep_engine->conf, env,
qmodulename);
if (module_desc)
{
- AXIS2_SVC_ENGAGE_MODULE(svc, env, module_desc, dep_engine_impl->conf);
+ AXIS2_SVC_ENGAGE_MODULE(svc, env, module_desc, dep_engine->conf);
}
else
@@ -1140,12 +886,12 @@
qmodulename = (axis2_qname_t *) axis2_array_list_get(list,
env, j);
- module_desc = AXIS2_CONF_GET_MODULE(dep_engine_impl->conf, env,
+ module_desc = AXIS2_CONF_GET_MODULE(dep_engine->conf, env,
qmodulename);
if (module_desc)
{
axis2_status_t status = AXIS2_FAILURE;
- status = AXIS2_SVC_ENGAGE_MODULE(svc, env, module_desc, dep_engine_impl->conf);
+ status = AXIS2_SVC_ENGAGE_MODULE(svc, env, module_desc, dep_engine->conf);
if(!status)
return status;
@@ -1183,13 +929,13 @@
module_qname = (axis2_qname_t *) axis2_array_list_get(modules,
env, k);
- module = AXIS2_CONF_GET_MODULE(dep_engine_impl->conf, env,
+ module = AXIS2_CONF_GET_MODULE(dep_engine->conf, env,
module_qname);
if (module)
{
axis2_op_engage_module(op_desc, env, module,
- dep_engine_impl->conf);
+ dep_engine->conf);
}
else
{
@@ -1201,59 +947,15 @@
}
axis2_svc_grp_add_svc(svc_metadata, env, svc);
}
- return AXIS2_CONF_ADD_SVC_GRP(dep_engine_impl->conf, env, svc_metadata);
+ return AXIS2_CONF_ADD_SVC_GRP(dep_engine->conf, env, svc_metadata);
}
-/*static axis2_status_t
-axis2_dep_engine_load_svc_props(
- axis2_dep_engine_t *dep_engine,
- const axis2_env_t *env,
- axis2_svc_t *svc)
-{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
- axis2_flow_t *in_flow = NULL;
- axis2_flow_t *out_flow = NULL;
- axis2_flow_t *in_fault_flow = NULL;
- axis2_flow_t *out_fault_flow = NULL;
-
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- AXIS2_PARAM_CHECK(env->error, svc, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
-
- in_flow = AXIS2_SVC_GET_IN_FLOW(svc, env);
- if (in_flow)
- {
- axis2_dep_engine_add_flow_handlers(dep_engine, env, in_flow);
- }
-
- out_flow = AXIS2_SVC_GET_OUT_FLOW(svc, env);
- if (out_flow)
- {
- axis2_dep_engine_add_flow_handlers(dep_engine, env, out_flow);
- }
-
- in_fault_flow = AXIS2_SVC_GET_FAULT_IN_FLOW(svc, env);
- if (in_fault_flow)
- {
- axis2_dep_engine_add_flow_handlers(dep_engine, env, in_fault_flow);
- }
-
- out_fault_flow = AXIS2_SVC_GET_FAULT_OUT_FLOW(svc, env);
- if (out_fault_flow)
- {
- axis2_dep_engine_add_flow_handlers(dep_engine, env, out_fault_flow);
- }
- return AXIS2_SUCCESS;
-}*/
-
-
static axis2_status_t
axis2_dep_engine_load_module_dll(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
axis2_module_desc_t *module_desc)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
axis2_char_t *read_in_dll = NULL;
axis2_module_t *module = NULL;
axis2_dll_desc_t *dll_desc = NULL;
@@ -1268,15 +970,14 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, module_desc, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- read_in_dll = AXIS2_ARCH_FILE_DATA_GET_MODULE_DLL_NAME(dep_engine_impl->
+ read_in_dll = AXIS2_ARCH_FILE_DATA_GET_MODULE_DLL_NAME(dep_engine->
curr_file, env);
dll_desc = axis2_dll_desc_create(env);
dll_name = axis2_dll_desc_create_platform_specific_dll_name(dll_desc, env,
read_in_dll);
- module_folder = AXIS2_ARCH_FILE_DATA_GET_FILE(dep_engine_impl->curr_file, env);
+ module_folder = AXIS2_ARCH_FILE_DATA_GET_FILE(dep_engine->curr_file, env);
timestamp = axis2_file_get_timestamp(module_folder, env);
axis2_dll_desc_set_timestamp(dll_desc, env, timestamp);
module_folder_path = axis2_file_get_path(module_folder, env);
@@ -1387,7 +1088,7 @@
return AXIS2_SUCCESS;
}*/
-void *AXIS2_CALL
+AXIS2_EXTERN void *AXIS2_CALL
axis2_dep_engine_get_handler_dll(
const axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
@@ -1475,25 +1176,24 @@
module->handler_create_func_map);
}
- AXIS2_CONF_ADD_MODULE(AXIS2_INTF_TO_IMPL(dep_engine)->conf, env,
+ AXIS2_CONF_ADD_MODULE(dep_engine->conf, env,
module_metadata);
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_dep_engine_do_deploy(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
int size = 0;
axis2_status_t status = AXIS2_FAILURE;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- size = axis2_array_list_size(dep_engine_impl->ws_to_deploy, env);
+ size = axis2_array_list_size(dep_engine->ws_to_deploy, env);
+
if (size > 0)
{
int i = 0;
@@ -1505,24 +1205,24 @@
axis2_module_desc_t *meta_data = NULL;
axis2_arch_reader_t *arch_reader = NULL;
- dep_engine_impl->curr_file = (axis2_arch_file_data_t *)
- axis2_array_list_get(dep_engine_impl->ws_to_deploy, env, i);
+ dep_engine->curr_file = (axis2_arch_file_data_t *)
+ axis2_array_list_get(dep_engine->ws_to_deploy, env, i);
- type = AXIS2_ARCH_FILE_DATA_GET_TYPE(dep_engine_impl->curr_file, env);
+ type = AXIS2_ARCH_FILE_DATA_GET_TYPE(dep_engine->curr_file, env);
switch (type)
{
case AXIS2_SVC:
arch_reader = axis2_arch_reader_create(env);
/* TODO
- * AXIS2_ARCH_READER_PROCESS_WSDLS(arch_reader, env, dep_engine_impl->curr_file);
+ * AXIS2_ARCH_READER_PROCESS_WSDLS(arch_reader, env, dep_engine->curr_file);
* absolute_path = AXIS2_ARCH_FILE_DATA_GET_ABSOLUTE_PATH(
- * dep_engine_impl->curr_file, env);
+ * dep_engine->curr_file, env);
* svc = AXIS2_ARCH_READER_CREATE_SVC(arch_reader, env, absolute_path);
*/
svc_grp = axis2_svc_grp_create_with_conf(env,
- dep_engine_impl->conf);
- file_name = AXIS2_ARCH_FILE_DATA_GET_NAME(dep_engine_impl->
+ dep_engine->conf);
+ file_name = AXIS2_ARCH_FILE_DATA_GET_NAME(dep_engine->
curr_file, env);
status = AXIS2_ARCH_READER_PROCESS_SVC_GRP(arch_reader, env,
file_name, dep_engine, svc_grp);
@@ -1542,20 +1242,20 @@
AXIS2_FAILURE);
return status;
}
- dep_engine_impl->curr_file = NULL;
+ dep_engine->curr_file = NULL;
break;
case AXIS2_MODULE:
arch_reader = axis2_arch_reader_create(env);
- if (dep_engine_impl->arch_reader)
+ if (dep_engine->arch_reader)
{
- AXIS2_ARCH_READER_FREE(dep_engine_impl->arch_reader, env);
+ AXIS2_ARCH_READER_FREE(dep_engine->arch_reader, env);
}
- dep_engine_impl->arch_reader = axis2_arch_reader_create(env);
+ dep_engine->arch_reader = axis2_arch_reader_create(env);
meta_data = axis2_module_desc_create(env);
- file_name = AXIS2_ARCH_FILE_DATA_GET_NAME(dep_engine_impl->
+ file_name = AXIS2_ARCH_FILE_DATA_GET_NAME(dep_engine->
curr_file, env);
status = AXIS2_ARCH_READER_READ_MODULE_ARCH(
- dep_engine_impl->arch_reader, env, file_name, dep_engine,
+ dep_engine->arch_reader, env, file_name, dep_engine,
meta_data);
if (AXIS2_SUCCESS != status)
{
@@ -1574,7 +1274,7 @@
return AXIS2_FAILURE;
}
- dep_engine_impl->curr_file = NULL;
+ dep_engine->curr_file = NULL;
break;
}
AXIS2_ARCH_READER_FREE(arch_reader, env);
@@ -1583,18 +1283,16 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_dep_engine_undeploy(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
int size = 0;
axis2_char_t *svc_name = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- size = axis2_array_list_size(dep_engine_impl->ws_to_undeploy, env);
+ size = axis2_array_list_size(dep_engine->ws_to_undeploy, env);
if (size > 0)
{
@@ -1605,7 +1303,7 @@
axis2_ws_info_t *ws_info = NULL;
axis2_hash_t *faulty_svcs = NULL;
- ws_info = (axis2_ws_info_t *) axis2_array_list_get(dep_engine_impl->
+ ws_info = (axis2_ws_info_t *) axis2_array_list_get(dep_engine->
ws_to_undeploy, env, i);
type = AXIS2_WS_INFO_GET_TYPE(ws_info, env);
if (type == AXIS2_SVC)
@@ -1616,24 +1314,24 @@
svc_name = axis2_dep_engine_get_axis_svc_name(dep_engine, env,
file_name);
- AXIS2_CONF_REMOVE_SVC(dep_engine_impl->conf, env, svc_name);
+ AXIS2_CONF_REMOVE_SVC(dep_engine->conf, env, svc_name);
}
- faulty_svcs = AXIS2_CONF_GET_ALL_FAULTY_SVCS(dep_engine_impl->conf, env);
+ faulty_svcs = AXIS2_CONF_GET_ALL_FAULTY_SVCS(dep_engine->conf, env);
axis2_hash_set(faulty_svcs, svc_name, AXIS2_HASH_KEY_STRING, NULL);
}
}
- axis2_array_list_free(dep_engine_impl->ws_to_undeploy, env);
+ axis2_array_list_free(dep_engine->ws_to_undeploy, env);
+
return AXIS2_SUCCESS;
}
-axis2_bool_t AXIS2_CALL
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
axis2_dep_engine_is_hot_update(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- return AXIS2_INTF_TO_IMPL(dep_engine)->hot_update;
+ return dep_engine->hot_update;
}
static axis2_char_t *
@@ -1662,7 +1360,7 @@
return svc_name;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_dep_engine_set_phases_info(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
@@ -1670,7 +1368,7 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
- AXIS2_INTF_TO_IMPL(dep_engine)->phases_info = phases_info;
+ dep_engine->phases_info = phases_info;
return AXIS2_SUCCESS;
}
@@ -1680,30 +1378,29 @@
* class and build the chains , finally add the servicecontext to EngineContext and axisservice into
* EngineConfiguration
*/
-axis2_svc_t *AXIS2_CALL
+AXIS2_EXTERN axis2_svc_t *AXIS2_CALL
axis2_dep_engine_build_svc(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
axis2_svc_t *svc,
axis2_char_t *file_name)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
axiom_node_t *node = NULL;
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, file_name, NULL);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- dep_engine_impl->curr_file = axis2_arch_file_data_create_with_type_and_name(
+ dep_engine->curr_file = axis2_arch_file_data_create_with_type_and_name(
env, AXIS2_SVC, "");
- dep_engine_impl->svc_builder =
+ dep_engine->svc_builder =
axis2_svc_builder_create_with_file_and_dep_engine_and_svc(env,
file_name, dep_engine, svc);
- node = AXIS2_DESC_BUILDER_BUILD_OM(dep_engine_impl->svc_builder->desc_builder,
- env);
- AXIS2_SVC_BUILDER_POPULATE_SVC(dep_engine_impl->svc_builder, env, node);
+ node = AXIS2_DESC_BUILDER_BUILD_OM(
+ axis2_svc_builder_get_desc_builder(dep_engine->svc_builder, env),
+ env);
+ AXIS2_SVC_BUILDER_POPULATE_SVC(dep_engine->svc_builder, env, node);
/*axis2_dep_engine_load_svc_props(dep_engine, env, svc);*/
return svc;
@@ -1712,14 +1409,13 @@
/**
* This method can be used to build ModuleDescription for a given module archiev file
*/
-axis2_module_desc_t *AXIS2_CALL
+AXIS2_EXTERN axis2_module_desc_t *AXIS2_CALL
axis2_dep_engine_build_module(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
axis2_file_t *module_archive,
axis2_conf_t *conf)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
axis2_module_desc_t *module_desc = NULL;
axis2_module_t *module = NULL;
axis2_phases_info_t *phases_info = NULL;
@@ -1734,11 +1430,10 @@
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, module_archive, NULL);
AXIS2_PARAM_CHECK(env->error, conf, NULL);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
phases_info = AXIS2_CONF_GET_PHASES_INFO(conf, env);
axis2_dep_engine_set_phases_info(dep_engine, env, phases_info);
- dep_engine_impl->curr_file = axis2_arch_file_data_create_with_type_and_file(
+ dep_engine->curr_file = axis2_arch_file_data_create_with_type_and_file(
env, AXIS2_MODULE, module_archive);
module_desc = axis2_module_desc_create(env);
arch_reader = axis2_arch_reader_create(env);
@@ -1789,56 +1484,52 @@
module->handler_create_func_map);
}
- dep_engine_impl->curr_file = NULL;
+ dep_engine->curr_file = NULL;
return module_desc;
}
-axis2_char_t *AXIS2_CALL
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
axis2_dep_engine_get_repos_path(
const axis2_dep_engine_t *dep_engine,
const axis2_env_t *env)
{
- return AXIS2_INTF_TO_IMPL(dep_engine)->folder_name;
+ return dep_engine->folder_name;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_dep_engine_set_current_file_item(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
axis2_arch_file_data_t *file_data)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
-
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- if (dep_engine_impl->curr_file)
+ if (dep_engine->curr_file)
{
- AXIS2_ARCH_FILE_DATA_FREE(dep_engine_impl->curr_file, env);
- dep_engine_impl->curr_file = NULL;
+ AXIS2_ARCH_FILE_DATA_FREE(dep_engine->curr_file, env);
+ dep_engine->curr_file = NULL;
}
- dep_engine_impl->curr_file = file_data;
+ dep_engine->curr_file = file_data;
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_dep_engine_set_arch_reader(
axis2_dep_engine_t *dep_engine,
const axis2_env_t *env,
axis2_arch_reader_t *arch_reader)
{
- axis2_dep_engine_impl_t *dep_engine_impl = NULL;
-
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
- if (dep_engine_impl->arch_reader)
+ if (dep_engine->arch_reader)
{
- AXIS2_ARCH_FILE_DATA_FREE(dep_engine_impl->arch_reader, env);
- dep_engine_impl->arch_reader = NULL;
+ AXIS2_ARCH_READER_FREE(dep_engine->arch_reader, env);
+ dep_engine->arch_reader = NULL;
}
- dep_engine_impl->arch_reader = arch_reader;
+ dep_engine->arch_reader = arch_reader;
return AXIS2_SUCCESS;
}
+
+
Modified: webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c?view=diff&rev=518623&r1=518622&r2=518623
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Thu Mar 15 06:16:07 2007
@@ -22,105 +22,15 @@
#include <axis2_generic_obj.h>
#include <axis2_raw_xml_in_out_msg_recv.h>
-/**
- * To do the common tasks for all Builder
- */
-typedef struct axis2_desc_builder_impl
+struct axis2_desc_builder
{
- axis2_desc_builder_t desc_builder;
-
/**
* Store the full path to configuration file.
*/
axis2_char_t *file_name;
axiom_stax_builder_t *builder;
-
-}
-axis2_desc_builder_impl_t;
-
-#define AXIS2_INTF_TO_IMPL(desc_builder) \
- ((axis2_desc_builder_impl_t *) desc_builder)
-
-/************************* Function prototypes ********************************/
-
-axis2_status_t AXIS2_CALL
-axis2_desc_builder_free(
- axis2_desc_builder_t *desc_builder,
- const axis2_env_t *env);
-
-axiom_node_t *AXIS2_CALL
-axis2_build_OM(
- axis2_desc_builder_t *desc_builder,
- const axis2_env_t *env);
-
-struct axis2_flow *AXIS2_CALL
- axis2_desc_builder_process_flow(
- axis2_desc_builder_t *desc_builder,
- const axis2_env_t *env,
- struct axiom_element *flow_element,
- axis2_param_container_t *parent,
- axiom_node_t *node);
-
-struct axis2_handler_desc *AXIS2_CALL
- axis2_desc_builder_process_handler(
- axis2_desc_builder_t *desc_builder,
- const axis2_env_t *env,
- axiom_node_t *handler_element,
- axis2_param_container_t *parent);
-
-axis2_status_t AXIS2_CALL
-axis2_desc_builder_process_params(
- axis2_desc_builder_t *desc_builder,
- const axis2_env_t *env,
- axiom_children_qname_iterator_t *params,
- axis2_param_container_t *param_container,
- axis2_param_container_t *parent);
-
-axis2_status_t AXIS2_CALL
-axis2_desc_builder_process_op_module_refs(
- axis2_desc_builder_t *desc_builder,
- const axis2_env_t *env,
- axiom_children_qname_iterator_t *module_refs,
- struct axis2_op *op);
-
-struct axis2_msg_recv *AXIS2_CALL
- axis2_desc_builder_load_msg_recv(
- axis2_desc_builder_t *desc_builder,
- const axis2_env_t *env,
- axiom_element_t *recv_element);
-
-axis2_char_t *AXIS2_CALL
-axis2_desc_builder_get_short_file_name(
- const axis2_desc_builder_t *desc_builder,
- const axis2_env_t *env,
- axis2_char_t *file_name);
-
-axis2_char_t *AXIS2_CALL
-axis2_desc_builder_get_file_name_without_prefix(
- const axis2_desc_builder_t *desc_builder,
- const axis2_env_t *env,
- axis2_char_t *short_file_name);
-
-axis2_char_t *AXIS2_CALL
-axis2_desc_builder_get_value(
- const axis2_desc_builder_t *desc_builder,
- const axis2_env_t *env,
- axis2_char_t *in);
-
-/**
- * Populate the Axis2 Operation with details from the actionMapping,
- * outputActionMapping and faultActionMapping elements from the operation
- * element.
- *
- * @param operation
- * @param op_desc
- */
-axis2_status_t AXIS2_CALL
-axis2_desc_builder_process_action_mappings(
- axis2_desc_builder_t *desc_builder,
- const axis2_env_t *env,
- axiom_node_t *op_node,
- axis2_op_t *op_desc);
+ struct axis2_dep_engine *engine;
+};
static axis2_status_t
set_attrs_and_value(
@@ -129,178 +39,130 @@
axiom_element_t *param_element,
axiom_node_t *param_node);
-
-/************************** End of function prototypes ************************/
-
-axis2_desc_builder_t *AXIS2_CALL
+AXIS2_EXTERN axis2_desc_builder_t *AXIS2_CALL
axis2_desc_builder_create(
const axis2_env_t *env)
{
- axis2_desc_builder_impl_t *desc_builder_impl = NULL;
+ axis2_desc_builder_t *desc_builder = NULL;
AXIS2_ENV_CHECK(env, NULL);
- desc_builder_impl = (axis2_desc_builder_impl_t *) AXIS2_MALLOC(env->
- allocator, sizeof(axis2_desc_builder_impl_t));
+ desc_builder = (axis2_desc_builder_t *) AXIS2_MALLOC(env->
+ allocator, sizeof(axis2_desc_builder_t));
- if (NULL == desc_builder_impl)
+ if (NULL == desc_builder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- desc_builder_impl->file_name = NULL;
- desc_builder_impl->desc_builder.engine = NULL;
- desc_builder_impl->builder = NULL;
- desc_builder_impl->desc_builder.ops = NULL;
-
- desc_builder_impl->desc_builder.ops =
- AXIS2_MALLOC(env->allocator, sizeof(axis2_desc_builder_ops_t));
- if (NULL == desc_builder_impl->desc_builder.ops)
- {
- axis2_desc_builder_free(&(desc_builder_impl->desc_builder), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
-
- desc_builder_impl->desc_builder.ops->free = axis2_desc_builder_free;
- desc_builder_impl->desc_builder.ops->build_OM = axis2_build_OM;
- desc_builder_impl->desc_builder.ops->process_flow =
- axis2_desc_builder_process_flow;
- desc_builder_impl->desc_builder.ops->process_handler =
- axis2_desc_builder_process_handler;
- desc_builder_impl->desc_builder.ops->process_params =
- axis2_desc_builder_process_params;
- desc_builder_impl->desc_builder.ops->process_op_module_refs =
- axis2_desc_builder_process_op_module_refs;
- desc_builder_impl->desc_builder.ops->load_msg_recv =
- axis2_desc_builder_load_msg_recv;
- desc_builder_impl->desc_builder.ops->get_short_file_name =
- axis2_desc_builder_get_short_file_name;
- desc_builder_impl->desc_builder.ops->get_file_name_without_prefix =
- axis2_desc_builder_get_file_name_without_prefix;
- desc_builder_impl->desc_builder.ops->get_value =
- axis2_desc_builder_get_value;
- desc_builder_impl->desc_builder.ops->process_action_mappings =
- axis2_desc_builder_process_action_mappings;
+ desc_builder->file_name = NULL;
+ desc_builder->engine = NULL;
+ desc_builder->builder = NULL;
- return &(desc_builder_impl->desc_builder);
+ return desc_builder;
}
-axis2_desc_builder_t *AXIS2_CALL
+AXIS2_EXTERN axis2_desc_builder_t *AXIS2_CALL
axis2_desc_builder_create_with_file_and_dep_engine(
const axis2_env_t *env,
axis2_char_t *file_name,
axis2_dep_engine_t *engine)
{
- axis2_desc_builder_impl_t *desc_builder_impl = NULL;
+ axis2_desc_builder_t *desc_builder = NULL;
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, file_name, NULL);
AXIS2_PARAM_CHECK(env->error, engine, NULL);
- desc_builder_impl = (axis2_desc_builder_impl_t *)
+ desc_builder = (axis2_desc_builder_t *)
axis2_desc_builder_create(env);
- if (NULL == desc_builder_impl)
+ if (NULL == desc_builder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- desc_builder_impl->file_name = AXIS2_STRDUP(file_name, env);
- if (!desc_builder_impl->file_name)
+ desc_builder->file_name = AXIS2_STRDUP(file_name, env);
+ if (!desc_builder->file_name)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- desc_builder_impl->desc_builder.engine = engine;
+ desc_builder->engine = engine;
- return &(desc_builder_impl->desc_builder);
+ return desc_builder;
}
-axis2_desc_builder_t *AXIS2_CALL
+AXIS2_EXTERN axis2_desc_builder_t *AXIS2_CALL
axis2_desc_builder_create_with_dep_engine(
const axis2_env_t *env,
struct axis2_dep_engine *engine)
{
- axis2_desc_builder_impl_t *desc_builder_impl = NULL;
+ axis2_desc_builder_t *desc_builder = NULL;
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, engine, NULL);
- desc_builder_impl = (axis2_desc_builder_impl_t *)
+ desc_builder = (axis2_desc_builder_t *)
axis2_desc_builder_create(env);
- if (NULL == desc_builder_impl)
+ if (NULL == desc_builder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- desc_builder_impl->desc_builder.engine = engine;
+ desc_builder->engine = engine;
- return &(desc_builder_impl->desc_builder);
+ return desc_builder;
}
-/***************************Function implementation****************************/
-
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_desc_builder_free(
axis2_desc_builder_t *desc_builder,
const axis2_env_t *env)
{
- axis2_desc_builder_impl_t *desc_builder_impl = NULL;
-
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- desc_builder_impl = AXIS2_INTF_TO_IMPL(desc_builder);
-
- if (desc_builder_impl->file_name)
+ if (desc_builder->file_name)
{
- AXIS2_FREE(env->allocator, desc_builder_impl->file_name);
- desc_builder_impl->file_name = NULL;
+ AXIS2_FREE(env->allocator, desc_builder->file_name);
}
- if (desc_builder_impl->builder)
+ if (desc_builder->builder)
{
- axiom_stax_builder_free(desc_builder_impl->builder, env);
- desc_builder_impl->builder = NULL;
+ axiom_stax_builder_free(desc_builder->builder, env);
}
/* we cannot free deployment engine here */
desc_builder->engine = NULL;
- if (desc_builder->ops)
- AXIS2_FREE(env->allocator, desc_builder->ops);
-
- if (desc_builder_impl)
+ if (desc_builder)
{
- AXIS2_FREE(env->allocator, desc_builder_impl);
- desc_builder_impl = NULL;
+ AXIS2_FREE(env->allocator, desc_builder);
}
return AXIS2_SUCCESS;
}
-axiom_node_t *AXIS2_CALL
-axis2_build_OM(
+AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+axis2_desc_builder_build_om(
axis2_desc_builder_t *desc_builder,
const axis2_env_t *env)
{
- axis2_desc_builder_impl_t *desc_builder_impl = NULL;
axiom_xml_reader_t *reader = NULL;
axiom_document_t *document = NULL;
axiom_node_t *root = NULL;
AXIS2_ENV_CHECK(env, NULL);
- desc_builder_impl = AXIS2_INTF_TO_IMPL(desc_builder);
- if (!desc_builder_impl->file_name)
+ if (!desc_builder->file_name)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_STATE_DESC_BUILDER,
AXIS2_FAILURE);
return NULL;
}
/** create pull parser using the file path to configuration file */
- reader = axiom_xml_reader_create_for_file(env, desc_builder_impl->file_name,
+ reader = axiom_xml_reader_create_for_file(env, desc_builder->file_name,
NULL);
if (!reader)
@@ -311,9 +173,9 @@
}
/** create axiom_stax_builder by parsing pull_parser struct */
- desc_builder_impl->builder = axiom_stax_builder_create(env, reader);
+ desc_builder->builder = axiom_stax_builder_create(env, reader);
- if (!(desc_builder_impl->builder))
+ if (!(desc_builder->builder))
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CREATING_XML_STREAM_READER,
AXIS2_FAILURE)
@@ -323,7 +185,8 @@
get the om document form builder
document is the container of om model created using builder
*/
- document = axiom_stax_builder_get_document(desc_builder_impl->builder, env);
+ document = axiom_stax_builder_get_document(desc_builder->builder, env);
+
/**
* In description building we don't want defferred building. So build
* the whole tree at once
@@ -336,7 +199,7 @@
return root;
}
-axis2_flow_t *AXIS2_CALL
+AXIS2_EXTERN axis2_flow_t *AXIS2_CALL
axis2_desc_builder_process_flow(
axis2_desc_builder_t *desc_builder,
const axis2_env_t *env,
@@ -733,7 +596,7 @@
* @param operation
* @param op_desc
*/
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_desc_builder_process_action_mappings(
axis2_desc_builder_t *desc_builder,
const axis2_env_t *env,
@@ -808,7 +671,7 @@
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_desc_builder_process_params(
axis2_desc_builder_t *desc_builder,
const axis2_env_t *env,
@@ -952,14 +815,13 @@
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_desc_builder_process_op_module_refs(
axis2_desc_builder_t *desc_builder,
const axis2_env_t *env,
axiom_children_qname_iterator_t *module_refs,
axis2_op_t *op)
{
- axis2_desc_builder_impl_t *desc_builder_impl = NULL;
axiom_element_t *moduleref = NULL;
axiom_attribute_t *module_ref_attrib = NULL;
axis2_qname_t *qref = NULL;
@@ -967,7 +829,6 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, op, AXIS2_FAILURE);
- desc_builder_impl = AXIS2_INTF_TO_IMPL(desc_builder);
while (module_refs && AXIS2_TRUE == axiom_children_qname_iterator_has_next(module_refs,
env))
@@ -1010,7 +871,7 @@
return AXIS2_SUCCESS;
}
-axis2_msg_recv_t *AXIS2_CALL
+AXIS2_EXTERN axis2_msg_recv_t *AXIS2_CALL
axis2_desc_builder_load_msg_recv(
axis2_desc_builder_t *desc_builder,
const axis2_env_t *env,
@@ -1077,7 +938,7 @@
return msg_recv;
}
-struct axis2_msg_recv *AXIS2_CALL
+AXIS2_EXTERN struct axis2_msg_recv *AXIS2_CALL
axis2_desc_builder_load_default_msg_recv(
const axis2_env_t *env)
{
@@ -1087,7 +948,7 @@
return msg_recv;
}
-axis2_char_t *AXIS2_CALL
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
axis2_desc_builder_get_short_file_name(
const axis2_desc_builder_t *desc_builder,
const axis2_env_t *env,
@@ -1117,7 +978,7 @@
return short_name;
}
-axis2_char_t *AXIS2_CALL
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
axis2_desc_builder_get_file_name_without_prefix(
const axis2_desc_builder_t *desc_builder,
const axis2_env_t *env,
@@ -1140,7 +1001,7 @@
}
-axis2_char_t *AXIS2_CALL
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
axis2_desc_builder_get_value(
const axis2_desc_builder_t *desc_builder,
const axis2_env_t *env,
@@ -1163,4 +1024,11 @@
value = value + 1;
return value;
+}
+
+AXIS2_EXTERN struct axis2_dep_engine *AXIS2_CALL
+axis2_desc_builder_get_dep_engine(const axis2_desc_builder_t *desc_builder,
+ const axis2_env_t *env)
+{
+ return desc_builder->engine;
}
Modified: webservices/axis2/trunk/c/modules/core/deployment/module_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/module_builder.c?view=diff&rev=518623&r1=518622&r2=518623
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/module_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/module_builder.c Thu Mar 15 06:16:07 2007
@@ -18,146 +18,93 @@
#include <axis2_module_builder.h>
#include <axis2_arch_file_data.h>
-/**
- * This is to convert OM->ServiceDescrption , where it first create OM from
- * services.xml and then populate service description by using OM
- */
-typedef struct axis2_module_builder_impl
+struct axis2_module_builder
{
- axis2_module_builder_t module_builder;
axis2_module_desc_t *module_desc;
+ struct axis2_desc_builder *desc_builder;
+};
-}
-axis2_module_builder_impl_t;
-
-#define AXIS2_INTF_TO_IMPL(module_builder) \
- ((axis2_module_builder_impl_t *) module_builder)
-
-/************************* Function prototypes ********************************/
-
-axis2_status_t AXIS2_CALL
-axis2_module_builder_free(
- axis2_module_builder_t *module_builder,
- const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_module_builder_populate_module(
- axis2_module_builder_t *module_builder,
- const axis2_env_t *env);
-
-axis2_array_list_t *AXIS2_CALL
+static axis2_array_list_t *AXIS2_CALL
axis2_module_builder_process_ops(
axis2_module_builder_t *module_builder,
const axis2_env_t *env,
axiom_children_qname_iterator_t *op_itr);
-/************************** End of function prototypes ************************/
-
-axis2_module_builder_t *AXIS2_CALL
+AXIS2_EXTERN axis2_module_builder_t *AXIS2_CALL
axis2_module_builder_create(
const axis2_env_t *env)
{
- axis2_module_builder_impl_t *module_builder_impl = NULL;
+ axis2_module_builder_t *module_builder = NULL;
AXIS2_ENV_CHECK(env, NULL);
- module_builder_impl = (axis2_module_builder_impl_t *) AXIS2_MALLOC(env->
- allocator, sizeof(axis2_module_builder_impl_t));
+ module_builder = (axis2_module_builder_t *) AXIS2_MALLOC(env->
+ allocator, sizeof(axis2_module_builder_t));
- if (NULL == module_builder_impl)
+ if (NULL == module_builder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- module_builder_impl->module_builder.ops = NULL;
-
- module_builder_impl->module_builder.ops =
- AXIS2_MALLOC(env->allocator, sizeof(axis2_module_builder_ops_t));
- if (NULL == module_builder_impl->module_builder.ops)
- {
- axis2_module_builder_free(&(module_builder_impl->module_builder), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
- }
-
- module_builder_impl->module_builder.ops->free = axis2_module_builder_free;
- module_builder_impl->module_builder.ops->populate_module =
- axis2_module_builder_populate_module;
-
- return &(module_builder_impl->module_builder);
+ return module_builder;
}
-axis2_module_builder_t *AXIS2_CALL
+AXIS2_EXTERN axis2_module_builder_t *AXIS2_CALL
axis2_module_builder_create_with_file_and_dep_engine_and_module(
const axis2_env_t *env,
axis2_char_t *file_name,
axis2_dep_engine_t *dep_engine,
axis2_module_desc_t *module_desc)
{
- axis2_module_builder_impl_t *builder_impl = NULL;
+ axis2_module_builder_t *module_builder = NULL;
AXIS2_ENV_CHECK(env, NULL);
- builder_impl = (axis2_module_builder_impl_t *) axis2_module_builder_create(env);
- if (NULL == builder_impl)
+ module_builder = (axis2_module_builder_t *) axis2_module_builder_create(env);
+ if (NULL == module_builder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- builder_impl->module_builder.desc_builder =
+ module_builder->desc_builder =
axis2_desc_builder_create_with_file_and_dep_engine(env, file_name,
dep_engine);
- if (!builder_impl->module_builder.desc_builder)
+ if (!module_builder->desc_builder)
{
- axis2_module_builder_free(&(builder_impl->module_builder), env);
+ axis2_module_builder_free(module_builder, env);
return NULL;
}
- builder_impl->module_desc = module_desc;
- return &(builder_impl->module_builder);
+ module_builder->module_desc = module_desc;
+ return module_builder;
}
-/***************************Function implementation****************************/
-
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_module_builder_free(
axis2_module_builder_t *module_builder,
const axis2_env_t *env)
{
- axis2_module_builder_impl_t *module_builder_impl = NULL;
-
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- module_builder_impl = AXIS2_INTF_TO_IMPL(module_builder);
-
if (module_builder->desc_builder)
{
AXIS2_DESC_BUILDER_FREE(module_builder->desc_builder, env);
- module_builder->desc_builder = NULL;
- }
-
- if (module_builder->ops)
- {
- AXIS2_FREE(env->allocator, module_builder->ops);
- module_builder->ops = NULL;
}
- if (module_builder_impl)
+ if (module_builder)
{
- AXIS2_FREE(env->allocator, module_builder_impl);
- module_builder_impl = NULL;
+ AXIS2_FREE(env->allocator, module_builder);
}
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
axis2_module_builder_populate_module(
axis2_module_builder_t *module_builder,
const axis2_env_t *env)
{
- axis2_module_builder_impl_t *builder_impl = NULL;
axiom_element_t *module_element = NULL;
axiom_node_t *module_node = NULL;
axis2_qname_t *qdllname = NULL;
@@ -188,7 +135,6 @@
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "axis2_module_builder_populate_module start");
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- builder_impl = AXIS2_INTF_TO_IMPL(module_builder);
module_node = AXIS2_DESC_BUILDER_BUILD_OM(module_builder->desc_builder, env);
module_element = AXIOM_NODE_GET_DATA_ELEMENT(module_node, env);
@@ -213,7 +159,7 @@
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Populate module %s", module_name);
qmodule_name = axis2_qname_create(env, module_name, NULL, NULL);
- AXIS2_MODULE_DESC_SET_NAME(builder_impl->module_desc, env, qmodule_name);
+ AXIS2_MODULE_DESC_SET_NAME(module_builder->module_desc, env, qmodule_name);
if(qmodule_name)
AXIS2_QNAME_FREE(qmodule_name, env);
}
@@ -229,7 +175,7 @@
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Populate module %s", module_name);
module_qname = axis2_qname_create(env, module_name, NULL, NULL);
- AXIS2_MODULE_DESC_SET_NAME(builder_impl->module_desc, env, module_qname);
+ AXIS2_MODULE_DESC_SET_NAME(module_builder->module_desc, env, module_qname);
if(module_qname)
AXIS2_QNAME_FREE(module_qname, env);
}
@@ -241,12 +187,14 @@
axis2_char_t *module_name = NULL;
axis2_qname_t *module_qname = NULL;
- file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(module_builder->
- desc_builder->engine, env);
+ file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(
+ axis2_desc_builder_get_dep_engine(module_builder->desc_builder, env),
+ env);
module_name = AXIS2_ARCH_FILE_DATA_GET_MODULE_NAME(file_data, env);
module_qname = axis2_qname_create(env, module_name, NULL, NULL);
- axis2_module_desc_set_qname(builder_impl->module_desc, env, module_qname);
+ axis2_module_desc_set_qname(module_builder->module_desc, env, module_qname);
+
if (module_qname)
AXIS2_QNAME_FREE(module_qname, env);
}
@@ -266,12 +214,14 @@
class_name = axiom_attribute_get_value(module_dll_att, env);
if (class_name && (0 != AXIS2_STRCMP("", class_name)))
{
- if (module_builder->desc_builder->engine)
+ axis2_dep_engine_t *dep_engine =
+ axis2_desc_builder_get_dep_engine(module_builder->desc_builder, env);
+ if (dep_engine)
{
axis2_arch_file_data_t *file_data = NULL;
file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(
- module_builder->desc_builder->engine, env);
+ dep_engine, env);
AXIS2_ARCH_FILE_DATA_SET_MODULE_DLL_NAME(file_data, env,
class_name);
@@ -288,11 +238,12 @@
if (qparamst)
AXIS2_QNAME_FREE(qparamst, env);
- parent = axis2_module_desc_get_parent(builder_impl->module_desc, env);
+ parent = axis2_module_desc_get_parent(module_builder->module_desc, env);
+
if (parent)
- parent_container = parent->param_container;
+ parent_container = axis2_conf_get_param_container(parent, env);
AXIS2_DESC_BUILDER_PROCESS_PARAMS(module_builder->desc_builder, env,
- itr, axis2_module_desc_get_param_container(builder_impl->module_desc, env),
+ itr, axis2_module_desc_get_param_container(module_builder->module_desc, env),
parent_container);
/* Process IN_FLOW */
@@ -308,9 +259,10 @@
flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(module_builder->
desc_builder, env, in_flow_element,
- axis2_module_desc_get_param_container(builder_impl->module_desc, env),
+ axis2_module_desc_get_param_container(module_builder->module_desc, env),
in_flow_node);
- status = axis2_module_desc_set_in_flow(builder_impl->module_desc, env, flow);
+ status = axis2_module_desc_set_in_flow(module_builder->module_desc, env, flow);
+
if (AXIS2_SUCCESS != status)
{
if (flow)
@@ -331,9 +283,10 @@
flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(module_builder->
desc_builder, env, out_flow_element,
- axis2_module_desc_get_param_container(builder_impl->module_desc, env),
+ axis2_module_desc_get_param_container(module_builder->module_desc, env),
out_flow_node);
- status = axis2_module_desc_set_out_flow(builder_impl->module_desc, env, flow);
+ status = axis2_module_desc_set_out_flow(module_builder->module_desc, env, flow);
+
if (AXIS2_SUCCESS != status)
{
axis2_flow_free(flow, env);
@@ -353,9 +306,10 @@
flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(module_builder->
desc_builder, env, in_fault_flow_element,
- axis2_module_desc_get_param_container(builder_impl->module_desc, env),
+ axis2_module_desc_get_param_container(module_builder->module_desc, env),
in_fault_flow_node);
- status = axis2_module_desc_set_fault_in_flow(builder_impl->module_desc, env, flow);
+ status = axis2_module_desc_set_fault_in_flow(module_builder->module_desc, env, flow);
+
if (AXIS2_SUCCESS != status)
{
axis2_flow_free(flow, env);
@@ -375,9 +329,9 @@
flow = AXIS2_DESC_BUILDER_PROCESS_FLOW(module_builder->
desc_builder, env, out_fault_flow_element,
- axis2_module_desc_get_param_container(builder_impl->module_desc, env),
+ axis2_module_desc_get_param_container(module_builder->module_desc, env),
out_fault_flow_node);
- status = axis2_module_desc_set_fault_out_flow(builder_impl->module_desc,
+ status = axis2_module_desc_set_fault_out_flow(module_builder->module_desc,
env, flow);
if (AXIS2_SUCCESS != status)
{
@@ -399,7 +353,7 @@
axis2_op_t *op_desc = NULL;
op_desc = (axis2_op_t *) axis2_array_list_get(ops, env, i);
- axis2_module_desc_add_op(builder_impl->module_desc, env, op_desc);
+ axis2_module_desc_add_op(module_builder->module_desc, env, op_desc);
}
axis2_array_list_free(ops, env);
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
@@ -408,18 +362,16 @@
}
-axis2_array_list_t *AXIS2_CALL
+static axis2_array_list_t *AXIS2_CALL
axis2_module_builder_process_ops(
axis2_module_builder_t *module_builder,
const axis2_env_t *env,
axiom_children_qname_iterator_t *op_itr)
{
- axis2_module_builder_impl_t *builder_impl = NULL;
axis2_array_list_t *ops = NULL;
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, op_itr, NULL);
- builder_impl = AXIS2_INTF_TO_IMPL(module_builder);
ops = axis2_array_list_create(env, 0);
while (AXIS2_TRUE == axiom_children_qname_iterator_has_next(op_itr, env))
@@ -496,7 +448,7 @@
AXIS2_DESC_BUILDER_PROCESS_PARAMS(module_builder->desc_builder, env,
params,
axis2_op_get_param_container(op_desc, env),
- axis2_module_desc_get_param_container(builder_impl->module_desc, env));
+ axis2_module_desc_get_param_container(module_builder->module_desc, env));
/* To process wsamapping */
AXIS2_DESC_BUILDER_PROCESS_ACTION_MAPPINGS(module_builder->desc_builder,
env, op_node, op_desc);
@@ -534,8 +486,9 @@
AXIS2_DESC_BUILDER_PROCESS_OP_MODULE_REFS(module_builder->desc_builder,
env, modules, op_desc);
/* setting Operation phase */
- info = AXIS2_DEP_ENGINE_GET_PHASES_INFO(module_builder->desc_builder->
- engine, env);
+ info = AXIS2_DEP_ENGINE_GET_PHASES_INFO(
+ axis2_desc_builder_get_dep_engine(module_builder->desc_builder, env),
+ env);
AXIS2_PHASES_INFO_SET_OP_PHASES(info, env, op_desc);
/* adding operation */
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org