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/04/10 16:49:17 UTC
svn commit: r527148 - in /webservices/axis2/trunk/c: modules/mod_log/
xdocs/docs/mod_log/
Author: samisa
Date: Tue Apr 10 07:49:16 2007
New Revision: 527148
URL: http://svn.apache.org/viewvc?view=rev&rev=527148
Log:
Improved logging handler sample and added html code
Added:
webservices/axis2/trunk/c/xdocs/docs/mod_log/
webservices/axis2/trunk/c/xdocs/docs/mod_log/log_in_handler.c.html
webservices/axis2/trunk/c/xdocs/docs/mod_log/log_out_handler.c.html
webservices/axis2/trunk/c/xdocs/docs/mod_log/mod_log.c.html
Modified:
webservices/axis2/trunk/c/modules/mod_log/log_in_handler.c
webservices/axis2/trunk/c/modules/mod_log/log_out_handler.c
webservices/axis2/trunk/c/modules/mod_log/mod_log.c
Modified: webservices/axis2/trunk/c/modules/mod_log/log_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/mod_log/log_in_handler.c?view=diff&rev=527148&r1=527147&r2=527148
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_log/log_in_handler.c (original)
+++ webservices/axis2/trunk/c/modules/mod_log/log_in_handler.c Tue Apr 10 07:49:16 2007
@@ -15,10 +15,6 @@
* limitations under the License.
*/
-/*
-#include <axis2_addr_mod.h>
-#include <axis2_addr.h>
-*/
#include <axis2_handler_desc.h>
#include <axutil_array_list.h>
#include <axiom_soap_const.h>
@@ -33,12 +29,12 @@
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);
+ 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)
+ axutil_string_t *name)
{
axis2_handler_t *handler = NULL;
@@ -50,8 +46,6 @@
return NULL;
}
- /* handler init is handled by conf loading, so no need to do it here */
-
axis2_handler_set_invoke(handler, env, axutil_log_in_handler_invoke);
return handler;
@@ -60,8 +54,8 @@
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)
+ const axutil_env_t *env,
+ struct axis2_msg_ctx *msg_ctx)
{
axiom_soap_envelope_t *soap_envelope = NULL;
axiom_node_t *ret_node = NULL;
@@ -75,7 +69,8 @@
if (soap_envelope)
{
- axiom_soap_envelope_get_body(soap_envelope, env); /* hack to ensure soab buider state is in sync */
+ /* ensure SOAP buider state is in sync */
+ axiom_soap_envelope_get_body(soap_envelope, env);
ret_node = axiom_soap_envelope_get_base_node(soap_envelope, env);
if(ret_node)
@@ -84,10 +79,12 @@
om_str = axiom_node_to_string(ret_node, env);
if(om_str)
{
- AXIS2_LOG_INFO(env->log, "Input msg: %s", om_str);
+ AXIS2_LOG_INFO(env->log, "Input message: %s", om_str);
}
}
}
return AXIS2_SUCCESS;
}
+
+
Modified: webservices/axis2/trunk/c/modules/mod_log/log_out_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/mod_log/log_out_handler.c?view=diff&rev=527148&r1=527147&r2=527148
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_log/log_out_handler.c (original)
+++ webservices/axis2/trunk/c/modules/mod_log/log_out_handler.c Tue Apr 10 07:49:16 2007
@@ -15,10 +15,6 @@
* limitations under the License.
*/
-/*
-#include <axis2_addr_mod.h>
-#include <axis2_addr.h>
-*/
#include <axis2_handler_desc.h>
#include <axutil_array_list.h>
#include <axiom_soap_const.h>
@@ -33,12 +29,12 @@
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);
+ 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)
+ axutil_string_t *name)
{
axis2_handler_t *handler = NULL;
@@ -50,8 +46,6 @@
return NULL;
}
- /* handler init is handled by conf loading, so no need to do it here */
-
axis2_handler_set_invoke(handler, env, axutil_log_out_handler_invoke);
return handler;
@@ -60,8 +54,8 @@
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)
+ const axutil_env_t *env,
+ struct axis2_msg_ctx *msg_ctx)
{
axiom_soap_envelope_t *soap_envelope = NULL;
axiom_node_t *ret_node = NULL;
@@ -83,10 +77,12 @@
om_str = axiom_node_to_string(ret_node, env);
if(om_str)
{
- AXIS2_LOG_INFO(env->log, "Output msg: %s", om_str);
+ AXIS2_LOG_INFO(env->log, "Output message: %s", om_str);
}
}
}
return AXIS2_SUCCESS;
}
+
+
Modified: webservices/axis2/trunk/c/modules/mod_log/mod_log.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/mod_log/mod_log.c?view=diff&rev=527148&r1=527147&r2=527148
==============================================================================
--- webservices/axis2/trunk/c/modules/mod_log/mod_log.c (original)
+++ webservices/axis2/trunk/c/modules/mod_log/mod_log.c Tue Apr 10 07:49:16 2007
@@ -21,19 +21,22 @@
axis2_status_t AXIS2_CALL
axis2_mod_log_shutdown(axis2_module_t *module,
- const axutil_env_t *env);
+ 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_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);
+ const axutil_env_t *env);
+/**
+ * Module operations struct variable with functions assigned to members
+ */
static const axis2_module_ops_t log_module_ops_var = {
axis2_mod_log_init,
axis2_mod_log_shutdown,
@@ -47,6 +50,7 @@
module = AXIS2_MALLOC(env->allocator,
sizeof(axis2_module_t));
+ /* initialize operations */
module->ops = &log_module_ops_var;
return module;
@@ -59,7 +63,7 @@
axis2_conf_ctx_t *conf_ctx,
axis2_module_desc_t *module_desc)
{
- /* Any initialization stuff of mod_log goes here */
+ /* Any initialization stuff related to this module can be here */
return AXIS2_SUCCESS;
}
@@ -69,17 +73,12 @@
{
if(module->handler_create_func_map)
{
- /* TODO
- * do the neccessary clean in hash map
- */
axutil_hash_free(module->handler_create_func_map, env);
- module->handler_create_func_map = NULL;
}
if(module)
{
AXIS2_FREE(env->allocator, module);
- module = NULL;
}
return AXIS2_SUCCESS;
}
@@ -97,10 +96,12 @@
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);
-
+ /* add out handler */
axutil_hash_set(module->handler_create_func_map, "LoggingOutHandler",
AXIS2_HASH_KEY_STRING, axutil_log_out_handler_create);
@@ -108,7 +109,8 @@
}
/**
- * Following block distinguish the exposed part of the dll.
+ * Following functions are expected to be there in the module lib
+ * that helps to create and remove module instances
*/
AXIS2_EXPORT int
@@ -135,3 +137,5 @@
}
return status;
}
+
+
Added: webservices/axis2/trunk/c/xdocs/docs/mod_log/log_in_handler.c.html
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xdocs/docs/mod_log/log_in_handler.c.html?view=auto&rev=527148
==============================================================================
--- webservices/axis2/trunk/c/xdocs/docs/mod_log/log_in_handler.c.html (added)
+++ webservices/axis2/trunk/c/xdocs/docs/mod_log/log_in_handler.c.html Tue Apr 10 07:49:16 2007
@@ -0,0 +1,104 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>modules/mod_log/log_in_handler.c</title>
+ <meta name="generator" content="c2html 1.1.0" >
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" >
+ <meta http-equiv="Content-Script-Type" content="text/javascript" >
+ <meta http-equiv="Content-Style-Type" content="text/css" >
+ </head>
+ <body text="#000000">
+ <font face="Monospace">
+<font color="#808080"><i>/*<br>
+ * Licensed to the Apache Software Foundation (ASF) under one or more<br>
+ * contributor license agreements. See the NOTICE file distributed with<br>
+ * this work for additional information regarding copyright ownership.<br>
+ * The ASF licenses this file to You under the Apache License, Version 2.0<br>
+ * (the "License"); you may not use this file except in compliance with<br>
+ * the License. You may obtain a copy of the License at<br>
+ *<br>
+ * http://www.apache.org/licenses/LICENSE-2.0<br>
+ *<br>
+ * Unless required by applicable law or agreed to in writing, software<br>
+ * distributed under the License is distributed on an "AS IS" BASIS,<br>
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br>
+ * See the License for the specific language governing permissions and<br>
+ * limitations under the License.<br>
+ */</i></font><br>
+<br>
+<font color="#008000">#include <axis2_handler_desc.h><br></font>
+<font color="#008000">#include <axutil_array_list.h><br></font>
+<font color="#008000">#include <axiom_soap_const.h><br></font>
+<font color="#008000">#include <axiom_soap_envelope.h><br></font>
+<font color="#008000">#include <axiom_soap_header.h><br></font>
+<font color="#008000">#include <axiom_soap_header_block.h><br></font>
+<font color="#008000">#include <axis2_op.h><br></font>
+<font color="#008000">#include <axis2_msg_ctx.h><br></font>
+<font color="#008000">#include <axis2_conf_ctx.h><br></font>
+<font color="#008000">#include <axis2_msg_info_headers.h><br></font>
+<font color="#008000">#include <axutil_property.h><br></font>
+<br>
+<font color="#000000">axis2_status_t</font> <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axutil_log_in_handler_invoke</font>(<font color="#000000"><b>struct</b></font> <font color="#000000">axis2_handler</font> *<font color="#000000">handler</font>, <br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>,<br>
+ <font color="#000000"><b>struct</b></font> <font color="#000000">axis2_msg_ctx</font> *<font color="#000000">msg_ctx</font>);<br>
+<br>
+<font color="#000000">AXIS2_EXTERN</font> <font color="#000000">axis2_handler_t</font>* <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axutil_log_in_handler_create</font>(<font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>, <br>
+ <font color="#000000">axutil_string_t</font> *<font color="#000000">name</font>) <br>
+{<br>
+ <font color="#000000">axis2_handler_t</font> *<font color="#000000">handler</font> = <font color="#000000">NULL</font>;<br>
+ <br>
+ <font color="#000000">AXIS2_ENV_CHECK</font>(<font color="#000000">env</font>, <font color="#000000">NULL</font>);<br>
+ <br>
+ <font color="#000000">handler</font> = <font color="#000000">axis2_handler_create</font>(<font color="#000000">env</font>);<br>
+ <font color="#000000"><b>if</b></font> (!<font color="#000000">handler</font>)<br>
+ {<br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">NULL</font>;<br>
+ }<br>
+ <br>
+ <font color="#000000">axis2_handler_set_invoke</font>(<font color="#000000">handler</font>, <font color="#000000">env</font>, <font color="#000000">axutil_log_in_handler_invoke</font>);<br>
+<br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">handler</font>;<br>
+}<br>
+<br>
+<br>
+<font color="#000000">axis2_status_t</font> <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axutil_log_in_handler_invoke</font>(<font color="#000000"><b>struct</b></font> <font color="#000000">axis2_handler</font> *<font color="#000000">handler</font>, <br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>,<br>
+ <font color="#000000"><b>struct</b></font> <font color="#000000">axis2_msg_ctx</font> *<font color="#000000">msg_ctx</font>)<br>
+{<br>
+ <font color="#000000">axiom_soap_envelope_t</font> *<font color="#000000">soap_envelope</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axiom_node_t</font> *<font color="#000000">ret_node</font> = <font color="#000000">NULL</font>;<br>
+<br>
+ <font color="#000000">AXIS2_ENV_CHECK</font>( <font color="#000000">env</font>, <font color="#000000">AXIS2_FAILURE</font>);<br>
+ <font color="#000000">AXIS2_PARAM_CHECK</font>(<font color="#000000">env</font>-><font color="#000000">error</font>, <font color="#000000">msg_ctx</font>, <font color="#000000">AXIS2_FAILURE</font>);<br>
+ <br>
+ <font color="#000000">AXIS2_LOG_INFO</font>(<font color="#000000">env</font>-><font color="#000000">log</font>, <font color="#FF0000">"Starting logging in handler ........."</font>);<br>
+ <br>
+ <font color="#000000">soap_envelope</font> = <font color="#000000">axis2_msg_ctx_get_soap_envelope</font>(<font color="#000000">msg_ctx</font>, <font color="#000000">env</font>);<br>
+ <br>
+ <font color="#000000"><b>if</b></font> (<font color="#000000">soap_envelope</font>)<br>
+ {<br>
+ <font color="#808080"><i>/* ensure SOAP buider state is in sync */</i></font><br>
+ <font color="#000000">axiom_soap_envelope_get_body</font>(<font color="#000000">soap_envelope</font>, <font color="#000000">env</font>); <br>
+ <font color="#000000">ret_node</font> = <font color="#000000">axiom_soap_envelope_get_base_node</font>(<font color="#000000">soap_envelope</font>, <font color="#000000">env</font>);<br>
+<br>
+ <font color="#000000"><b>if</b></font>(<font color="#000000">ret_node</font>)<br>
+ {<br>
+ <font color="#000000">axis2_char_t</font> *<font color="#000000">om_str</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">om_str</font> = <font color="#000000">axiom_node_to_string</font>(<font color="#000000">ret_node</font>, <font color="#000000">env</font>);<br>
+ <font color="#000000"><b>if</b></font>(<font color="#000000">om_str</font>)<br>
+ {<br>
+ <font color="#000000">AXIS2_LOG_INFO</font>(<font color="#000000">env</font>-><font color="#000000">log</font>, <font color="#FF0000">"Input message: %s"</font>, <font color="#000000">om_str</font>);<br>
+ }<br>
+ }<br>
+ }<br>
+ <br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">AXIS2_SUCCESS</font>;<br>
+}<br>
+<br>
+<br>
+ </font>
+ </body>
+</html>
Added: webservices/axis2/trunk/c/xdocs/docs/mod_log/log_out_handler.c.html
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xdocs/docs/mod_log/log_out_handler.c.html?view=auto&rev=527148
==============================================================================
--- webservices/axis2/trunk/c/xdocs/docs/mod_log/log_out_handler.c.html (added)
+++ webservices/axis2/trunk/c/xdocs/docs/mod_log/log_out_handler.c.html Tue Apr 10 07:49:16 2007
@@ -0,0 +1,102 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>modules/mod_log/log_out_handler.c</title>
+ <meta name="generator" content="c2html 1.1.0" >
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" >
+ <meta http-equiv="Content-Script-Type" content="text/javascript" >
+ <meta http-equiv="Content-Style-Type" content="text/css" >
+ </head>
+ <body text="#000000">
+ <font face="Monospace">
+<font color="#808080"><i>/*<br>
+ * Licensed to the Apache Software Foundation (ASF) under one or more<br>
+ * contributor license agreements. See the NOTICE file distributed with<br>
+ * this work for additional information regarding copyright ownership.<br>
+ * The ASF licenses this file to You under the Apache License, Version 2.0<br>
+ * (the "License"); you may not use this file except in compliance with<br>
+ * the License. You may obtain a copy of the License at<br>
+ *<br>
+ * http://www.apache.org/licenses/LICENSE-2.0<br>
+ *<br>
+ * Unless required by applicable law or agreed to in writing, software<br>
+ * distributed under the License is distributed on an "AS IS" BASIS,<br>
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br>
+ * See the License for the specific language governing permissions and<br>
+ * limitations under the License.<br>
+ */</i></font><br>
+<br>
+<font color="#008000">#include <axis2_handler_desc.h><br></font>
+<font color="#008000">#include <axutil_array_list.h><br></font>
+<font color="#008000">#include <axiom_soap_const.h><br></font>
+<font color="#008000">#include <axiom_soap_envelope.h><br></font>
+<font color="#008000">#include <axiom_soap_header.h><br></font>
+<font color="#008000">#include <axiom_soap_header_block.h><br></font>
+<font color="#008000">#include <axis2_op.h><br></font>
+<font color="#008000">#include <axis2_msg_ctx.h><br></font>
+<font color="#008000">#include <axis2_conf_ctx.h><br></font>
+<font color="#008000">#include <axis2_msg_info_headers.h><br></font>
+<font color="#008000">#include <axutil_property.h><br></font>
+<br>
+<font color="#000000">axis2_status_t</font> <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axutil_log_out_handler_invoke</font>(<font color="#000000"><b>struct</b></font> <font color="#000000">axis2_handler</font> *<font color="#000000">handler</font>, <br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>,<br>
+ <font color="#000000"><b>struct</b></font> <font color="#000000">axis2_msg_ctx</font> *<font color="#000000">msg_ctx</font>);<br>
+<br>
+<font color="#000000">AXIS2_EXTERN</font> <font color="#000000">axis2_handler_t</font>* <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axutil_log_out_handler_create</font>(<font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>, <br>
+ <font color="#000000">axutil_string_t</font> *<font color="#000000">name</font>) <br>
+{<br>
+ <font color="#000000">axis2_handler_t</font> *<font color="#000000">handler</font> = <font color="#000000">NULL</font>;<br>
+ <br>
+ <font color="#000000">AXIS2_ENV_CHECK</font>(<font color="#000000">env</font>, <font color="#000000">NULL</font>);<br>
+ <br>
+ <font color="#000000">handler</font> = <font color="#000000">axis2_handler_create</font>(<font color="#000000">env</font>);<br>
+ <font color="#000000"><b>if</b></font> (!<font color="#000000">handler</font>)<br>
+ {<br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">NULL</font>;<br>
+ }<br>
+ <br>
+ <font color="#000000">axis2_handler_set_invoke</font>(<font color="#000000">handler</font>, <font color="#000000">env</font>, <font color="#000000">axutil_log_out_handler_invoke</font>);<br>
+<br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">handler</font>;<br>
+}<br>
+<br>
+<br>
+<font color="#000000">axis2_status_t</font> <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axutil_log_out_handler_invoke</font>(<font color="#000000"><b>struct</b></font> <font color="#000000">axis2_handler</font> *<font color="#000000">handler</font>, <br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>,<br>
+ <font color="#000000"><b>struct</b></font> <font color="#000000">axis2_msg_ctx</font> *<font color="#000000">msg_ctx</font>)<br>
+{<br>
+ <font color="#000000">axiom_soap_envelope_t</font> *<font color="#000000">soap_envelope</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">axiom_node_t</font> *<font color="#000000">ret_node</font> = <font color="#000000">NULL</font>;<br>
+<br>
+ <font color="#000000">AXIS2_ENV_CHECK</font>( <font color="#000000">env</font>, <font color="#000000">AXIS2_FAILURE</font>);<br>
+ <font color="#000000">AXIS2_PARAM_CHECK</font>(<font color="#000000">env</font>-><font color="#000000">error</font>, <font color="#000000">msg_ctx</font>, <font color="#000000">AXIS2_FAILURE</font>);<br>
+ <br>
+ <font color="#000000">AXIS2_LOG_INFO</font>(<font color="#000000">env</font>-><font color="#000000">log</font>, <font color="#FF0000">"Starting logging out handler ........."</font>);<br>
+ <br>
+ <font color="#000000">soap_envelope</font> = <font color="#000000">axis2_msg_ctx_get_soap_envelope</font>(<font color="#000000">msg_ctx</font>, <font color="#000000">env</font>);<br>
+ <br>
+ <font color="#000000"><b>if</b></font> (<font color="#000000">soap_envelope</font>)<br>
+ {<br>
+ <font color="#000000">ret_node</font> = <font color="#000000">axiom_soap_envelope_get_base_node</font>(<font color="#000000">soap_envelope</font>, <font color="#000000">env</font>);<br>
+<br>
+ <font color="#000000"><b>if</b></font>(<font color="#000000">ret_node</font>)<br>
+ {<br>
+ <font color="#000000">axis2_char_t</font> *<font color="#000000">om_str</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">om_str</font> = <font color="#000000">axiom_node_to_string</font>(<font color="#000000">ret_node</font>, <font color="#000000">env</font>);<br>
+ <font color="#000000"><b>if</b></font>(<font color="#000000">om_str</font>)<br>
+ {<br>
+ <font color="#000000">AXIS2_LOG_INFO</font>(<font color="#000000">env</font>-><font color="#000000">log</font>, <font color="#FF0000">"Output message: %s"</font>, <font color="#000000">om_str</font>);<br>
+ }<br>
+ }<br>
+ }<br>
+ <br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">AXIS2_SUCCESS</font>;<br>
+}<br>
+<br>
+<br>
+ </font>
+ </body>
+</html>
Added: webservices/axis2/trunk/c/xdocs/docs/mod_log/mod_log.c.html
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/xdocs/docs/mod_log/mod_log.c.html?view=auto&rev=527148
==============================================================================
--- webservices/axis2/trunk/c/xdocs/docs/mod_log/mod_log.c.html (added)
+++ webservices/axis2/trunk/c/xdocs/docs/mod_log/mod_log.c.html Tue Apr 10 07:49:16 2007
@@ -0,0 +1,155 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>modules/mod_log/mod_log.c</title>
+ <meta name="generator" content="c2html 1.1.0" >
+ <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" >
+ <meta http-equiv="Content-Script-Type" content="text/javascript" >
+ <meta http-equiv="Content-Style-Type" content="text/css" >
+ </head>
+ <body text="#000000">
+ <font face="Monospace">
+<font color="#808080"><i>/*<br>
+ * Licensed to the Apache Software Foundation (ASF) under one or more<br>
+ * contributor license agreements. See the NOTICE file distributed with<br>
+ * this work for additional information regarding copyright ownership.<br>
+ * The ASF licenses this file to You under the Apache License, Version 2.0<br>
+ * (the "License"); you may not use this file except in compliance with<br>
+ * the License. You may obtain a copy of the License at<br>
+ *<br>
+ * http://www.apache.org/licenses/LICENSE-2.0<br>
+ *<br>
+ * Unless required by applicable law or agreed to in writing, software<br>
+ * distributed under the License is distributed on an "AS IS" BASIS,<br>
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br>
+ * See the License for the specific language governing permissions and<br>
+ * limitations under the License.<br>
+ */</i></font><br>
+<font color="#008000">#include <axis2_module.h><br></font>
+<font color="#008000">#include <axis2_conf_ctx.h><br></font>
+<br>
+<font color="#008000">#include "mod_log.h"<br></font>
+<br>
+<font color="#000000">axis2_status_t</font> <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axis2_mod_log_shutdown</font>(<font color="#000000">axis2_module_t</font> *<font color="#000000">module</font>,<br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>);<br>
+<br>
+<font color="#000000">axis2_status_t</font> <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axis2_mod_log_init</font>(<br>
+ <font color="#000000">axis2_module_t</font> *<font color="#000000">module</font>,<br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>,<br>
+ <font color="#000000">axis2_conf_ctx_t</font> *<font color="#000000">conf_ctx</font>,<br>
+ <font color="#000000">axis2_module_desc_t</font> *<font color="#000000">module_desc</font>);<br>
+<br>
+<font color="#000000">axis2_status_t</font> <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axis2_mod_log_fill_handler_create_func_map</font>(<font color="#000000">axis2_module_t</font> *<font color="#000000">module</font>,<br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>);<br>
+<br>
+<font color="#808080"><i>/**<br>
+ * Module operations struct variable with functions assigned to members<br>
+ */</i></font><br>
+<font color="#800000">static</font> <font color="#800000">const</font> <font color="#000000">axis2_module_ops_t</font> <font color="#000000">log_module_ops_var</font> = {<br>
+ <font color="#000000">axis2_mod_log_init</font>,<br>
+ <font color="#000000">axis2_mod_log_shutdown</font>,<br>
+ <font color="#000000">axis2_mod_log_fill_handler_create_func_map</font><br>
+};<br>
+<br>
+<font color="#000000">axis2_module_t</font> *<br>
+<font color="#000000">axis2_mod_log_create</font>(<font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>)<br>
+{<br>
+ <font color="#000000">axis2_module_t</font> *<font color="#000000">module</font> = <font color="#000000">NULL</font>;<br>
+ <font color="#000000">module</font> = <font color="#000000">AXIS2_MALLOC</font>(<font color="#000000">env</font>-><font color="#000000">allocator</font>, <br>
+ <font color="#000000"><b>sizeof</b></font>(<font color="#000000">axis2_module_t</font>));<br>
+<br>
+ <font color="#808080"><i>/* initialize operations */</i></font><br>
+ <font color="#000000">module</font>-><font color="#000000">ops</font> = &<font color="#000000">log_module_ops_var</font>;<br>
+<br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">module</font>;<br>
+}<br>
+<br>
+<font color="#000000">axis2_status_t</font> <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axis2_mod_log_init</font>(<br>
+ <font color="#000000">axis2_module_t</font> *<font color="#000000">module</font>,<br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>,<br>
+ <font color="#000000">axis2_conf_ctx_t</font> *<font color="#000000">conf_ctx</font>,<br>
+ <font color="#000000">axis2_module_desc_t</font> *<font color="#000000">module_desc</font>)<br>
+{<br>
+ <font color="#808080"><i>/* Any initialization stuff related to this module can be here */</i></font><br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">AXIS2_SUCCESS</font>;<br>
+}<br>
+<br>
+<font color="#000000">axis2_status_t</font> <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axis2_mod_log_shutdown</font>(<font color="#000000">axis2_module_t</font> *<font color="#000000">module</font>,<br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>)<br>
+{<br>
+ <font color="#000000"><b>if</b></font>(<font color="#000000">module</font>-><font color="#000000">handler_create_func_map</font>)<br>
+ {<br>
+ <font color="#000000">axutil_hash_free</font>(<font color="#000000">module</font>-><font color="#000000">handler_create_func_map</font>, <font color="#000000">env</font>);<br>
+ }<br>
+ <br>
+ <font color="#000000"><b>if</b></font>(<font color="#000000">module</font>)<br>
+ {<br>
+ <font color="#000000">AXIS2_FREE</font>(<font color="#000000">env</font>-><font color="#000000">allocator</font>, <font color="#000000">module</font>);<br>
+ }<br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">AXIS2_SUCCESS</font>; <br>
+}<br>
+<br>
+<font color="#000000">axis2_status_t</font> <font color="#000000">AXIS2_CALL</font><br>
+<font color="#000000">axis2_mod_log_fill_handler_create_func_map</font>(<font color="#000000">axis2_module_t</font> *<font color="#000000">module</font>,<br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>)<br>
+{<br>
+ <font color="#000000">AXIS2_ENV_CHECK</font>(<font color="#000000">env</font>, <font color="#000000">AXIS2_FAILURE</font>);<br>
+ <br>
+ <font color="#000000">module</font>-><font color="#000000">handler_create_func_map</font> = <font color="#000000">axutil_hash_make</font>(<font color="#000000">env</font>);<br>
+ <font color="#000000"><b>if</b></font>(!<font color="#000000">module</font>-><font color="#000000">handler_create_func_map</font>)<br>
+ {<br>
+ <font color="#000000">AXIS2_ERROR_SET</font>(<font color="#000000">env</font>-><font color="#000000">error</font>, <font color="#000000">AXIS2_ERROR_NO_MEMORY</font>, <br>
+ <font color="#000000">AXIS2_FAILURE</font>);<br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">AXIS2_FAILURE</font>;<br>
+ }<br>
+<br>
+ <font color="#808080"><i>/* add in handler */</i></font><br>
+ <font color="#000000">axutil_hash_set</font>(<font color="#000000">module</font>-><font color="#000000">handler_create_func_map</font>, <font color="#FF0000">"LoggingInHandler"</font>, <br>
+ <font color="#000000">AXIS2_HASH_KEY_STRING</font>, <font color="#000000">axutil_log_in_handler_create</font>);<br>
+<br>
+ <font color="#808080"><i>/* add out handler */</i></font><br>
+ <font color="#000000">axutil_hash_set</font>(<font color="#000000">module</font>-><font color="#000000">handler_create_func_map</font>, <font color="#FF0000">"LoggingOutHandler"</font>, <br>
+ <font color="#000000">AXIS2_HASH_KEY_STRING</font>, <font color="#000000">axutil_log_out_handler_create</font>);<br>
+ <br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">AXIS2_SUCCESS</font>;<br>
+}<br>
+<br>
+<font color="#808080"><i>/**<br>
+ * Following functions are expected to be there in the module lib <br>
+ * that helps to create and remove module instances <br>
+ */</i></font><br>
+<br>
+<font color="#000000">AXIS2_EXPORT</font> <font color="#800000">int</font> <br>
+<font color="#000000">axis2_get_instance</font>(<font color="#000000">axis2_module_t</font> **<font color="#000000">inst</font>,<br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>)<br>
+{<br>
+ *<font color="#000000">inst</font> = <font color="#000000">axis2_mod_log_create</font>(<font color="#000000">env</font>);<br>
+ <font color="#000000"><b>if</b></font>(!(*<font color="#000000">inst</font>))<br>
+ {<br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">AXIS2_FAILURE</font>;<br>
+ }<br>
+<br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">AXIS2_SUCCESS</font>;<br>
+}<br>
+<br>
+<font color="#000000">AXIS2_EXPORT</font> <font color="#800000">int</font> <br>
+<font color="#000000">axis2_remove_instance</font>(<font color="#000000">axis2_module_t</font> *<font color="#000000">inst</font>,<br>
+ <font color="#800000">const</font> <font color="#000000">axutil_env_t</font> *<font color="#000000">env</font>)<br>
+{<br>
+ <font color="#000000">axis2_status_t</font> <font color="#000000">status</font> = <font color="#000000">AXIS2_FAILURE</font>;<br>
+ <font color="#000000"><b>if</b></font> (<font color="#000000">inst</font>)<br>
+ {<br>
+ <font color="#000000">status</font> = <font color="#000000">axis2_mod_log_shutdown</font>(<font color="#000000">inst</font>, <font color="#000000">env</font>);<br>
+ }<br>
+ <font color="#000000"><b>return</b></font> <font color="#000000">status</font>;<br>
+}<br>
+<br>
+<br>
+ </font>
+ </body>
+</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org