axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r369740 - in /webservices/axis2/trunk/c: include/ modules/core/deployment/ test/core/deployment/
Date Tue, 17 Jan 2006 10:21:26 GMT
Author: damitha
Date: Tue Jan 17 02:20:54 2006
New Revision: 369740

URL: http://svn.apache.org/viewcvs?rev=369740&view=rev
Log:
Now work upto loading the service. 
Now it returns fail in axis2_svc_builder_populate_svc

Modified:
    webservices/axis2/trunk/c/include/axis2_arch_file_data.h
    webservices/axis2/trunk/c/include/axis2_arch_reader.h
    webservices/axis2/trunk/c/include/axis2_svc.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/dep_engine.c
    webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c
    webservices/axis2/trunk/c/test/core/deployment/test_deployment.c

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=369740&r1=369739&r2=369740&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_arch_file_data.h (original)
+++ webservices/axis2/trunk/c/include/axis2_arch_file_data.h Tue Jan 17 02:20:54 2006
@@ -70,10 +70,15 @@
                                         axis2_env_t **env,
                                         axis2_char_t *msg_recv);
     
+    /**
+     * return the dll name
+     */
     axis2_char_t *(AXIS2_CALL *
     get_name)(axis2_arch_file_data_t *file_data,
                                         axis2_env_t **env);
-    
+    /**
+     * return the service dll name
+     */
     axis2_char_t *(AXIS2_CALL *
     get_svc_name)(axis2_arch_file_data_t *file_data,
                                         axis2_env_t **env);

Modified: webservices/axis2/trunk/c/include/axis2_arch_reader.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_arch_reader.h?rev=369740&r1=369739&r2=369740&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_arch_reader.h (original)
+++ webservices/axis2/trunk/c/include/axis2_arch_reader.h Tue Jan 17 02:20:54 2006
@@ -88,7 +88,7 @@
     axis2_status_t (AXIS2_CALL *
     process_svc_grp) (axis2_arch_reader_t *arch_reader,
                                         axis2_env_t **env,
-                                        axis2_char_t *file_path,
+                                        axis2_char_t *file_name,
                                         struct axis2_dep_engine *dep_engine,
                                         axis2_svc_grp_t *svc_grp);
     
@@ -136,8 +136,8 @@
 #define AXIS2_ARCH_READER_PROCESS_SVC_GRP(arch_reader, env, file_path, dep_engine, svc_grp)
\
 		((arch_reader)->ops->process_svc_grp (arch_reader, env, file_path, dep_engine, svc_grp))
 
-#define AXIS2_ARCH_READER_BUILD_SVC_GRP(arch_reader, env, file_path, dep_engine, svc_grp)
\
-		((arch_reader)->ops->build_svc_grp (arch_reader, env, file_path, dep_engine, svc_grp))
+#define AXIS2_ARCH_READER_BUILD_SVC_GRP(arch_reader, env, file_name, dep_engine, svc_grp)
\
+		((arch_reader)->ops->build_svc_grp (arch_reader, env, file_name, dep_engine, svc_grp))
         
 #define AXIS2_ARCH_READER_READ_MODULE_ARCH(arch_reader, env, file_path, dep_engine, module)
\
 		((arch_reader)->ops->read_module_arch (arch_reader, env, file_path, dep_engine, module))

Modified: webservices/axis2/trunk/c/include/axis2_svc.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_svc.h?rev=369740&r1=369739&r2=369740&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_svc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_svc.h Tue Jan 17 02:20:54 2006
@@ -420,6 +420,13 @@
 
 /** 
  * Creates service struct with qname
+ * @return pointer to newly created service
+ */
+AXIS2_DECLARE(axis2_svc_t *)
+axis2_svc_create (axis2_env_t **env);
+
+/** 
+ * Creates service struct with qname
  * @param qname ualified name
  * @return pointer to newly created service
  */

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=369740&r1=369739&r2=369740&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 Tue Jan 17 02:20:54
2006
@@ -383,7 +383,15 @@
     
     svc_qname = AXIS2_SVC_GET_QNAME(svc_desc, env);
     svc_name = AXIS2_QNAME_GET_LOCALPART(svc_qname, env);
