You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2007/09/28 11:53:04 UTC
svn commit: r580276 [8/26] - in /webservices/axis2/trunk/c/src: core/addr/
core/clientapi/ core/context/ core/deployment/ core/description/
core/engine/ core/phaseresolver/ core/receivers/ core/transport/
core/transport/http/common/ core/transport/http...
Modified: webservices/axis2/trunk/c/src/core/deployment/module_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/module_builder.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/module_builder.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/module_builder.c Fri Sep 28 02:52:58 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -24,23 +25,24 @@
struct axis2_desc_builder *desc_builder;
};
-static axutil_array_list_t *AXIS2_CALL
-axis2_module_builder_process_ops(axis2_module_builder_t *module_builder,
- const axutil_env_t *env,
- axiom_children_qname_iterator_t *op_itr);
+static axutil_array_list_t *AXIS2_CALL axis2_module_builder_process_ops(
+ axis2_module_builder_t * module_builder,
+ const axutil_env_t * env,
+ axiom_children_qname_iterator_t * op_itr);
AXIS2_EXTERN axis2_module_builder_t *AXIS2_CALL
-axis2_module_builder_create(const axutil_env_t *env)
+axis2_module_builder_create(
+ const axutil_env_t * env)
{
axis2_module_builder_t *module_builder = NULL;
AXIS2_ENV_CHECK(env, NULL);
module_builder = (axis2_module_builder_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axis2_module_builder_t));
+ sizeof
+ (axis2_module_builder_t));
-
- if (! module_builder)
+ if (!module_builder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -50,24 +52,26 @@
}
AXIS2_EXTERN axis2_module_builder_t *AXIS2_CALL
-axis2_module_builder_create_with_file_and_dep_engine_and_module(const axutil_env_t *env,
- axis2_char_t *file_name,
- axis2_dep_engine_t *dep_engine,
- axis2_module_desc_t *module_desc)
+axis2_module_builder_create_with_file_and_dep_engine_and_module(
+ const axutil_env_t * env,
+ axis2_char_t * file_name,
+ axis2_dep_engine_t * dep_engine,
+ axis2_module_desc_t * module_desc)
{
axis2_module_builder_t *module_builder = NULL;
AXIS2_ENV_CHECK(env, NULL);
- module_builder = (axis2_module_builder_t *) axis2_module_builder_create(env);
- if (! module_builder)
+ module_builder =
+ (axis2_module_builder_t *) axis2_module_builder_create(env);
+ if (!module_builder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
module_builder->desc_builder =
axis2_desc_builder_create_with_file_and_dep_engine(env, file_name,
- dep_engine);
+ dep_engine);
if (!module_builder->desc_builder)
{
axis2_module_builder_free(module_builder, env);
@@ -78,8 +82,9 @@
}
AXIS2_EXTERN void AXIS2_CALL
-axis2_module_builder_free(axis2_module_builder_t *module_builder,
- const axutil_env_t *env)
+axis2_module_builder_free(
+ axis2_module_builder_t * module_builder,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, void);
@@ -97,8 +102,9 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_module_builder_populate_module(axis2_module_builder_t *module_builder,
- const axutil_env_t *env)
+axis2_module_builder_populate_module(
+ axis2_module_builder_t * module_builder,
+ const axutil_env_t * env)
{
axiom_element_t *module_element = NULL;
axiom_node_t *module_node = NULL;
@@ -127,11 +133,13 @@
int i = 0;
axis2_status_t status = AXIS2_FAILURE;
- AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "axis2_module_builder_populate_module start");
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+ "axis2_module_builder_populate_module start");
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- module_node = axis2_desc_builder_build_om(module_builder->desc_builder, env);
+ module_node =
+ axis2_desc_builder_build_om(module_builder->desc_builder, env);
module_element = axiom_node_get_data_element(module_node, env);
if (!module_element)
{
@@ -142,13 +150,15 @@
axis2_char_t *module_name = NULL;
axutil_qname_t *module_qname = NULL;
- file_data = axis2_dep_engine_get_current_file_item(
- axis2_desc_builder_get_dep_engine(module_builder->desc_builder, env),
- 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 = axutil_qname_create(env, module_name, NULL, NULL);
- axis2_module_desc_set_qname(module_builder->module_desc, env, module_qname);
+ axis2_module_desc_set_qname(module_builder->module_desc, env,
+ module_qname);
if (module_qname)
{
@@ -169,20 +179,20 @@
{
axis2_char_t *class_name = NULL;
-
class_name = axiom_attribute_get_value(module_dll_att, env);
if (class_name && (0 != axutil_strcmp("", class_name)))
{
- axis2_dep_engine_t *dep_engine =
- axis2_desc_builder_get_dep_engine(module_builder->desc_builder, env);
+ 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(
- dep_engine, env);
+ file_data =
+ axis2_dep_engine_get_current_file_item(dep_engine, env);
axis2_arch_file_data_set_module_dll_name(file_data, env,
- class_name);
+ class_name);
}
}
}
@@ -192,7 +202,7 @@
qparamst = axutil_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
itr = axiom_element_get_children_with_qname(module_element, env,
- qparamst, module_node);
+ qparamst, module_node);
if (qparamst)
{
axutil_qname_free(qparamst, env);
@@ -204,13 +214,17 @@
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(module_builder->module_desc, env),
- parent_container);
+ itr,
+ axis2_module_desc_get_param_container
+ (module_builder->module_desc, env),
+ parent_container);
/* Process IN_FLOW */
qinflowst = axutil_qname_create(env, AXIS2_IN_FLOW_START, NULL, NULL);
in_flow_element = axiom_element_get_first_child_with_qname(module_element,
- env, qinflowst, module_node, &in_flow_node);
+ env, qinflowst,
+ module_node,
+ &in_flow_node);
if (qinflowst)
{
axutil_qname_free(qinflowst, env);
@@ -221,10 +235,13 @@
axis2_flow_t *flow = NULL;
flow = axis2_desc_builder_process_flow(module_builder->desc_builder,
- env, in_flow_element,
- axis2_module_desc_get_param_container(module_builder->module_desc, env),
- in_flow_node);
- status = axis2_module_desc_set_in_flow(module_builder->module_desc, env, flow);
+ env, in_flow_element,
+ axis2_module_desc_get_param_container
+ (module_builder->module_desc,
+ env), in_flow_node);
+ status =
+ axis2_module_desc_set_in_flow(module_builder->module_desc, env,
+ flow);
if (AXIS2_SUCCESS != status)
{
@@ -238,7 +255,9 @@
qoutflowst = axutil_qname_create(env, AXIS2_OUT_FLOW_START, NULL, NULL);
out_flow_element = axiom_element_get_first_child_with_qname(module_element,
- env, qoutflowst, module_node, &out_flow_node);
+ env, qoutflowst,
+ module_node,
+ &out_flow_node);
if (qoutflowst)
{
axutil_qname_free(qoutflowst, env);
@@ -249,10 +268,13 @@
axis2_flow_t *flow = NULL;
flow = axis2_desc_builder_process_flow(module_builder->desc_builder,
- env, out_flow_element,
- axis2_module_desc_get_param_container(module_builder->module_desc, env),
- out_flow_node);
- status = axis2_module_desc_set_out_flow(module_builder->module_desc, env, flow);
+ env, out_flow_element,
+ axis2_module_desc_get_param_container
+ (module_builder->module_desc,
+ env), out_flow_node);
+ status =
+ axis2_module_desc_set_out_flow(module_builder->module_desc, env,
+ flow);
if (AXIS2_SUCCESS != status)
{
@@ -262,8 +284,10 @@
}
qinfaultflow = axutil_qname_create(env, AXIS2_IN_FAILTFLOW, NULL, NULL);
- in_fault_flow_element = axiom_element_get_first_child_with_qname(module_element,
- env, qinfaultflow, module_node, &in_fault_flow_node);
+ in_fault_flow_element =
+ axiom_element_get_first_child_with_qname(module_element, env,
+ qinfaultflow, module_node,
+ &in_fault_flow_node);
if (qinfaultflow)
{
axutil_qname_free(qinfaultflow, env);
@@ -274,11 +298,13 @@
axis2_flow_t *flow = NULL;
flow = axis2_desc_builder_process_flow(module_builder->desc_builder,
- env, in_fault_flow_element,
- axis2_module_desc_get_param_container(module_builder->module_desc, env),
- in_fault_flow_node);
- status = axis2_module_desc_set_fault_in_flow(module_builder->module_desc,
- env, flow);
+ env, in_fault_flow_element,
+ axis2_module_desc_get_param_container
+ (module_builder->module_desc,
+ env), in_fault_flow_node);
+ status =
+ axis2_module_desc_set_fault_in_flow(module_builder->module_desc,
+ env, flow);
if (AXIS2_SUCCESS != status)
{
@@ -288,8 +314,10 @@
}
qoutfaultflow = axutil_qname_create(env, AXIS2_OUT_FAILTFLOW, NULL, NULL);
- out_fault_flow_element = axiom_element_get_first_child_with_qname(module_element,
- env, qoutfaultflow, module_node, &out_fault_flow_node);
+ out_fault_flow_element =
+ axiom_element_get_first_child_with_qname(module_element, env,
+ qoutfaultflow, module_node,
+ &out_fault_flow_node);
if (qoutfaultflow)
{
axutil_qname_free(qoutfaultflow, env);
@@ -300,11 +328,13 @@
axis2_flow_t *flow = NULL;
flow = axis2_desc_builder_process_flow(module_builder->desc_builder,
- env, out_fault_flow_element,
- axis2_module_desc_get_param_container(module_builder->module_desc, env),
- out_fault_flow_node);
- status = axis2_module_desc_set_fault_out_flow(module_builder->module_desc,
- env, flow);
+ env, out_fault_flow_element,
+ axis2_module_desc_get_param_container
+ (module_builder->module_desc,
+ env), out_fault_flow_node);
+ status =
+ axis2_module_desc_set_fault_out_flow(module_builder->module_desc,
+ env, flow);
if (AXIS2_SUCCESS != status)
{
axis2_flow_free(flow, env);
@@ -315,7 +345,7 @@
/* Processing Operations */
qopst = axutil_qname_create(env, AXIS2_OPERATIONST, NULL, NULL);
op_itr = axiom_element_get_children_with_qname(module_element, env,
- qopst, module_node);
+ qopst, module_node);
if (qopst)
{
axutil_qname_free(qopst, env);
@@ -331,15 +361,15 @@
}
axutil_array_list_free(ops, env);
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
- "axis2_module_builder_populate_module end");
+ "axis2_module_builder_populate_module end");
return AXIS2_SUCCESS;
}
-
static axutil_array_list_t *AXIS2_CALL
-axis2_module_builder_process_ops(axis2_module_builder_t *module_builder,
- const axutil_env_t *env,
- axiom_children_qname_iterator_t *op_itr)
+axis2_module_builder_process_ops(
+ axis2_module_builder_t * module_builder,
+ const axutil_env_t * env,
+ axiom_children_qname_iterator_t * op_itr)
{
axutil_array_list_t *ops = NULL;
@@ -379,10 +409,10 @@
axutil_qname_free(qattname, env);
}
- if (! op_name_att)
+ if (!op_name_att)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_OP_NAME_MISSING,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return NULL;
}
qmep = axutil_qname_create(env, AXIS2_MEP, NULL, NULL);
@@ -396,7 +426,7 @@
{
mep_url = axiom_attribute_get_value(op_mep_att, env);
}
- if (! mep_url)
+ if (!mep_url)
{
/* Assuming in-out mep */
op_desc = axis2_op_create_from_module(env);
@@ -417,26 +447,30 @@
/* Operation parameters */
qparamst = axutil_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
params = axiom_element_get_children_with_qname(op_element, env,
- qparamst, op_node);
+ qparamst, op_node);
if (qparamst)
{
axutil_qname_free(qparamst, env);
}
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(module_builder->module_desc, env));
+ params,
+ axis2_op_get_param_container(op_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);
+ axis2_desc_builder_process_action_mappings(module_builder->desc_builder,
+ env, op_node, op_desc);
/* setting the mep of the operation */
/* loading the message receivers */
qmsgrecv = axutil_qname_create(env, AXIS2_MESSAGERECEIVER, NULL, NULL);
recv_element = axiom_element_get_first_child_with_qname(op_element,
- env, qmsgrecv, op_node, &recv_node);
+ env, qmsgrecv,
+ op_node,
+ &recv_node);
if (qmsgrecv)
{
axutil_qname_free(qmsgrecv, env);
@@ -446,7 +480,8 @@
axis2_msg_recv_t *msg_recv = NULL;
msg_recv = axis2_desc_builder_load_msg_recv(module_builder->
- desc_builder, env, recv_element);
+ desc_builder, env,
+ recv_element);
axis2_op_set_msg_recv(op_desc, env, msg_recv);
}
else
@@ -459,17 +494,18 @@
/* Process Module Refs */
qmodulest = axutil_qname_create(env, AXIS2_MODULEST, NULL, NULL);
modules = axiom_element_get_children_with_qname(op_element, env,
- qmodulest, op_node);
+ qmodulest, op_node);
if (qmodulest)
{
axutil_qname_free(qmodulest, env);
}
axis2_desc_builder_process_op_module_refs(module_builder->desc_builder,
- env, modules, op_desc);
+ env, modules, op_desc);
/* setting Operation phase */
- info = axis2_dep_engine_get_phases_info(
- axis2_desc_builder_get_dep_engine(module_builder->desc_builder, env),
- 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 */
@@ -477,5 +513,3 @@
}
return ops;
}
-
-
Modified: webservices/axis2/trunk/c/src/core/deployment/phases_info.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/phases_info.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/phases_info.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/phases_info.c Fri Sep 28 02:52:58 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -31,15 +32,17 @@
};
AXIS2_EXTERN axis2_phases_info_t *AXIS2_CALL
-axis2_phases_info_create(const axutil_env_t *env)
+axis2_phases_info_create(
+ const axutil_env_t * env)
{
axis2_phases_info_t *phases_info = NULL;
AXIS2_ENV_CHECK(env, NULL);
phases_info = (axis2_phases_info_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axis2_phases_info_t));
+ sizeof
+ (axis2_phases_info_t));
- if (! phases_info)
+ if (!phases_info)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -58,8 +61,9 @@
}
AXIS2_EXTERN void AXIS2_CALL
-axis2_phases_info_free(axis2_phases_info_t *phases_info,
- const axutil_env_t *env)
+axis2_phases_info_free(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, void);
@@ -85,73 +89,73 @@
if (phases_info->op_in_phases)
{
/*axutil_hash_index_t *i = NULL;
- for (i = axutil_hash_first (phases_info->op_in_phases, env); i; i =
- axutil_hash_next (env, i))
- {
- void *v = NULL;
- axis2_phase_t *phase = NULL;
-
- axutil_hash_this (i, NULL, NULL, &v);
- phase = (axis2_phase_t *) v;
- if(phase)
- {
- axis2_phase_free(phase, env);
- }
- }*/
+ for (i = axutil_hash_first (phases_info->op_in_phases, env); i; i =
+ axutil_hash_next (env, i))
+ {
+ void *v = NULL;
+ axis2_phase_t *phase = NULL;
+
+ axutil_hash_this (i, NULL, NULL, &v);
+ phase = (axis2_phase_t *) v;
+ if(phase)
+ {
+ axis2_phase_free(phase, env);
+ }
+ } */
axutil_hash_free(phases_info->op_in_phases, env);
}
if (phases_info->op_out_phases)
{
/*axutil_hash_index_t *i = NULL;
- for (i = axutil_hash_first (phases_info->op_out_phases, env); i; i =
- axutil_hash_next (env, i))
- {
- void *v = NULL;
- axis2_phase_t *phase = NULL;
-
- axutil_hash_this (i, NULL, NULL, &v);
- phase = (axis2_phase_t *) v;
- if(phase)
- {
- axis2_phase_free(phase, env);
- }
- }*/
+ for (i = axutil_hash_first (phases_info->op_out_phases, env); i; i =
+ axutil_hash_next (env, i))
+ {
+ void *v = NULL;
+ axis2_phase_t *phase = NULL;
+
+ axutil_hash_this (i, NULL, NULL, &v);
+ phase = (axis2_phase_t *) v;
+ if(phase)
+ {
+ axis2_phase_free(phase, env);
+ }
+ } */
axutil_hash_free(phases_info->op_out_phases, env);
}
if (phases_info->op_in_faultphases)
{
/*axutil_hash_index_t *i = NULL;
- for (i = axutil_hash_first (phases_info->op_in_faultphases, env);
- i; i = axutil_hash_next (env, i))
- {
- void *v = NULL;
- axis2_phase_t *phase = NULL;
-
- axutil_hash_this (i, NULL, NULL, &v);
- phase = (axis2_phase_t *) v;
- if(phase)
- {
- axis2_phase_free(phase, env);
- }
- }*/
+ for (i = axutil_hash_first (phases_info->op_in_faultphases, env);
+ i; i = axutil_hash_next (env, i))
+ {
+ void *v = NULL;
+ axis2_phase_t *phase = NULL;
+
+ axutil_hash_this (i, NULL, NULL, &v);
+ phase = (axis2_phase_t *) v;
+ if(phase)
+ {
+ axis2_phase_free(phase, env);
+ }
+ } */
axutil_hash_free(phases_info->op_in_faultphases, env);
}
if (phases_info->op_out_faultphases)
{
/*axutil_hash_index_t *i = NULL;
- for (i = axutil_hash_first (phases_info->op_out_faultphases, env);
- i; i = axutil_hash_next (env, i))
- {
- void *v = NULL;
- axis2_phase_t *phase = NULL;
-
- axutil_hash_this (i, NULL, NULL, &v);
- phase = (axis2_phase_t *) v;
- if(phase)
- {
- axis2_phase_free(phase, env);
- }
- }*/
+ for (i = axutil_hash_first (phases_info->op_out_faultphases, env);
+ i; i = axutil_hash_next (env, i))
+ {
+ void *v = NULL;
+ axis2_phase_t *phase = NULL;
+
+ axutil_hash_this (i, NULL, NULL, &v);
+ phase = (axis2_phase_t *) v;
+ if(phase)
+ {
+ axis2_phase_free(phase, env);
+ }
+ } */
axutil_hash_free(phases_info->op_out_faultphases, env);
}
@@ -164,9 +168,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_phases_info_set_in_phases(axis2_phases_info_t *phases_info,
- const axutil_env_t *env,
- axutil_array_list_t *in_phases)
+axis2_phases_info_set_in_phases(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env,
+ axutil_array_list_t * in_phases)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, in_phases, AXIS2_FAILURE);
@@ -181,9 +186,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_phases_info_set_out_phases(axis2_phases_info_t *phases_info,
- const axutil_env_t *env,
- axutil_array_list_t *out_phases)
+axis2_phases_info_set_out_phases(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env,
+ axutil_array_list_t * out_phases)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, out_phases, AXIS2_FAILURE);
@@ -198,9 +204,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_phases_info_set_in_faultphases(axis2_phases_info_t *phases_info,
- const axutil_env_t *env,
- axutil_array_list_t *in_faultphases)
+axis2_phases_info_set_in_faultphases(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env,
+ axutil_array_list_t * in_faultphases)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, in_faultphases, AXIS2_FAILURE);
@@ -215,9 +222,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_phases_info_set_out_faultphases(axis2_phases_info_t *phases_info,
- const axutil_env_t *env,
- axutil_array_list_t *out_faultphases)
+axis2_phases_info_set_out_faultphases(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env,
+ axutil_array_list_t * out_faultphases)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, out_faultphases, AXIS2_FAILURE);
@@ -232,8 +240,9 @@
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_phases_info_get_in_phases(const axis2_phases_info_t *phases_info,
- const axutil_env_t *env)
+axis2_phases_info_get_in_phases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, NULL);
@@ -241,29 +250,33 @@
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_phases_info_get_out_phases(const axis2_phases_info_t *phases_info,
- const axutil_env_t *env)
+axis2_phases_info_get_out_phases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env)
{
return phases_info->out_phases;
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_phases_info_get_in_faultphases(const axis2_phases_info_t *phases_info,
- const axutil_env_t *env)
+axis2_phases_info_get_in_faultphases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env)
{
return phases_info->in_faultphases;
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_phases_info_get_out_faultphases(const axis2_phases_info_t *phases_info,
- const axutil_env_t *env)
+axis2_phases_info_get_out_faultphases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env)
{
return phases_info->out_faultphases;
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_phases_info_get_op_in_phases(const axis2_phases_info_t *phases_info,
- const axutil_env_t *env)
+axis2_phases_info_get_op_in_phases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env)
{
struct axis2_phase *phase = NULL;
int i = 0;
@@ -288,7 +301,7 @@
size = axutil_array_list_size(phases_info->in_phases, env);
for (i = 0; i < size; i++)
{
- phase_name = (axis2_char_t *)
+ phase_name = (axis2_char_t *)
axutil_array_list_get(phases_info->in_phases, env, i);
if (0 == axutil_strcmp(AXIS2_PHASE_TRANSPORT_IN, phase_name) ||
0 == axutil_strcmp(AXIS2_PHASE_PRE_DISPATCH, phase_name) ||
@@ -303,13 +316,13 @@
* phases for each operation specific flow making the operation
* the owner of the flow and the phases contained within it*/
/*phase = axutil_hash_get(phases_info->op_in_phases, phase_name,
- AXIS2_HASH_KEY_STRING);
- if(!phase)
- {
- phase = axis2_phase_create(env, phase_name);
- axutil_hash_set(phases_info->op_in_phases, phase_name,
- AXIS2_HASH_KEY_STRING, phase);
- }*/
+ AXIS2_HASH_KEY_STRING);
+ if(!phase)
+ {
+ phase = axis2_phase_create(env, phase_name);
+ axutil_hash_set(phases_info->op_in_phases, phase_name,
+ AXIS2_HASH_KEY_STRING, phase);
+ } */
phase = axis2_phase_create(env, phase_name);
status = axutil_array_list_add(op_in_phases, env, phase);
if (AXIS2_SUCCESS != status)
@@ -317,13 +330,13 @@
int i = 0;
int size = 0;
- axis2_phase_free(phase, env);
+ axis2_phase_free(phase, env);
phase = NULL;
size = axutil_array_list_size(op_in_phases, env);
for (i = 0; i < size; i++)
{
phase = axutil_array_list_get(op_in_phases, env, i);
- axis2_phase_free(phase, env);
+ axis2_phase_free(phase, env);
phase = NULL;
}
axutil_array_list_free(op_in_phases, env);
@@ -336,8 +349,9 @@
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_phases_info_get_op_out_phases(const axis2_phases_info_t *phases_info,
- const axutil_env_t *env)
+axis2_phases_info_get_op_out_phases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env)
{
struct axis2_phase *phase = NULL;
int i = 0;
@@ -361,15 +375,15 @@
for (i = 0; i < size; i++)
{
phase_name = (axis2_char_t *) axutil_array_list_get(phases_info->
- out_phases, env, i);
+ out_phases, env, i);
/*phase = axutil_hash_get(phases_info->op_out_phases, phase_name,
- AXIS2_HASH_KEY_STRING);
- if(!phase)
- {
- phase = axis2_phase_create(env, phase_name);
- axutil_hash_set(phases_info->op_out_phases, phase_name,
- AXIS2_HASH_KEY_STRING, phase);
- }*/
+ AXIS2_HASH_KEY_STRING);
+ if(!phase)
+ {
+ phase = axis2_phase_create(env, phase_name);
+ axutil_hash_set(phases_info->op_out_phases, phase_name,
+ AXIS2_HASH_KEY_STRING, phase);
+ } */
phase = axis2_phase_create(env, phase_name);
status = axutil_array_list_add(op_out_phases, env, phase);
if (AXIS2_SUCCESS != status)
@@ -383,7 +397,7 @@
for (i = 0; i < size; i++)
{
phase = axutil_array_list_get(op_out_phases, env, i);
- axis2_phase_free(phase, env);
+ axis2_phase_free(phase, env);
phase = NULL;
}
axutil_array_list_free(op_out_phases, env);
@@ -395,8 +409,9 @@
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_phases_info_get_op_in_faultphases(const axis2_phases_info_t *phases_info,
- const axutil_env_t *env)
+axis2_phases_info_get_op_in_faultphases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env)
{
int i = 0;
int size = 0;
@@ -427,13 +442,13 @@
phase_name = (axis2_char_t *)
axutil_array_list_get(phases_info->in_faultphases, env, i);
/*phase = axutil_hash_get(phases_info->op_in_faultphases, phase_name,
- AXIS2_HASH_KEY_STRING);
- if(!phase)
- {
- phase = axis2_phase_create(env, phase_name);
- axutil_hash_set(phases_info->op_in_faultphases,
- phase_name, AXIS2_HASH_KEY_STRING, phase);
- }*/
+ AXIS2_HASH_KEY_STRING);
+ if(!phase)
+ {
+ phase = axis2_phase_create(env, phase_name);
+ axutil_hash_set(phases_info->op_in_faultphases,
+ phase_name, AXIS2_HASH_KEY_STRING, phase);
+ } */
phase = axis2_phase_create(env, phase_name);
status = axutil_array_list_add(op_in_faultphases, env, phase);
if (AXIS2_SUCCESS != status)
@@ -460,8 +475,9 @@
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_phases_info_get_op_out_faultphases(const axis2_phases_info_t *phases_info,
- const axutil_env_t *env)
+axis2_phases_info_get_op_out_faultphases(
+ const axis2_phases_info_t * phases_info,
+ const axutil_env_t * env)
{
int i = 0;
int size = 0;
@@ -490,16 +506,16 @@
}
for (i = 0; i < size; i++)
{
- phase_name = (axis2_char_t *)
+ phase_name = (axis2_char_t *)
axutil_array_list_get(phases_info->out_faultphases, env, i);
/*phase = axutil_hash_get(phases_info->op_out_faultphases, phase_name,
- AXIS2_HASH_KEY_STRING);
- if(!phase)
- {
- phase = axis2_phase_create(env, phase_name);
- axutil_hash_set(phases_info->op_out_faultphases,
- phase_name, AXIS2_HASH_KEY_STRING, phase);
- }*/
+ AXIS2_HASH_KEY_STRING);
+ if(!phase)
+ {
+ phase = axis2_phase_create(env, phase_name);
+ axutil_hash_set(phases_info->op_out_faultphases,
+ phase_name, AXIS2_HASH_KEY_STRING, phase);
+ } */
phase = axis2_phase_create(env, phase_name);
status = axutil_array_list_add(op_out_faultphases, env, phase);
if (AXIS2_SUCCESS != status)
@@ -526,9 +542,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_phases_info_set_op_phases(axis2_phases_info_t *phases_info,
- const axutil_env_t *env,
- axis2_op_t *op_desc)
+axis2_phases_info_set_op_phases(
+ axis2_phases_info_t * phases_info,
+ const axutil_env_t * env,
+ axis2_op_t * op_desc)
{
axis2_status_t status = AXIS2_FAILURE;
axutil_array_list_t *op_in_phases = NULL;
@@ -540,7 +557,7 @@
AXIS2_PARAM_CHECK(env->error, op_desc, AXIS2_FAILURE);
op_in_phases = axis2_phases_info_get_op_in_phases(phases_info, env);
- if (! op_in_phases)
+ if (!op_in_phases)
{
status = AXIS2_ERROR_GET_STATUS_CODE(env->error);
/* op_in_phases cannot be NULL */
@@ -548,59 +565,60 @@
}
op_out_phases = axis2_phases_info_get_op_out_phases(phases_info, env);
- if (! op_out_phases)
+ if (!op_out_phases)
{
status = AXIS2_ERROR_GET_STATUS_CODE(env->error);
/* op_out_phases cannot be NULL */
return status;
}
- op_in_faultphases = axis2_phases_info_get_op_in_faultphases(phases_info, env);
- op_out_faultphases = axis2_phases_info_get_op_out_faultphases(phases_info,
- env);
+ op_in_faultphases =
+ axis2_phases_info_get_op_in_faultphases(phases_info, env);
+ op_out_faultphases =
+ axis2_phases_info_get_op_out_faultphases(phases_info, env);
status = axis2_op_set_in_flow(op_desc, env, op_in_phases);
status = axis2_op_set_out_flow(op_desc, env, op_out_phases);
if (op_in_faultphases)
{
- status = axis2_op_set_fault_in_flow(op_desc, env,
- op_in_faultphases);
+ status = axis2_op_set_fault_in_flow(op_desc, env, op_in_faultphases);
}
if (op_out_faultphases)
{
- status = axis2_op_set_fault_out_flow(op_desc, env,
- op_out_faultphases);
+ status = axis2_op_set_fault_out_flow(op_desc, env, op_out_faultphases);
}
return status;
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_phases_info_copy_flow(const axutil_env_t *env,
- const axutil_array_list_t *flow_to_copy)
+axis2_phases_info_copy_flow(
+ const axutil_env_t * env,
+ const axutil_array_list_t * flow_to_copy)
{
- int size = 0, i = 0;
+ int size = 0,
+ i = 0;
axutil_array_list_t *new_flow = NULL;
- if(flow_to_copy)
+ if (flow_to_copy)
{
- size = axutil_array_list_size((axutil_array_list_t *) flow_to_copy, env);
+ size =
+ axutil_array_list_size((axutil_array_list_t *) flow_to_copy, env);
}
- if(size > 0)
+ if (size > 0)
{
new_flow = axutil_array_list_create(env, 0);
- if(!new_flow)
+ if (!new_flow)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
}
- for(i = 0; i < size; i++)
+ for (i = 0; i < size; i++)
{
void *item = axutil_array_list_get((axutil_array_list_t *) flow_to_copy,
- env, i);
- axis2_phase_increment_ref((axis2_phase_t *)item, env);
+ env, i);
+ axis2_phase_increment_ref((axis2_phase_t *) item, env);
axutil_array_list_add(new_flow, env, item);
}
return new_flow;
}
-
Modified: webservices/axis2/trunk/c/src/core/deployment/repos_listener.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/repos_listener.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/repos_listener.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/repos_listener.c Fri Sep 28 02:52:58 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -21,6 +22,7 @@
struct axis2_repos_listener
{
+
/**
* Referance to a WSInfoList
*/
@@ -33,23 +35,25 @@
axis2_char_t *folder_name;
};
-static axis2_status_t
-axis2_repos_listener_search(axis2_repos_listener_t *repos_listener,
- const axutil_env_t *env,
- axis2_char_t *folder_name,
+static axis2_status_t axis2_repos_listener_search(
+ axis2_repos_listener_t * repos_listener,
+ const axutil_env_t * env,
+ axis2_char_t * folder_name,
int type);
AXIS2_EXTERN axis2_repos_listener_t *AXIS2_CALL
-axis2_repos_listener_create(const axutil_env_t *env)
+axis2_repos_listener_create(
+ const axutil_env_t * env)
{
axis2_repos_listener_t *repos_listener = NULL;
AXIS2_ENV_CHECK(env, NULL);
repos_listener = (axis2_repos_listener_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axis2_repos_listener_t));
+ sizeof
+ (axis2_repos_listener_t));
- if (! repos_listener)
+ if (!repos_listener)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -60,7 +64,6 @@
return repos_listener;
}
-
/**
* This constructor take two argumnets folder name and referance to Deployment Engine
* Fisrt it initilize the syetm , by loading all the modules in the /modules directory
@@ -71,18 +74,20 @@
*/
AXIS2_EXTERN axis2_repos_listener_t *AXIS2_CALL
-axis2_repos_listener_create_with_folder_name_and_dep_engine(const axutil_env_t *env,
- axis2_char_t *folder_name,
- axis2_dep_engine_t *dep_engine)
+axis2_repos_listener_create_with_folder_name_and_dep_engine(
+ const axutil_env_t * env,
+ axis2_char_t * folder_name,
+ axis2_dep_engine_t * dep_engine)
{
axis2_repos_listener_t *repos_listener = NULL;
axis2_status_t status = AXIS2_FAILURE;
AXIS2_ENV_CHECK(env, NULL);
- repos_listener = (axis2_repos_listener_t *) axis2_repos_listener_create(env);
+ repos_listener =
+ (axis2_repos_listener_t *) axis2_repos_listener_create(env);
- if (! repos_listener)
+ if (!repos_listener)
{
return NULL;
}
@@ -92,7 +97,7 @@
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- repos_listener->info_list =
+ repos_listener->info_list =
axis2_ws_info_list_create_with_dep_engine(env, dep_engine);
if (!repos_listener->info_list)
{
@@ -102,7 +107,7 @@
if (AXIS2_SUCCESS != status)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPOS_LISTENER_INIT_FAILED,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return NULL;
}
@@ -110,8 +115,9 @@
}
AXIS2_EXTERN void AXIS2_CALL
-axis2_repos_listener_free(axis2_repos_listener_t *repos_listener,
- const axutil_env_t *env)
+axis2_repos_listener_free(
+ axis2_repos_listener_t * repos_listener,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, void);
@@ -131,8 +137,9 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_repos_listener_check_modules(axis2_repos_listener_t *repos_listener,
- const axutil_env_t *env)
+axis2_repos_listener_check_modules(
+ axis2_repos_listener_t * repos_listener,
+ const axutil_env_t * env)
{
axis2_char_t *module_path = NULL;
axis2_char_t *temp_path = NULL;
@@ -140,17 +147,21 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- temp_path = axutil_stracat(env, repos_listener->folder_name, AXIS2_PATH_SEP_STR);
+ temp_path =
+ axutil_stracat(env, repos_listener->folder_name, AXIS2_PATH_SEP_STR);
module_path = axutil_stracat(env, temp_path, AXIS2_MODULE_PATH);
AXIS2_FREE(env->allocator, temp_path);
- status = axis2_repos_listener_search(repos_listener, env, module_path, AXIS2_MODULE);
+ status =
+ axis2_repos_listener_search(repos_listener, env, module_path,
+ AXIS2_MODULE);
AXIS2_FREE(env->allocator, module_path);
return status;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_repos_listener_check_svcs(axis2_repos_listener_t *repos_listener,
- const axutil_env_t *env)
+axis2_repos_listener_check_svcs(
+ axis2_repos_listener_t * repos_listener,
+ const axutil_env_t * env)
{
axis2_char_t *svc_path = NULL;
axis2_char_t *temp_path = NULL;
@@ -158,24 +169,28 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- temp_path = axutil_stracat(env, repos_listener->folder_name, AXIS2_PATH_SEP_STR);
+ temp_path =
+ axutil_stracat(env, repos_listener->folder_name, AXIS2_PATH_SEP_STR);
svc_path = axutil_stracat(env, temp_path, AXIS2_SVC_PATH);
AXIS2_FREE(env->allocator, temp_path);
- status = axis2_repos_listener_search(repos_listener, env, svc_path, AXIS2_SVC);
+ status =
+ axis2_repos_listener_search(repos_listener, env, svc_path, AXIS2_SVC);
AXIS2_FREE(env->allocator, svc_path);
return status;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_repos_listener_update(axis2_repos_listener_t *repos_listener,
- const axutil_env_t *env)
+axis2_repos_listener_update(
+ axis2_repos_listener_t * repos_listener,
+ const axutil_env_t * env)
{
return axis2_ws_info_list_update(repos_listener->info_list, env);
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_repos_listener_init(axis2_repos_listener_t *repos_listener,
- const axutil_env_t *env)
+axis2_repos_listener_init(
+ axis2_repos_listener_t * repos_listener,
+ const axutil_env_t * env)
{
axis2_status_t status = AXIS2_FAILURE;
@@ -199,8 +214,9 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_repos_listener_start_listen(axis2_repos_listener_t *repos_listener,
- const axutil_env_t *env)
+axis2_repos_listener_start_listen(
+ axis2_repos_listener_t * repos_listener,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -212,9 +228,10 @@
}
static axis2_status_t
-axis2_repos_listener_search(axis2_repos_listener_t *repos_listener,
- const axutil_env_t *env,
- axis2_char_t *folder_name,
+axis2_repos_listener_search(
+ axis2_repos_listener_t * repos_listener,
+ const axutil_env_t * env,
+ axis2_char_t * folder_name,
int type)
{
int size = 0;
@@ -226,7 +243,7 @@
AXIS2_PARAM_CHECK(env->error, folder_name, AXIS2_FAILURE);
current_info_list = axutil_dir_handler_list_service_or_module_dirs(env,
- folder_name);
+ folder_name);
if (!current_info_list)
{
axis2_status_t status_code = AXIS2_FAILURE;
@@ -236,16 +253,18 @@
{
return status;
}
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "No %s in the folder.", folder_name);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "No %s in the folder.",
+ folder_name);
return AXIS2_SUCCESS;
}
size = axutil_array_list_size(current_info_list, env);
- for (i = 0; i < size; i++) /* loop until empty */
+ for (i = 0; i < size; i++) /* loop until empty */
{
axutil_file_t *file = NULL;
file = axutil_array_list_get(current_info_list, env, i);
- status = axis2_ws_info_list_add_ws_info_item(repos_listener->info_list, env,
- file, type);
+ status =
+ axis2_ws_info_list_add_ws_info_item(repos_listener->info_list, env,
+ file, type);
if (AXIS2_SUCCESS != status)
{
int size_j = 0;
@@ -276,4 +295,3 @@
current_info_list = NULL;
return AXIS2_SUCCESS;
}
-
Modified: webservices/axis2/trunk/c/src/core/deployment/svc_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/svc_builder.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/svc_builder.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/svc_builder.c Fri Sep 28 02:52:58 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -27,29 +28,30 @@
struct axis2_desc_builder *desc_builder;
};
-static axutil_array_list_t *
-axis2_svc_builder_process_ops(axis2_svc_builder_t *svc_builder,
- const axutil_env_t *env,
- axiom_children_qname_iterator_t *op_itr);
-
-static void
-axis2_svc_builder_process_msgs(axis2_svc_builder_t *svc_builder,
- const axutil_env_t *env,
- axiom_children_qname_iterator_t *iterator,
- axis2_op_t *op);
+static axutil_array_list_t *axis2_svc_builder_process_ops(
+ axis2_svc_builder_t * svc_builder,
+ const axutil_env_t * env,
+ axiom_children_qname_iterator_t * op_itr);
+
+static void axis2_svc_builder_process_msgs(
+ axis2_svc_builder_t * svc_builder,
+ const axutil_env_t * env,
+ axiom_children_qname_iterator_t * iterator,
+ axis2_op_t * op);
AXIS2_EXTERN axis2_svc_builder_t *AXIS2_CALL
-axis2_svc_builder_create(const axutil_env_t *env)
+axis2_svc_builder_create(
+ const axutil_env_t * env)
{
axis2_svc_builder_t *svc_builder = NULL;
AXIS2_ENV_CHECK(env, NULL);
svc_builder = (axis2_svc_builder_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axis2_svc_builder_t));
+ sizeof
+ (axis2_svc_builder_t));
-
- if (! svc_builder)
+ if (!svc_builder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -62,10 +64,11 @@
}
AXIS2_EXTERN axis2_svc_builder_t *AXIS2_CALL
-axis2_svc_builder_create_with_file_and_dep_engine_and_svc(const axutil_env_t *env,
- axis2_char_t *file_name,
- struct axis2_dep_engine *dep_engine,
- axis2_svc_t *svc)
+axis2_svc_builder_create_with_file_and_dep_engine_and_svc(
+ const axutil_env_t * env,
+ axis2_char_t * file_name,
+ struct axis2_dep_engine * dep_engine,
+ axis2_svc_t * svc)
{
axis2_svc_builder_t *svc_builder = NULL;
@@ -74,13 +77,13 @@
AXIS2_PARAM_CHECK(env->error, dep_engine, NULL);
AXIS2_PARAM_CHECK(env->error, svc, NULL);
svc_builder = (axis2_svc_builder_t *) axis2_svc_builder_create(env);
- if (! svc_builder)
+ if (!svc_builder)
{
return NULL;
}
svc_builder->desc_builder =
axis2_desc_builder_create_with_file_and_dep_engine(env, file_name,
- dep_engine);
+ dep_engine);
if (!svc_builder->desc_builder)
{
axis2_svc_builder_free(svc_builder, env);
@@ -91,9 +94,10 @@
}
AXIS2_EXTERN axis2_svc_builder_t *AXIS2_CALL
-axis2_svc_builder_create_with_dep_engine_and_svc(const axutil_env_t *env,
- axis2_dep_engine_t *dep_engine,
- axis2_svc_t *svc)
+axis2_svc_builder_create_with_dep_engine_and_svc(
+ const axutil_env_t * env,
+ axis2_dep_engine_t * dep_engine,
+ axis2_svc_t * svc)
{
axis2_svc_builder_t *svc_builder = NULL;
@@ -101,7 +105,7 @@
AXIS2_PARAM_CHECK(env->error, dep_engine, NULL);
AXIS2_PARAM_CHECK(env->error, svc, NULL);
svc_builder = (axis2_svc_builder_t *) axis2_svc_builder_create(env);
- if (! svc_builder)
+ if (!svc_builder)
{
return NULL;
}
@@ -117,8 +121,9 @@
}
AXIS2_EXTERN void AXIS2_CALL
-axis2_svc_builder_free(axis2_svc_builder_t *svc_builder,
- const axutil_env_t *env)
+axis2_svc_builder_free(
+ axis2_svc_builder_t * svc_builder,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, void);
@@ -139,9 +144,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_svc_builder_populate_svc(axis2_svc_builder_t *svc_builder,
- const axutil_env_t *env,
- axiom_node_t *svc_node)
+axis2_svc_builder_populate_svc(
+ axis2_svc_builder_t * svc_builder,
+ const axutil_env_t * env,
+ axiom_node_t * svc_node)
{
axiom_element_t *svc_element = NULL;
axiom_children_qname_iterator_t *itr = NULL;
@@ -200,19 +206,21 @@
return AXIS2_FAILURE;
}
itr = axiom_element_get_children_with_qname(svc_element, env, qparamst,
- svc_node);
+ svc_node);
axutil_qname_free(qparamst, env);
qparamst = NULL;
-
+
parent = axis2_svc_get_parent(svc_builder->svc, env);
-
- desc = axis2_svc_get_base(svc_builder->svc, env);
+
+ desc = axis2_svc_get_base(svc_builder->svc, env);
policy_include = axis2_desc_get_policy_include(desc, env);
status = axis2_desc_builder_process_params(svc_builder->desc_builder, env,
- itr,
- axis2_svc_get_param_container(svc_builder->svc, env),
- axis2_svc_grp_get_param_container(parent, env));
+ itr,
+ axis2_svc_get_param_container
+ (svc_builder->svc, env),
+ axis2_svc_grp_get_param_container
+ (parent, env));
if (AXIS2_SUCCESS != status)
{
return status;
@@ -221,18 +229,20 @@
/* process service description */
qdesc = axutil_qname_create(env, AXIS2_DESCRIPTION, NULL, NULL);
desc_element = axiom_element_get_first_child_with_qname(svc_element, env,
- qdesc, svc_node, &desc_node);
- axutil_qname_free(qdesc, env) ;
+ qdesc, svc_node,
+ &desc_node);
+ axutil_qname_free(qdesc, env);
qdesc = NULL;
- if( desc_element)
+ if (desc_element)
{
axiom_element_t *desc_value_element = NULL;
axiom_node_t *desc_value_node = NULL;
axis2_char_t *description_text = NULL;
- desc_value_element = axiom_element_get_first_element(desc_element,
- env, desc_node, &desc_value_node);
- description_text = axiom_element_get_text (desc_element, env, desc_node);
+ desc_value_element = axiom_element_get_first_element(desc_element,
+ env, desc_node,
+ &desc_value_node);
+ description_text = axiom_element_get_text(desc_element, env, desc_node);
if (description_text)
{
axis2_svc_set_svc_desc(svc_builder->svc, env, description_text);
@@ -240,11 +250,10 @@
}
/* wsdl path */
- wsdl_path_param =
- axutil_param_container_get_param(
- axis2_svc_get_param_container(svc_builder->svc, env),
- env,
- AXIS2_SVC_WSDL_PATH);
+ wsdl_path_param =
+ axutil_param_container_get_param(axis2_svc_get_param_container
+ (svc_builder->svc, env), env,
+ AXIS2_SVC_WSDL_PATH);
if (wsdl_path_param)
{
@@ -266,11 +275,10 @@
* container taken from svc
*/
dll_desc = axutil_dll_desc_create(env);
- impl_info_param =
- axutil_param_container_get_param(
- axis2_svc_get_param_container(svc_builder->svc, env),
- env,
- AXIS2_SERVICE_CLASS);
+ impl_info_param =
+ axutil_param_container_get_param(axis2_svc_get_param_container
+ (svc_builder->svc, env), env,
+ AXIS2_SERVICE_CLASS);
if (!impl_info_param)
{
axutil_dll_desc_free(dll_desc, env);
@@ -278,19 +286,20 @@
}
class_name = axutil_param_get_value(impl_info_param, env);
svc_dll_name =
- axutil_dll_desc_create_platform_specific_dll_name(dll_desc, env,
- class_name);
- arch_file_data = axis2_dep_engine_get_current_file_item(
- axis2_desc_builder_get_dep_engine(svc_builder->desc_builder, env),
- env);
+ axutil_dll_desc_create_platform_specific_dll_name(dll_desc, env,
+ class_name);
+ arch_file_data =
+ axis2_dep_engine_get_current_file_item(axis2_desc_builder_get_dep_engine
+ (svc_builder->desc_builder, env),
+ env);
svc_folder = axis2_arch_file_data_get_file(arch_file_data, env);
- timestamp = axutil_file_get_timestamp(svc_folder, env);
+ timestamp = axutil_file_get_timestamp(svc_folder, env);
axutil_dll_desc_set_timestamp(dll_desc, env, timestamp);
- svc_folder_path = axutil_file_get_path(svc_folder, env);
+ svc_folder_path = axutil_file_get_path(svc_folder, env);
dll_path = axutil_strcat(env, svc_folder_path, AXIS2_PATH_SEP_STR,
- svc_dll_name, NULL);
+ svc_dll_name, NULL);
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "DLL path is : %s", dll_path);
- status = axutil_dll_desc_set_name(dll_desc, env, dll_path);
+ status = axutil_dll_desc_set_name(dll_desc, env, dll_path);
if (AXIS2_SUCCESS != status)
{
axutil_dll_desc_free(dll_desc, env);
@@ -301,8 +310,8 @@
axutil_dll_desc_set_type(dll_desc, env, AXIS2_SVC_DLL);
status = axutil_param_set_value(impl_info_param, env, dll_desc);
- axutil_param_set_value_free(impl_info_param, env,
- axutil_dll_desc_free_void_arg);
+ axutil_param_set_value_free(impl_info_param, env,
+ axutil_dll_desc_free_void_arg);
if (AXIS2_SUCCESS != status)
{
axutil_dll_desc_free(dll_desc, env);
@@ -311,10 +320,11 @@
/* processing service wide modules which required to engage globally */
qmodulest = axutil_qname_create(env, AXIS2_MODULEST, NULL, NULL);
module_refs = axiom_element_get_children_with_qname(svc_element, env,
- qmodulest, svc_node);
- axutil_qname_free(qmodulest, env) ;
+ qmodulest, svc_node);
+ axutil_qname_free(qmodulest, env);
qmodulest = NULL;
- status = axis2_svc_builder_process_module_refs(svc_builder, env, module_refs);
+ status =
+ axis2_svc_builder_process_module_refs(svc_builder, env, module_refs);
if (AXIS2_SUCCESS != status)
{
return status;
@@ -323,33 +333,42 @@
/* process IN_FLOW */
qinflowst = axutil_qname_create(env, AXIS2_IN_FLOW_START, NULL, NULL);
in_flow_element = axiom_element_get_first_child_with_qname(svc_element,
- env, qinflowst, svc_node, &in_flow_node);
- axutil_qname_free(qinflowst, env) ;
+ env, qinflowst,
+ svc_node,
+ &in_flow_node);
+ axutil_qname_free(qinflowst, env);
qinflowst = NULL;
qoutflowst = axutil_qname_create(env, AXIS2_OUT_FLOW_START, NULL, NULL);
out_flow_element = axiom_element_get_first_child_with_qname(svc_element,
- env, qoutflowst, svc_node, &out_flow_node);
- axutil_qname_free(qoutflowst, env) ;
+ env, qoutflowst,
+ svc_node,
+ &out_flow_node);
+ axutil_qname_free(qoutflowst, env);
qoutflowst = NULL;
qin_faultflowst = axutil_qname_create(env, AXIS2_IN_FAILTFLOW, NULL, NULL);
in_faultflow_element = axiom_element_get_first_child_with_qname(svc_element,
- env, qin_faultflowst, svc_node, &in_faultflow_node);
- axutil_qname_free(qin_faultflowst, env) ;
+ env,
+ qin_faultflowst,
+ svc_node,
+ &in_faultflow_node);
+ axutil_qname_free(qin_faultflowst, env);
qin_faultflowst = NULL;
- qout_faultflowst = axutil_qname_create(env, AXIS2_OUT_FAILTFLOW, NULL, NULL);
- out_faultflow_element = axiom_element_get_first_child_with_qname(svc_element,
- env, qoutflowst, svc_node, &out_faultflow_node);
- axutil_qname_free(qout_faultflowst, env) ;
+ qout_faultflowst =
+ axutil_qname_create(env, AXIS2_OUT_FAILTFLOW, NULL, NULL);
+ out_faultflow_element =
+ axiom_element_get_first_child_with_qname(svc_element, env, qoutflowst,
+ svc_node, &out_faultflow_node);
+ axutil_qname_free(qout_faultflowst, env);
qout_faultflowst = NULL;
/* processing operations */
qopst = axutil_qname_create(env, AXIS2_OPERATIONST, NULL, NULL);
operation_itr = axiom_element_get_children_with_qname(svc_element, env,
- qopst, svc_node);
- axutil_qname_free(qopst, env) ;
+ qopst, svc_node);
+ axutil_qname_free(qopst, env);
qopst = NULL;
ops = axis2_svc_builder_process_ops(svc_builder, env, operation_itr);
if (ops)
@@ -387,42 +406,45 @@
axutil_array_list_free(ops, env);
/*
- <schema targetNamespace="http://x.y.z"/>
- setting the PolicyInclude
- processing <wsp:Policy> .. </..> elements
- */
+ <schema targetNamespace="http://x.y.z"/>
+ setting the PolicyInclude
+ processing <wsp:Policy> .. </..> elements
+ */
qpolicy = axutil_qname_create(env, NEETHI_POLICY, NEETHI_NAMESPACE, NULL);
itr = axiom_element_get_children_with_qname(svc_element, env,
- qpolicy, svc_node);
- axutil_qname_free(qpolicy, env) ;
+ qpolicy, svc_node);
+ axutil_qname_free(qpolicy, env);
qpolicy = NULL;
if (itr)
{
axis2_process_policy_elements(env, AXIS2_SERVICE_POLICY, itr,
- policy_include);
+ policy_include);
}
/* processing <wsp:PolicyReference> .. </..> elements */
- qpolicy = axutil_qname_create(env, NEETHI_REFERENCE, NEETHI_NAMESPACE, NULL);
- itr = axiom_element_get_children_with_qname(svc_element, env,
- qpolicy, svc_node);
- axutil_qname_free(qpolicy, env) ;
+ qpolicy =
+ axutil_qname_create(env, NEETHI_REFERENCE, NEETHI_NAMESPACE, NULL);
+ itr =
+ axiom_element_get_children_with_qname(svc_element, env, qpolicy,
+ svc_node);
+ axutil_qname_free(qpolicy, env);
qpolicy = NULL;
if (itr)
{
axis2_process_policy_reference_elements(env, AXIS2_POLICY_REF, itr,
- policy_include);
+ policy_include);
}
return AXIS2_SUCCESS;
}
static axutil_array_list_t *
-axis2_svc_builder_process_ops(axis2_svc_builder_t *svc_builder,
- const axutil_env_t *env,
- axiom_children_qname_iterator_t *op_itr)
+axis2_svc_builder_process_ops(
+ axis2_svc_builder_t * svc_builder,
+ const axutil_env_t * env,
+ axiom_children_qname_iterator_t * op_itr)
{
axutil_array_list_t *ops = NULL;
@@ -464,13 +486,13 @@
op_name_att = axiom_element_get_attribute(op_element, env, qattname);
axutil_qname_free(qattname, env);
qattname = NULL;
- if (! op_name_att)
+ if (!op_name_att)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_OP_NAME_MISSING,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
-
+
op_name = axiom_attribute_get_value(op_name_att, env);
qopname = axutil_qname_create(env, op_name, NULL, NULL);
op_desc = axis2_op_create(env);
@@ -488,40 +510,45 @@
if (op_mep_att)
{
mep_url = axiom_attribute_get_value(op_mep_att, env);
- if(mep_url)
+ if (mep_url)
{
axis2_op_set_msg_exchange_pattern(op_desc, env, mep_url);
}
}
- desc = axis2_op_get_base(op_desc, env);
+ desc = axis2_op_get_base(op_desc, env);
policy_include = axis2_desc_get_policy_include(desc, env);
/* operation parameters */
qparamst = axutil_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
params_itr = axiom_element_get_children_with_qname(op_element, env,
- qparamst, op_node);
+ qparamst, op_node);
axutil_qname_free(qparamst, env);
qparamst = NULL;
status = axis2_desc_builder_process_params(svc_builder->desc_builder,
- env, params_itr,
- axis2_op_get_param_container(op_desc, env),
- axis2_svc_get_param_container(svc_builder->svc, env));
+ env, params_itr,
+ axis2_op_get_param_container
+ (op_desc, env),
+ axis2_svc_get_param_container
+ (svc_builder->svc, env));
/* To process wsamapping */
- axis2_desc_builder_process_action_mappings(svc_builder->desc_builder,
- env, op_node, op_desc);
+ axis2_desc_builder_process_action_mappings(svc_builder->desc_builder,
+ env, op_node, op_desc);
/* loading the message receivers */
qmsgrecv = axutil_qname_create(env, AXIS2_MESSAGERECEIVER, NULL, NULL);
recv_element = axiom_element_get_first_child_with_qname(op_element,
- env, qmsgrecv, op_node, &recv_node);
+ env, qmsgrecv,
+ op_node,
+ &recv_node);
axutil_qname_free(qmsgrecv, env);
qmsgrecv = NULL;
if (recv_element && NULL != recv_node)
{
axis2_msg_recv_t *msg_recv = NULL;
- msg_recv = axis2_desc_builder_load_msg_recv(svc_builder->desc_builder,
- env, recv_element);
+ msg_recv =
+ axis2_desc_builder_load_msg_recv(svc_builder->desc_builder, env,
+ recv_element);
axis2_op_set_msg_recv(op_desc, env, msg_recv);
}
@@ -535,11 +562,12 @@
/* process module refs */
qmodulest = axutil_qname_create(env, AXIS2_MODULEST, NULL, NULL);
module_itr = axiom_element_get_children_with_qname(op_element, env,
- qmodulest, op_node);
+ qmodulest, op_node);
axutil_qname_free(qmodulest, env);
qmodulest = NULL;
status = axis2_desc_builder_process_op_module_refs(svc_builder->
- desc_builder, env, module_itr, op_desc);
+ desc_builder, env,
+ module_itr, op_desc);
if (AXIS2_SUCCESS != status)
{
return AXIS2_FAILURE;
@@ -548,46 +576,49 @@
/* setting the policy_include */
/* processing <wsp:Policy> .. </..> elements */
-
- qpolicy = axutil_qname_create(env, NEETHI_POLICY, NEETHI_NAMESPACE, NULL);
- itr = axiom_element_get_children_with_qname(op_element, env,
- qpolicy, op_node);
- axutil_qname_free(qpolicy, env) ;
+
+ qpolicy =
+ axutil_qname_create(env, NEETHI_POLICY, NEETHI_NAMESPACE, NULL);
+ itr =
+ axiom_element_get_children_with_qname(op_element, env, qpolicy,
+ op_node);
+ axutil_qname_free(qpolicy, env);
qpolicy = NULL;
if (itr)
{
axis2_process_policy_elements(env, AXIS2_SERVICE_POLICY, itr,
- policy_include);
+ policy_include);
}
/* processing <wsp:PolicyReference> .. </..> elements */
- qpolicy = axutil_qname_create(env, NEETHI_REFERENCE, NEETHI_NAMESPACE, NULL);
- itr = axiom_element_get_children_with_qname(op_element, env,
- qpolicy, op_node);
- axutil_qname_free(qpolicy, env) ;
+ qpolicy =
+ axutil_qname_create(env, NEETHI_REFERENCE, NEETHI_NAMESPACE, NULL);
+ itr =
+ axiom_element_get_children_with_qname(op_element, env, qpolicy,
+ op_node);
+ axutil_qname_free(qpolicy, env);
qpolicy = NULL;
if (itr)
{
axis2_process_policy_reference_elements(env, AXIS2_POLICY_REF, itr,
- policy_include);
+ policy_include);
}
qmessage = axutil_qname_create(env, AXIS2_MESSAGE, NULL, NULL);
itr = axiom_element_get_children_with_qname(op_element, env,
- qmessage, op_node);
- axutil_qname_free(qmessage, env) ;
+ qmessage, op_node);
+ axutil_qname_free(qmessage, env);
qmessage = NULL;
if (itr)
{
- axis2_svc_builder_process_msgs(svc_builder, env,
- itr, op_desc);
+ axis2_svc_builder_process_msgs(svc_builder, env, itr, op_desc);
}
/* setting operation phase */
- dep_engine =
+ dep_engine =
axis2_desc_builder_get_dep_engine(svc_builder->desc_builder, env);
if (dep_engine)
{
@@ -603,11 +634,12 @@
return ops;
}
-static void
-axis2_svc_builder_process_msgs(axis2_svc_builder_t *svc_builder,
- const axutil_env_t *env,
- axiom_children_qname_iterator_t *iterator,
- axis2_op_t *op)
+static void
+axis2_svc_builder_process_msgs(
+ axis2_svc_builder_t * svc_builder,
+ const axutil_env_t * env,
+ axiom_children_qname_iterator_t * iterator,
+ axis2_op_t * op)
{
while (AXIS2_TRUE == axiom_children_qname_iterator_has_next(iterator, env))
{
@@ -620,8 +652,7 @@
axutil_qname_t *qpolicy = NULL;
axis2_desc_t *desc = NULL;
axis2_policy_include_t *policy_include = NULL;
-
-
+
node = axiom_children_qname_iterator_next(iterator, env);
element = axiom_node_get_data_element(node, env);
qname = axutil_qname_create(env, AXIS2_LABEL, NULL, NULL);
@@ -631,7 +662,7 @@
msg_label = axiom_element_get_attribute_value(element, env, qname);
}
- if(msg_label)
+ if (msg_label)
{
msg = axis2_op_get_msg(op, env, msg_label);
}
@@ -643,95 +674,105 @@
axutil_qname_t *qparamst = NULL;
qparamst = axutil_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
params_itr = axiom_element_get_children_with_qname(element, env,
- qparamst, node);
+ qparamst, node);
axutil_qname_free(qparamst, env);
qparamst = NULL;
axis2_desc_builder_process_params(svc_builder->desc_builder,
- env, params_itr,
- axis2_msg_get_param_container(msg, env),
- axis2_op_get_param_container(op, env));
+ env, params_itr,
+ axis2_msg_get_param_container(msg,
+ env),
+ axis2_op_get_param_container(op,
+ env));
- desc = axis2_msg_get_base(msg, env);
+ desc = axis2_msg_get_base(msg, env);
policy_include = axis2_desc_get_policy_include(desc, env);
/* setting the policy_include */
/* processing <wsp:Policy> .. </..> elements */
-
- qpolicy = axutil_qname_create(env, NEETHI_POLICY, NEETHI_NAMESPACE, NULL);
- itr = axiom_element_get_children_with_qname(element, env,
- qpolicy, node);
- axutil_qname_free(qpolicy, env) ;
+
+ qpolicy =
+ axutil_qname_create(env, NEETHI_POLICY, NEETHI_NAMESPACE, NULL);
+ itr =
+ axiom_element_get_children_with_qname(element, env, qpolicy,
+ node);
+ axutil_qname_free(qpolicy, env);
qpolicy = NULL;
if (itr)
{
axis2_process_policy_elements(env, AXIS2_SERVICE_POLICY, itr,
- policy_include);
- /* axis2_process_policy_elements(env, AXIS2_MESSAGE_POLICY, itr,
- policy_include);*/
+ policy_include);
+ /* axis2_process_policy_elements(env, AXIS2_MESSAGE_POLICY, itr,
+ policy_include); */
}
/* processing <wsp:PolicyReference> .. </..> elements */
- qpolicy = axutil_qname_create(env, NEETHI_REFERENCE, NEETHI_NAMESPACE, NULL);
- itr = axiom_element_get_children_with_qname(element, env,
- qpolicy, node);
- axutil_qname_free(qpolicy, env) ;
+ qpolicy =
+ axutil_qname_create(env, NEETHI_REFERENCE, NEETHI_NAMESPACE,
+ NULL);
+ itr =
+ axiom_element_get_children_with_qname(element, env, qpolicy,
+ node);
+ axutil_qname_free(qpolicy, env);
qpolicy = NULL;
if (itr)
{
- axis2_process_policy_reference_elements(env, AXIS2_POLICY_REF, itr,
- policy_include);
+ axis2_process_policy_reference_elements(env, AXIS2_POLICY_REF,
+ itr, policy_include);
}
}
}
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_svc_builder_process_svc_module_conf(axis2_svc_builder_t *svc_builder,
- const axutil_env_t *env,
- axiom_children_qname_iterator_t *module_confs,
- axutil_param_container_t *parent,
- axis2_svc_t *svc)
+axis2_svc_builder_process_svc_module_conf(
+ axis2_svc_builder_t * svc_builder,
+ const axutil_env_t * env,
+ axiom_children_qname_iterator_t * module_confs,
+ axutil_param_container_t * parent,
+ axis2_svc_t * svc)
{
- while (AXIS2_TRUE == axiom_children_qname_iterator_has_next(module_confs, env))
+ while (AXIS2_TRUE ==
+ axiom_children_qname_iterator_has_next(module_confs, env))
{
axiom_element_t *module_conf_element = NULL;
axiom_node_t *module_conf_node = NULL;
axiom_attribute_t *module_name_att = NULL;
axutil_qname_t *qattname = NULL;
- module_conf_node = axiom_children_qname_iterator_next(module_confs, env);
- module_conf_element = axiom_node_get_data_element(module_conf_node,
- env);
+ module_conf_node =
+ axiom_children_qname_iterator_next(module_confs, env);
+ module_conf_element =
+ axiom_node_get_data_element(module_conf_node, env);
qattname = axutil_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
module_name_att = axiom_element_get_attribute(module_conf_element,
- env, qattname);
+ env, qattname);
axutil_qname_free(qattname, env);
qattname = NULL;
- if (! module_name_att)
+ if (!module_name_att)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODULE_CONF,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
}
return AXIS2_SUCCESS;
}
-
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_svc_builder_process_module_refs(axis2_svc_builder_t *svc_builder,
- const axutil_env_t *env,
- axiom_children_qname_iterator_t *
- module_refs)
+axis2_svc_builder_process_module_refs(
+ axis2_svc_builder_t * svc_builder,
+ const axutil_env_t * env,
+ axiom_children_qname_iterator_t * module_refs)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, module_refs, AXIS2_FAILURE);
- while (AXIS2_TRUE == axiom_children_qname_iterator_has_next(module_refs, env))
+ while (AXIS2_TRUE ==
+ axiom_children_qname_iterator_has_next(module_refs, env))
{
axiom_element_t *module_ref_element = NULL;
axiom_node_t *module_ref_node = NULL;
@@ -739,11 +780,10 @@
axutil_qname_t *qref = NULL;
module_ref_node = axiom_children_qname_iterator_next(module_refs, env);
- module_ref_element = axiom_node_get_data_element(module_ref_node,
- env);
+ module_ref_element = axiom_node_get_data_element(module_ref_node, env);
qref = axutil_qname_create(env, AXIS2_REF, NULL, NULL);
module_ref_att = axiom_element_get_attribute(module_ref_element,
- env, qref);
+ env, qref);
axutil_qname_free(qref, env);
if (module_ref_att)
{
@@ -752,12 +792,12 @@
ref_name = axiom_attribute_get_value(module_ref_att, env);
qrefname = axutil_qname_create(env, ref_name, NULL, NULL);
- if (! axis2_dep_engine_get_module(
- axis2_desc_builder_get_dep_engine(svc_builder->desc_builder, env),
- env, qrefname))
+ if (!axis2_dep_engine_get_module
+ (axis2_desc_builder_get_dep_engine
+ (svc_builder->desc_builder, env), env, qrefname))
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_NOT_FOUND,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
else
@@ -771,9 +811,9 @@
}
AXIS2_EXTERN struct axis2_desc_builder *AXIS2_CALL
-axis2_svc_builder_get_desc_builder(const axis2_svc_builder_t *svc_builder,
- const axutil_env_t *env)
+axis2_svc_builder_get_desc_builder(
+ const axis2_svc_builder_t * svc_builder,
+ const axutil_env_t * env)
{
return svc_builder->desc_builder;
}
-
Modified: webservices/axis2/trunk/c/src/core/deployment/svc_grp_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/svc_grp_builder.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/svc_grp_builder.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/svc_grp_builder.c Fri Sep 28 02:52:58 2007
@@ -1,3 +1,4 @@
+
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -24,16 +25,18 @@
};
AXIS2_EXTERN axis2_svc_grp_builder_t *AXIS2_CALL
-axis2_svc_grp_builder_create(const axutil_env_t *env)
+axis2_svc_grp_builder_create(
+ const axutil_env_t * env)
{
axis2_svc_grp_builder_t *svc_grp_builder = NULL;
AXIS2_ENV_CHECK(env, NULL);
svc_grp_builder = (axis2_svc_grp_builder_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axis2_svc_grp_builder_t));
+ sizeof
+ (axis2_svc_grp_builder_t));
- if (! svc_grp_builder)
+ if (!svc_grp_builder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -46,9 +49,10 @@
}
AXIS2_EXTERN axis2_svc_grp_builder_t *AXIS2_CALL
-axis2_svc_grp_builder_create_with_svc_and_dep_engine(const axutil_env_t *env,
- axiom_node_t *svc_grp,
- axis2_dep_engine_t *dep_engine)
+axis2_svc_grp_builder_create_with_svc_and_dep_engine(
+ const axutil_env_t * env,
+ axiom_node_t * svc_grp,
+ axis2_dep_engine_t * dep_engine)
{
axis2_svc_grp_builder_t *svc_grp_builder = NULL;
@@ -72,15 +76,15 @@
}
AXIS2_EXTERN void AXIS2_CALL
-axis2_svc_grp_builder_free(axis2_svc_grp_builder_t *svc_grp_builder,
- const axutil_env_t *env)
+axis2_svc_grp_builder_free(
+ axis2_svc_grp_builder_t * svc_grp_builder,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, void);
if (svc_grp_builder->desc_builder)
{
- axis2_desc_builder_free(svc_grp_builder->desc_builder,
- env);
+ axis2_desc_builder_free(svc_grp_builder->desc_builder, env);
}
if (svc_grp_builder)
{
@@ -91,9 +95,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_svc_grp_builder_populate_svc_grp(axis2_svc_grp_builder_t *svc_grp_builder,
- const axutil_env_t *env,
- axis2_svc_grp_t *svc_grp)
+axis2_svc_grp_builder_populate_svc_grp(
+ axis2_svc_grp_builder_t * svc_grp_builder,
+ const axutil_env_t * env,
+ axis2_svc_grp_t * svc_grp)
{
axiom_children_qname_iterator_t *itr = NULL;
axiom_children_qname_iterator_t *module_ref_itr = NULL;
@@ -106,11 +111,12 @@
axis2_conf_t *parent = NULL;
/* Processing service level paramters */
- svc_grp_element = axiom_node_get_data_element(svc_grp_builder->svc_grp, env);
+ svc_grp_element =
+ axiom_node_get_data_element(svc_grp_builder->svc_grp, env);
qparamst = axutil_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
itr = axiom_element_get_children_with_qname(svc_grp_element, env, qparamst,
- svc_grp_builder->svc_grp);
+ svc_grp_builder->svc_grp);
if (qparamst)
{
@@ -118,15 +124,21 @@
qparamst = NULL;
}
- parent = axis2_svc_grp_get_parent(svc_grp, env);
- status = axis2_desc_builder_process_params(svc_grp_builder->desc_builder, env, itr,
- axis2_svc_grp_get_param_container(svc_grp, env),
- axis2_conf_get_param_container(parent, env));
+ parent = axis2_svc_grp_get_parent(svc_grp, env);
+ status =
+ axis2_desc_builder_process_params(svc_grp_builder->desc_builder, env,
+ itr,
+ axis2_svc_grp_get_param_container
+ (svc_grp, env),
+ axis2_conf_get_param_container(parent,
+ env));
/* Processing service modules required to be engaged globally */
qmodulest = axutil_qname_create(env, AXIS2_MODULEST, NULL, NULL);
module_ref_itr = axiom_element_get_children_with_qname(svc_grp_element, env,
- qmodulest, svc_grp_builder->svc_grp);
+ qmodulest,
+ svc_grp_builder->
+ svc_grp);
if (qmodulest)
{
@@ -134,11 +146,12 @@
qmodulest = NULL;
}
- axis2_svc_grp_builder_process_module_refs(svc_grp_builder, env, module_ref_itr,
- svc_grp);
+ axis2_svc_grp_builder_process_module_refs(svc_grp_builder, env,
+ module_ref_itr, svc_grp);
qsvc_element = axutil_qname_create(env, AXIS2_SVC_ELEMENT, NULL, NULL);
svc_itr = axiom_element_get_children_with_qname(svc_grp_element, env,
- qsvc_element, svc_grp_builder->svc_grp);
+ qsvc_element,
+ svc_grp_builder->svc_grp);
if (qsvc_element)
{
@@ -154,8 +167,8 @@
axis2_char_t *svc_name = NULL;
axutil_qname_t *qattname = NULL;
- svc_node = (axiom_node_t *) axiom_children_qname_iterator_next(
- svc_itr, env);
+ svc_node =
+ (axiom_node_t *) axiom_children_qname_iterator_next(svc_itr, env);
svc_element = axiom_node_get_data_element(svc_node, env);
qattname = axutil_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
svc_name_att = axiom_element_get_attribute(svc_element, env, qattname);
@@ -167,10 +180,10 @@
}
svc_name = axiom_attribute_get_value(svc_name_att, env);
- if (! svc_name)
+ if (!svc_name)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_NAME_ERROR,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
else
@@ -180,11 +193,12 @@
axutil_array_list_t *deployable_svcs = NULL;
axis2_svc_builder_t *svc_builder = NULL;
- file_data = axis2_dep_engine_get_current_file_item(
- axis2_desc_builder_get_dep_engine(svc_grp_builder->desc_builder, env),
- env);
+ file_data =
+ axis2_dep_engine_get_current_file_item
+ (axis2_desc_builder_get_dep_engine
+ (svc_grp_builder->desc_builder, env), env);
axis_svc = axis2_arch_file_data_get_svc(file_data, env, svc_name);
- if (! axis_svc)
+ if (!axis_svc)
{
axutil_qname_t *qsvc_name = NULL;
@@ -196,13 +210,16 @@
}
/* the service that has to be deployed */
- deployable_svcs = axis2_arch_file_data_get_deployable_svcs(file_data,
- env);
+ deployable_svcs =
+ axis2_arch_file_data_get_deployable_svcs(file_data, env);
axutil_array_list_add(deployable_svcs, env, axis_svc);
axis2_svc_set_parent(axis_svc, env, svc_grp);
svc_builder = axis2_svc_builder_create_with_dep_engine_and_svc(env,
- axis2_desc_builder_get_dep_engine(svc_grp_builder->desc_builder, env),
- axis_svc);
+ axis2_desc_builder_get_dep_engine
+ (svc_grp_builder->
+ desc_builder,
+ env),
+ axis_svc);
status = axis2_svc_builder_populate_svc(svc_builder, env, svc_node);
axis2_svc_builder_free(svc_builder, env);
@@ -212,49 +229,51 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_svc_grp_builder_process_module_refs(axis2_svc_grp_builder_t *svc_grp_builder,
- const axutil_env_t *env,
- axiom_children_qname_iterator_t *module_refs ,
- axis2_svc_grp_t *svc_grp)
+axis2_svc_grp_builder_process_module_refs(
+ axis2_svc_grp_builder_t * svc_grp_builder,
+ const axutil_env_t * env,
+ axiom_children_qname_iterator_t * module_refs,
+ axis2_svc_grp_t * svc_grp)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, module_refs, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, svc_grp, AXIS2_FAILURE);
- while (AXIS2_TRUE == axiom_children_qname_iterator_has_next(module_refs, env))
+ while (AXIS2_TRUE ==
+ axiom_children_qname_iterator_has_next(module_refs, env))
{
axiom_node_t *module_ref_node = NULL;
axiom_element_t *module_ref_element = NULL;
axiom_attribute_t *module_ref_att = NULL;
axutil_qname_t *qref = NULL;
- module_ref_node = (axiom_node_t *)
+ module_ref_node = (axiom_node_t *)
axiom_children_qname_iterator_next(module_refs, env);
module_ref_element = axiom_node_get_data_element(module_ref_node, env);
qref = axutil_qname_create(env, AXIS2_REF, NULL, NULL);
module_ref_att = axiom_element_get_attribute(module_ref_element, env,
- qref);
+ qref);
if (module_ref_att)
{
axis2_char_t *ref_name = NULL;
axutil_qname_t *qrefname = NULL;
axis2_module_desc_t *module = NULL;
-
ref_name = axiom_attribute_get_value(module_ref_att, env);
qrefname = axutil_qname_create(env, ref_name, NULL, NULL);
- module = axis2_dep_engine_get_module(
- axis2_desc_builder_get_dep_engine(svc_grp_builder->desc_builder, env),
- env, qrefname);
- if (! module)
+ module =
+ axis2_dep_engine_get_module(axis2_desc_builder_get_dep_engine
+ (svc_grp_builder->desc_builder,
+ env), env, qrefname);
+ if (!module)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_NOT_FOUND,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
else
{
- axis2_svc_grp_add_module_ref(svc_grp, env, qrefname);
+ axis2_svc_grp_add_module_ref(svc_grp, env, qrefname);
}
axutil_qname_free(qrefname, env);
}
@@ -265,9 +284,9 @@
}
AXIS2_EXTERN axis2_desc_builder_t *AXIS2_CALL
-axis2_svc_grp_builder_get_desc_builder(const axis2_svc_grp_builder_t *svc_grp_builder,
- const axutil_env_t *env)
+axis2_svc_grp_builder_get_desc_builder(
+ const axis2_svc_grp_builder_t * svc_grp_builder,
+ const axutil_env_t * env)
{
return svc_grp_builder->desc_builder;
}
-
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org