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 [14/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/engine/req_uri_disp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/req_uri_disp.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/req_uri_disp.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/req_uri_disp.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,27 +28,23 @@
const axis2_char_t *AXIS2_REQ_URI_DISP_NAME = "request_uri_based_dispatcher";
-axis2_status_t AXIS2_CALL
-axis2_req_uri_disp_invoke(
+axis2_status_t AXIS2_CALL axis2_req_uri_disp_invoke(
axis2_handler_t * handler,
- const axutil_env_t *env,
+ const axutil_env_t * env,
struct axis2_msg_ctx *msg_ctx);
-axis2_svc_t *AXIS2_CALL
-axis2_req_uri_disp_find_svc(
- axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env);
-
-axis2_op_t *AXIS2_CALL
-axis2_req_uri_disp_find_op(
- axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env,
- axis2_svc_t *svc);
-
+axis2_svc_t *AXIS2_CALL axis2_req_uri_disp_find_svc(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+axis2_op_t *AXIS2_CALL axis2_req_uri_disp_find_op(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_svc_t * svc);
AXIS2_EXTERN axis2_disp_t *AXIS2_CALL
axis2_req_uri_disp_create(
- const axutil_env_t *env)
+ const axutil_env_t * env)
{
axis2_disp_t *disp = NULL;
axis2_handler_t *handler = NULL;
@@ -55,8 +52,9 @@
AXIS2_ENV_CHECK(env, NULL);
- name = axutil_string_create_const(env,
- (axis2_char_t **)&AXIS2_REQ_URI_DISP_NAME);
+ name = axutil_string_create_const(env,
+ (axis2_char_t **) &
+ AXIS2_REQ_URI_DISP_NAME);
disp = axis2_disp_create(env, name);
if (!disp)
@@ -69,7 +67,7 @@
if (!handler)
{
AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_INVALID_HANDLER_STATE, AXIS2_FAILURE);
+ AXIS2_ERROR_INVALID_HANDLER_STATE, AXIS2_FAILURE);
return NULL;
}
@@ -82,15 +80,15 @@
axis2_svc_t *AXIS2_CALL
axis2_req_uri_disp_find_svc(
- axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env)
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env)
{
axis2_endpoint_ref_t *endpoint_ref = NULL;
axis2_svc_t *svc = NULL;
AXIS2_ENV_CHECK(env, NULL);
- endpoint_ref = axis2_msg_ctx_get_to(msg_ctx, env);
+ endpoint_ref = axis2_msg_ctx_get_to(msg_ctx, env);
if (endpoint_ref)
{
@@ -101,8 +99,8 @@
{
axis2_char_t **url_tokens = NULL;
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Checking for service using target endpoint address : %s",
- address);
+ "Checking for service using target endpoint address : %s",
+ address);
url_tokens = axutil_parse_request_url_for_svc_and_op(env, address);
@@ -112,25 +110,25 @@
{
axis2_conf_ctx_t *conf_ctx = NULL;
- 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)
{
axis2_conf_t *conf = NULL;
- conf = axis2_conf_ctx_get_conf(conf_ctx, env);
+ conf = axis2_conf_ctx_get_conf(conf_ctx, env);
if (conf)
{
svc = axis2_conf_get_svc(conf, env, url_tokens[0]);
if (svc)
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Service found using target endpoint address");
+ "Service found using target endpoint address");
}
}
AXIS2_FREE(env->allocator, url_tokens[0]);
- if(url_tokens[1])
+ if (url_tokens[1])
{
- AXIS2_FREE(env->allocator, url_tokens[1]);
- }
+ AXIS2_FREE(env->allocator, url_tokens[1]);
+ }
}
AXIS2_FREE(env->allocator, url_tokens);
@@ -144,9 +142,9 @@
axis2_op_t *AXIS2_CALL
axis2_req_uri_disp_find_op(
- axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env,
- axis2_svc_t *svc)
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_svc_t * svc)
{
axis2_endpoint_ref_t *endpoint_ref = NULL;
axis2_op_t *op = NULL;
@@ -154,7 +152,7 @@
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, svc, NULL);
- endpoint_ref = axis2_msg_ctx_get_to(msg_ctx, env);
+ endpoint_ref = axis2_msg_ctx_get_to(msg_ctx, env);
if (endpoint_ref)
{
@@ -173,16 +171,17 @@
{
axutil_qname_t *op_qname = NULL;
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Checking for operation using \
- target endpoint uri fragment : %s",
- url_tokens[1]);
- op_qname = axutil_qname_create(env, url_tokens[1], NULL, NULL);
- op = axis2_svc_get_op_with_name(svc, env,
- axutil_qname_get_localpart(op_qname, env));
+ "Checking for operation using \
+ target endpoint uri fragment : %s", url_tokens[1]);
+ op_qname =
+ axutil_qname_create(env, url_tokens[1], NULL, NULL);
+ op = axis2_svc_get_op_with_name(svc, env,
+ axutil_qname_get_localpart
+ (op_qname, env));
axutil_qname_free(op_qname, env);
if (op)
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Operation found using target endpoint uri fragment");
+ "Operation found using target endpoint uri fragment");
}
if (url_tokens[0])
AXIS2_FREE(env->allocator, url_tokens[0]);
@@ -199,8 +198,8 @@
axis2_status_t AXIS2_CALL
axis2_req_uri_disp_invoke(
axis2_handler_t * handler,
- const axutil_env_t *env,
- struct axis2_msg_ctx *msg_ctx)
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * msg_ctx)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
Modified: webservices/axis2/trunk/c/src/core/engine/soap_action_disp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/soap_action_disp.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/soap_action_disp.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/soap_action_disp.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,7 +16,6 @@
* limitations under the License.
*/
-
#include <axis2_disp.h>
#include <axis2_handler_desc.h>
#include <axutil_string.h>
@@ -26,28 +26,26 @@
#include <axis2_addr.h>
#include <axutil_utils.h>
-const axis2_char_t *AXIS2_SOAP_ACTION_DISP_NAME = "soap_action_based_dispatcher";
+const axis2_char_t *AXIS2_SOAP_ACTION_DISP_NAME =
+ "soap_action_based_dispatcher";
-axis2_status_t AXIS2_CALL
-axiom_soap_action_disp_invoke(
- axis2_handler_t *handler,
- const axutil_env_t *env,
+axis2_status_t AXIS2_CALL axiom_soap_action_disp_invoke(
+ axis2_handler_t * handler,
+ const axutil_env_t * env,
struct axis2_msg_ctx *msg_ctx);
-axis2_svc_t *AXIS2_CALL
-axiom_soap_action_disp_find_svc(
- axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env);
-
-axis2_op_t *AXIS2_CALL
-axiom_soap_action_disp_find_op(
- axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env,
- axis2_svc_t *svc);
+axis2_svc_t *AXIS2_CALL axiom_soap_action_disp_find_svc(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+axis2_op_t *AXIS2_CALL axiom_soap_action_disp_find_op(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_svc_t * svc);
axis2_disp_t *AXIS2_CALL
axiom_soap_action_disp_create(
- const axutil_env_t *env)
+ const axutil_env_t * env)
{
axis2_disp_t *disp = NULL;
axis2_handler_t *handler = NULL;
@@ -55,8 +53,9 @@
AXIS2_ENV_CHECK(env, NULL);
- name = axutil_string_create_const(env,
- (axis2_char_t**)&AXIS2_SOAP_ACTION_DISP_NAME);
+ name = axutil_string_create_const(env,
+ (axis2_char_t **) &
+ AXIS2_SOAP_ACTION_DISP_NAME);
disp = axis2_disp_create(env, name);
if (!disp)
@@ -68,8 +67,8 @@
handler = axis2_disp_get_base(disp, env);
if (!handler)
{
- AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_INVALID_HANDLER_STATE, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error,
+ AXIS2_ERROR_INVALID_HANDLER_STATE, AXIS2_FAILURE);
return NULL;
}
@@ -81,19 +80,21 @@
}
axis2_svc_t *AXIS2_CALL
-axiom_soap_action_disp_find_svc(axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env)
+axiom_soap_action_disp_find_svc(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env)
{
- AXIS2_LOG_DEBUG(env->log,
- AXIS2_LOG_SI, "Checking for service using SOAPAction is not implemented");
+ AXIS2_LOG_DEBUG(env->log,
+ AXIS2_LOG_SI,
+ "Checking for service using SOAPAction is not implemented");
return NULL;
}
axis2_op_t *AXIS2_CALL
axiom_soap_action_disp_find_op(
- axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env,
- axis2_svc_t *svc)
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_svc_t * svc)
{
const axis2_char_t *action = NULL;
axis2_op_t *op = NULL;
@@ -101,17 +102,18 @@
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, svc, NULL);
- action = axutil_string_get_buffer(
- axis2_msg_ctx_get_soap_action(msg_ctx, env), env);
+ action =
+ axutil_string_get_buffer(axis2_msg_ctx_get_soap_action(msg_ctx, env),
+ env);
if (action)
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Checking for operation using SOAPAction : %s", action);
+ "Checking for operation using SOAPAction : %s", action);
if (!op)
{
- const axis2_char_t * op_name = NULL;
+ const axis2_char_t *op_name = NULL;
op_name = axutil_rindex(action, '/');
if (op_name)
@@ -130,7 +132,8 @@
}
if (op)
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Operation found using SOAPAction");
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "Operation found using SOAPAction");
}
return op;
}
@@ -138,8 +141,8 @@
axis2_status_t AXIS2_CALL
axiom_soap_action_disp_invoke(
axis2_handler_t * handler,
- const axutil_env_t *env,
- struct axis2_msg_ctx *msg_ctx)
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * msg_ctx)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -148,4 +151,3 @@
return axis2_disp_find_svc_and_op(handler, env, msg_ctx);
}
-
Modified: webservices/axis2/trunk/c/src/core/engine/soap_body_disp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/soap_body_disp.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/soap_body_disp.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/soap_body_disp.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,7 +16,6 @@
* limitations under the License.
*/
-
#include <axis2_disp.h>
#include <axis2_handler_desc.h>
#include <axutil_string.h>
@@ -26,30 +26,26 @@
#include <axiom_soap_envelope.h>
#include <axiom_soap_body.h>
-const axis2_char_t *AXIS2_SOAP_MESSAGE_BODY_DISP_NAME = "soap_message_body_based_dispatcher";
+const axis2_char_t *AXIS2_SOAP_MESSAGE_BODY_DISP_NAME =
+ "soap_message_body_based_dispatcher";
-axis2_status_t AXIS2_CALL
-axiom_soap_body_disp_invoke(
- axis2_handler_t *handler,
- const axutil_env_t *env,
+axis2_status_t AXIS2_CALL axiom_soap_body_disp_invoke(
+ axis2_handler_t * handler,
+ const axutil_env_t * env,
struct axis2_msg_ctx *msg_ctx);
-axis2_svc_t *AXIS2_CALL
-axiom_soap_body_disp_find_svc(
- axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env);
-
-
-axis2_op_t *AXIS2_CALL
-axiom_soap_body_disp_find_op(
- axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env,
- axis2_svc_t *svc);
-
+axis2_svc_t *AXIS2_CALL axiom_soap_body_disp_find_svc(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env);
+
+axis2_op_t *AXIS2_CALL axiom_soap_body_disp_find_op(
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_svc_t * svc);
axis2_disp_t *AXIS2_CALL
axiom_soap_body_disp_create(
- const axutil_env_t *env)
+ const axutil_env_t * env)
{
axis2_disp_t *disp = NULL;
axis2_handler_t *handler = NULL;
@@ -57,14 +53,14 @@
AXIS2_ENV_CHECK(env, NULL);
- name = axutil_string_create_const(env,
- (axis2_char_t**)&AXIS2_SOAP_MESSAGE_BODY_DISP_NAME);
+ name = axutil_string_create_const(env,
+ (axis2_char_t **) &
+ AXIS2_SOAP_MESSAGE_BODY_DISP_NAME);
disp = axis2_disp_create(env, name);
if (!disp)
{
- AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
@@ -72,7 +68,7 @@
if (!handler)
{
AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_INVALID_HANDLER_STATE, AXIS2_FAILURE);
+ AXIS2_ERROR_INVALID_HANDLER_STATE, AXIS2_FAILURE);
return NULL;
}
@@ -85,20 +81,22 @@
axis2_svc_t *AXIS2_CALL
axiom_soap_body_disp_find_svc(
- axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env)
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env)
{
axiom_soap_envelope_t *soap_envelope = NULL;
axis2_svc_t *svc = NULL;
AXIS2_ENV_CHECK(env, NULL);
- soap_envelope = axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
+ soap_envelope = axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
if (soap_envelope)
{
- axiom_soap_body_t *soap_body = axiom_soap_envelope_get_body(soap_envelope, env);
+ axiom_soap_body_t *soap_body =
+ axiom_soap_envelope_get_body(soap_envelope, env);
if (soap_body)
{
- axiom_node_t *body_node = axiom_soap_body_get_base_node(soap_body, env);
+ axiom_node_t *body_node =
+ axiom_soap_body_get_base_node(soap_body, env);
if (body_node)
{
axiom_node_t *body_first_child_node =
@@ -106,32 +104,35 @@
if (body_first_child_node)
{
- if (axiom_node_get_node_type(body_first_child_node, env) == AXIOM_ELEMENT)
+ if (axiom_node_get_node_type(body_first_child_node, env) ==
+ AXIOM_ELEMENT)
{
axiom_element_t *element = NULL;
- element = (axiom_element_t *)axiom_node_get_data_element(
- body_first_child_node, env);
+ element =
+ (axiom_element_t *)
+ axiom_node_get_data_element(body_first_child_node,
+ env);
if (element)
{
axiom_namespace_t *ns =
- axiom_element_get_namespace(
- element, env, body_first_child_node);
+ axiom_element_get_namespace(element, env,
+ body_first_child_node);
if (ns)
{
- axis2_char_t *uri =
+ axis2_char_t *uri =
axiom_namespace_get_uri(ns, env);
if (uri)
{
axis2_char_t **url_tokens = NULL;
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
"Checking for service "
- "using SOAP message body's "
- "first child's namespace "
- "URI : %s",uri);
-
- url_tokens =
- axutil_parse_request_url_for_svc_and_op(
- env, uri);
+ "using SOAP message body's "
+ "first child's namespace "
+ "URI : %s", uri);
+
+ url_tokens =
+ axutil_parse_request_url_for_svc_and_op
+ (env, uri);
if (url_tokens)
{
@@ -139,24 +140,32 @@
{
axis2_conf_ctx_t *conf_ctx = NULL;
- 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)
{
axis2_conf_t *conf = NULL;
- conf = axis2_conf_ctx_get_conf(
- conf_ctx, env);
+ conf =
+ axis2_conf_ctx_get_conf
+ (conf_ctx, env);
if (conf)
{
- svc = axis2_conf_get_svc(
- conf, env, url_tokens[0]);
+ svc =
+ axis2_conf_get_svc(conf,
+ env,
+ url_tokens
+ [0]);
if (svc)
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Service found \
+ AXIS2_LOG_DEBUG(env->
+ log,
+ AXIS2_LOG_SI,
+ "Service found \
using SOAP message body's first child's namespace URI");
}
}
- AXIS2_FREE(env->allocator, url_tokens[0]);
+ AXIS2_FREE(env->allocator,
+ url_tokens[0]);
}
AXIS2_FREE(env->allocator, url_tokens);
@@ -176,9 +185,9 @@
axis2_op_t *AXIS2_CALL
axiom_soap_body_disp_find_op(
- axis2_msg_ctx_t *msg_ctx,
- const axutil_env_t *env,
- axis2_svc_t *svc)
+ axis2_msg_ctx_t * msg_ctx,
+ const axutil_env_t * env,
+ axis2_svc_t * svc)
{
axiom_soap_envelope_t *soap_envelope = NULL;
axis2_op_t *op = NULL;
@@ -186,14 +195,14 @@
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, svc, NULL);
- soap_envelope = axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
+ soap_envelope = axis2_msg_ctx_get_soap_envelope(msg_ctx, env);
if (soap_envelope)
{
- axiom_soap_body_t *soap_body =
+ axiom_soap_body_t *soap_body =
axiom_soap_envelope_get_body(soap_envelope, env);
if (soap_body)
{
- axiom_node_t *body_node =
+ axiom_node_t *body_node =
axiom_soap_body_get_base_node(soap_body, env);
if (body_node)
{
@@ -206,25 +215,26 @@
AXIOM_ELEMENT)
{
axiom_element_t *element = NULL;
- element = (axiom_element_t *)axiom_node_get_data_element(
- body_first_child_node, env);
+ element =
+ (axiom_element_t *)
+ axiom_node_get_data_element(body_first_child_node,
+ env);
if (element)
{
- axis2_char_t *element_name = axiom_element_get_localname(
- element, env);
+ axis2_char_t *element_name =
+ axiom_element_get_localname(element, env);
if (element_name)
{
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Checking for operation using \
-SOAP message body's first child's local name : %s",
- element_name);
+ "Checking for operation using \
+SOAP message body's first child's local name : %s", element_name);
- op = axis2_svc_get_op_with_name(
- svc, env, element_name);
+ op = axis2_svc_get_op_with_name(svc, env,
+ element_name);
if (op)
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Operation found using SOAP \
+ "Operation found using SOAP \
message body's first child's local name");
}
@@ -240,8 +250,8 @@
axis2_status_t AXIS2_CALL
axiom_soap_body_disp_invoke(
axis2_handler_t * handler,
- const axutil_env_t *env,
- struct axis2_msg_ctx *msg_ctx)
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * msg_ctx)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
axis2_msg_ctx_set_find_svc(msg_ctx, env, axiom_soap_body_disp_find_svc);
Modified: webservices/axis2/trunk/c/src/core/phaseresolver/phase_holder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/phaseresolver/phase_holder.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/phaseresolver/phase_holder.c (original)
+++ webservices/axis2/trunk/c/src/core/phaseresolver/phase_holder.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
@@ -23,16 +24,19 @@
};
AXIS2_EXTERN axis2_phase_holder_t *AXIS2_CALL
-axis2_phase_holder_create(const axutil_env_t *env)
+axis2_phase_holder_create(
+ const axutil_env_t * env)
{
axis2_phase_holder_t *phase_holder = NULL;
AXIS2_ENV_CHECK(env, NULL);
phase_holder = (axis2_phase_holder_t *) AXIS2_MALLOC(env->
- allocator, sizeof(axis2_phase_holder_t));
+ allocator,
+ sizeof
+ (axis2_phase_holder_t));
- if (! phase_holder)
+ if (!phase_holder)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -44,8 +48,9 @@
}
AXIS2_EXTERN axis2_phase_holder_t *AXIS2_CALL
-axis2_phase_holder_create_with_phases(const axutil_env_t *env,
- axutil_array_list_t *phases)
+axis2_phase_holder_create_with_phases(
+ const axutil_env_t * env,
+ axutil_array_list_t * phases)
{
axis2_phase_holder_t *phase_holder = NULL;
@@ -56,15 +61,16 @@
return NULL;
}
- phase_holder = (axis2_phase_holder_t *)axis2_phase_holder_create(env);
+ phase_holder = (axis2_phase_holder_t *) axis2_phase_holder_create(env);
phase_holder->phase_list = phases;
return phase_holder;
}
AXIS2_EXTERN void AXIS2_CALL
-axis2_phase_holder_free(axis2_phase_holder_t *phase_holder,
- const axutil_env_t *env)
+axis2_phase_holder_free(
+ axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, void);
@@ -77,9 +83,10 @@
}
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-axis2_phase_holder_is_phase_exist(axis2_phase_holder_t *phase_holder,
- const axutil_env_t *env,
- const axis2_char_t *phase_name)
+axis2_phase_holder_is_phase_exist(
+ axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env,
+ const axis2_char_t * phase_name)
{
int size = 0;
int i = 0;
@@ -95,8 +102,8 @@
const axis2_char_t *phase_name_l = NULL;
phase = (axis2_phase_t *) axutil_array_list_get(phase_holder->
- phase_list, env, i);
- phase_name_l = axis2_phase_get_name(phase, env);
+ phase_list, env, i);
+ phase_name_l = axis2_phase_get_name(phase, env);
if (0 == axutil_strcmp(phase_name_l, phase_name))
{
return AXIS2_TRUE;
@@ -106,80 +113,91 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_phase_holder_add_handler(axis2_phase_holder_t *phase_holder,
- const axutil_env_t *env,
- axis2_handler_desc_t *handler)
+axis2_phase_holder_add_handler(
+ axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env,
+ axis2_handler_desc_t * handler)
{
const axis2_char_t *phase_name = NULL;
axis2_status_t status = AXIS2_FAILURE;
- AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "axis2_phase_holder_add_handler start");
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+ "axis2_phase_holder_add_handler start");
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, handler, AXIS2_FAILURE);
- phase_name = axis2_phase_rule_get_name(
- axis2_handler_desc_get_rules(handler, env), env);
- if (AXIS2_TRUE == axis2_phase_holder_is_phase_exist(phase_holder, env,
- phase_name))
+ phase_name =
+ axis2_phase_rule_get_name(axis2_handler_desc_get_rules(handler, env),
+ env);
+ if (AXIS2_TRUE ==
+ axis2_phase_holder_is_phase_exist(phase_holder, env, phase_name))
{
axis2_phase_t *phase = NULL;
phase = axis2_phase_holder_get_phase(phase_holder, env, phase_name);
status = axis2_phase_add_handler_desc(phase, env, handler);
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Add handler %s to phase %s",
- axutil_string_get_buffer(axis2_handler_desc_get_name(handler, env), env),
- phase_name);
+ axutil_string_get_buffer(axis2_handler_desc_get_name
+ (handler, env), env),
+ phase_name);
}
else
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_PHASE, AXIS2_FAILURE);
status = AXIS2_FAILURE;
}
- AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "axis2_phase_holder_add_handler end status = %s",
- status ? "SUCCESS" : "FAILURE");
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+ "axis2_phase_holder_add_handler end status = %s",
+ status ? "SUCCESS" : "FAILURE");
return status;
}
-
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_phase_holder_remove_handler(axis2_phase_holder_t *phase_holder,
- const axutil_env_t *env,
- axis2_handler_desc_t *handler)
+axis2_phase_holder_remove_handler(
+ axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env,
+ axis2_handler_desc_t * handler)
{
const axis2_char_t *phase_name = NULL;
axis2_status_t status = AXIS2_FAILURE;
- AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "axis2_phase_holder_remove_handler start");
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+ "axis2_phase_holder_remove_handler start");
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, handler, AXIS2_FAILURE);
- phase_name = axis2_phase_rule_get_name(
- axis2_handler_desc_get_rules(handler, env), env);
- if (AXIS2_TRUE == axis2_phase_holder_is_phase_exist(phase_holder, env,
- phase_name))
+ phase_name =
+ axis2_phase_rule_get_name(axis2_handler_desc_get_rules(handler, env),
+ env);
+ if (AXIS2_TRUE ==
+ axis2_phase_holder_is_phase_exist(phase_holder, env, phase_name))
{
axis2_phase_t *phase = NULL;
phase = axis2_phase_holder_get_phase(phase_holder, env, phase_name);
status = axis2_phase_remove_handler_desc(phase, env, handler);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Remove handler %s from phase %s",
- axutil_string_get_buffer(axis2_handler_desc_get_name(handler, env), env),
- phase_name);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "Remove handler %s from phase %s",
+ axutil_string_get_buffer(axis2_handler_desc_get_name
+ (handler, env), env),
+ phase_name);
}
else
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_PHASE, AXIS2_FAILURE);
status = AXIS2_FAILURE;
}
- AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "axis2_phase_holder_remove_handler end status = %s",
- status ? "SUCCESS" : "FAILURE");
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
+ "axis2_phase_holder_remove_handler end status = %s",
+ status ? "SUCCESS" : "FAILURE");
return status;
}
AXIS2_EXTERN axis2_phase_t *AXIS2_CALL
-axis2_phase_holder_get_phase(const axis2_phase_holder_t *phase_holder,
- const axutil_env_t *env,
- const axis2_char_t *phase_name)
+axis2_phase_holder_get_phase(
+ const axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env,
+ const axis2_char_t * phase_name)
{
int size = 0;
int i = 0;
@@ -193,8 +211,8 @@
{
const axis2_char_t *phase_name_l = NULL;
phase = (axis2_phase_t *) axutil_array_list_get(phase_holder->
- phase_list, env, i);
- phase_name_l = axis2_phase_get_name(phase, env);
+ phase_list, env, i);
+ phase_name_l = axis2_phase_get_name(phase, env);
if (0 == axutil_strcmp(phase_name_l, phase_name))
{
return phase;
@@ -205,10 +223,11 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_phase_holder_build_transport_handler_chain(axis2_phase_holder_t *phase_holder,
- const axutil_env_t *env,
- axis2_phase_t *phase,
- axutil_array_list_t *handlers)
+axis2_phase_holder_build_transport_handler_chain(
+ axis2_phase_holder_t * phase_holder,
+ const axutil_env_t * env,
+ axis2_phase_t * phase,
+ axutil_array_list_t * handlers)
{
axis2_handler_t *handler = NULL;
int size = 0;
@@ -224,19 +243,19 @@
for (i = 0; i < size; i++)
{
- handler_desc = (axis2_handler_desc_t *) axutil_array_list_get(
- handlers, env, i);
+ handler_desc =
+ (axis2_handler_desc_t *) axutil_array_list_get(handlers, env, i);
status = axis2_handler_init(handler, env, handler_desc);
if (AXIS2_FAILURE == status)
- {
+ {
return status;
- }
+ }
status = axis2_handler_desc_set_handler(handler_desc, env, handler);
if (AXIS2_FAILURE == status)
- {
+ {
return status;
- }
+ }
status = axis2_phase_add_handler(phase, env, handler);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org