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/11/18 14:41:54 UTC

svn commit: r596084 [1/2] - in /webservices/axis2/scratch/c/dinesh/axis2c-762: axiom/src/om/ include/ samples/server/echo/ src/core/deployment/ src/core/engine/ src/core/receivers/ src/core/transport/http/receiver/ src/core/transport/http/sender/ src/c...

Author: dinesh
Date: Sun Nov 18 05:41:52 2007
New Revision: 596084

URL: http://svn.apache.org/viewvc?rev=596084&view=rev
Log:
specifying axis2.xml which having services, modules and library directories.
Using those services, modules and lib directories make axis2 conf and start the server. This feature gives ability to place services, modules and lib folders where ever user need.

Modified:
    webservices/axis2/scratch/c/dinesh/axis2c-762/axiom/src/om/om_namespace.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/axiom/src/om/om_node.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_conf.h
    webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_conf_init.h
    webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_http_server.h
    webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo.h
    webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo_skeleton.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/arch_file_data.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/arch_reader.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/axis2_dep_engine.h
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/axis2_repos_listener.h
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/conf_builder.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/conf_init.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/dep_engine.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/phases_info.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/repos_listener.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/ws_info_list.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/engine/conf.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/engine/engine.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/receivers/raw_xml_in_out_msg_recv.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/transport/http/receiver/http_receiver.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/transport/http/sender/http_client.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/transport/http/server/simple_axis2_server/http_server_main.c
    webservices/axis2/scratch/c/dinesh/axis2c-762/util/include/axutil_error.h
    webservices/axis2/scratch/c/dinesh/axis2c-762/util/src/dir_handler.c

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/axiom/src/om/om_namespace.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/axiom/src/om/om_namespace.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/axiom/src/om/om_namespace.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/axiom/src/om/om_namespace.c Sun Nov 18 05:41:52 2007
@@ -387,6 +387,7 @@
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return AXIS2_FAILURE;
     }
+	
     return AXIS2_SUCCESS;
 
 }

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/axiom/src/om/om_node.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/axiom/src/om/om_node.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/axiom/src/om/om_node.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/axiom/src/om/om_node.c Sun Nov 18 05:41:52 2007
@@ -83,7 +83,6 @@
     node->data_element = NULL;
     node->om_doc = NULL;
     node->builder = NULL;
-
     return node;
 }
 

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_conf.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_conf.h?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_conf.h (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_conf.h Sun Nov 18 05:41:52 2007
@@ -624,6 +624,31 @@
         axis2_conf_t * conf,
         const axutil_env_t * env,
         axis2_char_t * axis2_repo);
+	
+	
+	/**
+     * Gets the axis2.xml location.
+     * @param conf pointer to conf struct
+     * @param env pointer to environment struct
+     * @return returns repository location as a string
+     */
+    AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+    axis2_conf_get_axis2_xml(
+        const axis2_conf_t * conf,
+        const axutil_env_t * env);
+
+    /**
+     * Sets the axis2.xml location.
+     * @param conf pointer to conf struct
+     * @param env pointer to environment struct
+     * @param axis2_xml repository location as a string
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_conf_set_axis2_xml(
+        axis2_conf_t * conf,
+        const axutil_env_t * env,
+        axis2_char_t * axis2_xml);
 
     /**
      * Engages the named module.
@@ -731,6 +756,20 @@
         axis2_conf_t * conf,
         const axutil_env_t * env,
         axis2_bool_t enable_mtom);
+	
+	/**
+	 * set a flag to mark conf created by axis2.xml
+	 */
+	AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    axis2_conf_get_enable_axis2_flag(
+        axis2_conf_t * conf,
+        const axutil_env_t * env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_conf_set_enable_axis2_flag(
+        axis2_conf_t * conf,
+        const axutil_env_t * env,
+        axis2_bool_t axis2_flag);
 
     /*The following two methods are used in Rampart to
      *check whether security is engaed. */

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_conf_init.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_conf_init.h?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_conf_init.h (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_conf_init.h Sun Nov 18 05:41:52 2007
@@ -43,6 +43,17 @@
     axis2_build_conf_ctx(
         const axutil_env_t * env,
         const axis2_char_t * repo_name);
+	
+	/**
+	 * Builds the configuration for the Server using axis2.xml file.
+	 * @param env Pointer to environment struct. MUST NOT be NULL
+	 * @param file path of the axis2.xml file
+	 * @return pointer to an instance of configuration context properly initialized
+	 */
+	AXIS2_EXTERN axis2_conf_ctx_t *AXIS2_CALL
+	axis2_build_conf_ctx_with_file(
+    	const axutil_env_t * env,
+    	const axis2_char_t * file);
 
     /**
      * Builds the Configuration for the Client
@@ -60,4 +71,4 @@
 #ifdef __cplusplus
 }
 #endif
-#endif                          /* AXIS2_CONF_INIT_H */
+#endif      /* AXIS2_CONF_INIT_H */

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_http_server.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_http_server.h?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_http_server.h (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/include/axis2_http_server.h Sun Nov 18 05:41:52 2007
@@ -42,11 +42,16 @@
 #endif
 
     AXIS2_EXTERN axis2_transport_receiver_t *AXIS2_CALL
-
     axis2_http_server_create(
         const axutil_env_t * env,
         const axis2_char_t * repo,
         const int port);
+	
+	AXIS2_EXTERN axis2_transport_receiver_t *AXIS2_CALL
+	axis2_http_server_create_with_file(
+    	const axutil_env_t * env,
+    	const axis2_char_t * file,
+    	const int port);
 
     axis2_status_t AXIS2_CALL
     axis2_http_server_stop(
@@ -58,4 +63,4 @@
 }
 #endif
 
-#endif                          /* AXIS2_HTTP_SERVER_H */
+#endif  /* AXIS2_HTTP_SERVER_H */

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo.c Sun Nov 18 05:41: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
@@ -23,10 +22,6 @@
     const axutil_env_t * env,
     axis2_char_t * text);
 
-void set_custom_error(
-    const axutil_env_t * env,
-    axis2_char_t * error_message);
-
 axiom_node_t *
 axis2_echo_echo(
     const axutil_env_t * env,
@@ -45,21 +40,24 @@
      */
     if (!node)                  /* 'echoString' node */
     {
-        set_custom_error(env, "Invalid payload; echoString node is NULL");
+		AXIS2_ERROR_SET (env->error, USER_ERROR_NO_1, AXIS2_FAILURE);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "%s", AXIS2_ERROR_GET_MESSAGE (env->error));
         return NULL;
     }
 
     text_parent_node = axiom_node_get_first_element(node, env);
     if (!text_parent_node)
     {
-        set_custom_error(env, "Invalid payload; text node is NULL");
+		AXIS2_ERROR_SET (env->error, USER_ERROR_NO_2, AXIS2_FAILURE);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "%s", AXIS2_ERROR_GET_MESSAGE (env->error));
         return NULL;
     }
 
     text_node = axiom_node_get_first_child(text_parent_node, env);
     if (!text_node)             /* actual text to echo */
     {
-        set_custom_error(env, "Invalid payload; text to be echoed is NULL");
+      	AXIS2_ERROR_SET (env->error, USER_ERROR_NO_3, AXIS2_FAILURE);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "%s", AXIS2_ERROR_GET_MESSAGE (env->error));
         return NULL;
     }
 
@@ -76,10 +74,12 @@
     }
     else
     {
-        set_custom_error(env, "Invalid payload; invalid XML in request");
+        AXIS2_ERROR_SET (env->error, USER_ERROR_NO_4, AXIS2_FAILURE);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "%s", AXIS2_ERROR_GET_MESSAGE (env->error));
         return NULL;
     }
-
+	
+	
     return ret_node;
 }
 
@@ -106,11 +106,3 @@
     return echo_om_node;
 }
 
-void
-set_custom_error(
-    const axutil_env_t * env,
-    axis2_char_t * error_message)
-{
-    axutil_error_set_error_message(env->error, error_message);
-    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_LAST + 1, AXIS2_FAILURE);
-}

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo.h?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo.h (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo.h Sun Nov 18 05:41:52 2007
@@ -25,6 +25,13 @@
 #include <axiom_node.h>
 #include <axiom_element.h>
 
+
+/* USER_ERROR_NO_# defined wrt USER_ERROR_CODES_START*/
+#define USER_ERROR_NO_1 (USER_ERROR_CODES_START + 1) 
+#define USER_ERROR_NO_2 (USER_ERROR_CODES_START + 2)
+#define USER_ERROR_NO_3 (USER_ERROR_CODES_START + 3)
+#define USER_ERROR_NO_4 (USER_ERROR_CODES_START + 4)
+
 axiom_node_t *axis2_echo_echo(
     const axutil_env_t * env,
     axiom_node_t * node);

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo_skeleton.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo_skeleton.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo_skeleton.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/samples/server/echo/echo_skeleton.c Sun Nov 18 05:41:52 2007
@@ -21,10 +21,15 @@
 #include <axis2_msg_ctx.h>
 #include <stdio.h>
 
+
 int AXIS2_CALL echo_free(
     axis2_svc_skeleton_t * svc_skeleton,
     const axutil_env_t * env);
 
+extern axis2_char_t *axutil_error_messages[AXUTIL_ERROR_MAX];
+
+void static user_defined_errors_init ();
+
 /*
  * This method invokes the right service method
  */
@@ -73,6 +78,7 @@
     const axutil_env_t * env)
 {
     /* Any initialization stuff of echo service should go here */
+	
     return AXIS2_SUCCESS;
 }
 
