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 2006/01/23 05:54:23 UTC

svn commit: r371462 - in /webservices/axis2/trunk/c: include/axis2_transport_in_desc.h modules/core/deployment/axis2_deployment.h modules/core/deployment/conf_builder.c modules/core/engine/conf.c

Author: damitha
Date: Sun Jan 22 20:54:14 2006
New Revision: 371462

URL: http://svn.apache.org/viewcvs?rev=371462&view=rev
Log:
Added process dispatchers code again.


Modified:
    webservices/axis2/trunk/c/include/axis2_transport_in_desc.h
    webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h
    webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c
    webservices/axis2/trunk/c/modules/core/engine/conf.c

Modified: webservices/axis2/trunk/c/include/axis2_transport_in_desc.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_transport_in_desc.h?rev=371462&r1=371461&r2=371462&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_transport_in_desc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_transport_in_desc.h Sun Jan 22 20:54:14 2006
@@ -41,7 +41,7 @@
 #endif
 
 struct axis2_phase;
-struct axis2_transport_listener;    
+struct axis2_transport_receiver;    
 typedef struct axis2_transport_in_desc axis2_transport_in_desc_t;
 typedef struct axis2_transport_in_desc_ops axis2_transport_in_desc_ops_t;
 
@@ -109,7 +109,7 @@
     axis2_status_t (AXIS2_CALL *
     set_recv) (struct axis2_transport_in_desc *transport_in,
                                             axis2_env_t **env,
-                                            struct axis2_transport_listener *recv);
+                                            struct axis2_transport_receiver *recv);
     
     struct axis2_phase * (AXIS2_CALL *
     get_in_phase) (struct axis2_transport_in_desc *transport_in,

Modified: webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h?rev=371462&r1=371461&r2=371462&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h Sun Jan 22 20:54:14 2006
@@ -110,6 +110,7 @@
 #define AXIS2_HOTDEPLOYMENT "hotdeployment"
 #define AXIS2_HOTUPDATE "hotupdate"
 #define AXIS2_EXTRACTSVCARCHIVE "extractServiceArchive"
+#define AXIS2_DISPATCH_ORDER "dispatchOrder"
 #define AXIS2_DISPATCHER "dispatcher"
 
 #define AXIS2_STORAGE "axisStorage"

Modified: webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c?rev=371462&r1=371461&r2=371462&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c Sun Jan 22 20:54:14 2006
@@ -184,7 +184,7 @@
     axis2_om_element_t *disp_order_element = NULL;
     axis2_om_node_t *disp_order_node = NULL;
     axis2_status_t status = AXIS2_FAILURE;
-    
+   
     AXIS2_FUNC_PARAM_CHECK(conf_builder, env, AXIS2_FAILURE);
     builder_impl = AXIS2_INTF_TO_IMPL(conf_builder);
     
@@ -229,6 +229,25 @@
         AXIS2_QNAME_FREE(qmep, env);
     }
     
+    /* processing Dispatching Order */
+    qdisporder = axis2_qname_create(env, AXIS2_DISPATCH_ORDER, NULL, NULL);
+    disp_order_element = AXIS2_OM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(
+        conf_element, env, qdisporder, conf_node, &disp_order_node);
+    AXIS2_QNAME_FREE(qdisporder, env);
+    if(NULL != disp_order_element)
+    {
+        axis2_conf_builder_process_disp_order(conf_builder, env, disp_order_node);
+        /*log.info("found the custom disptaching order and continue with that order");*/
+    } else 
+    {
+        status = AXIS2_CONF_SET_DEFAULT_DISPATCHERS(builder_impl->conf, env);
+        if(AXIS2_SUCCESS != status)
+        {
+            return AXIS2_FAILURE;
+        }
+        /*log.info("no custom diaptching order found continue with default dispatcing order");*/
+    }
+
     /* Process Module refs */
     qmodulest = axis2_qname_create(env, AXIS2_MODULEST, NULL, NULL);
     module_itr = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(conf_element, env,
@@ -378,7 +397,7 @@
         AXIS2_QNAME_FREE(qdllname, env);
     }
 
