axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r351594 [4/5] - in /webservices/axis2/trunk/c: ./ ides/anjuta/ include/ modules/core/context/src/ modules/core/description/src/ modules/core/engine/src/ modules/core/phaseresolver/src/ modules/core/phaseresolver/src/.deps/ modules/core/tran...
Date Fri, 02 Dec 2005 05:14:51 GMT
Modified: webservices/axis2/trunk/c/modules/core/engine/src/engine_config.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/src/engine_config.c?rev=351594&r1=351593&r2=351594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/src/engine_config.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/src/engine_config.c Thu Dec  1 21:13:39
2005
@@ -18,17 +18,33 @@
 
 #include <axis2_engine_config.h>
 
-typedef struct axis2_engine_config_impl_s axis2_engine_config_impl_t;
+typedef struct axis2_engine_config_impl axis2_engine_config_impl_t;
 
 /** 
  * @brief Engine configuration struct impl
  * Axis2 Engine Configuration impl  
  */  
-struct axis2_engine_config_impl_s
+struct axis2_engine_config_impl
 {
 	axis2_engine_config_t engine_config;
-    axis2_param_container_t *param_container;
     axis2_hash_t *svc_grps;
+    axis2_hash_t *transports_in;
+    axis2_hash_t *transports_out;
+    /**
+     * Field modules
+     */
+    axis2_array_list_t *engaged_modules;
+    /**
+     * Field modules
+     */
+    axis2_hash_t *modules;
+    /** private ArrayList inPhases; */
+    axis2_array_list_t *out_phases;
+    axis2_array_list_t *in_fault_phases;
+    axis2_array_list_t *out_fault_phases;
+
+    axis2_array_list_t *in_phases_upto_and_including_post_dispatch;
+
 };
 
 #define AXIS2_INTF_TO_IMPL(engine_config) \
@@ -43,13 +59,17 @@
 axis2_status_t AXIS2_CALL 
 axis2_engine_config_add_svc_grp (axis2_engine_config_t *engine_config, 
                                     axis2_env_t **env,
-    	                            struct axis2_svc_grp_s *svc_grp);
+    	                            struct axis2_svc_grp *svc_grp);
 
-struct axis2_svc_grp_s * AXIS2_CALL 
+struct axis2_svc_grp * AXIS2_CALL 
 axis2_engine_config_get_svc_grp (axis2_engine_config_t *engine_config, 
                                     axis2_env_t **env,
 		                            const axis2_char_t *svc_grp_name);
 
+axis2_hash_t * AXIS2_CALL
+axis2_engine_config_get_svc_grps(axis2_engine_config_t *engine_config, 
+                                    axis2_env_t **env);
+
 axis2_status_t AXIS2_CALL 
 axis2_engine_config_add_svc (axis2_engine_config_t *engine_config, 
                                 axis2_env_t **env,
@@ -98,51 +118,216 @@
                 const axis2_char_t *svc_name, 
                 axis2_char_t **svc_name_st);
 		
+struct axis2_transport_in_desc * AXIS2_CALL
+axis2_engine_config_get_transport_in(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env,
+                                        axis2_qname_t *qname);
+
+axis2_status_t AXIS2_CALL
+axis2_engine_config_add_transport_in(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env,
+                                        struct axis2_transport_in_desc *transport);
+
+struct axis2_transport_out_desc * AXIS2_CALL
+axis2_engine_config_get_transport_out(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env,
+                                        axis2_qname_t *qname);
+
+axis2_status_t AXIS2_CALL
+axis2_engine_config_add_transport_out(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env,
+                                        struct axis2_transport_out_desc *transport);
+
+axis2_hash_t * AXIS2_CALL
+axis2_engine_config_get_transports_in(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env);
+
+axis2_hash_t * AXIS2_CALL
+axis2_engine_config_get_transports_out(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env);	
+                                        
+struct axis2_module_desc *AXIS2_CALL
+axis2_engine_config_get_module(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env,
+                                        axis2_qname_t *qname);
+
+axis2_array_list_t * AXIS2_CALL
+axis2_engine_config_get_engaged_modules(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env);
+
+axis2_array_list_t * AXIS2_CALL
+axis2_engine_config_get_in_phases_upto_and_including_post_dispatch(
+                                            axis2_engine_config_t *engine_config,
+                                            axis2_env_t **env);
+
+axis2_array_list_t * AXIS2_CALL
+axis2_engine_config_get_outflow(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env);
+
+axis2_array_list_t * AXIS2_CALL
+axis2_engine_config_get_in_fault_flow(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env);
 