@@ -92,7 +98,7 @@
      * To see how to deal with multiple impl methods, have a look at the
      * math sample.
      */
-
+	user_defined_errors_init ();
     return axis2_echo_echo(env, node);
 }
 
@@ -166,4 +172,17 @@
         status = AXIS2_SVC_SKELETON_FREE(inst, env);
     }
     return status;
+}
+
+void 
+user_defined_errors_init ()
+{
+	/*
+	 * USER_ERROR_NO_1, USER_ERROR_2, USER_ERROR_NO_3 in echo.h
+	 */
+	 
+	axutil_error_messages[USER_ERROR_NO_1] = "Invalid payload; echoString node is NULL";
+	axutil_error_messages[USER_ERROR_NO_2] = "Invalid payload; text node is NULL";
+	axutil_error_messages[USER_ERROR_NO_3] = "Invalid payload; text to be echoed is NULL";
+	axutil_error_messages[USER_ERROR_NO_4] = "Invalid payload; invalid XML in request";
 }

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/arch_file_data.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/arch_file_data.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/arch_file_data.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/arch_file_data.c Sun Nov 18 05:41:52 2007
@@ -56,15 +56,7 @@
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-
-    arch_file_data->file = NULL;
-    arch_file_data->type = 0;
-    arch_file_data->msg_recv = NULL;
-    arch_file_data->module_name = NULL;
-    arch_file_data->module_dll_name = NULL;
-    arch_file_data->name = NULL;
-    arch_file_data->svc_map = NULL;
-    arch_file_data->deployable_svcs = NULL;
+	memset ((void *)arch_file_data, 0, sizeof (axis2_arch_file_data_t));
 
     arch_file_data->deployable_svcs = axutil_array_list_create(env, 0);
     if (!arch_file_data->deployable_svcs)

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/arch_reader.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/arch_reader.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/arch_reader.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/arch_reader.c Sun Nov 18 05:41:52 2007
@@ -90,17 +90,31 @@
     axis2_status_t status = AXIS2_FAILURE;
     axis2_char_t *svcs_xml = NULL;
     axis2_char_t *repos_path = NULL;
+    axis2_bool_t file_flag = AXIS2_FALSE;
     AXIS2_ENV_CHECK(env, 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);
 
-    repos_path = axis2_dep_engine_get_repos_path(dep_engine, env);
+    file_flag = axis2_dep_engine_get_file_flag (dep_engine, env);
 
