axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r370794 - in /webservices/axis2/trunk/c: deploy/ include/ modules/core/deployment/ modules/util/ test/core/transport/http/ test/resources/
Date Fri, 20 Jan 2006 11:26:51 GMT
Author: damitha
Date: Fri Jan 20 03:26:31 2006
New Revision: 370794

URL: http://svn.apache.org/viewcvs?rev=370794&view=rev
Log:
Now services are put into deployment folders as folders.
Code is changed to reflect that


Modified:
    webservices/axis2/trunk/c/deploy/axis2.xml
    webservices/axis2/trunk/c/include/axis2_arch_file_data.h
    webservices/axis2/trunk/c/include/axis2_dep_engine.h
    webservices/axis2/trunk/c/include/axis2_dir_handler.h
    webservices/axis2/trunk/c/include/axis2_error.h
    webservices/axis2/trunk/c/include/axis2_repos_listener.h
    webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c
    webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
    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/deployment/repos_listener.c
    webservices/axis2/trunk/c/modules/core/deployment/svc_grp_builder.c
    webservices/axis2/trunk/c/modules/util/dir_handler.c
    webservices/axis2/trunk/c/test/core/transport/http/test_http_transport.c
    webservices/axis2/trunk/c/test/resources/services.xml

Modified: webservices/axis2/trunk/c/deploy/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/deploy/axis2.xml?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/deploy/axis2.xml (original)
+++ webservices/axis2/trunk/c/deploy/axis2.xml Fri Jan 20 03:26:31 2006
@@ -104,33 +104,33 @@
         <phase name="PreDispatch"/>
         <phase name="Dispatch">
             <handler name="AddressingBasedDispatcher"
-                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                     class="axis2_engine.so">
                 <order phase="Dispatch"/>
             </handler>
              <handler name="RequestURIBasedDispatcher"
-                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
+                     class="axis2_engine.so">
                 <order phase="Dispatch"/>
             </handler>
              <handler name="SOAPActionBasedDispatcher"
-                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
+                     class="axis2_engine.so">
                 <order phase="Dispatch"/>
             </handler>
              <handler name="SOAPMessageBodyBasedDispatcher"
-                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                     class="axis2_engine.so">
                 <order phase="Dispatch"/>
             </handler>
         </phase>
         <phase name="PostDispatch">
              <handler name="DispatchPostConditionsEvaluator"
-                     class="org.apache.axis2.engine.DispatchingChecker">
+                     class="axis2_engine.so">
                 <order phase="PostDispatch"/>
             </handler>
             <handler name="InstanceDispatcher"
-                     class="org.apache.axis2.engine.InstanceDispatcher">
+                     class="axis2_engine.so">
                 <order phase="PostDispatch"/>
             </handler>
             <handler name="SOAPProcessingModelChecker"
-                     class="org.apache.axis2.engine.SOAPProcessingModelChecker">
+                     class="axis2_engine.so">
                 <order phase="PostDispatch"/>
             </handler>
         </phase>

Modified: webservices/axis2/trunk/c/include/axis2_arch_file_data.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_arch_file_data.h?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_arch_file_data.h (original)
+++ webservices/axis2/trunk/c/include/axis2_arch_file_data.h Fri Jan 20 03:26:31 2006
@@ -71,13 +71,14 @@
                                         axis2_char_t *msg_recv);
     
     /**
-     * return the dll name
+     * @return the name of the contained file.
      */
     axis2_char_t *(AXIS2_CALL *
     get_name)(axis2_arch_file_data_t *file_data,
                                         axis2_env_t **env);
     /**
-     * return the service dll name
+     * @return the service name. if contained file is not null this is the
+     * file name. else this is the name property
      */
     axis2_char_t *(AXIS2_CALL *
     get_svc_name)(axis2_arch_file_data_t *file_data,
@@ -142,7 +143,8 @@
 
 /**
  * Creates arch file data struct
- * @param repos_path
+ * @param type 
+ * @param file folder name of service or module
  * @return pointer to newly created arch file data
  */
 AXIS2_DECLARE(axis2_arch_file_data_t *) 
@@ -150,6 +152,12 @@
                                                     int type,
                                                     axis2_file_t *file);
 