+axis2_array_list_t * AXIS2_CALL
+axis2_engine_config_get_out_fault_flow(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env);                             
          
+                                        
 /************************** End of function prototypes ************************/
 
 axis2_engine_config_t * AXIS2_CALL 
 axis2_engine_config_create (axis2_env_t **env)
 {
+    axis2_engine_config_impl_t *config_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
-	axis2_engine_config_impl_t *engine_config_impl
+	config_impl
 		= (axis2_engine_config_impl_t *) AXIS2_MALLOC ((*env)->allocator
 		, sizeof(axis2_engine_config_impl_t));
 	
-	if(NULL == engine_config_impl)
+	if(NULL == config_impl)
 	    AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    
+    config_impl->svc_grps = NULL;
+    config_impl->modules = NULL;
+    config_impl->engaged_modules = NULL;
+    config_impl->in_phases_upto_and_including_post_dispatch = NULL;
+    config_impl->out_phases = NULL;
+    config_impl->in_fault_phases = NULL;
+    config_impl->out_fault_phases = NULL;
+    
+    config_impl->engine_config.ops = NULL;
 	
-	engine_config_impl->engine_config.ops->free = axis2_engine_config_free;
-	engine_config_impl->engine_config.ops->add_svc_grp = 
+    config_impl->engine_config.param_container = (axis2_param_container_t *) 
+        axis2_param_container_create(env);		
+	if(NULL == config_impl->engine_config.param_container)
+	{
+        axis2_engine_config_free(&(config_impl->engine_config), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	}
+    
+    config_impl->transports_in = axis2_hash_make(env);		
+	if(NULL == config_impl->transports_in)
+	{
+        axis2_engine_config_free(&(config_impl->engine_config), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	}
+
+	config_impl->transports_out = axis2_hash_make(env);		
+	if(NULL == config_impl->transports_out)
+	{
+        axis2_engine_config_free(&(config_impl->engine_config), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	}
+    
+    config_impl->modules = axis2_hash_make(env);		
+	if(NULL == config_impl->modules)
+	{
+        axis2_engine_config_free(&(config_impl->engine_config), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	}
+    
+    config_impl->engaged_modules = axis2_array_list_create(env, 0);		
+	if(NULL == config_impl->engaged_modules)
+	{
+        axis2_engine_config_free(&(config_impl->engine_config), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	}
+    
+    config_impl->in_phases_upto_and_including_post_dispatch = 
+        axis2_array_list_create(env, 0);		
+	if(NULL == config_impl->in_phases_upto_and_including_post_dispatch)
+	{
+        axis2_engine_config_free(&(config_impl->engine_config), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	}
+    
+    config_impl->out_phases = axis2_array_list_create(env, 0);		
+	if(NULL == config_impl->out_phases)
+	{
+        axis2_engine_config_free(&(config_impl->engine_config), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	}
+    
+    config_impl->in_fault_phases = axis2_array_list_create(env, 0);		
+	if(NULL == config_impl->in_fault_phases)
+	{
+        axis2_engine_config_free(&(config_impl->engine_config), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	}
+    
+    config_impl->out_fault_phases = axis2_array_list_create(env, 0);		
+	if(NULL == config_impl->out_fault_phases)
+	{
+        axis2_engine_config_free(&(config_impl->engine_config), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+	}
+		
+    config_impl->engine_config.ops = AXIS2_MALLOC((*env)->allocator,
+        sizeof(axis2_engine_config_ops_t));
+    if(NULL == config_impl->engine_config.ops)
+    {
+        axis2_engine_config_free(&(config_impl->engine_config), env);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+    }
+    
+	config_impl->engine_config.ops->free = axis2_engine_config_free;
+	config_impl->engine_config.ops->add_svc_grp = 
         axis2_engine_config_add_svc_grp;
-	engine_config_impl->engine_config.ops->get_svc_grp = 
+	config_impl->engine_config.ops->get_svc_grp = 
         axis2_engine_config_get_svc_grp;
-	engine_config_impl->engine_config.ops->add_svc = axis2_engine_config_add_svc;
-	engine_config_impl->engine_config.ops->get_svc = axis2_engine_config_get_svc;
-	engine_config_impl->engine_config.ops->remove_svc = 
+    
+    config_impl->engine_config.ops->get_svc_grps = 
+        axis2_engine_config_get_svc_grps;
+    
+	config_impl->engine_config.ops->add_svc = axis2_engine_config_add_svc;
+	config_impl->engine_config.ops->get_svc = axis2_engine_config_get_svc;
+	config_impl->engine_config.ops->remove_svc = 
         axis2_engine_config_remove_svc;
-    engine_config_impl->engine_config.ops->add_param = 
+    config_impl->engine_config.ops->add_param = 
         axis2_engine_config_add_param;
-	engine_config_impl->engine_config.ops->get_param = 
+	config_impl->engine_config.ops->get_param = 
         axis2_engine_config_get_param;
-	engine_config_impl->engine_config.ops->get_params = 
+	config_impl->engine_config.ops->get_params = 
         axis2_engine_config_get_params;
-    engine_config_impl->engine_config.ops->is_param_locked = 
+    config_impl->engine_config.ops->is_param_locked = 
             axis2_engine_config_is_param_locked;
-
-	axis2_param_container_t *param_container = (axis2_param_container_t *)
-		axis2_param_container_create(env);		
-	if(NULL == param_container)
-	{
-        AXIS2_FREE((*env)->allocator, engine_config_impl);
-		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
-	}
-
-	engine_config_impl->param_container = param_container;
-	
-	engine_config_impl->svc_grps = NULL;
+    
+    config_impl->engine_config.ops->get_transport_in = 
+            axis2_engine_config_get_transport_in;
+      
+    config_impl->engine_config.ops->add_transport_in = 
+            axis2_engine_config_add_transport_in;    
+     
+    config_impl->engine_config.ops->get_transport_out = 
+            axis2_engine_config_get_transport_out;
+            
+    config_impl->engine_config.ops->add_transport_out = 
+            axis2_engine_config_add_transport_out;
+
+    config_impl->engine_config.ops->get_transports_in = 
+            axis2_engine_config_get_transports_in;
+            
+    config_impl->engine_config.ops->get_transports_out = 
+            axis2_engine_config_get_transports_out;
 	
-	return &(engine_config_impl->engine_config);	
+    config_impl->engine_config.ops->get_module = 
+            axis2_engine_config_get_module;
+    
+    config_impl->engine_config.ops->get_engaged_modules =
+    axis2_engine_config_get_engaged_modules;
+    
+    config_impl->engine_config.ops->get_in_phases_upto_and_including_post_dispatch
=
+    axis2_engine_config_get_in_phases_upto_and_including_post_dispatch;
+    
+    config_impl->engine_config.ops->get_outflow =
+            axis2_engine_config_get_outflow;
+    
+    config_impl->engine_config.ops->get_in_fault_flow =
+            axis2_engine_config_get_in_fault_flow;
+    
+    config_impl->engine_config.ops->get_out_fault_flow =
+            axis2_engine_config_get_out_fault_flow;
+    
+	return &(config_impl->engine_config);	
 }	
 
 /**********************Start of operation impls********************************/
@@ -151,16 +336,43 @@
 axis2_engine_config_free (axis2_engine_config_t *engine_config, 
                             axis2_env_t **env)
 {
+    axis2_engine_config_impl_t *config_impl = NULL;
 	AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
+    config_impl = AXIS2_INTF_TO_IMPL(engine_config);
     
     if(NULL != engine_config->ops)
 		AXIS2_FREE((*env)->allocator, engine_config->ops);
     
-	if(NULL != AXIS2_INTF_TO_IMPL(engine_config)->param_container)
-        AXIS2_PARAM_CONTAINER_FREE(AXIS2_INTF_TO_IMPL(engine_config)->
-            param_container, env);
+	if(NULL != engine_config->param_container)
+        AXIS2_PARAM_CONTAINER_FREE(engine_config->param_container, env);
+    
+    if(config_impl->svc_grps)
+        axis2_hash_free(config_impl->svc_grps, env);
+    
+    if(config_impl->transports_in)
+        axis2_hash_free(config_impl->transports_in, env);
+    
+    if(config_impl->transports_out)
+        axis2_hash_free(config_impl->transports_out, env);
+    
+    if(config_impl->modules)
+        axis2_hash_free(config_impl->modules, env);
+    
+    if(config_impl->engaged_modules)
+        AXIS2_ARRAY_LIST_FREE(config_impl->engaged_modules, env);
     
-    axis2_hash_free(AXIS2_INTF_TO_IMPL(engine_config)->svc_grps, env);
+    if(config_impl->out_phases)
+        AXIS2_ARRAY_LIST_FREE(config_impl->out_phases, env);
+    
+    if(config_impl->in_fault_phases)
+        AXIS2_ARRAY_LIST_FREE(config_impl->in_fault_phases, env);
+    
+    if(config_impl->out_fault_phases)
+        AXIS2_ARRAY_LIST_FREE(config_impl->out_fault_phases, env);
+    
+    if(config_impl->in_phases_upto_and_including_post_dispatch)
+        AXIS2_ARRAY_LIST_FREE(config_impl->
+            in_phases_upto_and_including_post_dispatch, env);
     
 	AXIS2_FREE((*env)->allocator, engine_config);
     
@@ -170,7 +382,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_engine_config_add_svc_grp (axis2_engine_config_t *engine_config, 
                                     axis2_env_t **env,
-    	                            struct axis2_svc_grp_s *svc_grp)
+    	                            struct axis2_svc_grp *svc_grp)
 {
     AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, svc_grp, AXIS2_FAILURE);
@@ -182,7 +394,7 @@
 	return AXIS2_SUCCESS;
 }
 
-struct axis2_svc_grp_s * AXIS2_CALL 
+struct axis2_svc_grp * AXIS2_CALL 
 axis2_engine_config_get_svc_grp (axis2_engine_config_t *engine_config, 
                                     axis2_env_t **env,
 		                            const axis2_char_t *svc_grp_name)
@@ -190,11 +402,19 @@
 	AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
 	AXIS2_PARAM_CHECK((*env)->error, svc_grp_name, NULL);
     
-	return (struct axis2_svc_grp_s *) (axis2_hash_get (
+	return (struct axis2_svc_grp *) (axis2_hash_get (
         AXIS2_INTF_TO_IMPL(engine_config)->svc_grps, svc_grp_name, 
             AXIS2_HASH_KEY_STRING));
 }
 
+axis2_hash_t * AXIS2_CALL
+axis2_engine_config_get_svc_grps(axis2_engine_config_t *engine_config, 
+                                    axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    return AXIS2_INTF_TO_IMPL(engine_config)->svc_grps;
+}
+
 axis2_status_t AXIS2_CALL 
 axis2_engine_config_add_svc (axis2_engine_config_t *engine_config, 
                                 axis2_env_t **env, 
@@ -203,7 +423,7 @@
     AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, svc, AXIS2_FAILURE);
 	
-	struct axis2_svc_grp_s *svc_grp = axis2_svc_grp_create(env);
+	struct axis2_svc_grp *svc_grp = axis2_svc_grp_create(env);
 	
 	if(NULL == svc_grp)
     {
@@ -233,7 +453,7 @@
 	AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, svc_name, NULL);
 	
-	struct axis2_svc_grp_s *sg = NULL;
+	struct axis2_svc_grp *sg = NULL;
 	int len = strlen(svc_name);
 	axis2_char_t *svc_st[2];
 	svc_st[1] = (axis2_char_t*) AXIS2_MALLOC((*env)->allocator,
@@ -263,7 +483,7 @@
     AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, svc_name, AXIS2_FAILURE);
 	
-	struct axis2_svc_grp_s *sg = NULL;
+	struct axis2_svc_grp *sg = NULL;
         
 	int len = strlen(svc_name);
 	axis2_char_t *svc_st[2];
@@ -292,18 +512,28 @@
                         axis2_env_t **env,
 		                axis2_param_t *param)
 {
+    axis2_status_t status = AXIS2_FAILURE;
     AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, param, AXIS2_FAILURE);
     
-	if(NULL == AXIS2_INTF_TO_IMPL(engine_config)->param_container)
+	if(NULL == engine_config->param_container)
 	{
 		AXIS2_ERROR_SET((*env)->error, 
             AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
 	}
-	axis2_hash_set (AXIS2_PARAM_CONTAINER_GET_PARAMS(AXIS2_INTF_TO_IMPL(engine_config)->
-        param_container, env), AXIS2_PARAM_GET_NAME(param, env), 
-        AXIS2_HASH_KEY_STRING, param);	
-	return AXIS2_SUCCESS;
+	
+    if(AXIS2_PARAM_CONTAINER_IS_PARAM_LOCKED(engine_config->param_container, env, 
+        AXIS2_PARAM_GET_NAME(param, env)))
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_PARAMETER_LOCKED_CANNOT_OVERRIDE,
+            AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    } else
+    {
+        status = AXIS2_PARAM_CONTAINER_ADD_PARAM(engine_config->param_container, env,
param);
+    }
+    return status;
 }
 
 axis2_param_t * AXIS2_CALL
@@ -311,17 +541,18 @@
                         axis2_env_t **env,
 		                const axis2_char_t *name)
 {
-    AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, name, NULL);
     
-	if(NULL == AXIS2_INTF_TO_IMPL(engine_config)->param_container)
+	if(NULL == engine_config->param_container)
 	{
 		AXIS2_ERROR_SET((*env)->error, 
-            AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, AXIS2_FAILURE);
+            AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, NULL);
+        return NULL;
 	}
 		
-	return (axis2_param_t *)(axis2_hash_get 
-		(AXIS2_PARAM_CONTAINER_GET_PARAMS(AXIS2_INTF_TO_IMPL(engine_config)->
-        param_container, env), name, AXIS2_HASH_KEY_STRING));
+	return AXIS2_PARAM_CONTAINER_GET_PARAM(engine_config->param_container, env,
+        name);
 	
 }
 
@@ -330,8 +561,7 @@
                         axis2_env_t **env)
 {
 	AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
-	return AXIS2_PARAM_CONTAINER_GET_PARAMS(AXIS2_INTF_TO_IMPL(engine_config)->
-        param_container, env);
+	return AXIS2_PARAM_CONTAINER_GET_PARAMS(engine_config->param_container, env);
 	
 }
 
@@ -341,7 +571,7 @@
 		                    const axis2_char_t *param_name)
 {
     AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FALSE);
-    if(NULL == AXIS2_INTF_TO_IMPL(engine_config)->param_container)
+    if(NULL == engine_config->param_container)
 	{
 		AXIS2_ERROR_SET((*env)->error, 
             AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, AXIS2_FALSE);
@@ -353,11 +583,172 @@
         AXIS2_FAILURE);
 		
 	return AXIS2_PARAM_CONTAINER_IS_PARAM_LOCKED
-		(AXIS2_INTF_TO_IMPL(engine_config)->param_container, env, param_name); 
+		(engine_config->param_container, env, param_name); 
 	
 }
 
-	
+struct axis2_transport_in_desc * AXIS2_CALL
+axis2_engine_config_get_transport_in(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env,
+                                        axis2_qname_t *qname)
+{
+    axis2_engine_config_impl_t *config_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, qname, NULL);
+    
+    config_impl = AXIS2_INTF_TO_IMPL(engine_config);
+    
+    return (struct axis2_transport_in_desc *) axis2_hash_get(config_impl->transports_in,
+            qname, sizeof(axis2_qname_t));
+}
+
+/**
+ * Method addTransport
+ *
+ * @param transport
+ * @throws AxisFault
+ */
+axis2_status_t AXIS2_CALL
+axis2_engine_config_add_transport_in(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env,
+                                        struct axis2_transport_in_desc *transport)
+{
+    axis2_engine_config_impl_t *config_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, transport, AXIS2_FAILURE);
+    config_impl = AXIS2_INTF_TO_IMPL(engine_config);
+    axis2_hash_set(config_impl->transports_in,
+        AXIS2_TRANSPORT_IN_DESC_GET_QNAME(transport, env), sizeof(axis2_qname_t), 
+            transport);
+    
+    return AXIS2_SUCCESS;
+    
+}
+
+struct axis2_transport_out_desc * AXIS2_CALL
+axis2_engine_config_get_transport_out(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env,
+                                        axis2_qname_t *qname)
+{
+    axis2_engine_config_impl_t *config_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, qname, NULL);
+    
+    config_impl = AXIS2_INTF_TO_IMPL(engine_config);
+    
+    return (struct axis2_transport_out_desc *) axis2_hash_get(config_impl->transports_out,
+            qname, sizeof(axis2_qname_t));
+}
+
+/**
+ * Method addTransport
+ *
+ * @param transport
+ * @throws AxisFault
+ */
+axis2_status_t AXIS2_CALL
+axis2_engine_config_add_transport_out(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env,
+                                        struct axis2_transport_out_desc *transport)
+{
+    axis2_engine_config_impl_t *config_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, transport, AXIS2_FAILURE);
+    config_impl = AXIS2_INTF_TO_IMPL(engine_config);
+    axis2_hash_set(config_impl->transports_out,
+        AXIS2_TRANSPORT_OUT_DESC_GET_QNAME(transport, env),
+            sizeof(axis2_qname_t), transport);
+    return AXIS2_SUCCESS;
+    
+}
+
+axis2_hash_t * AXIS2_CALL
+axis2_engine_config_get_transports_in(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    return AXIS2_INTF_TO_IMPL(engine_config)->transports_in;
+}
+
+/**
+ * Method getModule
+ *
+ * @param name
+ * @return ModuleDescription
+ */
+struct axis2_module_desc *AXIS2_CALL
+axis2_engine_config_get_module(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env,
+                                        axis2_qname_t *qname) 
+{
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, qname, NULL);
+    return (struct axis2_module_desc *) axis2_hash_get(AXIS2_INTF_TO_IMPL(
+        engine_config)->modules, qname, sizeof(axis2_qname_t));
+}
+
+/**
+ * Method getEngadgedModules
+ *
+ * @return  Collection
+ */
+axis2_array_list_t * AXIS2_CALL
+axis2_engine_config_get_engaged_modules(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    return AXIS2_INTF_TO_IMPL(engine_config)->engaged_modules;
+}
+
+axis2_array_list_t * AXIS2_CALL
+axis2_engine_config_get_in_phases_upto_and_including_post_dispatch(
+                                            axis2_engine_config_t *engine_config,
+                                            axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    return AXIS2_INTF_TO_IMPL(engine_config)->
+        in_phases_upto_and_including_post_dispatch;
+}
+
+axis2_array_list_t * AXIS2_CALL
+axis2_engine_config_get_outflow(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    return AXIS2_INTF_TO_IMPL(engine_config)->out_phases;
+}
+
+
+/**
+ * @return ArrayList
+ */
+axis2_array_list_t * AXIS2_CALL
+axis2_engine_config_get_in_fault_flow(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    return AXIS2_INTF_TO_IMPL(engine_config)->in_fault_phases;
+}
+
+/**
+ * @return ArrayList
+ */
+axis2_array_list_t * AXIS2_CALL
+axis2_engine_config_get_out_fault_flow(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    return AXIS2_INTF_TO_IMPL(engine_config)->out_fault_phases;
+}
+
+axis2_hash_t * AXIS2_CALL
+axis2_engine_config_get_transports_out(axis2_engine_config_t *engine_config,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(engine_config, env, NULL);
+    return AXIS2_INTF_TO_IMPL(engine_config)->transports_out;
+}	
+
 axis2_status_t 
 split_svc_name (axis2_env_t **env, 
                 const axis2_char_t *svc_name, 

Modified: webservices/axis2/trunk/c/modules/core/phaseresolver/src/.deps/phase_holder.Plo
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/phaseresolver/src/.deps/phase_holder.Plo?rev=351594&r1=351593&r2=351594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/phaseresolver/src/.deps/phase_holder.Plo (original)
+++ webservices/axis2/trunk/c/modules/core/phaseresolver/src/.deps/phase_holder.Plo Thu Dec
 1 21:13:39 2005
@@ -1 +1,107 @@
-# dummy
+phase_holder.lo phase_holder.o: phase_holder.c \
+  ../../../../include/axis2_phase_holder.h ../../../../include/axis2.h \
+  /usr/include/stdlib.h /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h /usr/include/bits/wordsize.h \
+  /usr/include/gnu/stubs-32.h \
+  /usr/lib/gcc/i386-redhat-linux/4.0.0/include/stddef.h \
+  /usr/include/stdio.h /usr/include/bits/types.h \
+  /usr/include/bits/typesizes.h /usr/include/libio.h \
+  /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
+  /usr/include/gconv.h \
+  /usr/lib/gcc/i386-redhat-linux/4.0.0/include/stdarg.h \
+  /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+  /usr/include/bits/stdio.h ../../../../include/axis2_env.h \
+  ../../../../include/axis2_allocator.h \
+  ../../../../include/axis2_defines.h ../../../../include/axis2_error.h \
+  ../../../../include/axis2_stream.h ../../../../include/axis2_log.h \
+  ../../../../include/axis2_qname.h \
+  ../../../../modules/util/src/axis2_string.h \
+  ../../../../modules/util/src/axis2_array_list.h \
+  ../../../../include/axis2_handler_desc.h \
+  ../../../../include/axis2_param.h ../../../../include/axis2_om_node.h \
+  ../../../../include/axis2_core.h \
+  ../../../../modules/util/src/axis2_hash.h \
+  ../../../../include/axis2_param_container.h \
+  ../../../../include/axis2_phase_rule.h \
+  ../../../../include/axis2_handler.h ../../../../include/axis2_phase.h \
+  ../../../../modules/wsdl/src/wsdl.h
+
+../../../../include/axis2_phase_holder.h:
+
+../../../../include/axis2.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/gnu/stubs-32.h:
+
+/usr/lib/gcc/i386-redhat-linux/4.0.0/include/stddef.h:
+
+/usr/include/stdio.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/gconv.h:
+
+/usr/lib/gcc/i386-redhat-linux/4.0.0/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+../../../../include/axis2_env.h:
+
+../../../../include/axis2_allocator.h:
+
+../../../../include/axis2_defines.h:
+
+../../../../include/axis2_error.h:
+
+../../../../include/axis2_stream.h:
+
+../../../../include/axis2_log.h:
+
+../../../../include/axis2_qname.h:
+
+../../../../modules/util/src/axis2_string.h:
+
+../../../../modules/util/src/axis2_array_list.h:
+
+../../../../include/axis2_handler_desc.h:
+
+../../../../include/axis2_param.h:
+
+../../../../include/axis2_om_node.h:
+
+../../../../include/axis2_core.h:
+
+../../../../modules/util/src/axis2_hash.h:
+
+../../../../include/axis2_param_container.h:
+
+../../../../include/axis2_phase_rule.h:
+
+../../../../include/axis2_handler.h:
+
+../../../../include/axis2_phase.h:
+
+../../../../modules/wsdl/src/wsdl.h:

Modified: webservices/axis2/trunk/c/modules/core/phaseresolver/src/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/phaseresolver/src/Makefile.am?rev=351594&r1=351593&r2=351594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/phaseresolver/src/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/core/phaseresolver/src/Makefile.am Thu Dec  1 21:13:39
2005
@@ -6,4 +6,6 @@
 INCLUDES = -I${CUTEST_HOME}/include -I$(top_builddir)/include \
             -I$(top_builddir)/modules/xml/guththila/src \
             -I$(top_builddir)/modules/util/src \
-            -I$(top_builddir)/modules/wsdl/src
+            -I$(top_builddir)/modules/wsdl/src \
+            -I$(top_builddir)/modules/core/description/src \
+            -I$(top_builddir)/modules/core/transport

Modified: webservices/axis2/trunk/c/modules/core/phaseresolver/src/Makefile.in
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/phaseresolver/src/Makefile.in?rev=351594&r1=351593&r2=351594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/phaseresolver/src/Makefile.in (original)
+++ webservices/axis2/trunk/c/modules/core/phaseresolver/src/Makefile.in Thu Dec  1 21:13:39
2005
@@ -195,7 +195,9 @@
 INCLUDES = -I${CUTEST_HOME}/include -I$(top_builddir)/include \
             -I$(top_builddir)/modules/xml/guththila/src \
             -I$(top_builddir)/modules/util/src \
-            -I$(top_builddir)/modules/wsdl/src
+            -I$(top_builddir)/modules/wsdl/src \
+            -I$(top_builddir)/modules/core/description/src \
+            -I$(top_builddir)/modules/core/transport
 
 all: all-am
 

Modified: webservices/axis2/trunk/c/modules/core/phaseresolver/src/phase_holder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/phaseresolver/src/phase_holder.c?rev=351594&r1=351593&r2=351594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/phaseresolver/src/phase_holder.c (original)
+++ webservices/axis2/trunk/c/modules/core/phaseresolver/src/phase_holder.c Thu Dec  1 21:13:39
2005
@@ -73,12 +73,7 @@
 	if(NULL == phase_holder_impl)
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL); 
     