-    svcs_xml = axutil_strcat(env, repos_path, AXIS2_PATH_SEP_STR,
-                             AXIS2_SERVICE_FOLDER, AXIS2_PATH_SEP_STR,
-                             file_name, AXIS2_PATH_SEP_STR, AXIS2_SVC_XML,
-                             NULL);
+    if (file_flag == AXIS2_FALSE)
+    { 
+
+        repos_path = axis2_dep_engine_get_repos_path(dep_engine, env);
+        
+        svcs_xml = axutil_strcat(env, repos_path, AXIS2_PATH_SEP_STR,
+                                 AXIS2_SERVICE_FOLDER, AXIS2_PATH_SEP_STR,
+                                 file_name, AXIS2_PATH_SEP_STR, AXIS2_SVC_XML,
+                                 NULL);
+    }
+    else
+    {
+        repos_path = axis2_dep_engine_get_svc_dir (dep_engine, env);
+        svcs_xml = axutil_strcat (env, repos_path, AXIS2_PATH_SEP_STR,
+                                  file_name, AXIS2_PATH_SEP_STR, AXIS2_SVC_XML,
+                                  NULL);
+    }
 
     if (!svcs_xml)
     {
@@ -250,17 +264,32 @@
     axis2_status_t status = AXIS2_FAILURE;
     axis2_char_t *module_xml = NULL;
     axis2_char_t *repos_path = NULL;
+    axis2_bool_t file_flag;
+
 
     AXIS2_ENV_CHECK(env, 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, module_desc, AXIS2_FAILURE);
 
-    repos_path = axis2_dep_engine_get_repos_path(dep_engine, env);
-    module_xml = axutil_strcat(env, repos_path, AXIS2_PATH_SEP_STR,
-                               AXIS2_MODULE_FOLDER, AXIS2_PATH_SEP_STR,
-                               file_name, AXIS2_PATH_SEP_STR, AXIS2_MODULE_XML,
-                               NULL);
+    file_flag = axis2_dep_engine_get_file_flag (dep_engine, env);
+	if (file_flag == AXIS2_FALSE)
+	{
+    	repos_path = axis2_dep_engine_get_repos_path(dep_engine, env);
+    	module_xml = axutil_strcat(env, repos_path, AXIS2_PATH_SEP_STR,
+        	                       AXIS2_MODULE_FOLDER, AXIS2_PATH_SEP_STR,
+            	                   file_name, AXIS2_PATH_SEP_STR, AXIS2_MODULE_XML,
+                	               NULL);
+	}
+	else
+	{
+        repos_path = axis2_dep_engine_get_module_dir (dep_engine, env);
+        module_xml = axutil_strcat (env, repos_path, AXIS2_PATH_SEP_STR,
+                                    file_name, AXIS2_PATH_SEP_STR, AXIS2_MODULE_XML,
+                                    NULL);
+		AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "%s", module_xml);
+	}
+	
     if (!module_xml)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/axis2_dep_engine.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/axis2_dep_engine.h?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/axis2_dep_engine.h (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/axis2_dep_engine.h Sun Nov 18 05:41:52 2007
@@ -136,10 +136,9 @@
      * @param env pointer to environment struct
      */
     AXIS2_EXTERN struct axis2_phases_info *AXIS2_CALL
-
-                axis2_dep_engine_get_phases_info(
-                    const axis2_dep_engine_t * dep_engine,
-                    const axutil_env_t * env);
+    axis2_dep_engine_get_phases_info(
+        const axis2_dep_engine_t * dep_engine,
+        const axutil_env_t * env);
 
     /**
      * @param dep_engine pointer to deployment engine
@@ -147,29 +146,28 @@
      * @return AxisConfiguration <code>AxisConfiguration</code>
      */
     AXIS2_EXTERN struct axis2_conf *AXIS2_CALL
-
-                axis2_dep_engine_get_axis_conf(
-                    const axis2_dep_engine_t * dep_engine,
-                    const axutil_env_t * env);
+    axis2_dep_engine_get_axis_conf(
+        const axis2_dep_engine_t * dep_engine,
+        const axutil_env_t * env);
 
     /**
      * @param dep_engine pointer to deployment engine
      * @param env pointer to environment struct
      */
     AXIS2_EXTERN struct axis2_conf *AXIS2_CALL
-                axis2_dep_engine_load(
-                    axis2_dep_engine_t * dep_engine,
-                    const axutil_env_t * env);
+    axis2_dep_engine_load(
+        axis2_dep_engine_t * dep_engine,
+        const axutil_env_t * env);
 
     /**
      * @param dep_engine pointer to deployment engine
      * @param env pointer to environment struct
      */
     AXIS2_EXTERN struct axis2_conf *AXIS2_CALL
-                axis2_dep_engine_load_client(
-                    axis2_dep_engine_t * dep_engine,
-                    const axutil_env_t * env,
-                    const axis2_char_t * client_home);
+    axis2_dep_engine_load_client(
+        axis2_dep_engine_t * dep_engine,
+        const axutil_env_t * env,
+        const axis2_char_t * client_home);
 
     /**
      * @param dep_engine pointer to deployment engine
@@ -234,11 +232,11 @@
      * @param file_name pointer to file name
      */
     AXIS2_EXTERN struct axis2_svc *AXIS2_CALL
-                axis2_dep_engine_build_svc(
-                    axis2_dep_engine_t * dep_engine,
-                    const axutil_env_t * env,
-                    struct axis2_svc *svc,
-                    axis2_char_t * file_name);
+		axis2_dep_engine_build_svc(
+			axis2_dep_engine_t * dep_engine,
+            const axutil_env_t * env,
+            struct axis2_svc *svc,
+            axis2_char_t * file_name);
 
     /**
      * This method can be used to build ModuleDescription for a given module archiev file
@@ -248,22 +246,65 @@
      * @param conf pointer to conf
      */
     AXIS2_EXTERN struct axis2_module_desc *AXIS2_CALL
-
-                axis2_dep_engine_build_module(
-                    axis2_dep_engine_t * dep_engine,
-                    const axutil_env_t * env,
-                    axutil_file_t * module_archive,
-                    struct axis2_conf *conf);
+		axis2_dep_engine_build_module(
+        	axis2_dep_engine_t * dep_engine,
+            const axutil_env_t * env,
+            axutil_file_t * module_archive,
+            struct axis2_conf *conf);
 
     /**
      * @param dep_engine pointer to deployment engine
      * @param env pointer to environment struct
      */
     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
-    axis2_dep_engine_get_repos_path(
+    	axis2_dep_engine_get_repos_path(
+        const axis2_dep_engine_t * dep_engine,
+        const axutil_env_t * env);
+
+	/**
+     * @param dep_engine pointer to module directory
+     * @param env pointer to environment struct
+     */
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    	axis2_dep_engine_get_file_flag(
         const axis2_dep_engine_t * dep_engine,
         const axutil_env_t * env);
 
+	
+	/**
+     * @param dep_engine pointer to module directory
+     * @param env pointer to environment struct
+     */
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    	axis2_dep_engine_get_module_dir(
+        const axis2_dep_engine_t * dep_engine,
+        const axutil_env_t * env);
+	
+	/**
+     * @param dep_engine pointer to module directory
+     * @param env pointer to environment struct
+	 * @param module_dir pointer of the directory path
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    	axis2_dep_engine_set_module_dir(
+        axis2_dep_engine_t * dep_engine,
+        const axutil_env_t * env,
+	    const axis2_char_t *module_dir);
+
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    axis2_dep_engine_get_svc_dir(
+        const axis2_dep_engine_t * dep_engine,
+        const axutil_env_t * env);
+
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_dep_engine_set_svc_dir(
+        axis2_dep_engine_t * dep_engine,
+        const axutil_env_t * env,
+        const axis2_char_t *svc_dir);
+
+
     /**
      * @param dep_engine pointer to deployment engine
      * @param env pointer to environment struct
@@ -271,7 +312,6 @@
      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
      */
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
-
     axis2_dep_engine_set_current_file_item(
         axis2_dep_engine_t * dep_engine,
         const axutil_env_t * env,
@@ -307,10 +347,24 @@
      * @return pointer to newly created deployment engine
      */
     AXIS2_EXTERN axis2_dep_engine_t *AXIS2_CALL
-
     axis2_dep_engine_create_with_repos_name(
         const axutil_env_t * env,
         const axis2_char_t * repos_path);
+	
+	
+	/**
+     * Creates description builder struct using axis2 xml
+     * This the constructor which is used by Engine in order to start
+     * Deployment module,
+     * @param env pointer to environment struct
+     * @param axis2_xml is the path of the axis2.xml .
+     * @return pointer to newly created deployment engine
+     */	
+	AXIS2_EXTERN axis2_dep_engine_t *AXIS2_CALL
+	axis2_dep_engine_create_with_axis2_xml(
+	    const axutil_env_t * env,
+    	const axis2_char_t * axis2_xml);
+
 
     /**
      * Creates deployment engine struct
@@ -326,6 +380,11 @@
         const axis2_char_t * repos_path,
         const axis2_char_t * svr_xml_file);
 
+    AXIS2_EXTERN axis2_dep_engine_t *AXIS2_CALL
+    axis2_dep_engine_create_with_svr_xml_file(
+        const axutil_env_t * env,
+        const axis2_char_t * svr_xml_file);
+
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
     axis2_dep_engine_add_desc_builder(
         axis2_dep_engine_t * dep_engine,
@@ -333,7 +392,6 @@
         struct axis2_desc_builder *desc_builder);
 
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
-
     axis2_dep_engine_add_module_builder(
         axis2_dep_engine_t * dep_engine,
         const axutil_env_t * env,

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/axis2_repos_listener.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/axis2_repos_listener.h?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/axis2_repos_listener.h (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/axis2_repos_listener.h Sun Nov 18 05:41:52 2007
@@ -121,7 +121,6 @@
      * @return pointer to newly created deployment engine
      */
     AXIS2_EXTERN axis2_repos_listener_t *AXIS2_CALL
-
     axis2_repos_listener_create(
         const axutil_env_t * env);
 
@@ -132,11 +131,24 @@
      * @return pointer to newly created deployment engine
      */
     AXIS2_EXTERN axis2_repos_listener_t *AXIS2_CALL
-
     axis2_repos_listener_create_with_folder_name_and_dep_engine(
         const axutil_env_t * env,
         axis2_char_t * folder_name,
         struct axis2_dep_engine *dep_engine);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_repos_listener_set_conf(
+        axis2_repos_listener_t *repo_listener,        
+        const axutil_env_t * env,
+        axis2_conf_t *conf);
+
+    AXIS2_EXTERN axis2_conf_t *AXIS2_CALL
+    axis2_repos_listener_get_conf(
+        axis2_repos_listener_t *repo_listener,        
+        const axutil_env_t * env);
+
+
+
 
     /** @} */
 

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/conf_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/conf_builder.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/conf_builder.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/conf_builder.c Sun Nov 18 05:41:52 2007
@@ -666,6 +666,7 @@
             trs_name = axiom_element_get_attribute(transport_element, env,
                                                    qattname);
         }
+
         axutil_qname_free(qattname, env);
         if (trs_name)
         {
@@ -697,9 +698,16 @@
             axis2_char_t *temp_path2 = NULL;
             axis2_char_t *temp_path3 = NULL;
             AXIS2_TRANSPORT_ENUMS transport_enum;
+            axis2_bool_t axis2_flag = AXIS2_FALSE;
+            axutil_param_t *libparam;
+            axis2_char_t *libdir;
+            axis2_conf_t *conf; 
+
+            conf = conf_builder->conf;
+            axis2_flag = axis2_conf_get_axis2_flag (conf, env);
 
             name = axiom_attribute_get_value(trs_name, env);
-            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Transport name:%s", name);
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Transport out name:%s", name);
             if (name)
             {
                 if (axutil_strcmp(name, AXIS2_TRANSPORT_HTTP) == 0)
@@ -758,18 +766,42 @@
             dll_name =
                 axutil_dll_desc_create_platform_specific_dll_name(dll_desc, env,
                                                                   class_name);
+            if (axis2_flag == AXIS2_FALSE)
+            {
+                repos_name =
+                    axis2_dep_engine_get_repos_path
+                    (axis2_desc_builder_get_dep_engine
+                     (conf_builder->desc_builder, env), env);
+                temp_path = axutil_stracat(env, repos_name, AXIS2_PATH_SEP_STR);
+                temp_path2 = axutil_stracat(env, temp_path, AXIS2_LIB_FOLDER);
+                temp_path3 = axutil_stracat(env, temp_path2, AXIS2_PATH_SEP_STR);
+                path_qualified_dll_name = axutil_stracat(env, temp_path3, dll_name);
+                AXIS2_FREE(env->allocator, temp_path);
+                AXIS2_FREE(env->allocator, temp_path2);
+                AXIS2_FREE(env->allocator, temp_path3);
+            }
+            else
+            {
+                libparam = axis2_conf_get_param (conf, env, "libDir");
+                if (libparam)
+                {
+                    libdir = axutil_param_get_value (libparam, env);
+                }
+
+                if (!libdir)
+                {
+                    AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "specifying \
+services and modules directories using axis2.xml, path of the library directory\
+is not presant");
+                    return AXIS2_FAILURE;
+                }
+                path_qualified_dll_name = axutil_strcat (env, libdir, 
+                                                         AXIS2_PATH_SEP_STR,
+                                                         dll_name,
+                                                         NULL);
+            }
+            AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "%s", path_qualified_dll_name);
 
-            repos_name =
-                axis2_dep_engine_get_repos_path
-                (axis2_desc_builder_get_dep_engine
-                 (conf_builder->desc_builder, env), env);
-            temp_path = axutil_stracat(env, repos_name, AXIS2_PATH_SEP_STR);
-            temp_path2 = axutil_stracat(env, temp_path, AXIS2_LIB_FOLDER);
-            temp_path3 = axutil_stracat(env, temp_path2, AXIS2_PATH_SEP_STR);
-            path_qualified_dll_name = axutil_stracat(env, temp_path3, dll_name);
-            AXIS2_FREE(env->allocator, temp_path);
-            AXIS2_FREE(env->allocator, temp_path2);
-            AXIS2_FREE(env->allocator, temp_path3);
             axutil_dll_desc_set_name(dll_desc, env, path_qualified_dll_name);
             AXIS2_FREE(env->allocator, path_qualified_dll_name);
             axutil_dll_desc_set_type(dll_desc, env, AXIS2_TRANSPORT_SENDER_DLL);

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/conf_init.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/conf_init.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/conf_init.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/conf_init.c Sun Nov 18 05:41:52 2007
@@ -93,6 +93,68 @@
     return conf_ctx;
 }
 
+
+AXIS2_EXTERN axis2_conf_ctx_t *AXIS2_CALL
+axis2_build_conf_ctx_with_file(
+    const axutil_env_t * env,
+    const axis2_char_t * file)
+{
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    axis2_dep_engine_t *dep_engine = NULL;
+    axis2_conf_t *conf = NULL;
+    axis2_phase_resolver_t *phase_resolver = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+
+    dep_engine = axis2_dep_engine_create_with_axis2_xml (env, file);
+    if (!dep_engine)
+    {
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+                        "dep engine create with axis2 xml 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);
+    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);
+
+    axis2_init_modules(env, conf_ctx);
+    axis2_load_services(env, conf_ctx);
+    axis2_init_transports(env, conf_ctx);
+
+    axis2_phase_resolver_free(phase_resolver, env);
+
+    return conf_ctx;
+}
+
 axis2_conf_ctx_t *AXIS2_CALL
 axis2_build_client_conf_ctx(
     const axutil_env_t * env,

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/dep_engine.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/dep_engine.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/dep_engine.c Sun Nov 18 05:41:52 2007
@@ -47,6 +47,9 @@
     axis2_char_t *axis2_repos;
     axis2_bool_t hot_dep;       /* to do hot deployment or not */
     axis2_bool_t hot_update;    /* to do hot update or not */
+	
+	/* whether dep_engine build using axis2.xml */
+	axis2_bool_t file_flag;
 
     /**
      * This will store all the web Services to deploy
@@ -64,6 +67,17 @@
      */
     axis2_char_t *folder_name;
 
+	/**
+	 * module directory, dep_engine holds in the module build scenario
+	 */
+	axis2_char_t *module_dir;
+
+   /**
+    *services directory, services are avialble in services directory
+    */
+
+    axis2_char_t *svc_dir;
+	
     /**
      * Full path to the server xml file(axis2.xml)
      */
@@ -75,7 +89,7 @@
      */
     axutil_array_list_t *module_list;
     axis2_repos_listener_t *repos_listener; /*Added this here to help with freeing
-                                               memory allocated for this - Samisa */
+                                              memory allocated for this - Samisa */
     axis2_conf_builder_t *conf_builder;
     axis2_svc_builder_t *svc_builder;
     axutil_array_list_t *desc_builders;
@@ -127,6 +141,10 @@
     const axutil_env_t * env,
     axis2_char_t * file_name);
 
+static axis2_status_t axis2_dep_engine_set_svc_and_module_dir_path (
+    axis2_dep_engine_t *dep_engine,
+    const axutil_env_t *env);
+
 AXIS2_EXTERN axis2_dep_engine_t *AXIS2_CALL
 axis2_dep_engine_create(
     const axutil_env_t * env)
@@ -144,23 +162,7 @@
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    dep_engine->conf = NULL;
-    dep_engine->axis2_repos = NULL;
-    dep_engine->curr_file = NULL;
-    dep_engine->arch_reader = NULL;
-    dep_engine->ws_to_deploy = NULL;
-    dep_engine->ws_to_undeploy = NULL;
-    dep_engine->phases_info = NULL;
-    dep_engine->module_list = NULL;
-    dep_engine->folder_name = NULL;
-    dep_engine->conf_name = NULL;
-    dep_engine->repos_listener = NULL;
-    dep_engine->conf_builder = NULL;
-    dep_engine->svc_builder = NULL;
-    dep_engine->desc_builders = NULL;
-    dep_engine->module_builders = NULL;
-    dep_engine->svc_builders = NULL;
-    dep_engine->svc_grp_builders = NULL;
+  	memset (dep_engine, 0, sizeof (axis2_dep_engine_t));
 
     dep_engine->ws_to_deploy = axutil_array_list_create(env, 0);
     if (!(dep_engine->ws_to_deploy))
@@ -201,10 +203,33 @@
     {
         return NULL;
     }
+	dep_engine->file_flag = AXIS2_FALSE;
+
+    return dep_engine;
+}
+
+AXIS2_EXTERN axis2_dep_engine_t *AXIS2_CALL
+axis2_dep_engine_create_with_axis2_xml(
+    const axutil_env_t * env,
+    const axis2_char_t * axis2_xml)
+{
+    axis2_dep_engine_t *dep_engine = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+
+    dep_engine = (axis2_dep_engine_t *)
+        axis2_dep_engine_create_with_svr_xml_file(env,
+                                                  axis2_xml);
+    if (!dep_engine)
+    {
+        return NULL;
+    }
+	dep_engine->file_flag = AXIS2_TRUE;
 
     return dep_engine;
 }
 
