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 di...@apache.org on 2007/10/29 07:40:57 UTC

svn commit: r589520 [1/3] - in /webservices/axis2/trunk/c: samples/client/echo/echo.c src/core/deployment/conf_init.c src/core/transport/http/sender/http_sender.c src/core/transport/tcp/receiver/simple_tcp_svr_conn.c

Author: dinesh
Date: Sun Oct 28 23:40:52 2007
New Revision: 589520

URL: http://svn.apache.org/viewvc?rev=589520&view=rev
Log:
conf_init add some null checking and meaningful log messages

Modified:
    webservices/axis2/trunk/c/samples/client/echo/echo.c
    webservices/axis2/trunk/c/src/core/deployment/conf_init.c
    webservices/axis2/trunk/c/src/core/transport/http/sender/http_sender.c
    webservices/axis2/trunk/c/src/core/transport/tcp/receiver/simple_tcp_svr_conn.c

Modified: webservices/axis2/trunk/c/samples/client/echo/echo.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/samples/client/echo/echo.c?rev=589520&r1=589519&r2=589520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/samples/client/echo/echo.c (original)
+++ webservices/axis2/trunk/c/samples/client/echo/echo.c Sun Oct 28 23:40:52 2007
@@ -211,7 +211,7 @@
     axis2_char_t *om_str = NULL;
 
     ns1 =
-        axiom_namespace_create(env, "http://ws.apache.org/axis2/services/echo",
+       axiom_namespace_create(env, "http://ws.apache.org/axis2/services/echo",
                                "ns1");
     echo_om_ele =
         axiom_element_create(env, NULL, "echoString", ns1, &echo_om_node);

Modified: webservices/axis2/trunk/c/src/core/deployment/conf_init.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/src/core/deployment/conf_init.c?rev=589520&r1=589519&r2=589520&view=diff
==============================================================================
--- webservices/axis2/trunk/c/src/core/deployment/conf_init.c (original)
+++ webservices/axis2/trunk/c/src/core/deployment/conf_init.c Sun Oct 28 23:40:52 2007
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -53,12 +52,16 @@
     dep_engine = axis2_dep_engine_create_with_repos_name(env, repo_name);
     if (!dep_engine)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                        "dep engine create with repos name failed, dep_engine value is NULL");
         return NULL;
     }
 
     conf = axis2_dep_engine_load(dep_engine, env);
     if (!conf)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                        "dep engine load failed. conf value is NULL");
         return NULL;
     }
     axis2_conf_set_dep_engine(conf, env, dep_engine);
@@ -66,10 +69,18 @@
     phase_resolver = axis2_phase_resolver_create_with_config(env, conf);
     if (!phase_resolver)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                        "phase resolver create with config failed. phase resolver value is NULL");
         return NULL;
     }
 
     conf_ctx = axis2_conf_ctx_create(env, conf);
+    if (!conf_ctx)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                        "conf ctx creation failed. conf_ctx value is NULL");
+        return NULL;
+    }
 
     axis2_phase_resolver_build_chains(phase_resolver, env);
 
@@ -97,12 +108,16 @@
     dep_engine = axis2_dep_engine_create(env);
     if (!dep_engine)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                        "dep engine create with repos name failed, dep_engine value is NULL");
         return NULL;
     }
 
     conf = axis2_dep_engine_load_client(dep_engine, env, axis2_home);
     if (!conf)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                        "dep engine load failed. conf value is NULL");
         return NULL;
     }
     axis2_conf_set_dep_engine(conf, env, dep_engine);
@@ -110,12 +125,16 @@
     phase_resolver = axis2_phase_resolver_create_with_config(env, conf);
     if (!phase_resolver)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                        "phase resolver create with config failed. phase resolver value is NULL");
         return NULL;
     }
 
     conf_ctx = axis2_conf_ctx_create(env, conf);
     if (!conf_ctx)
     {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                        "conf ctx creation failed. conf_ctx value is NULL");
         return NULL;
     }
 
@@ -170,6 +189,11 @@
         }
         status = AXIS2_SUCCESS;
     }
+    else
+    {
+        AXIS2_LOG_WARNING(env->log, AXIS2_LOG_SI, 
+                          "conf ctx value is NULL, axis2 module init failed");
+    }
 
     return status;
 }
@@ -226,6 +250,7 @@
                             axutil_allocator_switch_to_local_pool(env->allocator);
                             return AXIS2_FAILURE;
                         }
+
                         axis2_svc_set_impl_class(svc_desc, env, impl_class);
                         status = AXIS2_SVC_SKELETON_INIT_WITH_CONF((axis2_svc_skeleton_t
                                                            *) impl_class, env,
@@ -244,6 +269,11 @@
         }
         status = AXIS2_SUCCESS;
     }
+    else
+    {
+        AXIS2_LOG_WARNING (env->log, AXIS2_LOG_SI, 
+                           "conf ctx value is NULL, axis2 load services failed");
+    }
 
     return status;
 }
@@ -301,6 +331,12 @@
         }
         status = AXIS2_SUCCESS;
     }
+    else
+    {
+        AXIS2_LOG_WARNING (env->log, AXIS2_LOG_SI, 
+                           "conf ctx value is NULL, axis2 init transports failed");
+    }
+
 
     return status;
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org