-    phase_holder_impl->phase_list = axis2_array_list_create(env, 0);
-    if(NULL == phase_holder_impl->phase_list)
-    {
-        axis2_phase_holder_free(&(phase_holder_impl->phase_holder), env);
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
-    }
+    phase_holder_impl->phase_list = NULL;
     
 	phase_holder_impl->phase_holder.ops = 
 		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_phase_holder_ops_t));
@@ -155,6 +150,7 @@
     int size = 0;
     int i = 0;
     struct axis2_phase *phase = NULL;
+        
     AXIS2_FUNC_PARAM_CHECK(phase_holder, env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK((*env)->error, phase_name, AXIS2_FALSE);
     
@@ -187,6 +183,7 @@
 {
     axis2_char_t *phase_name = NULL;
     axis2_status_t status = AXIS2_FAILURE;
+    
     AXIS2_FUNC_PARAM_CHECK(phase_holder, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, handler, AXIS2_FAILURE);
     
@@ -200,7 +197,7 @@
     } else 
     {
         AXIS2_ERROR_SET((*env)->error, INVALID_PHASE, AXIS2_FAILURE);
-        
+        return AXIS2_FAILURE;
     }
     return status;
 }
@@ -218,12 +215,14 @@
 {
     int size = 0;
     int i = 0;
-    axis2_phase_holder_impl_t *phase_holder_impl = AXIS2_INTF_TO_IMPL(phase_holder);
+    axis2_phase_holder_impl_t *phase_holder_impl = NULL;
     struct axis2_phase *phase = NULL;
         
     AXIS2_FUNC_PARAM_CHECK(phase_holder, env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, phase_name, NULL);
     
+    phase_holder_impl = AXIS2_INTF_TO_IMPL(phase_holder);
+    
     size = AXIS2_ARRAY_LIST_SIZE(phase_holder_impl->phase_list, env);
     
     for (i = 0; i < size; i++) {
@@ -276,11 +275,14 @@
         handler =
                 (Handler) handlerClass.newInstance();*/
         status = AXIS2_HANDLER_INIT(handler, env, handler_desc);
-        if(AXIS2_SUCCESS == status)
-            status = AXIS2_HANDLER_DESC_SET_HANDLER(handler_desc, env, handler);
+        if(AXIS2_FAILURE == status)
+            return status;
+        
+        status = AXIS2_HANDLER_DESC_SET_HANDLER(handler_desc, env, handler);
+        if(AXIS2_FAILURE == status)
+            return status;
         
-        if(AXIS2_SUCCESS == status)
-            status = AXIS2_PHASE_ADD_HANDLER(phase, env, handler);
+        status = AXIS2_PHASE_ADD_HANDLER(phase, env, handler);
     }
     return status;
 }



Mime
View raw message