+
 AXIS2_EXTERN axis2_dep_engine_t *AXIS2_CALL
 axis2_dep_engine_create_with_repos_name_and_svr_xml_file(
     const axutil_env_t * env,
@@ -260,6 +285,7 @@
 
     conf_file_l = axutil_stracat(env, repos_path, AXIS2_PATH_SEP_STR);
     dep_engine->conf_name = axutil_stracat(env, conf_file_l, svr_xml_file);
+	
     AXIS2_FREE(env->allocator, conf_file_l);
     if (!dep_engine->conf_name)
     {
@@ -268,24 +294,71 @@
                         AXIS2_FAILURE);
         return NULL;
     }
+	
     status = axutil_file_handler_access(dep_engine->conf_name, AXIS2_F_OK);
     if (AXIS2_SUCCESS != status)
     {
         axis2_dep_engine_free(dep_engine, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND,
                         AXIS2_FAILURE);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "%s", 
+						 AXIS2_ERROR_GET_MESSAGE (env->error));
         return NULL;
     }
 
     return dep_engine;
 }
 
+AXIS2_EXTERN axis2_dep_engine_t *AXIS2_CALL
+axis2_dep_engine_create_with_svr_xml_file(
+    const axutil_env_t * env,
+    const axis2_char_t * svr_xml_file)
+{
+    axis2_dep_engine_t *dep_engine = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, svr_xml_file, NULL);
+
+    dep_engine = (axis2_dep_engine_t *) axis2_dep_engine_create(env);
+	
+    if (!dep_engine)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    dep_engine->conf_name = axutil_strdup (env, (axis2_char_t *)svr_xml_file);
+    if (!dep_engine->conf_name)
+    {
+        axis2_dep_engine_free(dep_engine, env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_REPO_CAN_NOT_BE_NULL,
+                        AXIS2_FAILURE);
+        return NULL;
+    }
+    status = axutil_file_handler_access(dep_engine->conf_name, AXIS2_F_OK);
+    if (AXIS2_SUCCESS != status)
+    {
+        axis2_dep_engine_free(dep_engine, env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CONFIG_NOT_FOUND,
+                        AXIS2_FAILURE);
+		AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "%s", 
+						 AXIS2_ERROR_GET_MESSAGE (env->error));
+        return NULL;
+    }
+
+    return dep_engine;
+}
+
+
 AXIS2_EXTERN void AXIS2_CALL
 axis2_dep_engine_free(
     axis2_dep_engine_t * dep_engine,
     const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, void);
+    if (!dep_engine)
+        return;
 
     if (dep_engine->curr_file)
     {
@@ -491,6 +564,7 @@
     axutil_qname_t * module_name)
 {
     AXIS2_PARAM_CHECK(env->error, module_name, NULL);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     return axis2_conf_get_module(dep_engine->conf, env, module_name);
 }
@@ -500,6 +574,7 @@
     const axis2_dep_engine_t * dep_engine,
     const axutil_env_t * env)
 {
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
     return dep_engine->curr_file;
 }
 
@@ -511,6 +586,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, file, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     return axutil_array_list_add(dep_engine->ws_to_deploy, env, file);
 }
@@ -523,6 +599,8 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, file, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
+
     if (!(dep_engine->ws_to_undeploy))
     {
         dep_engine->ws_to_undeploy = axutil_array_list_create(env, 0);
@@ -535,6 +613,7 @@
     const axis2_dep_engine_t * dep_engine,
     const axutil_env_t * env)
 {
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
     return dep_engine->phases_info;
 }
 
@@ -543,6 +622,7 @@
     const axis2_dep_engine_t * dep_engine,
     const axutil_env_t * env)
 {
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
     return dep_engine->conf;
 }
 
@@ -559,6 +639,7 @@
     axutil_param_t *para_hot_update = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     para_hot_dep = axis2_conf_get_param(dep_engine->conf, env,
                                         AXIS2_HOTDEPLOYMENT);
@@ -592,6 +673,7 @@
     axis2_status_t status = AXIS2_FAILURE;
     axutil_array_list_t *out_fault_phases = NULL;
     axutil_array_list_t *new_out_fault_phases = NULL;
+
     AXIS2_ENV_CHECK(env, NULL);
 
     if (!dep_engine->conf_name)
@@ -607,26 +689,48 @@
     {
         return NULL;
     }
+	
+	/* set a flag to mark that conf is create using axis2 xml
+	 * to find out that conf is build using axis2 xml , this flag can be used
+	 */
+	axis2_conf_set_axis2_flag (dep_engine->conf, env, dep_engine->file_flag);
+	axis2_conf_set_axis2_xml (dep_engine->conf, env, dep_engine->conf_name);
 
     dep_engine->conf_builder =
         axis2_conf_builder_create_with_file_and_dep_engine_and_conf(env,
                                                                     dep_engine->
-                                                                    conf_name,
+                                                                    conf_name, 
                                                                     dep_engine,
                                                                     dep_engine->
-                                                                    conf);
+                                                                    conf); 
     if (!(dep_engine->conf_builder))
     {
         axis2_conf_free(dep_engine->conf, env);
         dep_engine->conf = NULL;
     }
+
+    /* Only after populating we will be able to access parameters in
+     * the axis2.xml
+     */
+
     status = axis2_conf_builder_populate_conf(dep_engine->conf_builder, env);
+
     if (AXIS2_SUCCESS != status)
     {
+		AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "population unsuccessful\n");
         axis2_conf_free(dep_engine->conf, env);
         dep_engine->conf = NULL;
         return NULL;
     }
+
+    status = axis2_dep_engine_set_svc_and_module_dir_path (dep_engine, env);
+    if (AXIS2_SUCCESS != status)
+    {
+        return NULL;
+    }
+
+    AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "population finished \n");
+
     status = axis2_dep_engine_set_dep_features(dep_engine, env);
     if (AXIS2_SUCCESS != status)
     {
@@ -637,6 +741,8 @@
     {
         axis2_repos_listener_free(dep_engine->repos_listener, env);
     }
+	
+    AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "creating repos listener");
     dep_engine->repos_listener =
         axis2_repos_listener_create_with_folder_name_and_dep_engine(env,
                                                                     dep_engine->
@@ -654,8 +760,10 @@
                                                       dep_engine->conf);
     status =
         axis2_dep_engine_validate_system_predefined_phases(dep_engine, env);