+/**
+ * Creates arch file data struct
+ * @param type 
+ * @param name 
+ * @return pointer to newly created arch file data
+ */
 AXIS2_DECLARE(axis2_arch_file_data_t *)
 axis2_arch_file_data_create_with_type_and_name(axis2_env_t **env,
                                                     int type,

Modified: webservices/axis2/trunk/c/include/axis2_dep_engine.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_dep_engine.h?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_dep_engine.h (original)
+++ webservices/axis2/trunk/c/include/axis2_dep_engine.h Fri Jan 20 03:26:31 2006
@@ -214,7 +214,7 @@
                                             axis2_char_t *repos_path);
     /**
      * Creates deployment engine struct
-     * @param repos_path
+     * @param repos_path is the path to which Repositary Listner should listen.
      * @param svr_xml_file
      * @return pointer to newly created deployment engine
      */

Modified: webservices/axis2/trunk/c/include/axis2_dir_handler.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_dir_handler.h?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_dir_handler.h (original)
+++ webservices/axis2/trunk/c/include/axis2_dir_handler.h Fri Jan 20 03:26:31 2006
@@ -36,16 +36,31 @@
  * @{
  */
     /**
-     * List the .zip or tar.gz files in the given path
-     * @param pathname path to the directory where your modules or services are
-     * @return array list of .zip or tar.gz file names
+     * List the dll files in the given service or module folder path
+     * @param pathname path to your service or module directory
+     * @return array list of dll file names
      */
     AXIS2_DECLARE(axis2_array_list_t *)
-    axis2_dir_handler_list_dir(axis2_env_t **env,
+    axis2_dir_handler_list_services_or_modules_in_dir(axis2_env_t **env,
                                 axis2_char_t *pathname); 
+    
+    /**
+     * List services or modules directories in the services or modules folder
+     * respectively
+     * @param pathname path  your modules or services folder
+     * @return array list of contents of services or modules folder
+     */
+    axis2_array_list_t *AXIS2_CALL
+    axis2_dir_handler_list_service_or_module_dirs(axis2_env_t **env,
+                                axis2_char_t *pathname);
+                                
+/***********************Function Macros****************************************/
 
-#define AXIS2_DIR_HANDLER_LIST_DIR(env, pathname) \
-        (axis2_dir_handler_list_dir(env, pathname))
+#define AXIS2_DIR_HANDLER_LIST_SERVICES_OR_MODULES_IN_DIR(env, pathname) \
+        (axis2_dir_handler_list_services_or_modules_in_dir(env, pathname))
+        
+#define AXIS2_DIR_HANDLER_LIST_SERVICE_OR_MODULE_DIRS(env, pathname) \
+        (axis2_dir_handler_list_service_or_module_dirs(env, pathname))        
 
 /** @} */
     

Modified: webservices/axis2/trunk/c/include/axis2_error.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_error.h?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_error.h (original)
+++ webservices/axis2/trunk/c/include/axis2_error.h Fri Jan 20 03:26:31 2006
@@ -451,6 +451,7 @@
         /* Listen failed for the server socket */
         AXIS2_ERROR_SOCKET_LISTEN_FAILED,
         AXIS2_ERROR_FILE_NAME_NOT_SET,
+        AXIS2_ERROR_REPOS_LISTENER_INIT_FAILED,
         /** The following has to be the last error value all the time.
             All other error codes should appear above this.
             AXIS2_ERROR_LAST is used to track the number of error codes present

Modified: webservices/axis2/trunk/c/include/axis2_repos_listener.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_repos_listener.h?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_repos_listener.h (original)
+++ webservices/axis2/trunk/c/include/axis2_repos_listener.h Fri Jan 20 03:26:31 2006
@@ -117,7 +117,7 @@
 axis2_repos_listener_create (axis2_env_t **env);
 
 /**
- * @param folder_name
+ * @param folder_name this is the axis2 deployment root directory(repository path)
  * @param dep_engine
  * @return pointer to newly created deployment engine
  */

Modified: webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_file_data.c Fri Jan 20 03:26:31
2006
@@ -107,16 +107,6 @@
                                     axis2_env_t **env,
                                     axis2_array_list_t *deployable_svcs);
 
-axis2_char_t *
-axis2_arch_file_data_get_short_file_name(axis2_arch_file_data_t *file_data,
-                                                axis2_env_t **env,
-                                                axis2_char_t *file_name);
-                                                
-axis2_char_t *
-axis2_arch_file_data_get_file_name_without_prefix(axis2_arch_file_data_t *file_data,
-                                                axis2_env_t **env,
-                                                axis2_char_t *short_file_name);
-
                                
 /************************** End of function prototypes ************************/
 
@@ -333,21 +323,18 @@
                                     axis2_env_t **env)
 {
     axis2_arch_file_data_impl_t *file_data_impl = NULL;
-    axis2_char_t *file_name = NULL;
-    axis2_char_t *name = NULL;
     axis2_char_t *svc_name = NULL;
     AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
     file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
     if(NULL != file_data_impl->file)
     {
-        file_name = AXIS2_FILE_GET_NAME(file_data_impl->file, env);
+        svc_name = AXIS2_FILE_GET_NAME(file_data_impl->file, env);
     }
     else
     {
-        file_name = file_data_impl->name;
+        svc_name = file_data_impl->name;
     }
-    name = axis2_arch_file_data_get_short_file_name(file_data, env, file_name);
-    svc_name = axis2_arch_file_data_get_file_name_without_prefix(file_data, env, name);
+
     return svc_name;
 }
 
