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 2006/02/12 02:33:36 UTC

svn commit: r377103 - in /webservices/axis2/trunk/c/modules/core/engine: addr_disp.c req_uri_disp.c soap_action_disp.c soap_body_disp.c

Author: samisa
Date: Sat Feb 11 17:33:34 2006
New Revision: 377103

URL: http://svn.apache.org/viewcvs?rev=377103&view=rev
Log:
Added more helpful debug info to help locate which dispatcher founf the service and operation

Modified:
    webservices/axis2/trunk/c/modules/core/engine/addr_disp.c
    webservices/axis2/trunk/c/modules/core/engine/req_uri_disp.c
    webservices/axis2/trunk/c/modules/core/engine/soap_action_disp.c
    webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c

Modified: webservices/axis2/trunk/c/modules/core/engine/addr_disp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/addr_disp.c?rev=377103&r1=377102&r2=377103&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/addr_disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/addr_disp.c Sat Feb 11 17:33:34 2006
@@ -85,6 +85,7 @@
                     axis2_env_t **env) 
 {    
     axis2_endpoint_ref_t *endpoint_ref = NULL;
+    axis2_svc_t *svc = NULL;
     
     AXIS2_ENV_CHECK(env, NULL);    
     
@@ -121,12 +122,12 @@
                         conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
                         if (conf)
                         {
-                            axis2_svc_t *svc = NULL;
                             axis2_qname_t *qname = axis2_qname_create(env, url_tokens[0], NULL, NULL);
                             svc = AXIS2_CONF_GET_SVC(conf, env, AXIS2_QNAME_GET_LOCALPART(qname, env));
                             
                             AXIS2_QNAME_FREE(qname, env);
-                            return svc;
+                            if(svc)
+                                AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Service found using WSA enpoint address");
                         }
                     }                    
                 }
@@ -134,7 +135,7 @@
         }
     }
         