-    if (AXIS2_SUCCESS != status)
+   
+	if (AXIS2_SUCCESS != status)
     {
+		AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "validate system predefined failed \n");
         axis2_repos_listener_free(dep_engine->repos_listener, env);
         axis2_conf_free(dep_engine->conf, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_VALIDATION_FAILED,
@@ -665,6 +773,14 @@
 
     status = axis2_conf_set_phases_info(dep_engine->conf, env,
                                         dep_engine->phases_info);
+	if (AXIS2_SUCCESS != status)
+    {
+		AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "conf set phases_info failed \n");
+        axis2_repos_listener_free(dep_engine->repos_listener, env);
+        axis2_conf_free(dep_engine->conf, env);
+        return NULL;
+    }
+	
     out_fault_phases =
         axis2_phases_info_get_op_out_faultphases(dep_engine->phases_info, env);
     new_out_fault_phases = axis2_phases_info_copy_flow(env, out_fault_phases);
@@ -676,14 +792,17 @@
                                     new_out_fault_phases);
     if (AXIS2_SUCCESS != status)
     {
+		AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "conf set out fault phase failed \n");
         axis2_repos_listener_free(dep_engine->repos_listener, env);
         axis2_conf_free(dep_engine->conf, env);
         return NULL;
     }
-
+	
+	AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "about to engaged_modules \n");
     status = axis2_dep_engine_engage_modules(dep_engine, env);
     if (AXIS2_SUCCESS != status)
     {
+		AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "failed to engaged_modules \n");
         axis2_repos_listener_free(dep_engine->repos_listener, env);
         axis2_conf_free(dep_engine->conf, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_MODULE_VALIDATION_FAILED,
@@ -749,6 +868,12 @@
         axis2_conf_free(dep_engine->conf, env);
         dep_engine->conf = NULL;
     }
+
+   /**
+      very important: only after populating we will be able to access
+      parameters in axis2 xml.
+    */
+
     status = axis2_conf_builder_populate_conf(dep_engine->conf_builder, env);
     if (AXIS2_SUCCESS != status)
     {
@@ -840,6 +965,7 @@
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     if (!dep_engine->module_list)
     {
@@ -877,6 +1003,7 @@
     axis2_char_t *phase3 = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     in_phases = axis2_phases_info_get_in_phases(dep_engine->phases_info, env);
     if (in_phases)
@@ -910,6 +1037,7 @@
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc_metadata, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     svcs = axis2_arch_file_data_get_deployable_svcs(dep_engine->curr_file, env);
     if (svcs)
@@ -1066,6 +1194,7 @@
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, module_desc, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     read_in_dll =
         axis2_arch_file_data_get_module_dll_name(dep_engine->curr_file, env);
@@ -1158,6 +1287,7 @@
 
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, class_name, NULL);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     dll_desc = axutil_dll_desc_create(env);
     dll_name =
@@ -1187,6 +1317,8 @@
     axis2_module_t *module = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
+
     status = axis2_dep_engine_load_module_dll(dep_engine, env, module_metadata);
     if (AXIS2_SUCCESS != status)
     {
@@ -1251,6 +1383,7 @@
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     size = axutil_array_list_size(dep_engine->ws_to_deploy, env);
 
@@ -1269,66 +1402,68 @@
                 axutil_array_list_get(dep_engine->ws_to_deploy, env, i);
 
             type = axis2_arch_file_data_get_type(dep_engine->curr_file, env);
+            AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "%s", 
+                             axis2_arch_file_data_get_name(dep_engine->curr_file, env));
             switch (type)
             {
-            case AXIS2_SVC:
-                arch_reader = axis2_arch_reader_create(env);
+                case AXIS2_SVC:
+                    arch_reader = axis2_arch_reader_create(env);
 
-                svc_grp = axis2_svc_grp_create_with_conf(env, dep_engine->conf);
-                file_name = axis2_arch_file_data_get_name(dep_engine->
-                                                          curr_file, env);
-                status = axis2_arch_reader_process_svc_grp(arch_reader, env,
-                                                           file_name,
-                                                           dep_engine, svc_grp);
-                if (AXIS2_SUCCESS != status)
-                {
-                    axis2_arch_reader_free(arch_reader, env);
-                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_SVC,
-                                    AXIS2_FAILURE);
-                    return status;
-                }
-                status = axis2_dep_engine_add_new_svc(dep_engine, env, svc_grp);
-                if (AXIS2_SUCCESS != status)
-                {
-                    axis2_arch_reader_free(arch_reader, env);
-                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_SVC,
-                                    AXIS2_FAILURE);
-                    return status;
-                }
-                dep_engine->curr_file = NULL;
-                break;
-            case AXIS2_MODULE:
-                arch_reader = axis2_arch_reader_create(env);
-                if (dep_engine->arch_reader)
-                {
-                    axis2_arch_reader_free(dep_engine->arch_reader, env);
-                }
-                dep_engine->arch_reader = axis2_arch_reader_create(env);
-                meta_data = axis2_module_desc_create(env);
-                file_name = axis2_arch_file_data_get_name(dep_engine->
-                                                          curr_file, env);
-                status =
-                    axis2_arch_reader_read_module_arch(env, file_name,
-                                                       dep_engine, meta_data);
-                if (AXIS2_SUCCESS != status)
-                {
-                    axis2_arch_reader_free(arch_reader, env);
-                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODULE,
-                                    AXIS2_FAILURE);
-                    return AXIS2_FAILURE;
-                }
-                status = axis2_dep_engine_add_new_module(dep_engine, env,
-                                                         meta_data);
-                if (AXIS2_SUCCESS != status)
-                {
-                    axis2_arch_reader_free(arch_reader, env);
-                    AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODULE,
-                                    AXIS2_FAILURE);
-                    return AXIS2_FAILURE;
-                }
+                    svc_grp = axis2_svc_grp_create_with_conf(env, dep_engine->conf);
+                    file_name = axis2_arch_file_data_get_name(dep_engine->
+                                                              curr_file, env);
+                    status = axis2_arch_reader_process_svc_grp(arch_reader, env,
+                                                               file_name,
+                                                               dep_engine, svc_grp);
+                    if (AXIS2_SUCCESS != status)
+                    {
+                        axis2_arch_reader_free(arch_reader, env);
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_SVC,
+                                        AXIS2_FAILURE);
+                        return status;
+                    }
+                    status = axis2_dep_engine_add_new_svc(dep_engine, env, svc_grp);
+                    if (AXIS2_SUCCESS != status)
+                    {
+                        axis2_arch_reader_free(arch_reader, env);
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_SVC,
+                                        AXIS2_FAILURE);
+                        return status;
+                    }
+                    dep_engine->curr_file = NULL;
+                    break;
+                case AXIS2_MODULE:
+                    arch_reader = axis2_arch_reader_create(env);
+                    if (dep_engine->arch_reader)
+                    {
+                        axis2_arch_reader_free(dep_engine->arch_reader, env);
+                    }
+                    dep_engine->arch_reader = axis2_arch_reader_create(env);
+                    meta_data = axis2_module_desc_create(env);
+                    file_name = axis2_arch_file_data_get_name(dep_engine->
+                                                              curr_file, env);
+                    status =
+                        axis2_arch_reader_read_module_arch(env, file_name,
+                                                           dep_engine, meta_data);
+                    if (AXIS2_SUCCESS != status)
+                    {
+                        axis2_arch_reader_free(arch_reader, env);
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODULE,
+                                        AXIS2_FAILURE);
+                        return AXIS2_FAILURE;
+                    }
+                    status = axis2_dep_engine_add_new_module(dep_engine, env,
+                                                             meta_data);
+                    if (AXIS2_SUCCESS != status)
+                    {
+                        axis2_arch_reader_free(arch_reader, env);
+                        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_MODULE,
+                                        AXIS2_FAILURE);
+                        return AXIS2_FAILURE;
+                    }
 
-                dep_engine->curr_file = NULL;
-                break;
+                    dep_engine->curr_file = NULL;
+                    break;
             }
             axis2_arch_reader_free(arch_reader, env);
         }
@@ -1345,6 +1480,8 @@
     axis2_char_t *svc_name = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
+
     size = axutil_array_list_size(dep_engine->ws_to_undeploy, env);
 
     if (size > 0)
@@ -1421,6 +1558,8 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
+
     dep_engine->phases_info = phases_info;
     return AXIS2_SUCCESS;
 }
@@ -1444,6 +1583,7 @@
 
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, file_name, NULL);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     dep_engine->curr_file = axis2_arch_file_data_create_with_type_and_name(env,
                                                                            AXIS2_SVC,
@@ -1488,12 +1628,14 @@
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, module_archive, NULL);
     AXIS2_PARAM_CHECK(env->error, conf, NULL);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     phases_info = axis2_conf_get_phases_info(conf, env);
     axis2_dep_engine_set_phases_info(dep_engine, env, phases_info);
-    dep_engine->curr_file = axis2_arch_file_data_create_with_type_and_file(env,
-                                                                           AXIS2_MODULE,
-                                                                           module_archive);
+    dep_engine->curr_file = 
+		axis2_arch_file_data_create_with_type_and_file(env,
+                                                       AXIS2_MODULE,
+                                                       module_archive);
     module_desc = axis2_module_desc_create(env);
     arch_reader = axis2_arch_reader_create(env);
     file_name = axutil_file_get_name(module_archive, env);
@@ -1559,6 +1701,7 @@
     const axis2_dep_engine_t * dep_engine,
     const axutil_env_t * env)
 {
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
     return dep_engine->folder_name;
 }
 