@@ -480,55 +467,4 @@
     }
     file_data_impl->deployable_svcs = deployable_svcs;
     return AXIS2_SUCCESS;
-}
-
-axis2_char_t *
-axis2_arch_file_data_get_file_name_without_prefix(axis2_arch_file_data_t *file_data,
-                                                axis2_env_t **env,
-                                                axis2_char_t *short_file_name)
-{
-    axis2_char_t *file_name_l = NULL;
-    axis2_char_t *short_name = NULL;
-    int len = 0;
-    AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
-    AXIS2_PARAM_CHECK((*env)->error, short_file_name, NULL);
-    file_name_l = AXIS2_STRDUP(short_file_name, env);
-    if(!file_name_l)
-    {
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
-    len = AXIS2_STRLEN(AXIS2_LIB_PREFIX);
-    short_name = &file_name_l[len];
-    return short_name;
-
-}
-
-axis2_char_t *
-axis2_arch_file_data_get_short_file_name(axis2_arch_file_data_t *file_data,
-                                                axis2_env_t **env,
-                                                axis2_char_t *file_name) 
-{
-    axis2_char_t *separator = NULL;
-    axis2_char_t *value = NULL;
-    axis2_char_t *file_name_l = NULL;
-    axis2_char_t *short_name = NULL;
-    
-    AXIS2_FUNC_PARAM_CHECK(file_data, env, NULL);
-    AXIS2_PARAM_CHECK((*env)->error, file_name, NULL);
-    
-    file_name_l = AXIS2_STRDUP(file_name, env);
-    if(!file_name_l)
-    {
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
-    separator = ".";
-    
-    value = AXIS2_STRSTR(file_name_l, separator);
-    
-    value[0] = AXIS2_EOLN;
-    short_name = file_name_l;
-    
-    return short_name;
 }

Modified: webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c Fri Jan 20 03:26:31 2006
@@ -297,6 +297,10 @@
     axis2_char_t *svcs_xml = NULL;
     axis2_char_t *repos_path = NULL;
     axis2_char_t *temp_path = NULL;
+    axis2_char_t *temp_path2 = NULL;
+    axis2_char_t *temp_path3 = NULL;
+    axis2_char_t *svc_container_path = NULL;
+    axis2_char_t *svc_folder = NULL;
     
     AXIS2_FUNC_PARAM_CHECK(arch_reader, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, file_name, AXIS2_FAILURE);
@@ -305,8 +309,15 @@
     
     repos_path = AXIS2_DEP_ENGINE_GET_REPOS_PATH(dep_engine, env);
     temp_path = AXIS2_STRACAT(repos_path, AXIS2_PATH_SEP_STR, env);
-    svcs_xml = AXIS2_STRACAT(temp_path, AXIS2_SVC_XML, env);
+    temp_path2 = AXIS2_STRACAT(temp_path, AXIS2_SERVICE_FOLDER, env);
+    temp_path3 = AXIS2_STRACAT(temp_path2, AXIS2_PATH_SEP_STR, env);
+    svc_container_path = AXIS2_STRACAT(temp_path3, file_name, env);
+    svc_folder = AXIS2_STRACAT(svc_container_path, AXIS2_PATH_SEP_STR, env);
+    svcs_xml = AXIS2_STRACAT(svc_folder, AXIS2_SVC_XML, env);
     AXIS2_FREE((*env)->allocator, temp_path);
+    AXIS2_FREE((*env)->allocator, temp_path2);
+    AXIS2_FREE((*env)->allocator, temp_path3);
+    AXIS2_FREE((*env)->allocator, svc_container_path);
     printf("svcs_xml:%s\n", svcs_xml);
     if(!svcs_xml)
     {
@@ -369,20 +380,13 @@
     if(0 == AXIS2_STRCMP(AXIS2_SVC_ELEMENT, root_element_name))
     {
         axis2_svc_t *svc = NULL;
-        axis2_char_t *name = NULL;
-        axis2_char_t *short_file_name = NULL;
         axis2_svc_builder_t *svc_builder = NULL;
         axis2_arch_file_data_t *file_data = NULL;
         axis2_array_list_t *dep_svcs = NULL;
         axis2_char_t *svc_name = NULL;
         
         file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(dep_engine, env);
-        name = AXIS2_ARCH_FILE_DATA_GET_NAME(file_data, env);
-        printf("name*:%s\n", name);
-        short_file_name = AXIS2_DESC_BUILDER_GET_SHORT_FILE_NAME(desc_builder, 
-            env, name);
-        svc_name = AXIS2_DESC_BUILDER_GET_FILE_NAME_WITHOUT_PREFIX(desc_builder,
-            env, short_file_name);
+        svc_name = AXIS2_ARCH_FILE_DATA_GET_NAME(file_data, env);
         printf("svc_name:%s\n", svc_name);
         svc = AXIS2_ARCH_FILE_DATA_GET_SVC(file_data, env, svc_name);
         if(NULL == svc)

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=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h Fri Jan 20 03:26:31
2006
@@ -45,7 +45,7 @@
 #define AXIS2_MODULE 1 /* if it is a module */
 
 #define AXIS2_META_INF "META-INF"
-#define AXIS2_SVC_XML "services/services.xml"
+#define AXIS2_SVC_XML "services.xml"
 #define AXIS2_SVC_WSDL_NAME "service.wsdl"
 #define AXIS2_SVC_WSDL_WITH_FOLDER "META-INF/service.wsdl"
 #define AXIS2_MODULE_XML "modules/module.xml"
@@ -110,7 +110,6 @@
 #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=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/conf_builder.c Fri Jan 20 03:26:31 2006
@@ -228,25 +228,7 @@
         AXIS2_CONF_ADD_MSG_RECV(builder_impl->conf, env, att_value, msg_recv);
         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,
@@ -601,11 +583,10 @@
     return phase_list;
 }
 
-
 axis2_status_t
 axis2_conf_builder_process_transport_senders(axis2_conf_builder_t *conf_builder,
-                                    axis2_env_t **env,
-                                    axis2_om_children_qname_iterator_t *trs_senders)
+                                axis2_env_t **env,
+                                axis2_om_children_qname_iterator_t *trs_senders)
 {
     axis2_conf_builder_impl_t *builder_impl = NULL;
     
@@ -626,7 +607,8 @@
             AXIS2_OM_CHILDREN_QNAME_ITERATOR_NEXT(trs_senders, env);
 
         if (transport_node)
-            transport_element = (axis2_om_element_t*)AXIS2_OM_NODE_GET_DATA_ELEMENT(transport_node,
env);
+            transport_element = (axis2_om_element_t*)
+                AXIS2_OM_NODE_GET_DATA_ELEMENT(transport_node, env);
         
         /* getting trsnport Name */
         qattname = axis2_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
@@ -679,7 +661,7 @@
             dll_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(trs_dll_att, env);
             dll_desc = axis2_dll_desc_create(env);
             AXIS2_DLL_DESC_SET_NAME(dll_desc, env, dll_name);
-            AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_HANDLER_DLL);
+            AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_TRANSPORT_SENDER_DLL);
             axis2_class_loader_init(env);
             impl_info_param = axis2_param_create(env, NULL, NULL);
         
@@ -828,7 +810,7 @@
                 dll_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(trs_dll_name, env);
                 dll_desc = axis2_dll_desc_create(env);
                 AXIS2_DLL_DESC_SET_NAME(dll_desc, env, dll_name);
-                AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_HANDLER_DLL);
+                AXIS2_DLL_DESC_SET_TYPE(dll_desc, env, AXIS2_TRANSPORT_RECV_DLL);
                 axis2_class_loader_init(env);
                 impl_info_param = axis2_param_create(env, NULL, NULL);
             