-    return NULL;
+    return svc;
 }
 
 /**
@@ -150,6 +151,7 @@
 {
     axis2_char_t *action = NULL;
     axis2_qname_t *qname = NULL;
+    axis2_op_t *op = NULL;
     
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, svc, NULL);
@@ -158,13 +160,15 @@
     
     if (action)
     {
-        AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Checking for operation using WSAAction : %s", action);
+        AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Checking for operation using WSA Action : %s", action);
         
         qname = axis2_qname_create(env, action, NULL, NULL);
-        return AXIS2_SVC_GET_OP_WITH_QNAME(svc, env, qname);
+        op = AXIS2_SVC_GET_OP_WITH_QNAME(svc, env, qname);
+        if (op)
+            AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Operation found using WSA Action");
     }
     
-    return NULL;
+    return op;
 }
 
 

Modified: webservices/axis2/trunk/c/modules/core/engine/req_uri_disp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/req_uri_disp.c?rev=377103&r1=377102&r2=377103&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/req_uri_disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/req_uri_disp.c Sat Feb 11 17:33:34 2006
@@ -85,6 +85,7 @@
                     axis2_env_t **env) 
 {    
     axis2_endpoint_ref_t *endpoint_ref = NULL;
+    axis2_svc_t *svc = NULL;
     
     AXIS2_ENV_CHECK(env, NULL);    
     
@@ -115,9 +116,9 @@
                         conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
                         if (conf)
                         {
-                            axis2_svc_t *svc = NULL;
                             svc = AXIS2_CONF_GET_SVC(conf, env, url_tokens[0]);
-                            return svc;
+                            if (svc)
+                                AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Service found using target endpoint address");
                         }
                     }                    
                 }
@@ -125,7 +126,7 @@
         }
     }
         
-    return NULL;
+    return svc;
 }
 
 /**
@@ -140,6 +141,7 @@
                                 axis2_svc_t *svc)
 {
     axis2_endpoint_ref_t *endpoint_ref = NULL;
+    axis2_op_t *op = NULL;
     
     AXIS2_ENV_CHECK(env, NULL);    
     AXIS2_PARAM_CHECK((*env)->error, svc, NULL);
@@ -162,17 +164,17 @@
                 if (url_tokens[1])
                 {
                     axis2_qname_t *op_qname = NULL;
-                    axis2_op_t *op = NULL;
                     AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Checking for operation using target endpoint uri fragment : %s", url_tokens[1]);
                     op_qname = axis2_qname_create(env, url_tokens[1], NULL, NULL);
                     op = AXIS2_SVC_GET_OP_WITH_NAME(svc, env, AXIS2_QNAME_GET_LOCALPART(op_qname, env));
                     AXIS2_QNAME_FREE(op_qname, env);
-                    return op;
+                    if (op)
+                        AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Operation found using target endpoint uri fragment");
                 }
             }
         }
     }
-    return NULL;
+    return op;
 }
             
 axis2_status_t AXIS2_CALL axis2_req_uri_disp_invoke(struct axis2_handler * handler, 

Modified: webservices/axis2/trunk/c/modules/core/engine/soap_action_disp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/soap_action_disp.c?rev=377103&r1=377102&r2=377103&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/soap_action_disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/soap_action_disp.c Sat Feb 11 17:33:34 2006
@@ -103,6 +103,7 @@
                                 axis2_svc_t *svc)
 {
     axis2_char_t *action = NULL;
+    axis2_op_t *op = NULL;        
     
     AXIS2_ENV_CHECK(env, NULL);  
     AXIS2_PARAM_CHECK((*env)->error, svc, NULL);    
@@ -111,7 +112,6 @@
     
     if (action)
     {
-        axis2_op_t *op = NULL;        
         AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Checking for operation using SOAPAction : %s", action);
 
         op = AXIS2_SVC_GET_OP_BY_SOAP_ACTION(svc, env, action);
@@ -137,10 +137,11 @@
             }
         }
 
-        return op;
+        if (op)
+            AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Operation found using SOAPAction");
     }
     
-    return NULL;
+    return op;
 }
     
 axis2_status_t AXIS2_CALL axis2_soap_action_disp_invoke(struct axis2_handler * handler, 

Modified: webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c?rev=377103&r1=377102&r2=377103&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/soap_body_disp.c Sat Feb 11 17:33:34 2006
@@ -85,6 +85,7 @@
                     axis2_env_t **env) 
 {    
     axis2_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);
@@ -130,9 +131,9 @@
                                                 conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
                                                 if (conf)
                                                 {
-                                                    axis2_svc_t *svc = NULL;
                                                     svc = AXIS2_CONF_GET_SVC(conf, env, url_tokens[0]);
-                                                    return svc;
+                                                    if (svc)
+                                                        AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Service found using SOAP message body's first child's namespace URI");
                                                 }
                                             }                    
                                         }
@@ -146,7 +147,7 @@
         }
     }
     
-    return NULL;
+    return svc;
 }
 
 /**
@@ -161,6 +162,7 @@
                                 axis2_svc_t *svc)
 {
     axis2_soap_envelope_t *soap_envelope = NULL;
+    axis2_op_t *op = NULL;
     
     AXIS2_ENV_CHECK(env, NULL); 
     AXIS2_PARAM_CHECK((*env)->error, svc, NULL);
@@ -188,12 +190,13 @@
                             if (element_name)
                             {
                                 axis2_qname_t *op_qname = NULL;
-                                axis2_op_t *op = NULL;
                                 AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Checking for operation using SOAP message body's first child's local name : %s", element_name);
                                 op_qname = axis2_qname_create(env, element_name, NULL, NULL);
                                 op = AXIS2_SVC_GET_OP_WITH_NAME(svc, env, AXIS2_QNAME_GET_LOCALPART(op_qname, env));
                                 AXIS2_QNAME_FREE(op_qname, env);
-                                return op;
+                                if (op)
+                                    AXIS2_LOG_DEBUG((*env)->log, AXIS2_LOG_SI, "Operation found using SOAP message body's first child's local name");
+                                
                             }
                         }
                     }
@@ -201,7 +204,7 @@
             }
         }
     }
-    return NULL;
+    return op;
 }
             
 axis2_status_t AXIS2_CALL axis2_soap_body_disp_invoke(struct axis2_handler * handler,