@@ -1569,7 +1712,7 @@
     axis2_arch_file_data_t * file_data)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
     if (dep_engine->curr_file)
     {
         axis2_arch_file_data_free(dep_engine->curr_file, env);
@@ -1586,6 +1729,7 @@
     axis2_arch_reader_t * arch_reader)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     if (dep_engine->arch_reader)
     {
@@ -1604,6 +1748,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, module_builder, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     return axutil_array_list_add(dep_engine->module_builders, env,
                                  module_builder);
@@ -1617,6 +1762,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc_builder, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     return axutil_array_list_add(dep_engine->svc_builders, env, svc_builder);
 }
@@ -1629,6 +1775,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, svc_grp_builder, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     return axutil_array_list_add(dep_engine->svc_grp_builders, env,
                                  svc_grp_builder);
@@ -1642,6 +1789,114 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, desc_builder, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
 
     return axutil_array_list_add(dep_engine->desc_builders, env, desc_builder);
 }
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_dep_engine_get_module_dir(
+	const axis2_dep_engine_t * dep_engine,
+    const axutil_env_t * env)
+{
+	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
+	return axutil_strdup (env, dep_engine->module_dir);
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_dep_engine_set_module_dir(
+	axis2_dep_engine_t * dep_engine,
+	const axutil_env_t * env,
+	const axis2_char_t *module_dir)
+{
+	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
+	AXIS2_PARAM_CHECK (env->error, module_dir, AXIS2_FAILURE);
+	dep_engine->module_dir = axutil_strdup (env, module_dir);
+	return AXIS2_SUCCESS;
+}
+	
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_dep_engine_get_file_flag(
+    const axis2_dep_engine_t * dep_engine,
+    const axutil_env_t * env)
+{
+	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
+    return dep_engine->file_flag;
+}
+
+
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+axis2_dep_engine_get_svc_dir(
+	const axis2_dep_engine_t * dep_engine,
+    const axutil_env_t * env)
+{
+	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
+	return axutil_strdup (env, dep_engine->svc_dir);
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_dep_engine_set_svc_dir(
+	axis2_dep_engine_t * dep_engine,
+	const axutil_env_t * env,
+	const axis2_char_t *svc_dir)
+{
+	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
+	AXIS2_PARAM_CHECK (env->error, svc_dir, AXIS2_FAILURE);
+	dep_engine->svc_dir = axutil_strdup (env, svc_dir);
+	return AXIS2_SUCCESS;
+}
+
+static axis2_status_t axis2_dep_engine_set_svc_and_module_dir_path (
+    axis2_dep_engine_t *dep_engine,
+    const axutil_env_t *env)
+{
+    axis2_bool_t flag;
+    axis2_conf_t *conf;
+    axis2_char_t *dirpath;
+    axutil_param_t *dep_param;
+    AXIS2_PARAM_CHECK (env->error, dep_engine, AXIS2_FAILURE);
+    flag = dep_engine->file_flag;
+    if (flag == AXIS2_FALSE)
+    {
+        return AXIS2_SUCCESS;
+    }
+    else
+    {
+        conf = dep_engine->conf;
+        if (!conf)
+            return AXIS2_FAILURE;
+
+        dep_param = axis2_conf_get_param (conf, env, "moduleDir");
+        if (dep_param)
+        {
+            dirpath = (axis2_char_t *)axutil_param_get_value(dep_param, env);
+            if (dirpath)
+            {
+                dep_engine->module_dir = dirpath;
+                dirpath = NULL;
+            }
+        }
+        dep_param = NULL;
+
+        dep_param = axis2_conf_get_param (conf, env, "servicesDir");
+        if (dep_param)
+        {
+            dirpath = (axis2_char_t *)axutil_param_get_value(dep_param, env);
+            if (dirpath)
+            {
+                dep_engine->svc_dir = dirpath;
+                dirpath = NULL;
+            }
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+
+

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/phases_info.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/phases_info.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/phases_info.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/phases_info.c Sun Nov 18 05:41:52 2007
@@ -48,10 +48,7 @@
         return NULL;
     }
 
-    phases_info->in_phases = NULL;
-    phases_info->out_phases = NULL;
-    phases_info->in_faultphases = NULL;
-    phases_info->out_faultphases = NULL;
+	memset ((void *)phases_info, 0, sizeof (axis2_phases_info_t));
     phases_info->op_in_phases = axutil_hash_make(env);
     phases_info->op_out_phases = axutil_hash_make(env);
     phases_info->op_in_faultphases = axutil_hash_make(env);
@@ -175,7 +172,8 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, in_phases, AXIS2_FAILURE);
-
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
+	
     if (phases_info->in_phases)
     {
         axutil_array_list_free(phases_info->in_phases, env);
@@ -193,6 +191,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, out_phases, AXIS2_FAILURE);
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
     if (phases_info->out_phases)
     {
@@ -211,6 +210,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, in_faultphases, AXIS2_FAILURE);
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
     if (phases_info->in_faultphases)
     {
@@ -229,6 +229,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, out_faultphases, AXIS2_FAILURE);
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
     if (phases_info->out_faultphases)
     {
@@ -244,8 +245,7 @@
     const axis2_phases_info_t * phases_info,
     const axutil_env_t * env)
 {
-    AXIS2_ENV_CHECK(env, NULL);
-
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
     return phases_info->in_phases;
 }
 
@@ -254,6 +254,7 @@
     const axis2_phases_info_t * phases_info,
     const axutil_env_t * env)
 {
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
     return phases_info->out_phases;
 }
 
@@ -262,6 +263,7 @@
     const axis2_phases_info_t * phases_info,
     const axutil_env_t * env)
 {
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
     return phases_info->in_faultphases;
 }
 
@@ -270,6 +272,7 @@
     const axis2_phases_info_t * phases_info,
     const axutil_env_t * env)
 {
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
     return phases_info->out_faultphases;
 }
 
@@ -286,6 +289,7 @@
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_ENV_CHECK(env, NULL);
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
     op_in_phases = axutil_array_list_create(env, 0);
     if (!op_in_phases)
@@ -361,6 +365,7 @@
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_ENV_CHECK(env, NULL);
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
     if (phases_info->out_phases)
     {
@@ -421,6 +426,7 @@
     struct axis2_phase *phase = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
     if (!phases_info->in_faultphases)
     {
@@ -487,6 +493,7 @@
     struct axis2_phase *phase = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
     if (!phases_info->out_faultphases)
     {
@@ -555,6 +562,7 @@
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, op_desc, AXIS2_FAILURE);
+	AXIS2_PARAM_CHECK(env->error, phases_info, AXIS2_FAILURE);
 
     op_in_phases = axis2_phases_info_get_op_in_phases(phases_info, env);
     if (!op_in_phases)

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/repos_listener.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/repos_listener.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/repos_listener.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/repos_listener.c Sun Nov 18 05:41: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
@@ -33,6 +32,7 @@
      * that the listentner should listent
      */
     axis2_char_t *folder_name;
+    axis2_conf_t *conf;
 };
 
 static axis2_status_t axis2_repos_listener_search(
@@ -41,6 +41,7 @@
     axis2_char_t * folder_name,
     int type);
 
+
 AXIS2_EXTERN axis2_repos_listener_t *AXIS2_CALL
 axis2_repos_listener_create(
     const axutil_env_t * env)
@@ -49,9 +50,9 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    repos_listener = (axis2_repos_listener_t *) AXIS2_MALLOC(env->allocator,
-                                                             sizeof
-                                                             (axis2_repos_listener_t));
+    repos_listener = (axis2_repos_listener_t *)
+        AXIS2_MALLOC(env->allocator,
+                     sizeof (axis2_repos_listener_t));
 
     if (!repos_listener)
     {
@@ -60,17 +61,20 @@
     }
     repos_listener->folder_name = NULL;
     repos_listener->info_list = NULL;
+    repos_listener->folder_name = AXIS2_FALSE;
 
     return repos_listener;
 }
 
 /**
- * This constructor take two argumnets folder name and referance to Deployment Engine
- * 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 repos_listener should listen
- * @param deploy_engine refearnce to engine registry  inorder to inform the updates
+ * This constructor take two argumnets folder name and referance to
+ * Deployment Engine 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 repos_listener
+ * should listens
+ * @param deploy_engine refearnce to engine registry  inorder to
+ * inform the updates
  */
 
 AXIS2_EXTERN axis2_repos_listener_t *AXIS2_CALL
@@ -82,7 +86,12 @@
     axis2_repos_listener_t *repos_listener = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
+    axis2_conf_t *conf;
+    axis2_bool_t file_flag;
+
     AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, 
+                     "repos listener enter");
 
     repos_listener =
         (axis2_repos_listener_t *) axis2_repos_listener_create(env);
@@ -91,18 +100,47 @@
     {
         return NULL;
     }
-    repos_listener->folder_name = axutil_strdup(env, folder_name);
-    if (!repos_listener->folder_name)
+
+    file_flag = axis2_dep_engine_get_file_flag (dep_engine, env);
+
+    if (file_flag == AXIS2_FALSE)
     {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
+        repos_listener->folder_name = axutil_strdup(env, folder_name);
+        if (!repos_listener->folder_name)
+        {
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return NULL;
+        }
     }
+
     repos_listener->info_list =
         axis2_ws_info_list_create_with_dep_engine(env, dep_engine);
     if (!repos_listener->info_list)
     {
         return NULL;
     }