Modified: webservices/axis2/trunk/c/modules/core/deployment/repos_listener.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/repos_listener.c?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/repos_listener.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/repos_listener.c Fri Jan 20 03:26:31
2006
@@ -79,7 +79,7 @@
  * and added them to a list wich is in the WSInfolist class
  */
 axis2_status_t
-axis2_repos_listener_search_WS(axis2_repos_listener_t *listener,
+axis2_repos_listener_search(axis2_repos_listener_t *listener,
                                 axis2_env_t **env,
                                 axis2_char_t *folder_name,
                                 int type);
@@ -135,7 +135,7 @@
  * Fisrt it initilize the syetm , by loading all the modules in the /modules directory
  * and also create a WSInfoList to keep infor about available modules and services
  *
- * @param folderName    path to parent directory that the listener should listent
+ * @param folderName    path to parent directory that the listener should listen
  * @param deploy_engine refearnce to engine registry  inorder to inform the updates
  */
 
@@ -168,7 +168,13 @@
         return NULL;
     }
     status = axis2_repos_listener_init(&(listener_impl->repos_listener), env);
-    printf("respos listner init status:%d\n", status);
+    if(AXIS2_SUCCESS != status)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_REPOS_LISTENER_INIT_FAILED,
+            AXIS2_FAILURE);
+        return NULL;        
+    }
+    
     return &(listener_impl->repos_listener);
 }
 
