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 [26/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/modules/mod_log/log_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/modules/mod_log/log_in_handler.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/modules/mod_log/log_in_handler.c (original)
+++ webservices/axis2/trunk/c/src/modules/mod_log/log_in_handler.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,64 +28,63 @@
#include <axis2_msg_info_headers.h>
#include <axutil_property.h>
-axis2_status_t AXIS2_CALL
-axutil_log_in_handler_invoke(struct axis2_handler *handler,
- const axutil_env_t *env,
- struct axis2_msg_ctx *msg_ctx);
-
-AXIS2_EXTERN axis2_handler_t* AXIS2_CALL
-axutil_log_in_handler_create(const axutil_env_t *env,
- axutil_string_t *name)
+axis2_status_t AXIS2_CALL axutil_log_in_handler_invoke(
+ struct axis2_handler * handler,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * msg_ctx);
+
+AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+axutil_log_in_handler_create(
+ const axutil_env_t * env,
+ axutil_string_t * name)
{
axis2_handler_t *handler = NULL;
-
+
AXIS2_ENV_CHECK(env, NULL);
-
+
handler = axis2_handler_create(env);
if (!handler)
{
return NULL;
}
-
+
axis2_handler_set_invoke(handler, env, axutil_log_in_handler_invoke);
return handler;
}
-
axis2_status_t AXIS2_CALL
-axutil_log_in_handler_invoke(struct axis2_handler *handler,
- const axutil_env_t *env,
- struct axis2_msg_ctx *msg_ctx)
+axutil_log_in_handler_invoke(
+ struct axis2_handler * handler,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * msg_ctx)
{
axiom_soap_envelope_t *soap_envelope = NULL;
axiom_node_t *ret_node = NULL;
- AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
-
+
AXIS2_LOG_INFO(env->log, "Starting logging in handler .........");
-
- 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)
{
/* ensure SOAP buider state is in sync */
- axiom_soap_envelope_get_body(soap_envelope, env);
+ axiom_soap_envelope_get_body(soap_envelope, env);
ret_node = axiom_soap_envelope_get_base_node(soap_envelope, env);
- if(ret_node)
+ if (ret_node)
{
axis2_char_t *om_str = NULL;
om_str = axiom_node_to_string(ret_node, env);
- if(om_str)
+ if (om_str)
{
AXIS2_LOG_INFO(env->log, "Input message: %s", om_str);
}
}
}
-
+
return AXIS2_SUCCESS;
}
-
-
Modified: webservices/axis2/trunk/c/src/modules/mod_log/log_out_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/modules/mod_log/log_out_handler.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/modules/mod_log/log_out_handler.c (original)
+++ webservices/axis2/trunk/c/src/modules/mod_log/log_out_handler.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,62 +28,61 @@
#include <axis2_msg_info_headers.h>
#include <axutil_property.h>
-axis2_status_t AXIS2_CALL
-axutil_log_out_handler_invoke(struct axis2_handler *handler,
- const axutil_env_t *env,
- struct axis2_msg_ctx *msg_ctx);
-
-AXIS2_EXTERN axis2_handler_t* AXIS2_CALL
-axutil_log_out_handler_create(const axutil_env_t *env,
- axutil_string_t *name)
+axis2_status_t AXIS2_CALL axutil_log_out_handler_invoke(
+ struct axis2_handler * handler,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * msg_ctx);
+
+AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+axutil_log_out_handler_create(
+ const axutil_env_t * env,
+ axutil_string_t * name)
{
axis2_handler_t *handler = NULL;
-
+
AXIS2_ENV_CHECK(env, NULL);
-
+
handler = axis2_handler_create(env);
if (!handler)
{
return NULL;
}
-
+
axis2_handler_set_invoke(handler, env, axutil_log_out_handler_invoke);
return handler;
}
-
axis2_status_t AXIS2_CALL
-axutil_log_out_handler_invoke(struct axis2_handler *handler,
- const axutil_env_t *env,
- struct axis2_msg_ctx *msg_ctx)
+axutil_log_out_handler_invoke(
+ struct axis2_handler * handler,
+ const axutil_env_t * env,
+ struct axis2_msg_ctx * msg_ctx)
{
axiom_soap_envelope_t *soap_envelope = NULL;
axiom_node_t *ret_node = NULL;
- AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
-
+
AXIS2_LOG_INFO(env->log, "Starting logging out handler .........");
-
- 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)
{
ret_node = axiom_soap_envelope_get_base_node(soap_envelope, env);
- if(ret_node)
+ if (ret_node)
{
axis2_char_t *om_str = NULL;
om_str = axiom_node_to_string(ret_node, env);
- if(om_str)
+ if (om_str)
{
AXIS2_LOG_INFO(env->log, "Output message: %s", om_str);
}
}
}
-
+
return AXIS2_SUCCESS;
}
-
-
Modified: webservices/axis2/trunk/c/src/modules/mod_log/mod_log.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/modules/mod_log/mod_log.c?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/modules/mod_log/mod_log.c (original)
+++ webservices/axis2/trunk/c/src/modules/mod_log/mod_log.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
@@ -19,20 +20,19 @@
#include "mod_log.h"
-axis2_status_t AXIS2_CALL
-axis2_mod_log_shutdown(axis2_module_t *module,
- const axutil_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_mod_log_init(
- axis2_module_t *module,
- const axutil_env_t *env,
- axis2_conf_ctx_t *conf_ctx,
- axis2_module_desc_t *module_desc);
-
-axis2_status_t AXIS2_CALL
-axis2_mod_log_fill_handler_create_func_map(axis2_module_t *module,
- const axutil_env_t *env);
+axis2_status_t AXIS2_CALL axis2_mod_log_shutdown(
+ axis2_module_t * module,
+ const axutil_env_t * env);
+
+axis2_status_t AXIS2_CALL axis2_mod_log_init(
+ axis2_module_t * module,
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx,
+ axis2_module_desc_t * module_desc);
+
+axis2_status_t AXIS2_CALL axis2_mod_log_fill_handler_create_func_map(
+ axis2_module_t * module,
+ const axutil_env_t * env);
/**
* Module operations struct variable with functions assigned to members
@@ -44,11 +44,11 @@
};
axis2_module_t *
-axis2_mod_log_create(const axutil_env_t *env)
+axis2_mod_log_create(
+ const axutil_env_t * env)
{
axis2_module_t *module = NULL;
- module = AXIS2_MALLOC(env->allocator,
- sizeof(axis2_module_t));
+ module = AXIS2_MALLOC(env->allocator, sizeof(axis2_module_t));
/* initialize operations */
module->ops = &log_module_ops_var;
@@ -58,53 +58,54 @@
axis2_status_t AXIS2_CALL
axis2_mod_log_init(
- axis2_module_t *module,
- const axutil_env_t *env,
- axis2_conf_ctx_t *conf_ctx,
- axis2_module_desc_t *module_desc)
+ axis2_module_t * module,
+ const axutil_env_t * env,
+ axis2_conf_ctx_t * conf_ctx,
+ axis2_module_desc_t * module_desc)
{
/* Any initialization stuff related to this module can be here */
return AXIS2_SUCCESS;
}
axis2_status_t AXIS2_CALL
-axis2_mod_log_shutdown(axis2_module_t *module,
- const axutil_env_t *env)
+axis2_mod_log_shutdown(
+ axis2_module_t * module,
+ const axutil_env_t * env)
{
- if(module->handler_create_func_map)
+ if (module->handler_create_func_map)
{
axutil_hash_free(module->handler_create_func_map, env);
}
-
- if(module)
+
+ if (module)
{
AXIS2_FREE(env->allocator, module);
}
- return AXIS2_SUCCESS;
+ return AXIS2_SUCCESS;
}
axis2_status_t AXIS2_CALL
-axis2_mod_log_fill_handler_create_func_map(axis2_module_t *module,
- const axutil_env_t *env)
+axis2_mod_log_fill_handler_create_func_map(
+ axis2_module_t * module,
+ const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
+
module->handler_create_func_map = axutil_hash_make(env);
- if(!module->handler_create_func_map)
+ if (!module->handler_create_func_map)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY,
- AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return AXIS2_FAILURE;
}
/* add in handler */
- axutil_hash_set(module->handler_create_func_map, "LoggingInHandler",
- AXIS2_HASH_KEY_STRING, axutil_log_in_handler_create);
+ axutil_hash_set(module->handler_create_func_map, "LoggingInHandler",
+ AXIS2_HASH_KEY_STRING, axutil_log_in_handler_create);
/* add out handler */
- axutil_hash_set(module->handler_create_func_map, "LoggingOutHandler",
- AXIS2_HASH_KEY_STRING, axutil_log_out_handler_create);
-
+ axutil_hash_set(module->handler_create_func_map, "LoggingOutHandler",
+ AXIS2_HASH_KEY_STRING, axutil_log_out_handler_create);
+
return AXIS2_SUCCESS;
}
@@ -113,12 +114,13 @@
* that helps to create and remove module instances
*/
-AXIS2_EXPORT int
-axis2_get_instance(axis2_module_t **inst,
- const axutil_env_t *env)
+AXIS2_EXPORT int
+axis2_get_instance(
+ axis2_module_t ** inst,
+ const axutil_env_t * env)
{
- *inst = axis2_mod_log_create(env);
- if(!(*inst))
+ *inst = axis2_mod_log_create(env);
+ if (!(*inst))
{
return AXIS2_FAILURE;
}
@@ -126,16 +128,15 @@
return AXIS2_SUCCESS;
}
-AXIS2_EXPORT int
-axis2_remove_instance(axis2_module_t *inst,
- const axutil_env_t *env)
+AXIS2_EXPORT int
+axis2_remove_instance(
+ axis2_module_t * inst,
+ const axutil_env_t * env)
{
axis2_status_t status = AXIS2_FAILURE;
- if (inst)
- {
+ if (inst)
+ {
status = axis2_mod_log_shutdown(inst, env);
}
return status;
}
-
-
Modified: webservices/axis2/trunk/c/src/modules/mod_log/mod_log.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/modules/mod_log/mod_log.h?rev=580276&r1=580275&r2=580276&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/modules/mod_log/mod_log.h (original)
+++ webservices/axis2/trunk/c/src/modules/mod_log/mod_log.h 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
@@ -30,18 +31,20 @@
{
#endif
-AXIS2_EXTERN axis2_handler_t* AXIS2_CALL
-axutil_log_in_handler_create(const axutil_env_t *env,
- axutil_string_t *name);
-
-AXIS2_EXTERN axis2_handler_t* AXIS2_CALL
-axutil_log_out_handler_create(const axutil_env_t *env,
- axutil_string_t *name);
-
-/** @} */
-
+ AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+ axutil_log_in_handler_create(
+ const axutil_env_t * env,
+ axutil_string_t * name);
+
+ AXIS2_EXTERN axis2_handler_t *AXIS2_CALL
+ axutil_log_out_handler_create(
+ const axutil_env_t * env,
+ axutil_string_t * name);
+
+ /** @} */
+
#ifdef __cplusplus
}
#endif
-#endif /* AXIS2_MOD_LOG_H */
+#endif /* AXIS2_MOD_LOG_H */
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org