-    if(AXIS2_FALSE == found_disp)
+    if(AXIS2_TRUE != found_disp)
     {
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_DISPATCHER_FOUND, 
             AXIS2_FAILURE);
@@ -805,6 +824,7 @@
                 axis2_dll_desc_t *dll_desc = NULL;
                 axis2_param_t *impl_info_param = NULL;
                 axis2_transport_receiver_t *recv = NULL;
+                axis2_status_t stat = AXIS2_FAILURE;
                 
                 dll_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(trs_dll_name, env);
                 dll_desc = axis2_dll_desc_create(env);
@@ -816,8 +836,8 @@
                 AXIS2_PARAM_SET_VALUE(impl_info_param, env, dll_desc); 
                 recv = (axis2_transport_receiver_t *) 
                     axis2_class_loader_create_dll(env, impl_info_param);
-                int stat = AXIS2_TRANSPORT_IN_DESC_SET_RECV(transport_in, env, recv);
-                printf("stat:%d\n", stat);                
+                stat = AXIS2_TRANSPORT_IN_DESC_SET_RECV(transport_in, env, 
+                    recv);            
             }
             
             /* process Parameters */

Modified: webservices/axis2/trunk/c/modules/core/engine/conf.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/conf.c?rev=371462&r1=371461&r2=371462&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/conf.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/conf.c Sun Jan 22 20:54:14 2006
@@ -802,6 +802,7 @@
     axis2_qname_t *module_desc = NULL;
     axis2_char_t *svc_grp_name = NULL;
     int i = 0;
+    int k = 0;
     int size = 0;
     axis2_status_t status = AXIS2_FAILURE;
     
@@ -816,7 +817,7 @@
         if(!config_impl->all_svcs)
             return AXIS2_FAILURE;
     }
-    int k = axis2_hash_count(svcs);
+    k = axis2_hash_count(svcs);
     index_i = axis2_hash_first (svcs, env);
     while(index_i)
     {
@@ -1558,6 +1559,7 @@
     }
     handler = AXIS2_DISP_GET_BASE(add_dispatch, env);
     AXIS2_PHASE_ADD_HANDLER_AT(dispatch, env, 0, handler);
+    handler = NULL;
     
     uri_dispatch = axis2_addr_disp_create(env);
     if(!uri_dispatch)
@@ -1566,6 +1568,7 @@
     }
     handler = AXIS2_DISP_GET_BASE(uri_dispatch, env);
     AXIS2_PHASE_ADD_HANDLER_AT(dispatch, env, 1, handler);
+    handler = NULL;
     
     soap_action_based_dispatch = axis2_addr_disp_create(env);
     if(!soap_action_based_dispatch)
@@ -1574,7 +1577,8 @@
     }
     handler = AXIS2_DISP_GET_BASE(soap_action_based_dispatch, env);
     AXIS2_PHASE_ADD_HANDLER_AT(dispatch, env, 2, handler);
-
+    handler = NULL;
+    
     soap_msg_body_based_dispatch = axis2_addr_disp_create(env);
     if(!soap_msg_body_based_dispatch)
     {
@@ -1582,7 +1586,8 @@
     }
     handler = AXIS2_DISP_GET_BASE(soap_msg_body_based_dispatch, env);
     AXIS2_PHASE_ADD_HANDLER_AT(dispatch, env, 3, handler);
-
+    handler = NULL;
+    
     status = AXIS2_ARRAY_LIST_ADD(config_impl->
             in_phases_upto_and_including_post_dispatch, env, dispatch);
     if(AXIS2_FAILURE == status)
@@ -1608,7 +1613,8 @@
     
     handler = AXIS2_DISP_CHECKER_GET_BASE(disp_checker, env);
     AXIS2_PHASE_ADD_HANDLER_AT(post_dispatch, env, 0, handler);
- 
+    handler = NULL;
+    
     /*postDispatch.addHandler(instanceDispatcher,1); */
     status = AXIS2_ARRAY_LIST_ADD(config_impl->
             in_phases_upto_and_including_post_dispatch, env, post_dispatch);