@@ -212,7 +218,7 @@
     
     module_path = AXIS2_STRACAT(listener_impl->folder_name, AXIS2_MODULE_PATH,
         env);
-    return axis2_repos_listener_search_WS(listener, env, module_path, AXIS2_MODULE);
+    return axis2_repos_listener_search(listener, env, module_path, AXIS2_MODULE);
 }
 
 axis2_status_t AXIS2_CALL
@@ -225,7 +231,7 @@
     AXIS2_FUNC_PARAM_CHECK(listener, env, AXIS2_FAILURE);
     listener_impl = AXIS2_INTF_TO_IMPL(listener);
     svc_path = AXIS2_STRACAT(listener_impl->folder_name, AXIS2_SVC_PATH, env);
-    return axis2_repos_listener_search_WS(listener, env, svc_path, AXIS2_SVC);
+    return axis2_repos_listener_search(listener, env, svc_path, AXIS2_SVC);
 }
 
 axis2_status_t AXIS2_CALL
@@ -286,7 +292,7 @@
 }
 
 axis2_status_t
-axis2_repos_listener_search_WS(axis2_repos_listener_t *listener,
+axis2_repos_listener_search(axis2_repos_listener_t *listener,
                                 axis2_env_t **env,
                                 axis2_char_t *folder_name,
                                 int type) 
@@ -299,7 +305,8 @@
     AXIS2_FUNC_PARAM_CHECK(listener, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, folder_name, AXIS2_FAILURE);
     listener_impl = AXIS2_INTF_TO_IMPL(listener);
-    current_info_list = AXIS2_DIR_HANDLER_LIST_DIR(env, folder_name);
+    current_info_list = AXIS2_DIR_HANDLER_LIST_SERVICE_OR_MODULE_DIRS(env, 
+        folder_name);
     if(!current_info_list)
     {
         return AXIS2_FAILURE;
@@ -311,7 +318,7 @@
         file = AXIS2_ARRAY_LIST_GET(current_info_list, env, i);
         AXIS2_WS_INFO_LIST_ADD_WS_INFO_ITEM(listener_impl->info_list, env,
             file, type);
-        axis2_file_free(file, env);
+        AXIS2_FILE_FREE(file, env);
         
     }
     return AXIS2_SUCCESS;

Modified: webservices/axis2/trunk/c/modules/core/deployment/svc_grp_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/svc_grp_builder.c?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/svc_grp_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/svc_grp_builder.c Fri Jan 20 03:26:31
2006
@@ -22,7 +22,7 @@
 typedef struct axis2_svc_grp_builder_impl
 {
 	axis2_svc_grp_builder_t svc_grp_builder;
-    axis2_om_node_t *svc;
+    axis2_om_node_t *svc_grp;
     	
 } axis2_svc_grp_builder_impl_t;
 
@@ -92,7 +92,7 @@
 
 axis2_svc_grp_builder_t * AXIS2_CALL 
 axis2_svc_grp_builder_create_with_svc_and_dep_engine (axis2_env_t **env,
-                                                axis2_om_node_t *svc,
+                                                axis2_om_node_t *svc_grp,
                                                 axis2_dep_engine_t *dep_engine)
 {
     axis2_svc_grp_builder_impl_t *grp_builder_impl = NULL;
@@ -104,8 +104,14 @@
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         grp_builder_impl = NULL;
     }
-    grp_builder_impl->svc = svc;
-    grp_builder_impl->svc_grp_builder.desc_builder->engine = dep_engine;
+    grp_builder_impl->svc_grp_builder.desc_builder = 
+        axis2_desc_builder_create_with_dep_engine(env, dep_engine);
+    if(!grp_builder_impl->svc_grp_builder.desc_builder)
+    {
+        axis2_svc_grp_builder_free(&(grp_builder_impl->svc_grp_builder), env);
+        return NULL;
+    }
+    grp_builder_impl->svc_grp = svc_grp;
     
     return &(grp_builder_impl->svc_grp_builder);
 }
