You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2008/04/03 10:26:41 UTC
svn commit: r644219 - in /webservices/axis2/trunk/c: include/ src/core/addr/
src/core/engine/
Author: damitha
Date: Thu Apr 3 01:26:40 2008
New Revision: 644219
URL: http://svn.apache.org/viewvc?rev=644219&view=rev
Log:
Coding comments, coding conventions and meaningful log messages
Modified:
webservices/axis2/trunk/c/include/axis2_op.h
webservices/axis2/trunk/c/src/core/addr/msg_info_headers.c
webservices/axis2/trunk/c/src/core/addr/svc_name.c
webservices/axis2/trunk/c/src/core/engine/addr_disp.c
webservices/axis2/trunk/c/src/core/engine/ctx_handler.c
webservices/axis2/trunk/c/src/core/engine/disp.c
webservices/axis2/trunk/c/src/core/engine/disp_checker.c
webservices/axis2/trunk/c/src/core/engine/handler.c
webservices/axis2/trunk/c/src/core/engine/req_uri_disp.c
webservices/axis2/trunk/c/src/core/engine/rest_disp.c
webservices/axis2/trunk/c/src/core/engine/soap_action_disp.c
webservices/axis2/trunk/c/src/core/engine/soap_body_disp.c
Modified: webservices/axis2/trunk/c/include/axis2_op.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_op.h?rev=644219&r1=644218&r2=644219&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_op.h (original)
+++ webservices/axis2/trunk/c/include/axis2_op.h Thu Apr 3 01:26:40 2008
@@ -236,8 +236,7 @@
/**
* Sets operation QName.
- * @param op pointer to operation as a void pointer, as this would be
- * assigned to get_qname() method of base WSDL operation
+ * @param op pointer to operation as a void pointer.
* @param env pointer to environment struct
* @param qname pointer to QName, this method creates a clone of the
* QName
Modified: webservices/axis2/trunk/c/src/core/addr/msg_info_headers.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/addr/msg_info_headers.c?rev=644219&r1=644218&r2=644219&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/addr/msg_info_headers.c (original)
+++ webservices/axis2/trunk/c/src/core/addr/msg_info_headers.c Thu Apr 3 01:26:40 2008
@@ -69,8 +69,6 @@
{
axis2_msg_info_headers_t *msg_info_headers = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
msg_info_headers =
AXIS2_MALLOC(env->allocator, sizeof(axis2_msg_info_headers_t));
@@ -131,8 +129,6 @@
const axutil_env_t * env,
axis2_endpoint_ref_t * to)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
if (msg_info_headers->to && to) /* if the incoming to is NULL,
we consider that to be a reset,
so don't free */
@@ -158,7 +154,6 @@
const axutil_env_t * env,
axis2_endpoint_ref_t * from)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_info_headers->from = from;
return AXIS2_SUCCESS;
}
@@ -177,7 +172,6 @@
const axutil_env_t * env,
axis2_endpoint_ref_t * reply_to)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_info_headers->reply_to = reply_to;
return AXIS2_SUCCESS;
}
@@ -196,7 +190,6 @@
const axutil_env_t * env,
axis2_endpoint_ref_t * fault_to)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_info_headers->fault_to = fault_to;
return AXIS2_SUCCESS;
}
@@ -215,7 +208,6 @@
const axutil_env_t * env,
const axis2_char_t * action)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
if (msg_info_headers->action)
{
AXIS2_FREE(env->allocator, msg_info_headers->action);
@@ -242,8 +234,6 @@
const axutil_env_t * env,
const axis2_char_t * message_id)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
if (msg_info_headers->message_id)
{
AXIS2_FREE(env->allocator, msg_info_headers->message_id);
@@ -277,7 +267,6 @@
const axutil_env_t * env,
axis2_relates_to_t * relates_to)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_info_headers->relates_to = relates_to;
return AXIS2_SUCCESS;
}
@@ -296,8 +285,6 @@
const axutil_env_t * env,
axiom_node_t * ref_param)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
if (!(msg_info_headers->ref_params))
{
msg_info_headers->ref_params = axutil_array_list_create(env, 10);
@@ -319,8 +306,6 @@
struct axis2_msg_info_headers *msg_info_headers,
const axutil_env_t * env)
{
- AXIS2_ENV_CHECK(env, void);
-
if (msg_info_headers->to)
{
axis2_endpoint_ref_free(msg_info_headers->to, env);
@@ -367,7 +352,6 @@
const axutil_env_t * env,
const axis2_bool_t none)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_info_headers->reply_to_none = none;
return AXIS2_SUCCESS;
}
@@ -386,7 +370,6 @@
const axutil_env_t * env,
const axis2_bool_t anonymous)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_info_headers->reply_to_anonymous = anonymous;
return AXIS2_SUCCESS;
}
@@ -424,7 +407,6 @@
const axutil_env_t * env,
const axis2_bool_t anonymous)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
msg_info_headers->fault_to_anonymous = anonymous;
return AXIS2_SUCCESS;
}
@@ -436,3 +418,4 @@
{
return msg_info_headers->fault_to_anonymous;
}
+
Modified: webservices/axis2/trunk/c/src/core/addr/svc_name.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/addr/svc_name.c?rev=644219&r1=644218&r2=644219&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/addr/svc_name.c (original)
+++ webservices/axis2/trunk/c/src/core/addr/svc_name.c Thu Apr 3 01:26:40 2008
@@ -37,8 +37,6 @@
{
axis2_svc_name_t *svc_name = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
svc_name = AXIS2_MALLOC(env->allocator, sizeof(axis2_svc_name_t));
if (!svc_name)
{
@@ -88,8 +86,6 @@
const axutil_env_t * env,
const axutil_qname_t * qname)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
if (svc_name->qname)
{
axutil_qname_free(svc_name->qname, env);
@@ -119,8 +115,6 @@
const axutil_env_t * env,
const axis2_char_t * endpoint_name)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
if (svc_name->endpoint_name)
{
AXIS2_FREE(env->allocator, svc_name->endpoint_name);
@@ -141,8 +135,6 @@
struct axis2_svc_name *svc_name,
const axutil_env_t * env)
{
- AXIS2_ENV_CHECK(env, void);
-
if (svc_name->qname)
{
axutil_qname_free(svc_name->qname, env);
@@ -157,3 +149,4 @@
return;
}
+
Modified: webservices/axis2/trunk/c/src/core/engine/addr_disp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/addr_disp.c?rev=644219&r1=644218&r2=644219&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/addr_disp.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/addr_disp.c Thu Apr 3 01:26:40 2008
@@ -50,8 +50,6 @@
axis2_handler_t *handler = NULL;
axutil_string_t *name = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
name =
axutil_string_create_const(env,
(axis2_char_t **) & AXIS2_ADDR_DISP_NAME);
@@ -93,8 +91,6 @@
axis2_endpoint_ref_t *endpoint_ref = NULL;
axis2_svc_t *svc = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
if (axis2_msg_ctx_get_doing_rest(msg_ctx, env))
return NULL;
@@ -202,8 +198,6 @@
{
axis2_relates_to_t *relates_to = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
relates_to = axis2_msg_ctx_get_relates_to(msg_ctx, env);
/** first check if we can dispatch using the relates_to */
@@ -270,3 +264,4 @@
return axis2_disp_find_svc_and_op(handler, env, msg_ctx);
}
+
Modified: webservices/axis2/trunk/c/src/core/engine/ctx_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/ctx_handler.c?rev=644219&r1=644218&r2=644219&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/ctx_handler.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/ctx_handler.c Thu Apr 3 01:26:40 2008
@@ -44,8 +44,6 @@
axis2_handler_desc_t *handler_desc = NULL;
axutil_string_t *handler_string = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
if (string)
{
handler_string = axutil_string_clone((axutil_string_t *) string, env);
@@ -164,8 +162,10 @@
op_ctx = axis2_op_ctx_create(env, op, NULL);
if (!op_ctx)
{
+ axis2_char_t *op_name =
+ axutil_qname_get_localpart(axis2_op_get_qname(op, env), env);
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "Operation context not found");
+ "Could not create Operation context for operatoin %s", op_name);
return AXIS2_FAILURE;
}
@@ -204,3 +204,4 @@
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "Exit:axis2_ctx_handler_invoke");
return AXIS2_SUCCESS;
}
+
Modified: webservices/axis2/trunk/c/src/core/engine/disp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/disp.c?rev=644219&r1=644218&r2=644219&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/disp.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/disp.c Thu Apr 3 01:26:40 2008
@@ -48,8 +48,6 @@
axis2_disp_t *disp = NULL;
axis2_handler_desc_t *handler_desc = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
disp = AXIS2_MALLOC(env->allocator, sizeof(axis2_disp_t));
if (!disp)
{
@@ -125,8 +123,6 @@
const axutil_env_t * env,
axutil_string_t * name)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
if (disp->name)
{
axutil_string_free(disp->name, env);
@@ -151,7 +147,6 @@
axis2_svc_t *axis_service = NULL;
axis2_op_t *op = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
axis_service = axis2_msg_ctx_get_svc(msg_ctx, env);
@@ -183,7 +178,6 @@
struct axis2_disp *disp,
const axutil_env_t * env)
{
- AXIS2_ENV_CHECK(env, void);
if (disp->name)
{
axutil_string_free(disp->name, env);
@@ -191,3 +185,4 @@
AXIS2_FREE(env->allocator, disp);
return;
}
+
Modified: webservices/axis2/trunk/c/src/core/engine/disp_checker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/disp_checker.c?rev=644219&r1=644218&r2=644219&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/disp_checker.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/disp_checker.c Thu Apr 3 01:26:40 2008
@@ -54,8 +54,6 @@
axis2_disp_checker_t *disp_checker = NULL;
axis2_handler_desc_t *handler_desc = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
disp_checker = AXIS2_MALLOC(env->allocator, sizeof(axis2_disp_checker_t));
if (!disp_checker)
{
@@ -120,8 +118,6 @@
const axutil_env_t * env,
const axutil_string_t * name)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
if (disp_checker->name)
{
axutil_string_free(disp_checker->name, env);
@@ -143,8 +139,6 @@
axis2_disp_checker_t * disp_checker,
const axutil_env_t * env)
{
- AXIS2_ENV_CHECK(env, void);
-
if (disp_checker->name)
{
axutil_string_free(disp_checker->name, env);
@@ -176,8 +170,6 @@
axis2_char_t exception[1024];
axis2_char_t *wsa_action;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
/*if is client side, no point in proceeding */
@@ -295,3 +287,4 @@
}
return AXIS2_SUCCESS;
}
+
Modified: webservices/axis2/trunk/c/src/core/engine/handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/handler.c?rev=644219&r1=644218&r2=644219&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/handler.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/handler.c Thu Apr 3 01:26:40 2008
@@ -49,8 +49,6 @@
{
axis2_handler_t *handler = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
handler = AXIS2_MALLOC(env->allocator, sizeof(axis2_handler_t));
if (!handler)
{
@@ -69,7 +67,6 @@
axis2_handler_t * handler,
const axutil_env_t * env)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_FREE(env->allocator, handler);
return;
}
@@ -79,8 +76,6 @@
const axis2_handler_t * handler,
const axutil_env_t * env)
{
- AXIS2_ENV_CHECK(env, NULL);
-
if (!(handler->handler_desc))
return NULL;
@@ -102,8 +97,6 @@
const axutil_env_t * env,
const axis2_char_t * name)
{
- AXIS2_ENV_CHECK(env, NULL);
-
if (!(handler->handler_desc))
return NULL;
@@ -116,7 +109,6 @@
const axutil_env_t * env,
axis2_handler_desc_t * handler_desc)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
handler->handler_desc = handler_desc;
axis2_handler_desc_set_handler(handler_desc, env, handler);
@@ -140,3 +132,4 @@
handler->invoke = func;
return AXIS2_SUCCESS;
}
+
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=644219&r1=644218&r2=644219&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 Thu Apr 3 01:26:40 2008
@@ -50,8 +50,6 @@
axis2_handler_t *handler = NULL;
axutil_string_t *name = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
name = axutil_string_create_const(env,
(axis2_char_t **) &
AXIS2_REQ_URI_DISP_NAME);
@@ -86,8 +84,6 @@
axis2_endpoint_ref_t *endpoint_ref = NULL;
axis2_svc_t *svc = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
if (axis2_msg_ctx_get_doing_rest(msg_ctx, env))
return NULL;
@@ -152,7 +148,6 @@
axis2_endpoint_ref_t *endpoint_ref = NULL;
axis2_op_t *op = NULL;
- AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, svc, NULL);
if (axis2_msg_ctx_get_doing_rest(msg_ctx, env))
@@ -207,9 +202,8 @@
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, axis2_req_uri_disp_find_svc);
axis2_msg_ctx_set_find_op(msg_ctx, env, axis2_req_uri_disp_find_op);
return axis2_disp_find_svc_and_op(handler, env, msg_ctx);
}
+
Modified: webservices/axis2/trunk/c/src/core/engine/rest_disp.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/engine/rest_disp.c?rev=644219&r1=644218&r2=644219&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/engine/rest_disp.c (original)
+++ webservices/axis2/trunk/c/src/core/engine/rest_disp.c Thu Apr 3 01:26:40 2008
@@ -63,8 +63,6 @@
axis2_handler_t *handler = NULL;
axutil_string_t *name = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
name = axutil_string_create_const(env,
(axis2_char_t **) &
AXIS2_REST_DISP_NAME);
@@ -99,8 +97,6 @@
axis2_endpoint_ref_t *endpoint_ref = NULL;
axis2_svc_t *svc = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
if (!axis2_msg_ctx_get_doing_rest(msg_ctx, env))
return NULL;
@@ -174,7 +170,6 @@
axis2_char_t ***params = NULL;
int i = 0;
- AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, svc, NULL);
if (!axis2_msg_ctx_get_doing_rest(msg_ctx, env))
@@ -339,8 +334,6 @@
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, axis2_rest_disp_find_svc);
axis2_msg_ctx_set_find_op(msg_ctx, env, axis2_rest_disp_find_op);
return axis2_disp_find_svc_and_op(handler, env, msg_ctx);
@@ -455,3 +448,4 @@
AXIS2_FREE (env->allocator, loc_str);
return NULL;
}
+
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=644219&r1=644218&r2=644219&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 Thu Apr 3 01:26:40 2008
@@ -51,8 +51,6 @@
axis2_handler_t *handler = NULL;
axutil_string_t *name = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
name = axutil_string_create_const(env,
(axis2_char_t **) &
AXIS2_SOAP_ACTION_DISP_NAME);
@@ -103,7 +101,6 @@
axutil_qname_t *name = NULL;
axis2_op_t *op = NULL;
- AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, svc, NULL);
if (axis2_msg_ctx_get_doing_rest(msg_ctx, env))
@@ -158,10 +155,9 @@
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, axis2_soap_action_disp_find_svc);
axis2_msg_ctx_set_find_op(msg_ctx, env, axis2_soap_action_disp_find_op);
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=644219&r1=644218&r2=644219&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 Thu Apr 3 01:26:40 2008
@@ -51,8 +51,6 @@
axis2_handler_t *handler = NULL;
axutil_string_t *name = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
name = axutil_string_create_const(env,
(axis2_char_t **) &
AXIS2_SOAP_MESSAGE_BODY_DISP_NAME);
@@ -87,8 +85,6 @@
axiom_soap_envelope_t *soap_envelope = NULL;
axis2_svc_t *svc = NULL;
- AXIS2_ENV_CHECK(env, NULL);
-
if (axis2_msg_ctx_get_doing_rest(msg_ctx, env))
return NULL;
@@ -162,10 +158,11 @@
[0]);
if (svc)
AXIS2_LOG_DEBUG(env->
- log,
- AXIS2_LOG_SI,
- "Service found \
-using SOAP message body's first child's namespace URI");
+ log, AXIS2_LOG_SI,
+ "Service found "\
+ "using SOAP message"\
+ "body's first "\
+ "child's namespace URI");
}
}
AXIS2_FREE(env->allocator,
@@ -196,7 +193,6 @@
axiom_soap_envelope_t *soap_envelope = NULL;
axis2_op_t *op = NULL;
- AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, svc, NULL);
if (axis2_msg_ctx_get_doing_rest(msg_ctx, env))
@@ -233,16 +229,17 @@
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);
if (op)
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Operation found using SOAP \
-message body's first child's local name");
+ "Operation found using SOAP message "\
+ "body's first child's local name");
}
}
@@ -260,8 +257,8 @@
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, axis2_soap_body_disp_find_svc);
axis2_msg_ctx_set_find_op(msg_ctx, env, axis2_soap_body_disp_find_op);
return axis2_disp_find_svc_and_op(handler, env, msg_ctx);
}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org