+    
+    /* dep_engine's conf will set to repo_listner then we could get
+     * details fo the axis2.xml through axis2 conf. 
+     */
+
+    conf = axis2_dep_engine_get_axis_conf (dep_engine, env);
+    if (!conf)
+    {
+        AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
+                         "Deployment engines axis2 configuration not available");
+        return NULL;
+    }
+   
+    status = axis2_repos_listener_set_conf (repos_listener, env, conf);
+
+    if (status != AXIS2_SUCCESS)
+    {
+        AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, "setting conf to repos listener failed.");
+        return AXIS2_FAILURE;
+    }
+
+
     status = axis2_repos_listener_init(repos_listener, env);
     if (AXIS2_SUCCESS != status)
     {
@@ -114,12 +152,15 @@
     return repos_listener;
 }
 
+
 AXIS2_EXTERN void AXIS2_CALL
 axis2_repos_listener_free(
     axis2_repos_listener_t * repos_listener,
     const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, void);
+    if (!repos_listener)
+        return;
 
     if (repos_listener->folder_name)
     {
@@ -144,13 +185,52 @@
     axis2_char_t *module_path = NULL;
     axis2_char_t *temp_path = NULL;
     axis2_status_t status = AXIS2_FAILURE;
+    axis2_bool_t axis2_flag = AXIS2_FALSE;
+    axis2_conf_t *conf;
+
+    axutil_param_t *module_param;
+    axis2_char_t *module_dir;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, repos_listener, AXIS2_FAILURE);
+
+    conf = axis2_repos_listener_get_conf (repos_listener, env);
+
+    /* conf is needed only to decide we are using axis2.xml. Other
+     * case we don't need. Hence else part of following if-else
+     * condition not used.
+     */
 
-    temp_path =
-        axutil_stracat(env, repos_listener->folder_name, AXIS2_PATH_SEP_STR);
-    module_path = axutil_stracat(env, temp_path, AXIS2_MODULE_PATH);
-    AXIS2_FREE(env->allocator, temp_path);
+    if (conf)
+    {
+        axis2_flag = axis2_conf_get_axis2_flag (conf, env);
+    }
+
+    if (axis2_flag == AXIS2_FALSE)
+    {
+
+        temp_path =
+            axutil_stracat(env, repos_listener->folder_name, AXIS2_PATH_SEP_STR);
+        module_path = axutil_stracat(env, temp_path, AXIS2_MODULE_PATH);
+        AXIS2_FREE(env->allocator, temp_path);
+    }
+    else
+    {
+        module_param = axis2_conf_get_param (conf, env, "moduleDir");
+        if (module_param)
+        {
+            module_dir = (axis2_char_t *)axutil_param_get_value (module_param, env);
+            module_path = axutil_strdup (env, module_dir);
+            AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "%s", module_path);
+        }
+        else
+        {
+            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI, 
+                             "creating axis2 conf using axis2.xml, modulesDir \
+parameter not available."); 
+        }
+
+    }
     status =
         axis2_repos_listener_search(repos_listener, env, module_path,
                                     AXIS2_MODULE);
@@ -167,14 +247,48 @@
     axis2_char_t *temp_path = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
+    axis2_conf_t *conf;
+    axis2_bool_t axis2_flag = AXIS2_FALSE;
+
+    axutil_param_t *svc_param;
+    axis2_char_t *svc_dir;
+
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, repos_listener, AXIS2_FAILURE);
+
+    conf = axis2_repos_listener_get_conf (repos_listener, env);
+
+    if (conf)
+        axis2_flag = axis2_conf_get_axis2_flag (conf, env);
+
+    if (axis2_flag == AXIS2_FALSE)
+    {
+        temp_path =
+            axutil_stracat(env, repos_listener->folder_name, 
+                           AXIS2_PATH_SEP_STR);
+        svc_path = axutil_stracat(env, temp_path, AXIS2_SVC_PATH);
+        AXIS2_FREE(env->allocator, temp_path);
+    }
+    else
+    {
+        svc_param = axis2_conf_get_param (conf, env, "servicesDir");
+        if (svc_param)
+        {
+            svc_dir = axutil_param_get_value (svc_param, env);
+            svc_path = axutil_strdup (env, svc_dir);
+        }
+        else
+        {
+            AXIS2_LOG_ERROR (env->log, AXIS2_LOG_SI,
+                             "repos listener create using axis2.xml, \
+\"serviceDir\" param not available");
+        }
+    }
 
-    temp_path =
-        axutil_stracat(env, repos_listener->folder_name, AXIS2_PATH_SEP_STR);
-    svc_path = axutil_stracat(env, temp_path, AXIS2_SVC_PATH);
-    AXIS2_FREE(env->allocator, temp_path);
+    AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "%s", svc_path);
     status =
-        axis2_repos_listener_search(repos_listener, env, svc_path, AXIS2_SVC);
+        axis2_repos_listener_search(repos_listener, 
+                                    env, svc_path, AXIS2_SVC);
     AXIS2_FREE(env->allocator, svc_path);
     return status;
 }
@@ -184,6 +298,7 @@
     axis2_repos_listener_t * repos_listener,
     const axutil_env_t * env)
 {
+    AXIS2_PARAM_CHECK (env->error, repos_listener, AXIS2_FAILURE);
     return axis2_ws_info_list_update(repos_listener->info_list, env);
 }
 
@@ -195,6 +310,7 @@
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, repos_listener, AXIS2_FAILURE);
 
     status = axis2_ws_info_list_init(repos_listener->info_list, env);
     if (AXIS2_SUCCESS != status)
@@ -219,6 +335,7 @@
     const axutil_env_t * env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, repos_listener, AXIS2_FAILURE);
 
     axis2_ws_info_list_init(repos_listener->info_list, env);
     /* axis2_repos_listener_check_modules(repos_listener, env); */
@@ -240,10 +357,15 @@
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, repos_listener, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, folder_name, AXIS2_FAILURE);
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "%s in the folder.",
+                    folder_name);
 
     current_info_list = axutil_dir_handler_list_service_or_module_dirs(env,
                                                                        folder_name);
+
+
     if (!current_info_list)
     {
         axis2_status_t status_code = AXIS2_FAILURE;
@@ -257,7 +379,12 @@
                         folder_name);
         return AXIS2_SUCCESS;
     }
+
     size = axutil_array_list_size(current_info_list, env);