@@ -155,18 +161,19 @@
     axis2_qname_t *qparamst = NULL;
     axis2_qname_t *qmodulest = NULL;
     axis2_qname_t *qsvc_element = NULL;
-    axis2_om_element_t *svc_element = NULL;
+    axis2_om_element_t *svc_grp_element = NULL;
     axis2_status_t status = AXIS2_FAILURE;
     axis2_conf_t *parent = NULL;
     
     grp_builder_impl = AXIS2_INTF_TO_IMPL(grp_builder);
     
     /* Processing service level paramters */
-    svc_element = AXIS2_OM_NODE_GET_DATA_ELEMENT(grp_builder_impl->svc, env);
+    svc_grp_element = AXIS2_OM_NODE_GET_DATA_ELEMENT(grp_builder_impl->svc_grp, env);
+    printf("svc_element name:%s\n", AXIS2_OM_ELEMENT_GET_LOCALNAME(svc_grp_element, env));
     qparamst = axis2_qname_create(env, AXIS2_PARAMETERST, NULL, NULL);
     
-    itr = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(svc_element, env, qparamst,
-        grp_builder_impl->svc);
+    itr = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(svc_grp_element, env, qparamst,
+        grp_builder_impl->svc_grp);
     
     parent = AXIS2_SVC_GRP_GET_PARENT(svc_grp, env);
     status = AXIS2_DESC_BUILDER_PROCESS_PARAMS(grp_builder_impl->svc_grp_builder.
@@ -174,25 +181,24 @@
 
     /* processing servicewide modules required to engage gloabbly */
     qmodulest = axis2_qname_create(env, AXIS2_MODULEST, NULL, NULL);
-    module_ref_itr = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(svc_element, env,
-        qmodulest, grp_builder_impl->svc);
-    
+    module_ref_itr = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(svc_grp_element, env,
+        qmodulest, grp_builder_impl->svc_grp);
     axis2_svc_grp_builder_process_module_refs(grp_builder, env, module_ref_itr, 
         svc_grp);
-
     qsvc_element = axis2_qname_create(env, AXIS2_SVC_ELEMENT, NULL, NULL);
-    svc_itr = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(svc_element, env,
-        qsvc_element, grp_builder_impl->svc);
+    svc_itr = AXIS2_OM_ELEMENT_GET_CHILDREN_WITH_QNAME(svc_grp_element, env,
+        qsvc_element, grp_builder_impl->svc_grp);
     while(AXIS2_TRUE == AXIS2_OM_CHILDREN_QNAME_ITERATOR_HAS_NEXT(svc_itr, env))
     {
-        axis2_om_node_t *svc = NULL;
+        axis2_om_node_t *svc_node = NULL;
+        axis2_om_element_t *svc_element = NULL;
         axis2_om_attribute_t *svc_name_att = NULL;
         axis2_char_t *svc_name = NULL;
         axis2_qname_t *qattname = NULL;
-        axis2_om_element_t *svc_element = NULL;
         
-        svc = (axis2_om_node_t *) AXIS2_OM_CHILDREN_QNAME_ITERATOR_NEXT(
+        svc_node = (axis2_om_node_t *) AXIS2_OM_CHILDREN_QNAME_ITERATOR_NEXT(
             svc_itr, env);
+        svc_element = AXIS2_OM_NODE_GET_DATA_ELEMENT(svc_node, env);
         qattname = axis2_qname_create(env, AXIS2_ATTNAME, NULL, NULL);
         svc_name_att = AXIS2_OM_ELEMENT_GET_ATTRIBUTE(svc_element, env, qattname);
         svc_name = AXIS2_OM_ATTRIBUTE_GET_VALUE(svc_name_att, env);
@@ -207,6 +213,7 @@
             axis2_svc_t *axis_svc = NULL;
             struct axis2_arch_file_data *file_data = NULL;
             axis2_array_list_t *deployable_svcs = NULL;
+            axis2_svc_builder_t *svc_builder = NULL;
             
             file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(grp_builder->
                 desc_builder->engine, env);
@@ -217,8 +224,9 @@
                 
                 qsvc_name = axis2_qname_create(env, svc_name, NULL, NULL);
                 axis_svc = axis2_svc_create_with_qname(env, qsvc_name);
-                AXIS2_ARCH_FILE_DATA_ADD_SVC(file_data, env, axis_svc);
                 AXIS2_SVC_SET_QNAME(axis_svc, env, qsvc_name);
+                AXIS2_ARCH_FILE_DATA_ADD_SVC(file_data, env, axis_svc);
+                
             }
             /* the service that has to be deployed */
             
@@ -226,10 +234,9 @@
                 env);
             AXIS2_ARRAY_LIST_ADD(deployable_svcs, env, axis_svc);
             AXIS2_SVC_SET_PARENT(axis_svc, env, svc_grp);
-            axis2_svc_builder_t *svc_builder = NULL;
             svc_builder = axis2_svc_builder_create_with_dep_engine_and_svc(env,
                 grp_builder->desc_builder->engine, axis_svc);
-            status = AXIS2_SVC_BUILDER_POPULATE_SVC(svc_builder, env, svc);
+            status = AXIS2_SVC_BUILDER_POPULATE_SVC(svc_builder, env, svc_node);
             
         }
     }