-    
+    if(!file_data_impl->svc_map)
+    {
+        file_data_impl->svc_map = axis2_hash_make(env);
+        if(!file_data_impl->svc_map)
+        {
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
     axis2_hash_set(file_data_impl->svc_map, svc_name, AXIS2_HASH_KEY_STRING,
         svc_desc);
     return AXIS2_SUCCESS;
@@ -395,13 +403,21 @@
                                     axis2_char_t *svc_name)
 {
     axis2_arch_file_data_impl_t *file_data_impl = NULL;
-    struct axis2_svc *svc = NULL;
+    axis2_svc_t *svc = NULL;
+        
     AXIS2_FUNC_PARAM_CHECK(file_data, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, svc_name, AXIS2_FAILURE);
-    
     file_data_impl = AXIS2_INTF_TO_IMPL(file_data);
-    svc = (struct axis2_svc *) axis2_hash_get(file_data_impl->svc_map, svc_name, 
-        AXIS2_HASH_KEY_STRING);
+    
+    if(file_data_impl->svc_map)
+    {
+        svc = (axis2_svc_t *) axis2_hash_get(file_data_impl->svc_map, svc_name, 
+            AXIS2_HASH_KEY_STRING);
+    }
+    else
+    {
+        return NULL;
+    }
     return svc;
 }
 

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=369740&r1=369739&r2=369740&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/arch_reader.c Tue Jan 17 02:20:54 2006
@@ -19,6 +19,7 @@
 #include <axis2_class_loader.h>
 #include <axis2_svc_builder.h>
 #include <axis2_module_builder.h>
+#include <axis2_svc.h>
 
 /** 
  * @brief
@@ -288,31 +289,37 @@
 axis2_status_t AXIS2_CALL
 axis2_arch_reader_process_svc_grp(axis2_arch_reader_t *arch_reader,
                                     axis2_env_t **env,
-                                    axis2_char_t *file_path,
+                                    axis2_char_t *file_name,
                                     struct axis2_dep_engine *dep_engine,
                                     axis2_svc_grp_t *svc_grp)
 {
-    axis2_char_t *file_name = NULL;
     axis2_status_t status = AXIS2_FAILURE;
+    axis2_char_t *svcs_xml = NULL;
+    axis2_char_t *repos_path = NULL;
+    axis2_char_t *temp_path = NULL;
     
     AXIS2_FUNC_PARAM_CHECK(arch_reader, env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, file_path, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, file_name, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, dep_engine, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, svc_grp, AXIS2_FAILURE);
     
-    file_name = AXIS2_STRACAT(file_path, AXIS2_SVC_XML, env);
-    if(!file_name)
+    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);
+    AXIS2_FREE((*env)->allocator, temp_path);
+    printf("svcs_xml:%s\n", svcs_xml);
+    if(!svcs_xml)
     {
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
-    status = axis2_file_handler_access(file_name, AXIS2_F_OK);
+    status = axis2_file_handler_access(svcs_xml, AXIS2_F_OK);
     if(AXIS2_SUCCESS == status)
     {
         struct axis2_arch_file_data *arch_file_data = NULL;
         axis2_char_t *svc_name = NULL;    
         
-        status = axis2_arch_reader_build_svc_grp(arch_reader, env, file_name, 
+        status = axis2_arch_reader_build_svc_grp(arch_reader, env, svcs_xml, 
             dep_engine, svc_grp);
         if(AXIS2_FAILURE == status)
         {
@@ -333,7 +340,7 @@
 axis2_status_t AXIS2_CALL
 axis2_arch_reader_build_svc_grp(axis2_arch_reader_t *arch_reader,
                                 axis2_env_t **env,
-                                axis2_char_t *file_path,
+                                axis2_char_t *svc_xml,
                                 struct axis2_dep_engine *dep_engine,
                                 struct axis2_svc_grp *svc_grp)
 {                       
@@ -344,12 +351,12 @@
     axis2_status_t status = AXIS2_FAILURE;
     
     AXIS2_FUNC_PARAM_CHECK(arch_reader, env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK((*env)->error, file_path, AXIS2_FAILURE);    
+    AXIS2_PARAM_CHECK((*env)->error, svc_xml, AXIS2_FAILURE);    
     AXIS2_PARAM_CHECK((*env)->error, dep_engine, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, svc_grp, AXIS2_FAILURE);
     
     desc_builder = axis2_desc_builder_create_with_file_and_dep_engine(env, 
-        file_path, dep_engine);
+        svc_xml, dep_engine);
     if(!desc_builder)
     {
         return AXIS2_FAILURE;
@@ -357,6 +364,7 @@
     svcs = AXIS2_DESC_BUILDER_BUILD_OM(desc_builder, env);
     svcs_element = AXIS2_OM_NODE_GET_DATA_ELEMENT(svcs, env);
     root_element_name = AXIS2_OM_ELEMENT_GET_LOCALNAME(svcs_element, env);
+    printf("root_element_name:%s\n", root_element_name);
     if(0 == AXIS2_STRCMP(AXIS2_SVC_ELEMENT, root_element_name))
     {
         axis2_svc_t *svc = NULL;
@@ -368,8 +376,10 @@
         
         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);
+        printf("short_file_name:%s\n", short_file_name);
         svc = AXIS2_ARCH_FILE_DATA_GET_SVC(file_data, env, short_file_name);
         if(NULL == svc)
         {
@@ -393,6 +403,7 @@
         status = AXIS2_SVC_BUILDER_POPULATE_SVC(svc_builder, env, svcs);
         if(AXIS2_SUCCESS != status)
         {
+            printf("populate svc is not successful\n");
             return AXIS2_FAILURE;
         }
         file_data = AXIS2_DEP_ENGINE_GET_CURRENT_FILE_ITEM(dep_engine, env);
@@ -425,8 +436,7 @@
     AXIS2_PARAM_CHECK((*env)->error, dep_engine, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, module, AXIS2_FAILURE);
     
-    /*file_name = AXIS2_STRACAT(file_path, AXIS2_MODULE_XML, env);*/
-    file_name = file_path;
+    file_name = AXIS2_STRACAT(file_path, AXIS2_MODULE_XML, env);
     if(!file_name)
     {
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);

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=369740&r1=369739&r2=369740&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/axis2_deployment.h Tue Jan 17 02:20:54
2006
@@ -45,10 +45,10 @@
 #define AXIS2_MODULE 1 /* if it is a module */
 
 #define AXIS2_META_INF "META-INF"
-#define AXIS2_SVC_XML "META-INF/services.xml"
+#define AXIS2_SVC_XML "services/services.xml"
 #define AXIS2_SVC_WSDL_NAME "service.wsdl"
 #define AXIS2_SVC_WSDL_WITH_FOLDER "META-INF/service.wsdl"
-#define AXIS2_MODULE_XML "META-INF/module.xml"
+#define AXIS2_MODULE_XML "modules/module.xml"
 #define AXIS2_PARAMETERST "parameter" /* paramater start tag */
 #define AXIS2_LISTENERST "listener" /* paramater start tag */
 #define AXIS2_HANDLERST "handler"

Modified: webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c?rev=369740&r1=369739&r2=369740&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Tue Jan 17 02:20:54 2006
@@ -1308,6 +1308,7 @@
                     printf("file_name:%s\n", file_name);
                     status = AXIS2_ARCH_READER_PROCESS_SVC_GRP(arch_reader, env,
                         file_name, dep_engine, svc_grp);
+                    printf("came40\n");
                     if(AXIS2_SUCCESS != status)
                     {
                         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_SVC, 

Modified: webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c?rev=369740&r1=369739&r2=369740&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Tue Jan 17 02:20:54 2006
@@ -859,6 +859,7 @@
     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(desc_builder, env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, file_name, NULL);
@@ -869,14 +870,14 @@
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    while(NULL == value)
-    {
-        value = strpbrk(file_name_l, separator);
-    }
+    separator = ".";
+    
+    value = strstr(file_name_l, separator);
+    
     value[0] = AXIS2_EOLN;
-    value = file_name_l;
+    short_name = file_name_l;
     
-    return value;
+    return short_name;
 }
 
 axis2_char_t *AXIS2_CALL

Modified: webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c?rev=369740&r1=369739&r2=369740&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/ws_info_list.c Tue Jan 17 02:20:54 2006
@@ -239,48 +239,48 @@
         case AXIS2_SVC:
         {
             /* check whether the file is already deployed */
-            status = axis2_file_handler_access(file->name, AXIS2_F_OK);
+            /*status = axis2_file_handler_access(file->name, AXIS2_F_OK);
             if(AXIS2_SUCCESS != status)
-            {
-                axis2_ws_info_t *ws_info = NULL;
-                long last_modified_date = 0;
-                axis2_arch_file_data_t *file_data = NULL;
-                
-                last_modified_date = file->time_stamp;
-                ws_info = 
-            axis2_ws_info_create_with_file_name_and_last_modified_date_and_type(
-                env, file->name, last_modified_date, AXIS2_SVC);
-                AXIS2_ARRAY_LIST_ADD(info_list_impl->info_list, env, ws_info);
-                file_data = axis2_arch_file_data_create_with_type_and_file(env,
-                    AXIS2_SVC, file);
-                /* to inform that new web service is deployed */
-                AXIS2_DEP_ENGINE_ADD_WS_TO_DEPLOY(info_list_impl->deployer, 
-                    env, file_data);            
+            {*/
+            axis2_ws_info_t *ws_info = NULL;
+            long last_modified_date = 0;
+            axis2_arch_file_data_t *file_data = NULL;
+            
+            last_modified_date = file->time_stamp;
+            ws_info = 
+        axis2_ws_info_create_with_file_name_and_last_modified_date_and_type(
+            env, file->name, last_modified_date, AXIS2_SVC);
+            AXIS2_ARRAY_LIST_ADD(info_list_impl->info_list, env, ws_info);
+            file_data = axis2_arch_file_data_create_with_type_and_file(env,
+                AXIS2_SVC, file);
+            /* to inform that new web service is deployed */
+            AXIS2_DEP_ENGINE_ADD_WS_TO_DEPLOY(info_list_impl->deployer, 
+                env, file_data);            
                 
-            }
+            /*}*/
             
             break;
         }
         case AXIS2_MODULE:
         {
             /* check whether the file is already deployed */
-            status = axis2_file_handler_access(file->name, AXIS2_F_OK);
+            /*status = axis2_file_handler_access(file->name, AXIS2_F_OK);
             if(AXIS2_SUCCESS != status)
-            {
-                axis2_ws_info_t *ws_info = NULL;
-                long last_modified_date = 0;
-                axis2_arch_file_data_t *file_data = NULL;
-                
-                last_modified_date = file->time_stamp;
-                ws_info = 
-            axis2_ws_info_create_with_file_name_and_last_modified_date_and_type(
-                env, file->name, last_modified_date, AXIS2_MODULE);
-                AXIS2_ARRAY_LIST_ADD(info_list_impl->info_list, env, ws_info);
-                file_data = axis2_arch_file_data_create_with_type_and_file(env,
-                    AXIS2_MODULE, file);
-                /* to inform that new web service is deployed */
-                AXIS2_DEP_ENGINE_ADD_WS_TO_DEPLOY(info_list_impl->deployer, env, file_data);
-            }    
+            {*/
+            axis2_ws_info_t *ws_info = NULL;
+            long last_modified_date = 0;
+            axis2_arch_file_data_t *file_data = NULL;
+            
+            last_modified_date = file->time_stamp;
+            ws_info = 
+        axis2_ws_info_create_with_file_name_and_last_modified_date_and_type(
+            env, file->name, last_modified_date, AXIS2_MODULE);
+            AXIS2_ARRAY_LIST_ADD(info_list_impl->info_list, env, ws_info);
+            file_data = axis2_arch_file_data_create_with_type_and_file(env,
+                AXIS2_MODULE, file);
+            /* to inform that new web service is deployed */
+            AXIS2_DEP_ENGINE_ADD_WS_TO_DEPLOY(info_list_impl->deployer, env, file_data);
+            /*}*/
                 
             break;
         }

Modified: webservices/axis2/trunk/c/test/core/deployment/test_deployment.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/test/core/deployment/test_deployment.c?rev=369740&r1=369739&r2=369740&view=diff
==============================================================================
--- webservices/axis2/trunk/c/test/core/deployment/test_deployment.c (original)
+++ webservices/axis2/trunk/c/test/core/deployment/test_deployment.c Tue Jan 17 02:20:54 2006
@@ -128,10 +128,10 @@
 
 int main()
 {
-    axis2_test_dep_engine_do_deploy();
-    axis2_test_engine_conf_builder_populate_conf();
+    /*axis2_test_dep_engine_do_deploy();
+    axis2_test_engine_conf_builder_populate_conf();*/
     axis2_test_dep_engine_load();
-    axis2_test_transport_receiver_load();
+    /*axis2_test_transport_receiver_load();*/
     
 	return 0;
 }



Mime
View raw message