+
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, " %d current info list ", size);
+
+
     for (i = 0; i < size; i++)  /* loop until empty */
     {
         axutil_file_t *file = NULL;
@@ -294,4 +421,27 @@
     axutil_array_list_free(current_info_list, env);
     current_info_list = NULL;
     return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_repos_listener_set_conf(
+    axis2_repos_listener_t *repo_listener,        
+    const axutil_env_t * env,
+    axis2_conf_t *conf)
+{
+    AXIS2_PARAM_CHECK (env->error, repo_listener, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, conf, AXIS2_FAILURE);
+    repo_listener->conf = conf;
+    return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_conf_t *AXIS2_CALL
+axis2_repos_listener_get_conf (
+    axis2_repos_listener_t *repo_listener,        
+    const axutil_env_t * env)
+{
+    AXIS2_PARAM_CHECK (env->error, repo_listener, AXIS2_FAILURE);
+    return repo_listener->conf;
 }

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/ws_info_list.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/ws_info_list.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/ws_info_list.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/deployment/ws_info_list.c Sun Nov 18 05:41:52 2007
@@ -59,9 +59,7 @@
         return NULL;
     }
 
-    ws_info_list->deployer = NULL;
-    ws_info_list->ws_info_list = NULL;
-    ws_info_list->current_info_lists = NULL;
+    memset ((void *)ws_info_list, 0, sizeof (axis2_ws_info_list_t));
 
     ws_info_list->deployer = dep_engine;
 
@@ -178,6 +176,8 @@
     AXIS2_PARAM_CHECK(env->error, file, AXIS2_FAILURE);
 
     temp_name = axutil_file_get_name(file, env);
+
+    AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "%s file name", temp_name);
     info_list_name = axutil_strdup(env, temp_name);
     if (!info_list_name)
     {

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/engine/conf.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/engine/conf.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/engine/conf.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/engine/conf.c Sun Nov 18 05:41:52 2007
@@ -51,6 +51,7 @@
     axutil_hash_t *faulty_svcs;
     axutil_hash_t *faulty_modules;
     axis2_char_t *axis2_repo;
+	axis2_char_t *axis2_xml;
     axis2_dep_engine_t *dep_engine;
     axutil_array_list_t *handlers;
     axis2_bool_t enable_mtom;
@@ -62,6 +63,9 @@
 
     /** base description struct */
     axis2_desc_t *base;
+	
+	/** mark whether conf is build using axis2 xml*/
+	axis2_bool_t axis2_flag;
 
     /* this is a hack to keep rampart_context at client side */
     void *security_context;
@@ -85,29 +89,11 @@
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
+	memset ((void *)conf, 0, sizeof (axis2_conf_t));
 
-    conf->param_container = NULL;
-    conf->svc_grps = NULL;
-    conf->engaged_modules = NULL;
-    conf->in_phases_upto_and_including_post_dispatch = NULL;
-    conf->out_phases = NULL;
-    conf->in_fault_phases = NULL;
-    conf->out_fault_phases = NULL;
-    conf->phases_info = NULL;
-    conf->all_svcs = NULL;
-    conf->all_init_svcs = NULL;
-    conf->msg_recvs = NULL;
-    conf->faulty_svcs = NULL;
-    conf->faulty_modules = NULL;
-    conf->axis2_repo = NULL;
-    conf->dep_engine = NULL;
-    conf->all_modules = NULL;
-    conf->name_to_version_map = NULL;
-    conf->handlers = NULL;
     conf->enable_mtom = AXIS2_FALSE;
     conf->enable_security = AXIS2_FALSE;
-    conf->base = NULL;
-    conf->security_context = NULL;
+	conf->axis2_flag = AXIS2_FALSE;
 
     conf->param_container = (axutil_param_container_t *)
         axutil_param_container_create(env);
@@ -1398,7 +1384,8 @@
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, module_ref, AXIS2_FAILURE);
-
+	AXIS2_PARAM_CHECK (env->error, conf, AXIS2_FAILURE);
+	AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "conf engage module process");
     module_desc = axis2_conf_get_module(conf, env, module_ref);
     if (!module_desc)
     {
@@ -1411,6 +1398,10 @@
         axis2_char_t *temp_path2 = NULL;
         axis2_char_t *temp_path3 = NULL;
         axis2_char_t *path = NULL;
+		axutil_param_t *module_dir_param;
+		axis2_char_t *module_dir;
+		axis2_bool_t flag;
+		axis2_char_t *axis2_xml;
 
         arch_reader = axis2_arch_reader_create(env);
         if (!arch_reader)
@@ -1421,25 +1412,66 @@
         file =
             (axutil_file_t *) axis2_arch_reader_create_module_arch(env,
                                                                    file_name);
-        repos_path = axis2_conf_get_repo(conf, env);
-        temp_path1 = axutil_stracat(env, repos_path, AXIS2_PATH_SEP_STR);
-        temp_path2 = axutil_stracat(env, temp_path1, AXIS2_MODULE_FOLDER);
-        temp_path3 = axutil_stracat(env, temp_path2, AXIS2_PATH_SEP_STR);
-        path = axutil_stracat(env, temp_path3, file_name);
-        AXIS2_FREE(env->allocator, temp_path1);
-        AXIS2_FREE(env->allocator, temp_path2);
-        AXIS2_FREE(env->allocator, temp_path3);
+        /* this flag is to check whether conf is build using axis2
+         * xml instead of a repo. */
+		flag = axis2_conf_get_axis2_flag (conf, env);
+
+		if (flag == AXIS2_FALSE)
+		{
+        	repos_path = axis2_conf_get_repo(conf, env);
+        	temp_path1 = axutil_stracat(env, repos_path, AXIS2_PATH_SEP_STR);
+        	temp_path2 = axutil_stracat(env, temp_path1, AXIS2_MODULE_FOLDER);
+        	temp_path3 = axutil_stracat(env, temp_path2, AXIS2_PATH_SEP_STR);
+        	path = axutil_stracat(env, temp_path3, file_name);
+        	AXIS2_FREE(env->allocator, temp_path1);
+        	AXIS2_FREE(env->allocator, temp_path2);
+        	AXIS2_FREE(env->allocator, temp_path3);
+		}
+		else
+		{
+			/**
+			 * this case is to obtain module path from the axis2.xml
+			 */
+			axis2_xml = (axis2_char_t *)axis2_conf_get_axis2_xml (conf, env);
+			module_dir_param = axis2_conf_get_param (conf, env, "moduleDir");
+			module_dir = (axis2_char_t *) 
+					axutil_param_get_value (module_dir_param, env);
+			temp_path1 = axutil_strcat (env, 
+                                        module_dir, 
+                                        AXIS2_PATH_SEP_STR, NULL);
+			path = axutil_strcat (env, temp_path1, file_name, NULL);
+			AXIS2_LOG_DEBUG (env->log, AXIS2_LOG_SI, "%s", path);			
+		}
+		
         axutil_file_set_path(file, env, path);
         file_data = axis2_arch_file_data_create_with_type_and_file(env,
                                                                    AXIS2_MODULE,
                                                                    file);
 
-        dep_engine = axis2_dep_engine_create_with_repos_name(env, repos_path);
+		if (!flag)
+        {
+        	dep_engine = 
+                axis2_dep_engine_create_with_repos_name(env, repos_path);
+        }
+		else
+        {
+			dep_engine = 
+                axis2_dep_engine_create_with_axis2_xml (env, axis2_xml);
+        }
+		
         axis2_dep_engine_set_current_file_item(dep_engine, env, file_data);
+
+        /* this module_dir set the path of the module directory
+         * petaining to this module. This value will use inside the
+         * axis2_dep_engine_build_module function
+         */
+
+		axis2_dep_engine_set_module_dir (dep_engine, env, path);
         module_desc =
             axis2_dep_engine_build_module(dep_engine, env, file, conf);
         is_new_module = AXIS2_TRUE;
     }
+	
     if (module_desc)
     {
         int size = 0;
@@ -1524,6 +1556,28 @@
     return AXIS2_SUCCESS;
 }
 
+
+AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
+axis2_conf_get_axis2_xml(
+    const axis2_conf_t * conf,
+    const axutil_env_t * env)
+{
+    return axutil_strdup (env, conf->axis2_xml);
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_conf_set_axis2_xml(
+    axis2_conf_t * conf,
+    const axutil_env_t * env,
+    axis2_char_t * axis2_xml)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK (env->error, axis2_xml, AXIS2_FAILURE);
+    conf->axis2_xml = axutil_strdup(env, axis2_xml);
+    return AXIS2_SUCCESS;
+}
+
+
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axis2_conf_set_dep_engine(
     axis2_conf_t * conf,
@@ -1668,6 +1722,25 @@
     axis2_bool_t enable_mtom)
 {
     conf->enable_mtom = enable_mtom;
+    return AXIS2_SUCCESS;
+}
+
+
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axis2_conf_get_axis2_flag(
+    axis2_conf_t * conf,
+    const axutil_env_t * env)
+{
+    return conf->axis2_flag;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axis2_conf_set_axis2_flag(
+    axis2_conf_t * conf,
+    const axutil_env_t * env,
+    axis2_bool_t axis2_flag)
+{
+    conf->axis2_flag = axis2_flag;
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/engine/engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/engine/engine.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/engine/engine.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/engine/engine.c Sun Nov 18 05:41:52 2007
@@ -181,7 +181,7 @@
         }
         else
         {
-            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
                             "Transport out is not set in message context");
             return AXIS2_FAILURE;
         }
@@ -401,7 +401,7 @@
         }
         else
         {
-            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+            AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
                             "Transport out is not set in message context");
             return AXIS2_FAILURE;
         }

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/receivers/raw_xml_in_out_msg_recv.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/receivers/raw_xml_in_out_msg_recv.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/receivers/raw_xml_in_out_msg_recv.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/receivers/raw_xml_in_out_msg_recv.c Sun Nov 18 05:41:52 2007
@@ -53,8 +53,9 @@
         return NULL;
     }
 
-    axis2_msg_recv_set_invoke_business_logic(msg_recv, env,
-                                             axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync);
+    axis2_msg_recv_set_invoke_business_logic(
+        msg_recv, env,
+        axis2_raw_xml_in_out_msg_recv_invoke_business_logic_sync);
     return msg_recv;
 }
 

Modified: webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/transport/http/receiver/http_receiver.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/transport/http/receiver/http_receiver.c?rev=596084&r1=596083&r2=596084&view=diff
==============================================================================
--- webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/transport/http/receiver/http_receiver.c (original)
+++ webservices/axis2/scratch/c/dinesh/axis2c-762/src/core/transport/http/receiver/http_receiver.c Sun Nov 18 05:41:52 2007
@@ -134,6 +134,56 @@
     return &(server_impl->http_server);
 }
 
+
+AXIS2_EXTERN axis2_transport_receiver_t *AXIS2_CALL
+axis2_http_server_create_with_file(
+    const axutil_env_t * env,
+    const axis2_char_t * file,
+    const int port)
+{
+    axis2_http_server_impl_t *server_impl = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    server_impl = (axis2_http_server_impl_t *) AXIS2_MALLOC
+        (env->allocator, sizeof(axis2_http_server_impl_t));
+
+    if (!server_impl)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    server_impl->svr_thread = NULL;
+    server_impl->conf_ctx = NULL;
+    server_impl->conf_ctx_private = NULL;
+    server_impl->port = port;
+
+    server_impl->http_server.ops = &http_transport_receiver_ops_var;
+
+    if (file)
+    {
+
+        /**
+         * We first create a private conf ctx which is owned by this server
+         * we only free this private conf context. We should never free the
+         * server_impl->conf_ctx because it may own to any other object which
+         * may lead to double free
+         */
+        server_impl->conf_ctx_private = 
+			axis2_build_conf_ctx_with_file (env, file);
+		
+        if (!server_impl->conf_ctx_private)
+        {
+            axis2_http_server_free((axis2_transport_receiver_t *) server_impl,
+                                   env);
+            return NULL;
+        }
+        server_impl->conf_ctx = server_impl->conf_ctx_private;
+    }
+
+    return &(server_impl->http_server);
+}
+
+
 void AXIS2_CALL
 axis2_http_server_free(
     axis2_transport_receiver_t * server,
@@ -163,6 +213,7 @@
     AXIS2_FREE(env->allocator, server_impl);
     return;
 }
+
 
 axis2_status_t AXIS2_CALL
 axis2_http_server_init(



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