@@ -243,12 +250,13 @@
                                             axis2_svc_grp_t *svc_grp)
 {
     axis2_svc_grp_builder_impl_t *grp_builder_impl = NULL;
+    
     AXIS2_FUNC_PARAM_CHECK(grp_builder, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, module_refs, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, svc_grp, AXIS2_FAILURE);
     grp_builder_impl = AXIS2_INTF_TO_IMPL(grp_builder);
     
-    while (AXIS2_TRUE == AXIS2_OM_CHILDREN_ITERATOR_HAS_NEXT(module_refs, env));
+    while (AXIS2_TRUE == AXIS2_OM_CHILDREN_ITERATOR_HAS_NEXT(module_refs, env))
     {
         axis2_om_node_t *module_ref_node = NULL;
         axis2_om_element_t *module_ref_element = NULL;

Modified: webservices/axis2/trunk/c/modules/util/dir_handler.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/dir_handler.c?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/dir_handler.c (original)
+++ webservices/axis2/trunk/c/modules/util/dir_handler.c Fri Jan 20 03:26:31 2006
@@ -18,18 +18,14 @@
 #include <axis2_file.h>
 
 extern  int alphasort();
- 
-axis2_array_list_t *AXIS2_CALL
-axis2_dir_handler_list_dir(axis2_env_t **env,
-                            axis2_char_t *pathname);
 
 /**
- * List the .zip or tar.gz files in the given path
- * @param pathname path to the directory where your modules or services are
- * @return array list of .zip or tar.gz file names
+ * List the dll files in the given service or module folder path
+ * @param pathname path to your service or module directory
+ * @return array list of dll file names
  */
 axis2_array_list_t *AXIS2_CALL
-axis2_dir_handler_list_dir(axis2_env_t **env,
+axis2_dir_handler_list_services_or_modules_in_dir(axis2_env_t **env,
                             axis2_char_t *pathname)   
 { 
     axis2_array_list_t *file_list = NULL;
@@ -98,7 +94,84 @@
     return file_list;
 }
 
-axis2_bool_t file_select(struct direct *entry)
+/**
+ * List services or modules directories in the services or modules folder
+ * respectively
+ * @param pathname path  your modules or services folder
+ * @return array list of contents of services or modules folder
+ */
+axis2_array_list_t *AXIS2_CALL
+axis2_dir_handler_list_service_or_module_dirs(axis2_env_t **env,
+                            axis2_char_t *pathname)   
+{ 
+    axis2_array_list_t *file_list = NULL;
+    struct stat *buf = NULL;
+	int count = 1;
+    int i = 0;
+	struct direct **files = NULL;
+	int dir_select();
+    axis2_status_t status = AXIS2_FAILURE;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    file_list = axis2_array_list_create(env, 100);
+	count = scandir(pathname, &files, dir_select, alphasort);
+	/* If no files found, make a non-selectable menu item */
+	if (count <= 0)
+	{		 
+		printf("No files in this directory:%s\n", pathname);
+		return NULL;
+	}
+    
+	for (i = 1; i < (count + 1) ; ++i )
+    {
+        int len = 0;
+        axis2_char_t *fname = NULL;
+        axis2_file_t *arch_file = NULL;
+        axis2_char_t *path = NULL;
+       
+        fname = files[i-1]->d_name;
+        printf("fname:%s\n", fname);
+        arch_file = (axis2_file_t *) axis2_file_create(env);
+        if(!arch_file)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return NULL;
+        }
+        AXIS2_FILE_SET_NAME(arch_file, env, fname);
+        len = strlen(pathname) + strlen(fname) + 3;
+        path = AXIS2_MALLOC((*env)->allocator, len);
+        if(!path)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return NULL;
+        }
+        strcpy(path, pathname);
+        strcat(path, AXIS2_PATH_SEP_STR);
+        strcat(path, fname);
+        buf = AXIS2_MALLOC((*env)->allocator, sizeof(struct stat));
+        if(!buf)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return NULL;
+        }
+        stat(path, buf);
+        AXIS2_FILE_SET_TIMESTAMP(arch_file, env, (time_t) buf->st_ctime);
+        status = AXIS2_ARRAY_LIST_ADD(file_list, env, arch_file);
+        if(path)
+        {
+            AXIS2_FREE((*env)->allocator, path);
+            path = NULL;
+        }
+        buf = NULL;
+        arch_file = NULL;
+        fname = NULL;
+    }
+    
+    return file_list;
+}
+
+
+int file_select(struct direct *entry)
  
 {
 	axis2_char_t *ptr;
@@ -117,4 +190,25 @@
     }
 	else
 		return(AXIS2_FALSE);
