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/09/28 11:53:04 UTC
svn commit: r580276 [10/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/htt...
Modified: webservices/axis2/trunk/c/src/core/description/op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/op.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/op.c (original)
+++ webservices/axis2/trunk/c/src/core/description/op.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
@@ -37,20 +38,21 @@
axutil_qname_t *qname;
axis2_char_t *msg_exchange_pattern;
axis2_char_t *style;
+
/** parameter container to hold operation related parameters */
struct axutil_param_container *param_container;
};
AXIS2_EXTERN axis2_op_t *AXIS2_CALL
-axis2_op_create(const axutil_env_t *env)
+axis2_op_create(
+ const axutil_env_t * env)
{
axis2_op_t *op = NULL;
axis2_msg_t *msg = NULL;
AXIS2_ENV_CHECK(env, NULL);
- op = (axis2_op_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axis2_op_t));
+ op = (axis2_op_t *) AXIS2_MALLOC(env->allocator, sizeof(axis2_op_t));
if (!op)
{
@@ -73,7 +75,7 @@
op->style = axutil_strdup(env, AXIS2_STYLE_DOC);
op->param_container = (axutil_param_container_t *)
- axutil_param_container_create(env);
+ axutil_param_container_create(env);
if (!op->param_container)
{
axis2_op_free(op, env);
@@ -135,13 +137,14 @@
axis2_op_add_msg(op, env, AXIS2_MSG_OUT_FAULT, msg);
axis2_op_set_msg_exchange_pattern(op, env,
- (axis2_char_t *) AXIS2_MEP_URI_IN_OUT);
+ (axis2_char_t *) AXIS2_MEP_URI_IN_OUT);
return op;
}
AXIS2_EXTERN axis2_op_t *AXIS2_CALL
-axis2_op_create_from_module(const axutil_env_t *env)
+axis2_op_create_from_module(
+ const axutil_env_t * env)
{
axis2_op_t *op = NULL;
@@ -152,11 +155,10 @@
return op;
}
-
AXIS2_EXTERN axis2_op_t *AXIS2_CALL
axis2_op_create_with_qname(
- const axutil_env_t *env,
- const axutil_qname_t *qname)
+ const axutil_env_t * env,
+ const axutil_qname_t * qname)
{
axis2_op_t *op = NULL;
axis2_status_t status = AXIS2_FAILURE;
@@ -166,7 +168,6 @@
op = (axis2_op_t *) axis2_op_create(env);
-
if (!op)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -185,8 +186,8 @@
AXIS2_EXTERN void AXIS2_CALL
axis2_op_free(
- axis2_op_t *op,
- const axutil_env_t *env)
+ axis2_op_t * op,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, void);
@@ -233,7 +234,7 @@
{
axutil_qname_free(op->qname, env);
}
-
+
if (op->msg_exchange_pattern)
{
AXIS2_FREE(env->allocator, op->msg_exchange_pattern);
@@ -243,7 +244,7 @@
{
AXIS2_FREE(env->allocator, op->style);
}
-
+
if (op)
{
AXIS2_FREE(env->allocator, op);
@@ -253,8 +254,9 @@
}
AXIS2_EXTERN void AXIS2_CALL
-axis2_op_free_void_arg(void *op,
- const axutil_env_t *env)
+axis2_op_free_void_arg(
+ void *op,
+ const axutil_env_t * env)
{
axis2_op_t *op_l = NULL;
@@ -266,9 +268,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_add_param(axis2_op_t *op,
- const axutil_env_t *env,
- axutil_param_t *param)
+axis2_op_add_param(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_param_t * param)
{
axis2_char_t *param_name = NULL;
axis2_status_t status = AXIS2_FAILURE;
@@ -280,28 +283,31 @@
if (AXIS2_TRUE == axis2_op_is_param_locked(op, env, param_name))
{
AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_PARAMETER_LOCKED_CANNOT_OVERRIDE, AXIS2_FAILURE);
+ AXIS2_ERROR_PARAMETER_LOCKED_CANNOT_OVERRIDE,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
else
{
status = axutil_param_container_add_param(op->param_container, env,
- param);
+ param);
}
return status;
}
AXIS2_EXTERN axutil_param_t *AXIS2_CALL
-axis2_op_get_param(const axis2_op_t *op,
- const axutil_env_t *env,
- const axis2_char_t *param_name)
+axis2_op_get_param(
+ const axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name)
{
axutil_param_t *param = NULL;
AXIS2_PARAM_CHECK(env->error, param_name, NULL);
- param = axutil_param_container_get_param(op->param_container, env, param_name);
+ param =
+ axutil_param_container_get_param(op->param_container, env, param_name);
if (!param && op->parent)
{
param = axis2_svc_get_param(op->parent, env, param_name);
@@ -310,16 +316,18 @@
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_op_get_all_params(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_all_params(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
return axutil_param_container_get_params(op->param_container, env);
}
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-axis2_op_is_param_locked(axis2_op_t *op,
- const axutil_env_t *env,
- const axis2_char_t *param_name)
+axis2_op_is_param_locked(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * param_name)
{
axis2_svc_t *parent = NULL;
axutil_param_t *param = NULL;
@@ -339,13 +347,14 @@
return AXIS2_TRUE;
}
param = axis2_op_get_param(op, env, param_name);
- return (param && AXIS2_TRUE == axutil_param_is_locked(param, env));
+ return (param && AXIS2_TRUE == axutil_param_is_locked(param, env));
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_set_parent(axis2_op_t *op,
- const axutil_env_t *env,
- axis2_svc_t *svc)
+axis2_op_set_parent(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axis2_svc_t * svc)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, svc, AXIS2_FAILURE);
@@ -363,16 +372,18 @@
}
AXIS2_EXTERN axis2_svc_t *AXIS2_CALL
-axis2_op_get_parent(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_parent(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
return op->parent;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_set_msg_recv(axis2_op_t *op,
- const axutil_env_t *env,
- struct axis2_msg_recv *msg_recv)
+axis2_op_set_msg_recv(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ struct axis2_msg_recv * msg_recv)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_recv, AXIS2_FAILURE);
@@ -388,16 +399,18 @@
}
AXIS2_EXTERN struct axis2_msg_recv *AXIS2_CALL
-axis2_op_get_msg_recv(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_msg_recv(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
return op->msg_recv;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_set_qname(axis2_op_t *op,
- const axutil_env_t *env,
- const axutil_qname_t *qname)
+axis2_op_set_qname(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axutil_qname_t * qname)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -406,26 +419,28 @@
axutil_qname_free(op->qname, env);
op->qname = NULL;
}
-
- if (qname)
- {
- op->qname = axutil_qname_clone((axutil_qname_t *)qname, env);
+
+ if (qname)
+ {
+ op->qname = axutil_qname_clone((axutil_qname_t *) qname, env);
}
-
+
return AXIS2_SUCCESS;
}
AXIS2_EXTERN const axutil_qname_t *AXIS2_CALL
-axis2_op_get_qname(void *op,
- const axutil_env_t *env)
+axis2_op_get_qname(
+ void *op,
+ const axutil_env_t * env)
{
- return ((axis2_op_t *)op)->qname;
+ return ((axis2_op_t *) op)->qname;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_set_msg_exchange_pattern(axis2_op_t *op,
- const axutil_env_t *env,
- const axis2_char_t *pattern)
+axis2_op_set_msg_exchange_pattern(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * pattern)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, pattern, AXIS2_FAILURE);
@@ -441,23 +456,26 @@
}
AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
-axis2_op_get_msg_exchange_pattern(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_msg_exchange_pattern(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
return op->msg_exchange_pattern;
}
AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
-axis2_op_get_style(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_style(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
return op->style;
}
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_set_style(axis2_op_t *op,
- const axutil_env_t *env,
- const axis2_char_t *style)
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_op_set_style(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * style)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, style, AXIS2_FAILURE);
@@ -473,10 +491,11 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_engage_module(axis2_op_t *op,
- const axutil_env_t *env,
- axis2_module_desc_t *moduleref,
- axis2_conf_t *conf)
+axis2_op_engage_module(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axis2_module_desc_t * moduleref,
+ axis2_conf_t * conf)
{
int index = 0;
int size = 0;
@@ -504,8 +523,9 @@
const axutil_qname_t *qname1 = NULL;
const axutil_qname_t *qname2 = NULL;
- module_desc = (axis2_module_desc_t *) axutil_array_list_get(collection_module,
- env, index);
+ module_desc =
+ (axis2_module_desc_t *) axutil_array_list_get(collection_module,
+ env, index);
if (!module_desc)
{
return AXIS2_FAILURE;
@@ -515,7 +535,7 @@
if (axutil_qname_equals(qname1, env, qname2))
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Module already engaged to operation");
+ "Module already engaged to operation");
need_to_add = AXIS2_FALSE;
return AXIS2_FAILURE;
}
@@ -528,14 +548,14 @@
axis2_status_t status = AXIS2_FAILURE;
status = axis2_phase_resolver_engage_module_to_op(pr, env,
- op, moduleref);
+ op, moduleref);
if (AXIS2_SUCCESS != status)
{
/* ignore the status */
AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_SUCCESS);
}
module = axis2_module_desc_get_module(moduleref, env);
-
+
if (AXIS2_TRUE == need_to_add)
{
axutil_array_list_add(collection_module, env, moduleref);
@@ -550,9 +570,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_add_to_engaged_module_list(axis2_op_t *op,
- const axutil_env_t *env,
- axis2_module_desc_t *module_desc)
+axis2_op_add_to_engaged_module_list(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axis2_module_desc_t * module_desc)
{
axis2_module_desc_t *module_desc_l = NULL;
int size = 0;
@@ -573,11 +594,12 @@
{
const axutil_qname_t *module_qname_l = NULL;
- module_desc_l =
- (axis2_module_desc_t *) axutil_array_list_get(
- op->engaged_module_list, env, index);
+ module_desc_l =
+ (axis2_module_desc_t *) axutil_array_list_get(op->
+ engaged_module_list,
+ env, index);
module_qname_l = axis2_module_desc_get_qname(module_desc_l, env);
-
+
if (axutil_qname_equals(module_qname, env, module_qname_l))
{
return AXIS2_SUCCESS;
@@ -588,11 +610,11 @@
return axutil_array_list_add(op->engaged_module_list, env, module_desc);
}
-
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_remove_from_engaged_module_list(axis2_op_t *op,
- const axutil_env_t *env,
- axis2_module_desc_t *module_desc)
+axis2_op_remove_from_engaged_module_list(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axis2_module_desc_t * module_desc)
{
axis2_module_desc_t *module_desc_l = NULL;
int size = 0;
@@ -610,9 +632,11 @@
{
const axutil_qname_t *module_qname_l = NULL;
- module_desc_l =
- (axis2_module_desc_t *) axutil_array_list_get(op->engaged_module_list, env, index);
- module_qname_l = axis2_module_desc_get_qname(module_desc_l, env);
+ module_desc_l =
+ (axis2_module_desc_t *) axutil_array_list_get(op->
+ engaged_module_list,
+ env, index);
+ module_qname_l = axis2_module_desc_get_qname(module_desc_l, env);
if (axutil_qname_equals(module_qname, env, module_qname_l))
{
@@ -625,15 +649,17 @@
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_op_get_all_modules(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_all_modules(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
return op->engaged_module_list;
}
AXIS2_EXTERN int AXIS2_CALL
-axis2_op_get_axis_specific_mep_const(axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_axis_specific_mep_const(
+ axis2_op_t * op,
+ const axutil_env_t * env)
{
int temp = 0;
@@ -645,42 +671,42 @@
temp = AXIS2_MEP_CONSTANT_INVALID;
if (axutil_strcmp(AXIS2_MEP_URI_IN_OUT,
- axis2_op_get_msg_exchange_pattern(op, env)) == 0)
+ axis2_op_get_msg_exchange_pattern(op, env)) == 0)
{
temp = AXIS2_MEP_CONSTANT_IN_OUT;
}
else if (axutil_strcmp(AXIS2_MEP_URI_IN_ONLY,
- axis2_op_get_msg_exchange_pattern(op, env)) == 0)
+ axis2_op_get_msg_exchange_pattern(op, env)) == 0)
{
temp = AXIS2_MEP_CONSTANT_IN_ONLY;
}
else if (axutil_strcmp(AXIS2_MEP_URI_IN_OPTIONAL_OUT,
- axis2_op_get_msg_exchange_pattern(op, env)) == 0)
+ axis2_op_get_msg_exchange_pattern(op, env)) == 0)
{
temp = AXIS2_MEP_CONSTANT_IN_OPTIONAL_OUT;
}
else if (axutil_strcmp(AXIS2_MEP_URI_OUT_IN,
- axis2_op_get_msg_exchange_pattern(op, env)) == 0)
+ axis2_op_get_msg_exchange_pattern(op, env)) == 0)
{
temp = AXIS2_MEP_CONSTANT_OUT_IN;
}
else if (axutil_strcmp(AXIS2_MEP_URI_OUT_ONLY,
- axis2_op_get_msg_exchange_pattern(op, env)) == 0)
+ axis2_op_get_msg_exchange_pattern(op, env)) == 0)
{
temp = AXIS2_MEP_CONSTANT_OUT_ONLY;
}
else if (axutil_strcmp(AXIS2_MEP_URI_OUT_OPTIONAL_IN,
- axis2_op_get_msg_exchange_pattern(op, env)) == 0)
+ axis2_op_get_msg_exchange_pattern(op, env)) == 0)
{
temp = AXIS2_MEP_CONSTANT_OUT_OPTIONAL_IN;
}
else if (axutil_strcmp(AXIS2_MEP_URI_ROBUST_IN_ONLY,
- axis2_op_get_msg_exchange_pattern(op, env)) == 0)
+ axis2_op_get_msg_exchange_pattern(op, env)) == 0)
{
temp = AXIS2_MEP_CONSTANT_ROBUST_IN_ONLY;
}
else if (axutil_strcmp(AXIS2_MEP_URI_ROBUST_OUT_ONLY,
- axis2_op_get_msg_exchange_pattern(op, env)) == 0)
+ axis2_op_get_msg_exchange_pattern(op, env)) == 0)
{
temp = AXIS2_MEP_CONSTANT_ROBUST_OUT_ONLY;
}
@@ -688,7 +714,8 @@
if (temp == AXIS2_MEP_CONSTANT_INVALID)
{
AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_COULD_NOT_MAP_MEP_URI_TO_MEP_CONSTANT, AXIS2_FAILURE);
+ AXIS2_ERROR_COULD_NOT_MAP_MEP_URI_TO_MEP_CONSTANT,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
op->mep = temp;
@@ -697,8 +724,9 @@
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_op_get_fault_in_flow(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_fault_in_flow(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
if (op->base)
{
@@ -712,10 +740,10 @@
return NULL;
}
-
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_op_get_fault_out_flow(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_fault_out_flow(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
if (op->base)
{
@@ -729,10 +757,10 @@
return NULL;
}
-
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_op_get_out_flow(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_out_flow(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
if (op->base)
{
@@ -746,10 +774,10 @@
return NULL;
}
-
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_op_get_in_flow(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_in_flow(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
if (op->base)
{
@@ -764,9 +792,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_set_fault_in_flow(axis2_op_t *op,
- const axutil_env_t *env,
- axutil_array_list_t *list)
+axis2_op_set_fault_in_flow(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_array_list_t * list)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, list, AXIS2_FAILURE);
@@ -784,9 +813,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_set_fault_out_flow(axis2_op_t *op,
- const axutil_env_t *env,
- axutil_array_list_t *list)
+axis2_op_set_fault_out_flow(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_array_list_t * list)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, list, AXIS2_FAILURE);
@@ -803,9 +833,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_set_out_flow(axis2_op_t *op,
- const axutil_env_t *env,
- axutil_array_list_t *list)
+axis2_op_set_out_flow(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_array_list_t * list)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, list, AXIS2_FAILURE);
@@ -824,9 +855,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_set_in_flow(axis2_op_t *op,
- const axutil_env_t *env,
- axutil_array_list_t *list)
+axis2_op_set_in_flow(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_array_list_t * list)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, list, AXIS2_FAILURE);
@@ -844,31 +876,34 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_add_module_qname(axis2_op_t *op,
- const axutil_env_t *env,
- const axutil_qname_t *module_qname)
+axis2_op_add_module_qname(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axutil_qname_t * module_qname)
{
axutil_qname_t *module_qname_l = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, module_qname, AXIS2_FAILURE);
- module_qname_l = axutil_qname_clone((axutil_qname_t *)module_qname, env);
+ module_qname_l = axutil_qname_clone((axutil_qname_t *) module_qname, env);
return axutil_array_list_add(op->module_qnames, env, module_qname_l);
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_op_get_all_module_qnames(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_all_module_qnames(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
return op->module_qnames;
}
AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
-axis2_op_find_op_ctx(axis2_op_t *op,
- const axutil_env_t *env,
- struct axis2_msg_ctx *msg_ctx,
- struct axis2_svc_ctx *svc_ctx)
+axis2_op_find_op_ctx(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * msg_ctx,
+ struct axis2_svc_ctx * svc_ctx)
{
axis2_op_ctx_t *op_ctx = NULL;
axis2_relates_to_t *relates_to = NULL;
@@ -878,7 +913,7 @@
AXIS2_PARAM_CHECK(env->error, msg_ctx, NULL);
AXIS2_PARAM_CHECK(env->error, svc_ctx, NULL);
- relates_to = axis2_msg_ctx_get_relates_to(msg_ctx, env);
+ relates_to = axis2_msg_ctx_get_relates_to(msg_ctx, env);
if (!relates_to)
{
op_ctx = axis2_op_ctx_create(env, op, svc_ctx);
@@ -893,13 +928,13 @@
axis2_conf_ctx_t *conf_ctx = NULL;
const axis2_char_t *value = NULL;
- conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
+ conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
value = axis2_relates_to_get_value(relates_to, env);
- op_ctx = axis2_conf_ctx_get_op_ctx(conf_ctx, env, value);
+ op_ctx = axis2_conf_ctx_get_op_ctx(conf_ctx, env, value);
if (!op_ctx)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CANNOT_CORRELATE_MSG,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return NULL;
}
}
@@ -907,19 +942,20 @@
status = axis2_op_register_op_ctx(op, env, msg_ctx, op_ctx);
if (AXIS2_FAILURE == status)
{
- axis2_op_ctx_free(op_ctx, env);
+ axis2_op_ctx_free(op_ctx, env);
return NULL;
}
else
{
return op_ctx;
- }
+ }
}
AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
-axis2_op_find_existing_op_ctx(axis2_op_t *op,
- const axutil_env_t *env,
- const axis2_msg_ctx_t *msg_ctx)
+axis2_op_find_existing_op_ctx(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_msg_ctx_t * msg_ctx)
{
axis2_op_ctx_t *op_ctx = NULL;
axis2_relates_to_t *relates_to = NULL;
@@ -927,13 +963,13 @@
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, msg_ctx, NULL);
- op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
+ op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
if (op_ctx)
{
return op_ctx;
}
- relates_to = axis2_msg_ctx_get_relates_to(msg_ctx, env);
+ relates_to = axis2_msg_ctx_get_relates_to(msg_ctx, env);
if (!relates_to)
{
return NULL;
@@ -942,13 +978,13 @@
{
axis2_conf_ctx_t *conf_ctx = NULL;
axis2_char_t *value = NULL;
- conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
- op_ctx = axis2_conf_ctx_get_op_ctx(conf_ctx, env, value);
+ conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
+ op_ctx = axis2_conf_ctx_get_op_ctx(conf_ctx, env, value);
if (!op_ctx)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CANNOT_CORRELATE_MSG,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return NULL;
}
}
@@ -958,10 +994,11 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_register_op_ctx(axis2_op_t *op,
- const axutil_env_t *env,
- axis2_msg_ctx_t *msg_ctx,
- axis2_op_ctx_t *op_ctx)
+axis2_op_register_op_ctx(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axis2_op_ctx_t * op_ctx)
{
axis2_conf_ctx_t *conf_ctx = NULL;
const axis2_char_t *msg_id = NULL;
@@ -971,56 +1008,58 @@
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, op_ctx, AXIS2_FAILURE);
- conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
+ conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
if (!conf_ctx)
{
return AXIS2_FAILURE;
}
- msg_id = axis2_msg_ctx_get_msg_id(msg_ctx, env);
+ msg_id = axis2_msg_ctx_get_msg_id(msg_ctx, env);
if (!msg_id)
{
return AXIS2_FAILURE;
}
/*status = axis2_conf_ctx_register_op_ctx(conf_ctx, env, msg_id, op_ctx);
- if (AXIS2_FAILURE == status)
- {
- return AXIS2_FAILURE;
- }*/
- status = axis2_msg_ctx_set_op_ctx(msg_ctx, env, op_ctx);
+ if (AXIS2_FAILURE == status)
+ {
+ return AXIS2_FAILURE;
+ } */
+ status = axis2_msg_ctx_set_op_ctx(msg_ctx, env, op_ctx);
if (AXIS2_FAILURE == status)
{
axutil_hash_t *op_ctx_map = NULL;
- op_ctx_map = (axutil_hash_t *) axis2_conf_ctx_get_op_ctx_map(conf_ctx, env);
+ op_ctx_map =
+ (axutil_hash_t *) axis2_conf_ctx_get_op_ctx_map(conf_ctx, env);
axutil_hash_set(op_ctx_map, msg_id, AXIS2_HASH_KEY_STRING, NULL);
}
- if (AXIS2_TRUE == axis2_op_ctx_get_is_complete(op_ctx, env))
+ if (AXIS2_TRUE == axis2_op_ctx_get_is_complete(op_ctx, env))
{
- axis2_op_ctx_cleanup(op_ctx, env);
+ axis2_op_ctx_cleanup(op_ctx, env);
}
return AXIS2_SUCCESS;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_add_msg_ctx_in_only(axis2_op_t *op,
- const axutil_env_t *env,
- axis2_msg_ctx_t *msg_ctx,
- axis2_op_ctx_t *op_ctx)
+axis2_op_add_msg_ctx_in_only(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axis2_op_ctx_t * op_ctx)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, op_ctx, AXIS2_FAILURE);
-
- if (AXIS2_TRUE != axis2_op_ctx_get_is_complete(op_ctx, env))
+
+ if (AXIS2_TRUE != axis2_op_ctx_get_is_complete(op_ctx, env))
{
axis2_msg_ctx_t **msg_ctxs = NULL;
- msg_ctxs = axis2_op_ctx_get_msg_ctx_map(op_ctx, env);
+ msg_ctxs = axis2_op_ctx_get_msg_ctx_map(op_ctx, env);
msg_ctxs[AXIS2_WSDL_MESSAGE_LABEL_IN] = msg_ctx;
- axis2_op_ctx_set_complete(op_ctx, env, AXIS2_TRUE);
+ axis2_op_ctx_set_complete(op_ctx, env, AXIS2_TRUE);
}
else
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MESSAGE_ADDITION,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
@@ -1028,26 +1067,27 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_add_msg_ctx_out_only(axis2_op_t *op,
- const axutil_env_t *env,
- axis2_msg_ctx_t *msg_ctx,
- axis2_op_ctx_t *op_ctx)
+axis2_op_add_msg_ctx_out_only(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axis2_op_ctx_t * op_ctx)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, op_ctx, AXIS2_FAILURE);
- if (AXIS2_TRUE != axis2_op_ctx_get_is_complete(op_ctx, env))
+ if (AXIS2_TRUE != axis2_op_ctx_get_is_complete(op_ctx, env))
{
axis2_msg_ctx_t **msg_ctxs = NULL;
- msg_ctxs = axis2_op_ctx_get_msg_ctx_map(op_ctx, env);
- msg_ctxs[AXIS2_WSDL_MESSAGE_LABEL_OUT] = msg_ctx;
- axis2_op_ctx_set_complete(op_ctx, env, AXIS2_TRUE);
+ msg_ctxs = axis2_op_ctx_get_msg_ctx_map(op_ctx, env);
+ msg_ctxs[AXIS2_WSDL_MESSAGE_LABEL_OUT] = msg_ctx;
+ axis2_op_ctx_set_complete(op_ctx, env, AXIS2_TRUE);
}
else
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MESSAGE_ADDITION,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
@@ -1055,10 +1095,11 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_add_msg_ctx_in_out(axis2_op_t *op,
- const axutil_env_t *env,
- axis2_msg_ctx_t *msg_ctx,
- axis2_op_ctx_t *op_ctx)
+axis2_op_add_msg_ctx_in_out(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axis2_op_ctx_t * op_ctx)
{
axis2_msg_ctx_t **mep = NULL;
axis2_msg_ctx_t *in_msg_ctx = NULL;
@@ -1068,14 +1109,14 @@
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, op_ctx, AXIS2_FAILURE);
- mep = axis2_op_ctx_get_msg_ctx_map(op_ctx, env);
+ mep = axis2_op_ctx_get_msg_ctx_map(op_ctx, env);
in_msg_ctx = mep[AXIS2_WSDL_MESSAGE_LABEL_IN];
out_msg_ctx = mep[AXIS2_WSDL_MESSAGE_LABEL_OUT];
-
+
if (in_msg_ctx && NULL != out_msg_ctx)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MESSAGE_ADDITION,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
if (!in_msg_ctx)
@@ -1085,16 +1126,17 @@
else
{
mep[AXIS2_WSDL_MESSAGE_LABEL_OUT] = msg_ctx;
- axis2_op_ctx_set_complete(op_ctx, env, AXIS2_TRUE);
+ axis2_op_ctx_set_complete(op_ctx, env, AXIS2_TRUE);
}
return AXIS2_SUCCESS;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_add_msg_ctx_out_in(axis2_op_t *op,
- const axutil_env_t *env,
- axis2_msg_ctx_t *msg_ctx,
- axis2_op_ctx_t *op_ctx)
+axis2_op_add_msg_ctx_out_in(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axis2_msg_ctx_t * msg_ctx,
+ axis2_op_ctx_t * op_ctx)
{
axis2_msg_ctx_t **mep = NULL;
axis2_msg_ctx_t *in_msg_ctx = NULL;
@@ -1104,13 +1146,13 @@
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, op_ctx, AXIS2_FAILURE);
- mep = axis2_op_ctx_get_msg_ctx_map(op_ctx, env);
+ mep = axis2_op_ctx_get_msg_ctx_map(op_ctx, env);
in_msg_ctx = mep[AXIS2_WSDL_MESSAGE_LABEL_IN];
out_msg_ctx = mep[AXIS2_WSDL_MESSAGE_LABEL_OUT];
if (in_msg_ctx && NULL != out_msg_ctx)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MESSAGE_ADDITION,
- AXIS2_FAILURE);
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
if (!out_msg_ctx)
@@ -1120,26 +1162,28 @@
else
{
mep[AXIS2_WSDL_MESSAGE_LABEL_IN] = msg_ctx;
- axis2_op_ctx_set_complete(op_ctx, env, AXIS2_TRUE);
+ axis2_op_ctx_set_complete(op_ctx, env, AXIS2_TRUE);
}
return AXIS2_SUCCESS;
}
AXIS2_EXTERN axis2_msg_t *AXIS2_CALL
-axis2_op_get_msg(const axis2_op_t *op,
- const axutil_env_t *env,
- const axis2_char_t *label)
+axis2_op_get_msg(
+ const axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * label)
{
AXIS2_PARAM_CHECK(env->error, label, NULL);
- return (axis2_msg_t *)axis2_desc_get_child(op->base, env, label);
+ return (axis2_msg_t *) axis2_desc_get_child(op->base, env, label);
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_add_msg(axis2_op_t *op,
- const axutil_env_t *env,
- const axis2_char_t *label,
- const axis2_msg_t *msg)
+axis2_op_add_msg(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ const axis2_char_t * label,
+ const axis2_msg_t * msg)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, label, AXIS2_FAILURE);
@@ -1148,21 +1192,23 @@
}
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-axis2_op_is_from_module(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_is_from_module(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
return op->from_module;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_op_set_wsamapping_list(axis2_op_t *op,
- const axutil_env_t *env,
- axutil_array_list_t *mapping_list)
+axis2_op_set_wsamapping_list(
+ axis2_op_t * op,
+ const axutil_env_t * env,
+ axutil_array_list_t * mapping_list)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, mapping_list, AXIS2_FAILURE);
-
+
if (op->wsamapping_list)
{
axutil_array_list_free(op->wsamapping_list, env);
@@ -1173,24 +1219,25 @@
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_op_get_wsamapping_list(axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_wsamapping_list(
+ axis2_op_t * op,
+ const axutil_env_t * env)
{
return op->wsamapping_list;
}
AXIS2_EXTERN axutil_param_container_t *AXIS2_CALL
-axis2_op_get_param_container(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_param_container(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
return op->param_container;
}
AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
-axis2_op_get_base(const axis2_op_t *op,
- const axutil_env_t *env)
+axis2_op_get_base(
+ const axis2_op_t * op,
+ const axutil_env_t * env)
{
return op->base;
}
-
-
Modified: webservices/axis2/trunk/c/src/core/description/phase_rule.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/phase_rule.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/phase_rule.c (original)
+++ webservices/axis2/trunk/c/src/core/description/phase_rule.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
@@ -15,29 +16,34 @@
* limitations under the License.
*/
-
#include <axis2_const.h>
#include <axis2_phase_rule.h>
#include <axutil_string.h>
struct axis2_phase_rule
{
+
/** name of phase or handler before */
axis2_char_t *before;
+
/** name of phase or handler after */
axis2_char_t *after;
+
/** phase name */
axis2_char_t *name;
+
/** Is this first in phase? */
axis2_bool_t first;
+
/** Is this last in phase? */
axis2_bool_t last;
};
AXIS2_EXTERN axis2_phase_rule_t *AXIS2_CALL
-axis2_phase_rule_create(const axutil_env_t *env,
- const axis2_char_t *name)
+axis2_phase_rule_create(
+ const axutil_env_t * env,
+ const axis2_char_t * name)
{
axis2_phase_rule_t *phase_rule = NULL;
@@ -66,16 +72,18 @@
}
const axis2_char_t *AXIS2_CALL
-axis2_phase_rule_get_before(const axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env)
+axis2_phase_rule_get_before(
+ const axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env)
{
return phase_rule->before;
}
axis2_status_t AXIS2_CALL
-axis2_phase_rule_set_before(axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env,
- const axis2_char_t *before)
+axis2_phase_rule_set_before(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env,
+ const axis2_char_t * before)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -99,16 +107,18 @@
}
const axis2_char_t *AXIS2_CALL
-axis2_phase_rule_get_after(const axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env)
+axis2_phase_rule_get_after(
+ const axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env)
{
return phase_rule->after;
}
axis2_status_t AXIS2_CALL
-axis2_phase_rule_set_after(axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env,
- const axis2_char_t *after)
+axis2_phase_rule_set_after(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env,
+ const axis2_char_t * after)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -132,16 +142,18 @@
}
const axis2_char_t *AXIS2_CALL
-axis2_phase_rule_get_name(const axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env)
+axis2_phase_rule_get_name(
+ const axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env)
{
return phase_rule->name;
}
axis2_status_t AXIS2_CALL
-axis2_phase_rule_set_name(axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env,
- const axis2_char_t *name)
+axis2_phase_rule_set_name(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env,
+ const axis2_char_t * name)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -165,16 +177,18 @@
}
axis2_bool_t AXIS2_CALL
-axis2_phase_rule_is_first(const axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env)
+axis2_phase_rule_is_first(
+ const axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
return phase_rule->first;
}
axis2_status_t AXIS2_CALL
-axis2_phase_rule_set_first(axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env,
+axis2_phase_rule_set_first(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env,
axis2_bool_t first)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -183,16 +197,18 @@
}
axis2_bool_t AXIS2_CALL
-axis2_phase_rule_is_last(const axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env)
+axis2_phase_rule_is_last(
+ const axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
return phase_rule->last;
}
axis2_status_t AXIS2_CALL
-axis2_phase_rule_set_last(axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env,
+axis2_phase_rule_set_last(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env,
axis2_bool_t last)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -201,8 +217,9 @@
}
void AXIS2_CALL
-axis2_phase_rule_free(axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env)
+axis2_phase_rule_free(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, void);
@@ -227,8 +244,9 @@
}
axis2_phase_rule_t *AXIS2_CALL
-axis2_phase_rule_clone(axis2_phase_rule_t *phase_rule,
- const axutil_env_t *env)
+axis2_phase_rule_clone(
+ axis2_phase_rule_t * phase_rule,
+ const axutil_env_t * env)
{
axis2_phase_rule_t *phase_rule_new = NULL;
AXIS2_ENV_CHECK(env, NULL);
@@ -238,21 +256,19 @@
return NULL;
axis2_phase_rule_set_before(phase_rule_new, env,
- axis2_phase_rule_get_before(phase_rule, env));
+ axis2_phase_rule_get_before(phase_rule, env));
axis2_phase_rule_set_after(phase_rule_new, env,
- axis2_phase_rule_get_after(phase_rule, env));
+ axis2_phase_rule_get_after(phase_rule, env));
axis2_phase_rule_set_name(phase_rule_new, env,
- axis2_phase_rule_get_name(phase_rule, env));
+ axis2_phase_rule_get_name(phase_rule, env));
axis2_phase_rule_set_first(phase_rule_new, env,
- axis2_phase_rule_is_first(phase_rule, env));
+ axis2_phase_rule_is_first(phase_rule, env));
axis2_phase_rule_set_last(phase_rule_new, env,
- axis2_phase_rule_is_last(phase_rule, env));
+ axis2_phase_rule_is_last(phase_rule, env));
return phase_rule_new;
}
-
-
Modified: webservices/axis2/trunk/c/src/core/description/policy_include.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/description/policy_include.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/description/policy_include.c (original)
+++ webservices/axis2/trunk/c/src/core/description/policy_include.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
@@ -38,16 +39,17 @@
void *value;
} axis2_policy_wrapper_t;
-
AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
-axis2_policy_include_create(const axutil_env_t *env)
+axis2_policy_include_create(
+ const axutil_env_t * env)
{
axis2_policy_include_t *policy_include = NULL;
AXIS2_ENV_CHECK(env, NULL);
policy_include = (axis2_policy_include_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axis2_policy_include_t));
+ sizeof
+ (axis2_policy_include_t));
if (!policy_include)
{
@@ -81,18 +83,20 @@
}
AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
-axis2_policy_include_create_with_desc(const axutil_env_t *env,
- axis2_desc_t *desc)
+axis2_policy_include_create_with_desc(
+ const axutil_env_t * env,
+ axis2_desc_t * desc)
{
axis2_policy_include_t *policy_include = NULL;
axis2_desc_t *parent_desc = NULL;
AXIS2_ENV_CHECK(env, NULL);
- policy_include = (axis2_policy_include_t *) axis2_policy_include_create(env);
-
+ policy_include =
+ (axis2_policy_include_t *) axis2_policy_include_create(env);
+
parent_desc = axis2_desc_get_parent(desc, env);
-
+
if (policy_include->registry)
{
neethi_registry_free(policy_include->registry, env);
@@ -101,12 +105,14 @@
if (parent_desc)
{
- axis2_policy_include_t *preant_policy_include =
+ axis2_policy_include_t *preant_policy_include =
axis2_desc_get_policy_include(parent_desc, env);
if (preant_policy_include)
{
- policy_include->registry = neethi_registry_create_with_parent(env,
- axis2_policy_include_get_registry(preant_policy_include, env));
+ policy_include->registry = neethi_registry_create_with_parent(env,
+ axis2_policy_include_get_registry
+ (preant_policy_include,
+ env));
}
else
{
@@ -117,16 +123,16 @@
{
policy_include->registry = neethi_registry_create(env);
}
-
+
policy_include->desc = desc;
-
+
return policy_include;
}
AXIS2_EXTERN void AXIS2_CALL
axis2_policy_include_free(
- axis2_policy_include_t *policy_include,
- const axutil_env_t *env)
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, void);
@@ -140,13 +146,13 @@
axutil_hash_index_t *hi = NULL;
void *val = NULL;
for (hi = axutil_hash_first(policy_include->wrapper_elements, env); hi;
- hi = axutil_hash_next(env, hi))
+ hi = axutil_hash_next(env, hi))
{
axis2_policy_wrapper_t *wrapper = NULL;
axutil_hash_this(hi, NULL, NULL, &val);
wrapper = (axis2_policy_wrapper_t *) val;
if (wrapper)
- AXIS2_FREE(env->allocator, wrapper);
+ AXIS2_FREE(env->allocator, wrapper);
val = NULL;
wrapper = NULL;
}
@@ -162,9 +168,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_policy_include_set_registry(axis2_policy_include_t *policy_include,
- const axutil_env_t *env,
- neethi_registry_t *registry)
+axis2_policy_include_set_registry(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ neethi_registry_t * registry)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -172,39 +179,40 @@
{
neethi_registry_free(policy_include->registry, env);
}
-
+
policy_include->registry = registry;
-
+
return AXIS2_SUCCESS;
}
AXIS2_EXTERN neethi_registry_t *AXIS2_CALL
-axis2_policy_include_get_registry(axis2_policy_include_t *policy_include,
- const axutil_env_t *env)
+axis2_policy_include_get_registry(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env)
{
return policy_include->registry;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_policy_include_set_policy(axis2_policy_include_t *policy_include,
- const axutil_env_t *env,
- neethi_policy_t *policy)
+axis2_policy_include_set_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ neethi_policy_t * policy)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
+
if (policy_include->wrapper_elements)
{
axutil_hash_free(policy_include->wrapper_elements, env);
policy_include->wrapper_elements = NULL;
}
-
+
policy_include->wrapper_elements = axutil_hash_make(env);
- if (!neethi_policy_get_name(policy, env) &&
+ if (!neethi_policy_get_name(policy, env) &&
!neethi_policy_get_id(policy, env))
{
- neethi_policy_set_id(policy, env,
- axutil_uuid_gen(env));
+ neethi_policy_set_id(policy, env, axutil_uuid_gen(env));
}
if (policy_include->wrapper_elements)
@@ -212,25 +220,26 @@
axis2_policy_wrapper_t *wrapper = NULL;
wrapper = (axis2_policy_wrapper_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axis2_policy_wrapper_t));
+ sizeof
+ (axis2_policy_wrapper_t));
if (wrapper)
{
axis2_char_t *policy_name = NULL;
wrapper->type = AXIS2_ANON_POLICY;
wrapper->value = policy;
-
+
policy_name = neethi_policy_get_name(policy, env);
-
+
if (policy_name)
{
axutil_hash_set(policy_include->wrapper_elements, policy_name,
- AXIS2_HASH_KEY_STRING, wrapper);
+ AXIS2_HASH_KEY_STRING, wrapper);
}
else
{
- axutil_hash_set(policy_include->wrapper_elements,
- neethi_policy_get_id(policy, env),
- AXIS2_HASH_KEY_STRING, wrapper);
+ axutil_hash_set(policy_include->wrapper_elements,
+ neethi_policy_get_id(policy, env),
+ AXIS2_HASH_KEY_STRING, wrapper);
}
}
}
@@ -238,9 +247,10 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_policy_include_update_policy(axis2_policy_include_t *policy_include,
- const axutil_env_t *env,
- neethi_policy_t *policy)
+axis2_policy_include_update_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ neethi_policy_t * policy)
{
axis2_char_t *key;
axis2_policy_wrapper_t *wrapper = NULL;
@@ -255,44 +265,48 @@
}
wrapper = axutil_hash_get(policy_include->wrapper_elements, key,
- AXIS2_HASH_KEY_STRING);
- if(wrapper)
+ AXIS2_HASH_KEY_STRING);
+ if (wrapper)
{
wrapper->value = policy;
return AXIS2_SUCCESS;
}
-
+
return AXIS2_FAILURE;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_policy_include_set_effective_policy(axis2_policy_include_t *policy_include,
- const axutil_env_t *env,
- neethi_policy_t *effective_policy)
+axis2_policy_include_set_effective_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ neethi_policy_t * effective_policy)
{
policy_include->effective_policy = effective_policy;
return AXIS2_SUCCESS;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_policy_include_set_desc(axis2_policy_include_t *policy_include,
- const axutil_env_t *env,
- axis2_desc_t *desc)
+axis2_policy_include_set_desc(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ axis2_desc_t * desc)
{
policy_include->desc = desc;
return AXIS2_SUCCESS;
-}
+}
AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
-axis2_policy_include_get_desc(axis2_policy_include_t *policy_include,
- const axutil_env_t *env)
+axis2_policy_include_get_desc(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env)
{
return policy_include->desc;
}
AXIS2_EXTERN axis2_policy_include_t *AXIS2_CALL
-axis2_policy_include_get_parent(axis2_policy_include_t *policy_include,
- const axutil_env_t *env)
+axis2_policy_include_get_parent(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env)
{
if (policy_include->desc)
{
@@ -308,43 +322,44 @@
}
static axis2_status_t
-axis2_policy_include_calculate_policy(axis2_policy_include_t *policy_include,
- const axutil_env_t *env)
+axis2_policy_include_calculate_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env)
{
neethi_policy_t *result = NULL;
axutil_hash_index_t *hi = NULL;
void *val = NULL;
for (hi = axutil_hash_first(policy_include->wrapper_elements, env); hi;
- hi = axutil_hash_next(env, hi))
+ hi = axutil_hash_next(env, hi))
{
axis2_policy_wrapper_t *wrapper = NULL;
axutil_hash_this(hi, NULL, NULL, &val);
- wrapper = (axis2_policy_wrapper_t *)val;
+ wrapper = (axis2_policy_wrapper_t *) val;
if (wrapper)
{
neethi_policy_t *policy = NULL;
- if (wrapper->type == AXIS2_POLICY_REF)
+ if (wrapper->type == AXIS2_POLICY_REF)
{
- neethi_reference_t *reference =
- (neethi_reference_t *)wrapper->value;
+ neethi_reference_t *reference =
+ (neethi_reference_t *) wrapper->value;
if (reference)
{
/* TOOD add neethi_reference_normalize
- policy = (neethi_policy_t*) neethi_reference_normalize(
- reference, env, policy_include->registry, AXIS2_FALSE);
- */
+ policy = (neethi_policy_t*) neethi_reference_normalize(
+ reference, env, policy_include->registry, AXIS2_FALSE);
+ */
}
- }
- else
+ }
+ else
{
- policy = (neethi_policy_t *)wrapper->value;
- }
+ policy = (neethi_policy_t *) wrapper->value;
+ }
- result = (result == NULL) ? (neethi_policy_t*) policy :
- (neethi_policy_t*) neethi_engine_merge(env, result, policy);
+ result = (result == NULL) ? (neethi_policy_t *) policy :
+ (neethi_policy_t *) neethi_engine_merge(env, result, policy);
}
}
@@ -353,76 +368,89 @@
}
static neethi_policy_t *
-axis2_policy_include_calculate_effective_policy(axis2_policy_include_t *policy_include,
- const axutil_env_t *env)
-{
+axis2_policy_include_calculate_effective_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env)
+{
neethi_policy_t *result;
axis2_policy_include_t *parent = NULL;
parent = axis2_policy_include_get_parent(policy_include, env);
- if (parent)
+ if (parent)
{
neethi_policy_t *parent_policy =
- axis2_policy_include_get_effective_policy(parent,
- env);
+ axis2_policy_include_get_effective_policy(parent,
+ env);
- if (!parent_policy)
+ if (!parent_policy)
{
result = axis2_policy_include_get_policy(policy_include, env);
- }
- else
+ }
+ else
{
- if (axis2_policy_include_get_policy(policy_include, env))
+ if (axis2_policy_include_get_policy(policy_include, env))
{
neethi_policy_t *temp_policy = NULL;
- parent_policy = (neethi_policy_t *)neethi_engine_get_normalize(env, AXIS2_FALSE, parent_policy);
- temp_policy = axis2_policy_include_get_policy(policy_include, env);
- temp_policy = (neethi_policy_t *)neethi_engine_get_normalize(env, AXIS2_FALSE, temp_policy);
- /* result = (neethi_policy_t*) neethi_engine_merge(env, parent_policy,
- axis2_policy_include_get_policy(policy_include, env));*/
- result = (neethi_policy_t*) neethi_engine_merge(env,parent_policy, temp_policy);
+ parent_policy =
+ (neethi_policy_t *) neethi_engine_get_normalize(env,
+ AXIS2_FALSE,
+ parent_policy);
+ temp_policy =
+ axis2_policy_include_get_policy(policy_include, env);
+ temp_policy =
+ (neethi_policy_t *) neethi_engine_get_normalize(env,
+ AXIS2_FALSE,
+ temp_policy);
+ /* result = (neethi_policy_t*) neethi_engine_merge(env, parent_policy,
+ axis2_policy_include_get_policy(policy_include, env)); */
+ result =
+ (neethi_policy_t *) neethi_engine_merge(env, parent_policy,
+ temp_policy);
- }
- else
+ }
+ else
{
result = parent_policy;
}
}
- }
- else
+ }
+ else
{
result = axis2_policy_include_get_policy(policy_include, env);
}
-
+
return result;
/*policy_include->effective_policy = result;
- return AXIS2_SUCCESS;*/
+ return AXIS2_SUCCESS; */
}
AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
-axis2_policy_include_get_policy(axis2_policy_include_t *policy_include,
- const axutil_env_t *env)
+axis2_policy_include_get_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env)
{
axis2_policy_include_calculate_policy(policy_include, env);
return policy_include->policy;
}
AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
-axis2_policy_include_get_effective_policy(axis2_policy_include_t *policy_include,
- const axutil_env_t *env)
+axis2_policy_include_get_effective_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env)
{
/*if (policy_include->effective_policy)
- return policy_include->effective_policy;
- */
+ return policy_include->effective_policy;
+ */
return axis2_policy_include_calculate_effective_policy(policy_include, env);
- /*return policy_include->effective_policy;*/
+ /*return policy_include->effective_policy; */
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_policy_include_get_policy_elements(axis2_policy_include_t *policy_include,
- const axutil_env_t *env)
+axis2_policy_include_get_policy_elements(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env)
{
axutil_array_list_t *policy_elements_list = NULL;
axutil_hash_index_t *hi = NULL;
@@ -431,12 +459,12 @@
policy_elements_list = axutil_array_list_create(env, 10);
for (hi = axutil_hash_first(policy_include->wrapper_elements, env); hi;
- hi = axutil_hash_next(env, hi))
+ hi = axutil_hash_next(env, hi))
{
axis2_policy_wrapper_t *wrapper = NULL;
axutil_hash_this(hi, NULL, NULL, &val);
- wrapper = (axis2_policy_wrapper_t *)val;
+ wrapper = (axis2_policy_wrapper_t *) val;
if (wrapper)
{
@@ -447,8 +475,9 @@
}
AXIS2_EXTERN axutil_array_list_t *AXIS2_CALL
-axis2_policy_include_get_policy_elements_with_type(axis2_policy_include_t *policy_include,
- const axutil_env_t *env,
+axis2_policy_include_get_policy_elements_with_type(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
int type)
{
axutil_array_list_t *policy_elements_list = NULL;
@@ -458,12 +487,12 @@
policy_elements_list = axutil_array_list_create(env, 10);
for (hi = axutil_hash_first(policy_include->wrapper_elements, env); hi;
- hi = axutil_hash_next(env, hi))
+ hi = axutil_hash_next(env, hi))
{
axis2_policy_wrapper_t *wrapper = NULL;
axutil_hash_this(hi, NULL, NULL, &val);
- wrapper = (axis2_policy_wrapper_t *)val;
+ wrapper = (axis2_policy_wrapper_t *) val;
if (wrapper && wrapper->type == type)
{
@@ -474,23 +503,25 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_policy_include_register_policy(axis2_policy_include_t *policy_include,
- const axutil_env_t *env,
- axis2_char_t *key,
- neethi_policy_t *policy)
+axis2_policy_include_register_policy(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ axis2_char_t * key,
+ neethi_policy_t * policy)
{
if (policy_include->registry)
{
- return neethi_registry_register(policy_include->registry, env, key,
- policy);
+ return neethi_registry_register(policy_include->registry, env, key,
+ policy);
}
return AXIS2_FAILURE;
}
AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
-axis2_policy_include_get_policy_with_key(axis2_policy_include_t *policy_include,
- const axutil_env_t *env,
- axis2_char_t *key)
+axis2_policy_include_get_policy_with_key(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ axis2_char_t * key)
{
if (policy_include->registry)
{
@@ -500,19 +531,20 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_policy_include_add_policy_element(axis2_policy_include_t *policy_include,
- const axutil_env_t *env,
+axis2_policy_include_add_policy_element(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
int type,
- neethi_policy_t *policy)
+ neethi_policy_t * policy)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
- if (!neethi_policy_get_name(policy, env) &&
+
+ if (!neethi_policy_get_name(policy, env) &&
!neethi_policy_get_id(policy, env))
{
- axis2_char_t *uuid = axutil_uuid_gen(env);
+ axis2_char_t *uuid = axutil_uuid_gen(env);
neethi_policy_set_id(policy, env, uuid);
- if(uuid)
+ if (uuid)
{
AXIS2_FREE(env->allocator, uuid);
uuid = NULL;
@@ -524,25 +556,26 @@
axis2_policy_wrapper_t *wrapper = NULL;
wrapper = (axis2_policy_wrapper_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axis2_policy_wrapper_t));
+ sizeof
+ (axis2_policy_wrapper_t));
if (wrapper)
{
axis2_char_t *policy_name = NULL;
wrapper->type = type;
wrapper->value = policy;
-
+
policy_name = neethi_policy_get_name(policy, env);
if (!policy_name)
policy_name = neethi_policy_get_id(policy, env);
-
+
if (policy_name)
{
axutil_hash_set(policy_include->wrapper_elements, policy_name,
- AXIS2_HASH_KEY_STRING, wrapper);
+ AXIS2_HASH_KEY_STRING, wrapper);
if (policy_include->registry)
{
- neethi_registry_register(policy_include->registry,
- env, policy_name, policy);
+ neethi_registry_register(policy_include->registry,
+ env, policy_name, policy);
}
return AXIS2_SUCCESS;
}
@@ -552,53 +585,55 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_policy_include_add_policy_reference_element(axis2_policy_include_t *policy_include,
- const axutil_env_t *env,
+axis2_policy_include_add_policy_reference_element(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
int type,
- neethi_reference_t *reference)
+ neethi_reference_t * reference)
{
axis2_policy_wrapper_t *wrapper = NULL;
wrapper = (axis2_policy_wrapper_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axis2_policy_wrapper_t));
+ sizeof
+ (axis2_policy_wrapper_t));
if (wrapper)
{
wrapper->type = type;
wrapper->value = reference;
- axutil_hash_set(policy_include->wrapper_elements,
- neethi_reference_get_uri(reference, env),
- AXIS2_HASH_KEY_STRING, wrapper);
+ axutil_hash_set(policy_include->wrapper_elements,
+ neethi_reference_get_uri(reference, env),
+ AXIS2_HASH_KEY_STRING, wrapper);
}
return AXIS2_SUCCESS;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_policy_include_remove_policy_element(axis2_policy_include_t *policy_include,
- const axutil_env_t *env,
- axis2_char_t *policy_uri)
-{
+axis2_policy_include_remove_policy_element(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env,
+ axis2_char_t * policy_uri)
+{
if (policy_include->wrapper_elements)
{
axutil_hash_set(policy_include->wrapper_elements,
- policy_uri,
- AXIS2_HASH_KEY_STRING, NULL);
+ policy_uri, AXIS2_HASH_KEY_STRING, NULL);
}
if (policy_include->registry)
{
- neethi_registry_register(policy_include->registry,
- env, policy_uri, NULL);
+ neethi_registry_register(policy_include->registry,
+ env, policy_uri, NULL);
}
return AXIS2_SUCCESS;
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_policy_include_remove_all_policy_element(axis2_policy_include_t *policy_include,
- const axutil_env_t *env)
-{
+axis2_policy_include_remove_all_policy_element(
+ axis2_policy_include_t * policy_include,
+ const axutil_env_t * env)
+{
if (policy_include->wrapper_elements)
{
axutil_hash_free(policy_include->wrapper_elements, env);
}
return AXIS2_SUCCESS;
}
-
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org