+}
+
+int dir_select(struct direct *entry)
+ 
+{
+	axis2_char_t *ptr;
+	axis2_char_t *rindex(const axis2_char_t *s, int c);
+ 
+	if ((strcmp(entry->d_name, ".")== 0) ||
+			(strcmp(entry->d_name, "..") == 0))
+    {
+		return (AXIS2_FALSE);
+    }
+ 
+	/* Check for filename extensions */
+	ptr = rindex(entry->d_name, '.');
+	if (ptr != NULL)
+    {
+		return (AXIS2_FALSE);
+    }
+	return AXIS2_TRUE;
 }

Modified: webservices/axis2/trunk/c/test/core/transport/http/test_http_transport.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/transport/http/test_http_transport.c?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/transport/http/test_http_transport.c (original)
+++ webservices/axis2/trunk/c/test/core/transport/http/test_http_transport.c Fri Jan 20 03:26:31
2006
@@ -119,11 +119,11 @@
 
     printf("Starting http_client tests\n");
     request_line = axis2_http_request_line_create(&env, "GET", 
-                        "/", "HTTP/1.0");
+                        "/axis2/services", "HTTP/1.0");
     request_body = axis2_stream_create_basic(&env);
     request = axis2_http_simple_request_create(&env, request_line,
                         NULL, 0, NULL);
-    url = axis2_url_create(&env, "http", "www.google.com", 80,
+    url = axis2_url_create(&env, "http", "localhost", 9090,
                         NULL);
     header = axis2_http_header_create(&env,"Host", AXIS2_URL_GET_SERVER(url, &env));
     AXIS2_HTTP_SIMPLE_REQUEST_ADD_HEADER(request, &env, header);

Modified: webservices/axis2/trunk/c/test/resources/services.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/resources/services.xml?rev=370794&r1=370793&r2=370794&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/resources/services.xml (original)
+++ webservices/axis2/trunk/c/test/resources/services.xml Fri Jan 20 03:26:31 2006
@@ -1,45 +1,22 @@
 <serviceGroup>
 
-  <service name="AddService">
+  <service name="add_service">
 
-    <parameter name="ServiceClass" locked="xsd:false">sample.sgccalculator.AddService</parameter>
+    <parameter name="ServiceClass" locked="xsd:false">add.so</parameter>
 
     <operation name="add" > 
-          <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"
/>
+          <messageReceiver class="libaxis2_receivers.so" />
     </operation>
-    
-    <operation name="addPrevious" > 
-          <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"
/>
-    </operation>
-    
   </service>
   
-  <service name="MultiplyService">
+  <service name="multiply_service">
   
-    <parameter name="ServiceClass" locked="xsd:false">sample.sgccalculator.MultiplyService</parameter>
+    <parameter name="ServiceClass" locked="xsd:false">multiply.so</parameter>
 
     <operation name="multiply" > 
-          <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"
/>
+          <messageReceiver class="libaxis2_receivers.so" />
     </operation>
     
-    <operation name="multiplyPrevious" >
-          <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"
/>
-    </operation>
-     
   </service>
  
-   <service name="SubstractService">
-   
-   <parameter name="ServiceClass" locked="xsd:false">sample.sgccalculator.SubstractService</parameter>
-
-    <operation name="substract" >
-          <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"
/>
-    </operation>
-     
-    <operation name="substractPrevious" > 
-          <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"
/>
-    </operation>
-    
-  </service> 
-  
-</serviceGroup>
\ No newline at end of file
+</serviceGroup>



Mime
View raw message