You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2005/12/02 06:14:51 UTC

svn commit: r351594 [3/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...

Modified: webservices/axis2/trunk/c/modules/core/description/src/svc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/src/svc.c?rev=351594&r1=351593&r2=351594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/src/svc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/src/svc.c Thu Dec  1 21:13:39 2005
@@ -56,20 +56,26 @@
                     axis2_qname_t *qname);
 
 axis2_qname_t * AXIS2_CALL
-axis2_svc_get_name (const axis2_svc_t *svc, axis2_env_t **env);	
+axis2_svc_get_name (const axis2_svc_t *svc, 
+                    axis2_env_t **env);	
 
 axis2_status_t AXIS2_CALL
-axis2_svc_add_param (axis2_svc_t *svc, axis2_env_t **env, axis2_param_t *param);
+axis2_svc_add_param (axis2_svc_t *svc, 
+                        axis2_env_t **env, 
+                        axis2_param_t *param);
 
 axis2_param_t * AXIS2_CALL
-axis2_svc_get_param (axis2_svc_t *svc, axis2_env_t **env,
+axis2_svc_get_param (axis2_svc_t *svc, 
+                        axis2_env_t **env,
 		                const axis2_char_t *name);
 
-axis2_hash_t * AXIS2_CALL
-axis2_svc_get_params (axis2_svc_t *svc, axis2_env_t **env);
+axis2_array_list_t * AXIS2_CALL
+axis2_svc_get_params (axis2_svc_t *svc, 
+                        axis2_env_t **env);
 
 axis2_bool_t AXIS2_CALL
-axis2_svc_is_param_locked (axis2_svc_t *svc, axis2_env_t **env,
+axis2_svc_is_param_locked (axis2_svc_t *svc, 
+                            axis2_env_t **env,
 		                    const axis2_char_t *param_name);
 
 axis2_status_t AXIS2_CALL
@@ -77,15 +83,164 @@
                             axis2_env_t **env,
                             struct axis2_wsdl_interface *svc_interface);
 
+struct axis2_wsdl_interface * AXIS2_CALL
+axis2_svc_get_svc_interface(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_engage_module(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            struct axis2_module_desc * moduleref,
+                            struct axis2_engine_config * axis2_config);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_add_module_operations(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            struct axis2_module_desc * module,
+                            struct axis2_engine_config * axis2_config);
+                                
+axis2_status_t AXIS2_CALL
+axis2_svc_add_to_engaged_module_list(axis2_svc_t *svc,
+                                        axis2_env_t **env,
+                                        struct axis2_module_desc *module_name);
+                                    
+axis2_array_list_t * AXIS2_CALL
+axis2_svc_get_engaged_modules(axis2_svc_t *svc,
+                                axis2_env_t **env);
+
+
+void *AXIS2_CALL
+axis2_svc_get_wsdl_operation(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            axis2_qname_t *operation_name);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_set_context_path(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            axis2_char_t *context_path);
+
+axis2_char_t * AXIS2_CALL
+axis2_svc_get_context_path(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_set_style(axis2_svc_t *svc,
+                        axis2_env_t **env,
+                        axis2_char_t * style);
+
+axis2_char_t * AXIS2_CALL
+axis2_svc_get_style(axis2_svc_t *svc,
+                    axis2_env_t **env);
+
+struct axis2_flow * AXIS2_CALL
+axis2_svc_get_inflow(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_set_inflow(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            struct axis2_flow *inflow);
+
+struct axis2_flow * AXIS2_CALL
+axis2_svc_get_outflow(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_set_outflow(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            struct axis2_flow *outflow);
+
+struct axis2_flow *AXIS2_CALL
+axis2_svc_get_fault_inflow(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_set_fault_inflow(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            struct axis2_flow *fault_flow);
+
+struct axis2_flow * AXIS2_CALL
+axis2_svc_get_fault_outflow(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_set_fault_outflow(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            struct axis2_flow *fault_flow);
+
+struct axis2_operation * AXIS2_CALL
+axis2_svc_get_operation_by_soap_action(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            axis2_char_t *soap_action);
+
+
+struct axis2_operation * AXIS2_CALL
+axis2_svc_get_operation_by_soap_action_and_endpoint(axis2_svc_t *svc,
+                                        axis2_env_t **env,
+                                        axis2_char_t *soap_action,
+                                        axis2_qname_t * endpoint);       
+
+axis2_char_t * AXIS2_CALL
+axis2_svc_get_axis2_svc_name(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_set_axis2_svc_name(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            axis2_char_t *axis2_svc_name);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_set_last_update(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+long AXIS2_CALL
+axis2_svc_get_last_update(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+axis2_char_t * AXIS2_CALL
+axis2_svc_get_filename(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_set_filename(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            axis2_char_t *filename);
+
+axis2_hash_t * AXIS2_CALL
+axis2_svc_get_endpoints(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_set_endpoints(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            axis2_hash_t * endpoints);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_set_endpoint(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            struct axis2_wsdl_endpoint * endpoint);
+
+struct axis2_wsdl_endpoint * AXIS2_CALL
+axis2_svc_get_endpoint(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            axis2_qname_t * qname);
+
+axis2_char_t * AXIS2_CALL
+axis2_svc_get_namespace(axis2_svc_t *svc,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_add_mapping(axis2_svc_t *svc,
+                            axis2_env_t **env,
+                            axis2_char_t * mapping_key , 
+                            struct axis2_operation * axis2_opt);
+                            
 /************************* End of function headers ***************************/
 
 axis2_svc_t * AXIS2_CALL
 axis2_svc_create (axis2_env_t **env)
 {
-    struct axis2_param_container *param_container = NULL;
-    struct axis2_flow_container *flow_container = NULL;
     axis2_svc_impl_t *svc_impl = NULL;
-    struct axis2_wsdl_svc *wsdl_svc = NULL;
     axis2_array_list_t *array_list_l = NULL;
     struct axis2_param_container *param_container_l = NULL;
     struct axis2_wsdl_interface *wsdl_interface_l = NULL;
@@ -98,34 +253,40 @@
 		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
 	}
     
-    param_container = (struct axis2_param_container *)
+    svc_impl->parent = NULL;
+    svc_impl->axis2_svc_name = NULL;
+    svc_impl->last_update = 0;
+    svc_impl->svc.param_container = NULL;
+    svc_impl->svc.flow_container = NULL;
+    svc_impl->svc.wsdl_svc = NULL;
+    svc_impl->wasaction_opeartionmap = NULL;
+    svc_impl->module_list = NULL;
+    
+    svc_impl->svc.param_container = (struct axis2_param_container *)
 		axis2_param_container_create(env);		
-	if(NULL == param_container)
+	if(NULL == svc_impl->svc.param_container)
 	{
         axis2_svc_free(&(svc_impl->svc), env);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);		
 	}
     
-    flow_container = (struct axis2_flow_container *)
+    svc_impl->svc.flow_container = (struct axis2_flow_container *)
 		axis2_flow_container_create(env);		
-	if(NULL == flow_container)
+	if(NULL == svc_impl->svc.flow_container)
 	{
         axis2_svc_free(&(svc_impl->svc), env);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);		
 	}
     
-    svc_impl->svc.param_container = param_container;
     
-    wsdl_svc = (axis2_wsdl_svc_t *)axis2_wsdl_svc_create(env);		
-	if(NULL == wsdl_svc)
+    svc_impl->svc.wsdl_svc = (axis2_wsdl_svc_t *)axis2_wsdl_svc_create(env);		
+	if(NULL == svc_impl->svc.wsdl_svc)
 	{
         axis2_svc_free(&(svc_impl->svc), env);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);		
 	}
-
-	svc_impl->svc.wsdl_svc = wsdl_svc;
     
-    	svc_impl->wasaction_opeartionmap = axis2_hash_make (env);				
+    svc_impl->wasaction_opeartionmap = axis2_hash_make (env);				
 	if(NULL == svc_impl->wasaction_opeartionmap)
 	{
         axis2_svc_free(&(svc_impl->svc), env);
@@ -163,11 +324,71 @@
 	svc_impl->svc.ops->get_params = axis2_svc_get_params;
     svc_impl->svc.ops->is_param_locked = axis2_svc_is_param_locked;
     svc_impl->svc.ops->set_svc_interface = axis2_svc_set_svc_interface;
-	
-	svc_impl->parent = NULL;
-    svc_impl->axis2_svc_name = NULL;
-    svc_impl->last_update = 0;
+    svc_impl->svc.ops->get_svc_interface = axis2_svc_get_svc_interface;
+    
+    svc_impl->svc.ops->engage_module = axis2_svc_engage_module;
+    
+    svc_impl->svc.ops->add_module_operations = axis2_svc_add_module_operations;
+    
+    svc_impl->svc.ops->add_to_engaged_module_list = axis2_svc_add_to_engaged_module_list;
+    
+    svc_impl->svc.ops->get_engaged_modules = axis2_svc_get_engaged_modules;
+    
+    svc_impl->svc.ops->get_wsdl_operation = axis2_svc_get_wsdl_operation;
+    
+    svc_impl->svc.ops->set_context_path = axis2_svc_set_context_path;
+    
+    svc_impl->svc.ops->get_context_path = axis2_svc_get_context_path;
+    
+    svc_impl->svc.ops->set_style = axis2_svc_set_style;
+    
+    svc_impl->svc.ops->get_style = axis2_svc_get_style;
+    
+    svc_impl->svc.ops->get_inflow = axis2_svc_get_inflow;
+    
+    svc_impl->svc.ops->set_inflow = axis2_svc_set_inflow;
+    
+    svc_impl->svc.ops->get_outflow = axis2_svc_get_outflow;
+    
+    svc_impl->svc.ops->set_outflow = axis2_svc_set_outflow;
+    
+    svc_impl->svc.ops->get_fault_inflow = axis2_svc_get_fault_inflow;
+    
+    svc_impl->svc.ops->set_fault_inflow = axis2_svc_set_fault_inflow;
+    
+    svc_impl->svc.ops->get_fault_outflow = axis2_svc_get_fault_outflow;
+    
+    svc_impl->svc.ops->set_fault_outflow = axis2_svc_set_fault_outflow;
+    
+    svc_impl->svc.ops->get_operation_by_soap_action = axis2_svc_get_operation_by_soap_action;
+    
+    svc_impl->svc.ops->get_operation_by_soap_action_and_endpoint = axis2_svc_get_operation_by_soap_action_and_endpoint;
+    
+    svc_impl->svc.ops->get_axis2_svc_name = axis2_svc_get_axis2_svc_name;
+    
+    svc_impl->svc.ops->set_axis2_svc_name = axis2_svc_set_axis2_svc_name;
+    
+    svc_impl->svc.ops->set_last_update = axis2_svc_set_last_update;
+    
+    svc_impl->svc.ops->get_last_update = axis2_svc_get_last_update;
+    
+    svc_impl->svc.ops->get_filename = axis2_svc_get_filename;
+    
+    svc_impl->svc.ops->set_filename = axis2_svc_set_filename;
+    
+    svc_impl->svc.ops->get_endpoints = axis2_svc_get_endpoints;
+    
+    svc_impl->svc.ops->set_endpoints = axis2_svc_set_endpoints;
+    
+    svc_impl->svc.ops->set_endpoint = axis2_svc_set_endpoint;
     
+    svc_impl->svc.ops->get_endpoint = axis2_svc_get_endpoint;
+    
+    svc_impl->svc.ops->get_namespace = axis2_svc_get_namespace;
+    
+    svc_impl->svc.ops->add_mapping = axis2_svc_add_mapping;
+
+       
     wsdl_interface_l = axis2_wsdl_interface_create(env);
     if(NULL == wsdl_interface_l)
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
@@ -266,14 +487,14 @@
 axis2_status_t AXIS2_CALL
 axis2_svc_add_operation (axis2_svc_t *svc,
                             axis2_env_t **env,
-		                    struct axis2_operation *axis_operation)
+		                    struct axis2_operation *axis2_opt)
 {
     AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FALSE);
-    AXIS2_PARAM_CHECK((*env)->error, operation, AXIS2_FALSE);
+    AXIS2_PARAM_CHECK((*env)->error, axis2_opt, AXIS2_FALSE);
     
-    AXIS2_OPERATION_SET_PARENT(axis_operation, env, svc);
+    AXIS2_OPERATION_SET_PARENT(axis2_opt, env, svc);
     return AXIS2_WSDL_INTERFACE_SET_OPERATION(axis2_svc_get_svc_interface(svc, env),
-        env, axis2_operation);
+        env, axis2_opt);
 }
 
 struct axis2_operation * AXIS2_CALL
@@ -281,7 +502,7 @@
                                         axis2_env_t **env,
 		                                axis2_qname_t *operation_name)
 {
-    struct axis2_operation *opeartion_l = NULL;
+    struct axis2_operation *operation_l = NULL;
     axis2_char_t *op_str = NULL;
     /*axis2_hash_t *all_operations = NULL; */
     
@@ -297,12 +518,12 @@
     */
     if(NULL == operation_l )
     {
-        opeartion_l = (struct axis2_operation *) (axis2_hash_get (
+        operation_l = (struct axis2_operation *) (axis2_hash_get (
                 AXIS2_INTF_TO_IMPL(svc)->wasaction_opeartionmap, op_str,
                 AXIS2_HASH_KEY_STRING));
     }
     
-    return opeartion_l;	
+    return operation_l;	
 }	
 
 struct axis2_operation * AXIS2_CALL
@@ -314,7 +535,7 @@
     AXIS2_PARAM_CHECK((*env)->error, nc_name, NULL);
     
     return (axis2_operation_t *) axis2_hash_get(AXIS2_WSDL_INTERFACE_GET_OPERATIONS(
-        axis2_wsdl_get_svc_interface(svc, env), env), nc_name, AXIS2_HASH_KEY_STRING);
+        axis2_svc_get_svc_interface(svc, env), env), nc_name, AXIS2_HASH_KEY_STRING);
 }
 
 axis2_hash_t * AXIS2_CALL
@@ -323,7 +544,7 @@
 {
     AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
     
-    return AXIS2_WSDL_INTERFACE_GET_OPERATIONS(axis2_wsdl_get_svc_interface(svc,
+    return AXIS2_WSDL_INTERFACE_GET_OPERATIONS(axis2_svc_get_svc_interface(svc,
         env), env);
 }
 	
@@ -409,7 +630,7 @@
     return AXIS2_PARAM_CONTAINER_GET_PARAM(param_container_l, env, name);
 }
 
-axis2_hash_t * AXIS2_CALL
+axis2_array_list_t * AXIS2_CALL
 axis2_svc_get_params (axis2_svc_t *svc, 
                         axis2_env_t **env)
 {
@@ -430,7 +651,7 @@
 {
     axis2_bool_t locked = AXIS2_FALSE;
     axis2_param_t *param_l = NULL;
-    axis2_engine_config *engine_config_l = NULL;
+    struct axis2_engine_config *engine_config_l = NULL;
     
     AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK((*env)->error, param_name, AXIS2_FALSE);
@@ -447,11 +668,11 @@
     }
     if(AXIS2_TRUE == locked)
     {
-        return AXIS_TRUE;
+        return AXIS2_TRUE;
     } else 
     {
         param_l = axis2_svc_get_param(svc, env, param_name);
-        return (NULL != param && AXIS2_PARAM_IS_LOCKED(param_l, env));
+        return (NULL != param_l && AXIS2_PARAM_IS_LOCKED(param_l, env));
     }
 }
 
@@ -465,349 +686,397 @@
     return AXIS2_WSDL_SVC_SET_SVC_INTERFACE(svc->wsdl_svc, env, svc_interface);
 }
 
-/**
- * To ebgage a module it is reuired to use this method
- *
- * @param moduleref
- * @throws AxisFault
- */
+struct axis2_wsdl_interface *AXIS2_CALL
+axis2_svc_get_svc_interface(axis2_svc_t *svc,
+                            axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
+    return AXIS2_WSDL_SVC_GET_SVC_INTERFACE(svc->wsdl_svc, env);
+}
+
 axis2_status_t AXIS2_CALL
 axis2_svc_engage_module(axis2_svc_t *svc,
                             axis2_env_t **env,
                             struct axis2_module_desc * moduleref,
                             struct axis2_engine_config * axis2_config)
 {
-    if (moduleref == null) {
-        return;
-    }
-    Collection collectionModule = (Collection) this.getComponentProperty(
-            MODULEREF_KEY);
-    for (Iterator iterator = collectionModule.iterator();
-         iterator.hasNext();) {
-        struct axis2_module_desc * modu = (struct axis2_module_desc *) iterator.next();
-        if (modu.getname().equals(moduleref.getname())) {
-            throw new AxisFault(moduleref.getname().getLocalPart() +
-                    " module has alredy been engaged on the service. " +
-                    " Operation terminated !!!");
+    struct axis2_module_desc * modu = NULL;
+    axis2_array_list_t *collection_module = NULL;
+    struct axis2_phase_resolver *phase_resolver = NULL;
+    int i = 0;
+    axis2_status_t status = AXIS2_FAILURE;
+        
+    AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, moduleref, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, axis2_config, AXIS2_FAILURE);
+    
+    
+    collection_module = (axis2_array_list_t *) 
+        AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(svc->wsdl_svc->wsdl_component,
+            env, MODULEREF_KEY);
+    
+    for(i = 0; i < AXIS2_ARRAY_LIST_SIZE(collection_module, env); i++)
+    {
+        modu = (struct axis2_module_desc *) AXIS2_ARRAY_LIST_GET(collection_module,
+            env, i);
+        if(AXIS2_QNAME_EQUALS(AXIS2_MODULE_DESC_GET_NAME(modu, env), env,  
+            AXIS2_MODULE_DESC_GET_NAME(moduleref, env)))
+        {
+            /* module has alredy been engaged on the service. Operation terminated !!! */
+            AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_MODULE_ALREADY_ENGAGED_TO_SVC,
+                AXIS2_FAILURE);
+            return AXIS2_FAILURE;            
         }
-
+        
     }
-    new PhaseResolver(axis2_config).engageModuleTosvc(this, moduleref);
-    collectionModule.add(moduleref);
+   
+    phase_resolver = axis2_phase_resolver_create_with_config(env, axis2_config);
+    status = AXIS2_PHASE_RESOLVER_ENGAGE_MODULE_TO_SVC(phase_resolver, env, svc, moduleref);
+    status = AXIS2_ARRAY_LIST_ADD(collection_module, env, moduleref);
+    
+    return status;
 }
 
-/**
- * To add a opeartion to a service if a module requird to do so
- *
- * @param module
- */
-
 axis2_status_t AXIS2_CALL
-axis2_add_module_operations(axis2_svc_t *svc,
+axis2_svc_add_module_operations(axis2_svc_t *svc,
                             axis2_env_t **env,
-                            struct axis2_module_desc * module,
+                            struct axis2_module_desc * module_desc,
                             struct axis2_engine_config * axis2_config) 
 {
-    axis2_hash_t * map = module.getOperations();
-    Collection col = map.values();
-    PhaseResolver pr = new PhaseResolver(axis2_config, this);
-
-    for (Iterator iterator = col.iterator(); iterator.hasNext();) {
-        struct axis2_operation * axis2_operation = (struct axis2_operation *) iterator.next();
-        ArrayList paramters = axis2_operation.getParameters();
-        // Adding wsa-maping into service
-        for (int j = 0; j < paramters.size(); j++) {
-            Parameter parameter = (Parameter) paramters.get(j);
-            if(parameter.getname().equals(Constants.WSA_ACTION)){
-                this.addMapping((axis2_char_t *)parameter.getValue(),axis2_operation);
+    axis2_hash_t * map = NULL;
+    axis2_hash_index_t *index = NULL;
+    void *v = NULL;
+    struct axis2_phase_resolver * pr = NULL;
+    struct axis2_operation * axis2_opt = NULL;
+    axis2_array_list_t *params = NULL;
+    struct axis2_param *param = NULL;
+    int j = 0;
+    axis2_status_t status = AXIS2_FAILURE;
+    
+    AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, module_desc, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, axis2_config, AXIS2_FAILURE);
+    
+    map = AXIS2_MODULE_DESC_GET_OPERATIONS(module_desc, env);
+    pr = axis2_phase_resolver_create_with_config_and_svc(env, axis2_config, svc);
+    
+    for (index = axis2_hash_first (map, env); index; index = 
+        axis2_hash_next (env, index))
+    {
+
+        axis2_hash_this (index, NULL, NULL, &v);
+        axis2_opt = (struct axis2_operation *) v;
+        params = AXIS2_OPERATION_GET_PARAMS(axis2_opt, env);
+        /* Adding wsa-maping into service */
+        for(j = 0; j < AXIS2_ARRAY_LIST_SIZE(params, env); j++)
+        {
+            param = (struct axis2_param *) AXIS2_ARRAY_LIST_GET(params, env, j);
+            if(0 == AXIS2_STRCMP( AXIS2_PARAM_GET_NAME(param, env), WSA_ACTION))
+            {
+                status = axis2_svc_add_mapping(svc, env,
+                    (axis2_char_t *) AXIS2_PARAM_GET_VALUE(param, env), axis2_opt);
+                if(AXIS2_FAILURE == status)
+                {
+                    if(pr)
+                        AXIS2_PHASE_RESOLVER_FREE(pr, env); 
+                    return status;
+                }
             }
+                
+        }
+        status = AXIS2_PHASE_RESOLVER_BUILD_MODULE_OPERATION(pr, env, axis2_opt);
+        if(AXIS2_FAILURE == status)
+        {
+            if(pr)
+                AXIS2_PHASE_RESOLVER_FREE(pr, env); 
+            return status;
         }
-        pr.buildModuleOperation(axis2_operation);
-        this.addOperation(axis2_operation);
+        
+        status = axis2_svc_add_operation(svc, env, axis2_opt);
+ 
     }
+    if(pr)
+        AXIS2_PHASE_RESOLVER_FREE(pr, env); 
+    return status;
 }
 
 axis2_status_t AXIS2_CALL
-axis2_add_to_engage_module_list(axis2_svc_t *svc,
+axis2_svc_add_to_engaged_module_list(axis2_svc_t *svc,
                                 axis2_env_t **env,
                                 struct axis2_module_desc *module_name) 
 {
-    Collection collectionModule = (Collection) this.getComponentProperty(
-            MODULEREF_KEY);
-    for (Iterator iterator = collectionModule.iterator();
-         iterator.hasNext();) {
-        struct axis2_module_desc * moduleDescription = (struct axis2_module_desc *) iterator.next();
-        if (module_name.getname().equals(moduleDescription.getname())) {
-            return;
+    axis2_array_list_t *collection_module = NULL;
+    struct axis2_module_desc * module_desc = NULL;
+    int i = 0;
+     
+    AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, module_name, AXIS2_FAILURE);
+    
+    collection_module = (axis2_array_list_t *) 
+        AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(svc->wsdl_svc->wsdl_component, 
+            env, MODULEREF_KEY);
+    for(i = 0; i < AXIS2_ARRAY_LIST_SIZE(collection_module, env); i++)
+    {
+        module_desc = (struct axis2_module_desc *) AXIS2_ARRAY_LIST_GET(
+            collection_module, env, i);
+        if(AXIS2_QNAME_EQUALS(AXIS2_MODULE_DESC_GET_NAME(module_desc, env), env,
+                AXIS2_MODULE_DESC_GET_NAME(module_name, env)))
+        {
+            return AXIS2_FAILURE;
         }
     }
-    collectionModule.add(module_name);
+    return AXIS2_ARRAY_LIST_ADD(collection_module, env, module_name);
 }
 
-/**
- * Method getEngadgedModules
- *
- * @return Collection
- */
-Collection AXIS2_CALL
+axis2_array_list_t * AXIS2_CALL
 axis2_svc_get_engaged_modules(axis2_svc_t *svc,
-                            axis2_env_t **envs) 
+                            axis2_env_t **env) 
 {
-    return (Collection) this.getComponentProperty(MODULEREF_KEY);
+    AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
+    
+    return (axis2_array_list_t *) AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(
+        svc->wsdl_svc->wsdl_component, env, MODULEREF_KEY);
 }
 
-/**
- * To get the WSDL opeartion element in servic einterface
- * @param operationName  <code>QName</cde>
- * @return  WSDLOperation <code>WSDLOperation</code>
- */
-WSDLOperation AXIS2_CALL
+void * AXIS2_CALL
 axis2_svc_get_wsdl_operation(axis2_svc_t *svc,
                             axis2_env_t **env,
                             axis2_qname_t *operation_name)
 {
-    axis2_char_t * opStr = operationname.getLocalPart();
-    return this.getsvcInterface().getOperation(opStr) ;
+    struct axis2_wsdl_interface *svc_interface = NULL;
+        
+    axis2_char_t * op_str = NULL;
+    AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, operation_name, NULL);
+    
+    op_str = AXIS2_QNAME_GET_LOCALPART(operation_name, env);
+    svc_interface = axis2_svc_get_svc_interface(svc, env);
+    
+    return AXIS2_WSDL_INTERFACE_GET_OPERATION(svc_interface, env, op_str) ;
 }
 
-   /**
- * Method setContextPath
- *
- * @param contextPath
- */
 axis2_status_t AXIS2_CALL
 axis2_svc_set_context_path(axis2_svc_t *svc,
                             axis2_env_t **env,
                             axis2_char_t *context_path) 
 {
-    if (context_path != null) {
-        this.setComponentProperty(CONTEXTPATH_KEY, contextPath);
-    }
+    AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, context_path, AXIS2_FAILURE);
+    
+    return AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY(svc->wsdl_svc->wsdl_component,
+        env, CONTEXTPATH_KEY, context_path);
 }
 
-/**
- * Method getContextPath
- *
- * @return  context path
- */
 axis2_char_t * AXIS2_CALL
-axis2_svc_get_context_path() 
+axis2_svc_get_context_path(axis2_svc_t *svc,
+                            axis2_env_t **env) 
 {
-    return (axis2_char_t *) this.getComponentProperty(CONTEXTPATH_KEY);
+    AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
+    return (axis2_char_t *) AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(
+        svc->wsdl_svc->wsdl_component, env, CONTEXTPATH_KEY);
 }
 
-/**
- * Method setStyle
- *
- * @param style
- */
 axis2_status_t AXIS2_CALL
 axis2_svc_set_style(axis2_svc_t *svc,
                         axis2_env_t **env,
                         axis2_char_t * style) 
 {
-    if (style != null) {
-        this.setComponentProperty(STYLE_KEY, style);
-    }
+    AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, style, AXIS2_FAILURE);
+    
+    return AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY(svc->wsdl_svc->wsdl_component,
+        env, STYLE_KEY, style);
 }
 
-/**
- * Method getStyle
- *
- * @return axis2_char_t *
- */
 axis2_char_t * AXIS2_CALL
-axis2_svc_get_style() 
+axis2_svc_get_style(axis2_svc_t *svc,
+                    axis2_env_t **env) 
 {
-    return (axis2_char_t *) this.getComponentProperty(STYLE_KEY);
+    AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
+    return (axis2_char_t *) AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(
+        svc->wsdl_svc->wsdl_component, env, STYLE_KEY);
 }
 
-/**
- * Method getInFlow
- *
- * @return struct axis2_flow *
- */
 struct axis2_flow * AXIS2_CALL
-axis2_svc_get_in_flow(axis2_svc_t *svc,
+axis2_svc_get_inflow(axis2_svc_t *svc,
                             axis2_env_t **env) 
 {
-    return (struct axis2_flow *) this.getComponentProperty(INFLOW_KEY);
+    AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
+    return (struct axis2_flow *) AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(
+        svc->wsdl_svc->wsdl_component, env, INFLOW_KEY);
 }
 
-/**
- * Method setInFlow
- *
- * @param inFlow
- */
 axis2_status_t AXIS2_CALL
-axis2_svc_set_in_flow(axis2_svc_t *svc,
+axis2_svc_set_inflow(axis2_svc_t *svc,
                             axis2_env_t **env,
                             struct axis2_flow *inflow) 
 {
-    if (inflow != null) {
-        this.setComponentProperty(INFLOW_KEY, inflow);
-    }
+    AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, inflow, AXIS2_FAILURE);
+    
+    return AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY(svc->wsdl_svc->wsdl_component,
+        env, INFLOW_KEY, inflow);
 }
 
-/**
- * Method getOutFlow
- *
- * @return struct axis2_flow *
- */
 struct axis2_flow * AXIS2_CALL
-axis2_svc_get_out_flow(axis2_svc_t *svc,
+axis2_svc_get_outflow(axis2_svc_t *svc,
                             axis2_env_t **env) 
 {
-    return (struct axis2_flow *) this.getComponentProperty(OUTFLOW_KEY);
+    AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
+    return (struct axis2_flow *) AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(
+        svc->wsdl_svc->wsdl_component, env, OUTFLOW_KEY);
 }
 
-/**
- * Method setOutFlow
- *
- * @param outFlow
- */
 axis2_status_t AXIS2_CALL
 axis2_svc_set_outflow(axis2_svc_t *svc,
                             axis2_env_t **env,
                             struct axis2_flow *outflow) 
 {
-    if (outflow != null) {
-        this.setComponentProperty(OUTFLOW_KEY, outflow);
-    }
+    AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, outflow, AXIS2_FAILURE);
+    
+    return AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY(svc->wsdl_svc->
+        wsdl_component, env, OUTFLOW_KEY, outflow);
 }
 
-/**
- * Method getFaultInFlow
- *
- * @return struct axis2_flow *
- */
 struct axis2_flow *AXIS2_CALL
 axis2_svc_get_fault_inflow(axis2_svc_t *svc,
                             axis2_env_t **env) 
 {
-    return (struct axis2_flow *) this.getComponentProperty(IN_FAULTFLOW_KEY);
+    AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
+    
+    return (struct axis2_flow *) AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(
+        svc->wsdl_svc->wsdl_component, env, IN_FAULTFLOW_KEY);
 }
 
-/**
- * Method setFaultInFlow
- *
- * @param fault_flow
- */
 axis2_status_t AXIS2_CALL
 axis2_svc_set_fault_inflow(axis2_svc_t *svc,
                             axis2_env_t **env,
                             struct axis2_flow *fault_flow) 
 {
-    if (fault_flow != null) {
-        this.setComponentProperty(IN_FAULTFLOW_KEY, fault_flow);
-    }
+    AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, fault_flow, AXIS2_FAILURE);
+    return AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY(svc->wsdl_svc->wsdl_component,
+        env, IN_FAULTFLOW_KEY, fault_flow);
 }
 
 struct axis2_flow * AXIS2_CALL
-axis2_svc_get_faultout_flow(axis2_svc_t *svc,
+axis2_svc_get_fault_outflow(axis2_svc_t *svc,
                             axis2_env_t **env) 
 {
-    return (struct axis2_flow *) this.getComponentProperty(OUT_FAULTFLOW_KEY);
+    AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
+    
+    return (struct axis2_flow *) AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(
+        svc->wsdl_svc->wsdl_component, env, OUT_FAULTFLOW_KEY);
 }
 
 axis2_status_t AXIS2_CALL
-axis2_svc_set_faultOut_flow(axis2_svc_t *svc,
+axis2_svc_set_fault_outflow(axis2_svc_t *svc,
                             axis2_env_t **env,
                             struct axis2_flow *fault_flow) 
 {
-    if (fault_flow != null) {
-        this.setComponentProperty(OUT_FAULTFLOW_KEY, fault_flow);
-    }
+    AXIS2_FUNC_PARAM_CHECK(svc, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, fault_flow, AXIS2_FAILURE);
+    
+    return AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY(svc->wsdl_svc->wsdl_component, env,
+        OUT_FAULTFLOW_KEY, fault_flow);
 }
 
-/**
- * This method will return the operation given particular SOAP Action.
- * This method should only be called if there is only one Endpoint is defined
- * for this Service. If more than one Endpoint exists one of them will be picked.
- * If more than one Operation is found with the given
- * SOAP Action; null will be ruturned. If no particular Operation is found with
- * the given SOAP Action; null will be returned.
- *
- * @param soapAction SOAP Action defined for the particular Operation
- * @return A struct axis2_operation * if a unque Operation can be found with the given SOAP Action
- *         otherwise will return null.
- */
 struct axis2_operation * AXIS2_CALL
 axis2_svc_get_operation_by_soap_action(axis2_svc_t *svc,
                             axis2_env_t **env,
-                            axis2_char_t * soap_action) 
+                            axis2_char_t *soap_action) 
 {
-    if(soapAction == null || soapAction.equals("")){
-        return null;
-    }
-    Iterator iterator = this.getendpoints().keySet().iterator();
-    if (iterator.hasNext()) {
-        struct axis2_wsdl_endpoint * endpoint = (struct axis2_wsdl_endpoint *) this.getendpoints().get(
-                iterator.next());
-        return this.getOperationBySOAPAction(soapAction,
-                endpoint.getname());
+    axis2_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *endpoints = NULL;
+    axis2_hash_index_t *index = NULL;
+    void *value = NULL;
+    struct axis2_wsdl_endpoint * endpoint = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(svc, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, soap_action, NULL);
+    if(0 == AXIS2_STRCMP(soap_action, ""))
+        return NULL;
+    
+    svc_impl = AXIS2_INTF_TO_IMPL(svc);
+    
+    endpoints = axis2_svc_get_endpoints(svc, env);
+    index = axis2_hash_first (endpoints, env);
+    if(NULL != index)
+    {
+        axis2_hash_this(index, NULL, NULL, &value);
+        endpoint = (struct axis2_wsdl_endpoint *) value;
+        return axis2_svc_get_operation_by_soap_action_and_endpoint(svc, env, soap_action,
+            AXIS2_WSDL_ENDPOINT_GET_NAME(endpoint, env));
     }
 
-    return null;
-
-
+    return NULL;
 }
 
-
-/**
- * This method will return the operation given the particular endpoing and the
- * particular SOAP Action. If more than one Operation is found with the given
- * SOAP Action; null will be ruturned. If no particular Operation is found with
- * the given SOAP Action; null will be returned
- *
- * @param endpoint   Particular Enpoint in which the bining is defined with the particular SOAP
- *                   Action.
- * @param soapAction SOAP Action defined for the particular Operation
- * @return A struct axis2_operation * if a unque Operation can be found with the given SOAP Action
- *         otherwise will return null.
- */
 struct axis2_operation * AXIS2_CALL
-axis2_svc_get_operation_by_soap_action(axis2_svc_t *svc,
+axis2_svc_get_operation_by_soap_action_and_endpoint(axis2_svc_t *svc,
                                         axis2_env_t **env,
                                         axis2_char_t *soap_action,
                                         axis2_qname_t * endpoint) 
 {
-    axis2_hash_t * binding_operations = this.getendpoint(endpoint).getBinding()
-            .getBindingOperations();
-    Iterator operationKeySetIterator = bindingOperations.keySet().iterator();
-    struct axis2_operation * axis2_operation = null;
+    axis2_svc_impl_t *svc_impl = NULL;
+    axis2_hash_t *binding_operations = NULL;
+    struct axis2_operation * axis2_opt = NULL;
     int count = 0;
-    while (operationKeySetIterator.hasNext()) {
-        wsdlBindingOperation bindingOperation = (wsdlBindingOperation) bindingOperations.get(
-                operationKeySetIterator.next());
-        Iterator extIterator = bindingOperation.getExtensibilityElements()
-                .iterator();
-        while (extIterator.hasNext()) {
-            wsdlExtensibilityElement element = (wsdlExtensibilityElement) extIterator.next();
-            if (ExtensionConstants.SOAP_11_OPERATION.equals(element.getType())||
-                    ExtensionConstants.SOAP_12_OPERATION.equals(element.getType())) {
-                if (((SOAPOperation) element).getSoapAction().equals(
-                        soapAction)) {
-                    struct axis2_wsdl_operation *op = bindingOperation.getOperation();
-                    if (op instanceof AxisOperation) {
-                        axis2_operation = (struct axis2_operation *) op;
-                        count++;
-                    }
+    int j = 0;
+    axis2_hash_index_t *index_i = NULL;
+    void *k = NULL;
+    struct axis2_wsdl_binding_operation *binding_operation = NULL;
+    struct axis2_wsdl_soap_operation *element = NULL;
+    struct axis2_operation *op = NULL;
+    axis2_linked_list_t *extensiblity_elements = NULL;
+    axis2_qname_t *type_1 = NULL;
+    axis2_qname_t *type_2 = NULL;
+        
+    svc_impl = AXIS2_INTF_TO_IMPL(svc);
+    
+    type_1 = axis2_qname_create(env, "operation", SOAP_11_OPERATION, NULL);
+    binding_operations = AXIS2_WSDL_BINDING_GET_BINDING_OPERATIONS(
+        AXIS2_WSDL_ENDPOINT_GET_BINDING(axis2_svc_get_endpoint(svc, env, endpoint),
+            env), env);
+    
+    index_i = axis2_hash_first (binding_operations, env);
+    do
+    {
+        axis2_hash_this (index_i, &k, NULL, NULL);
+        binding_operation = (struct axis2_wsdl_binding_operation *) k;
+        extensiblity_elements = AXIS2_WSDL_COMPONENT_GET_EXTENSIBILITY_ELEMENTS(
+            binding_operation->extensible_component->wsdl_component, env);
+        do
+        {
+            element = (struct axis2_wsdl_soap_operation *) AXIS2_LINKED_LIST_GET(
+                extensiblity_elements, env, j); 
+                        
+            type_2 = AXIS2_WSDL_EXTENSIBLE_ELEMENT_GET_TYPE(element->extensible_element, env);
+            if(AXIS2_QNAME_EQUALS(type_2, env, type_1))
+            {
+                if(0 == AXIS2_STRCMP(AXIS2_WSDL_SOAP_OPERATION_GET_SOAP_ACTION(
+                    element, env), soap_action))
+                {
+                    op = (struct axis2_operation *) 
+                        AXIS2_WSDL_BINDING_OPERATION_GET_OPERATION(binding_operation,
+                            env);
+                    count++;    
                 }
+                    
             }
-        }
-    }
-    if (1 == count) {
-        return axis2_operation;
+            j++;
+        }while(j < AXIS2_LINKED_LIST_SIZE(extensiblity_elements, env));
+        index_i = axis2_hash_next (env, index_i);
+    } while(NULL != index_i);
+    if (1 == count) 
+    {
+        return op;
     }
+    
     return NULL;
 }
-
- /**
- * To get the description about the service
- *                                                                  
- * @return axis2_char_t *
- */
+       
 axis2_char_t * AXIS2_CALL
 axis2_svc_get_axis2_svc_name(axis2_svc_t *svc,
                             axis2_env_t **env) 
@@ -815,11 +1084,6 @@
     return AXIS2_INTF_TO_IMPL(svc)->axis2_svc_name;
 }
 
-/**
- * Set the description about the service
- *
- * @param axissvcname
- */
 axis2_status_t AXIS2_CALL
 axis2_svc_set_axis2_svc_name(axis2_svc_t *svc,
                             axis2_env_t **env,
@@ -828,13 +1092,11 @@
     axis2_svc_impl_t *svc_impl = AXIS2_INTF_TO_IMPL(svc);
     if(svc_impl->axis2_svc_name)
         AXIS2_FREE((*env)->allocator, svc_impl->axis2_svc_name);
-    axis2_svc_name->axis2_svc_name = axis2_svc_name;
+    svc_impl->axis2_svc_name = axis2_svc_name;
     return AXIS2_SUCCESS;
 }
 
-    /**
- * This method will set the current time as last update time of the service
- */
+
 axis2_status_t AXIS2_CALL
 axis2_svc_set_last_update(axis2_svc_t *svc,
                             axis2_env_t **env)
@@ -843,7 +1105,8 @@
     return AXIS2_SUCCESS;
 }
 
-long axis2_svc_get_last_update(axis2_svc_t *svc,
+long AXIS2_CALL
+axis2_svc_get_last_update(axis2_svc_t *svc,
                             axis2_env_t **env)
 {
     return AXIS2_INTF_TO_IMPL(svc)->last_update;
@@ -906,18 +1169,15 @@
     return AXIS2_WSDL_SVC_GET_NAMESPACE(svc->wsdl_svc, env);
 }
 
-/**
- * To add the was action paramater into has map so that was action based dispatch can support
- */
 axis2_status_t AXIS2_CALL
 axis2_svc_add_mapping(axis2_svc_t *svc,
                             axis2_env_t **env,
                             axis2_char_t * mapping_key , 
-                            struct axis2_operation * axis2_operation)
+                            struct axis2_operation * axis2_opt)
 {
     axis2_svc_impl_t *svc_impl = AXIS2_INTF_TO_IMPL(svc);
     
     axis2_hash_set(svc_impl->wasaction_opeartionmap, mapping_key, 
-        AXIS2_HASH_KEY_STRING, axis2_operation);
+        AXIS2_HASH_KEY_STRING, axis2_opt);
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/core/description/src/svc_grp.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/src/svc_grp.c?rev=351594&r1=351593&r2=351594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/src/svc_grp.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/src/svc_grp.c Thu Dec  1 21:13:39 2005
@@ -16,20 +16,20 @@
  
 #include <axis2_svc_grp.h>
 
-typedef struct axis2_svc_grp_impl axis2_svc_grp_impl_t;
-
 /** 
  * @brief Service group struct impl
  * Axis2 Service group impl  
  */  
-struct axis2_svc_grp_impl
+typedef struct axis2_svc_grp_impl
 {
 	axis2_svc_grp_t svc_grp;
-	axis2_param_container_t *param_container;
 	axis2_char_t *svc_grp_name;
 	axis2_hash_t *svcs;
+    /** to store service Group modules name */
+    axis2_array_list_t *modules;
+    struct axis2_engine_config *parent;
 	
-};
+} axis2_svc_grp_impl_t;
 
 #define AXIS2_INTF_TO_IMPL(svc_grp) ((axis2_svc_grp_impl_t *)svc_grp)
 
@@ -56,12 +56,16 @@
 axis2_svc_t * AXIS2_CALL 
 axis2_svc_grp_get_svc (axis2_svc_grp_t *svc_grp, 
                         axis2_env_t **env,
-		                const axis2_qname_t* svc_name);
-		
+		                axis2_qname_t* svc_name);
+
+axis2_hash_t *AXIS2_CALL
+axis2_svc_grp_get_svcs(axis2_svc_grp_t *svc_grp, 
+                        axis2_env_t **env);
+                        
 axis2_status_t AXIS2_CALL 
 axis2_svc_grp_remove_svc (axis2_svc_grp_t *svc_grp, 
                             axis2_env_t **env,
-		                    const axis2_qname_t* svc_name);
+		                    axis2_qname_t* svc_name);
 		
 axis2_status_t AXIS2_CALL 
 axis2_svc_grp_add_param (axis2_svc_grp_t *svc_grp, 
@@ -74,28 +78,70 @@
                         axis2_env_t **env,
 		                const axis2_char_t *name);
 		
-axis2_hash_t * AXIS2_CALL 
+axis2_array_list_t * AXIS2_CALL 
 axis2_svc_grp_get_params (axis2_svc_grp_t *svc_grp, 
                             axis2_env_t **env);
 		
 axis2_bool_t AXIS2_CALL 
 axis2_svc_grp_is_param_locked(axis2_svc_grp_t *svc_grp, 
                                 axis2_env_t **env,
-		                        const axis2_char_t *param_name);
+		                        axis2_char_t *param_name);
+                                
+axis2_status_t AXIS2_CALL
+axis2_svc_grp_add_module(axis2_svc_grp_t *svc_grp, 
+                                axis2_env_t **env,
+                                axis2_qname_t *module_qname);                                
+
+struct axis2_engine_config * AXIS2_CALL
+axis2_svc_grp_get_parent(axis2_svc_grp_t *svc_grp,
+                            axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_svc_grp_set_parent(axis2_svc_grp_t *svc_grp,
+                            axis2_env_t **env,
+                            struct axis2_engine_config *parent);
 
 /***************************** End of function headers ************************/
 
 axis2_svc_grp_t * AXIS2_CALL 
 axis2_svc_grp_create (axis2_env_t **env)
 {
+    axis2_svc_grp_impl_t *svc_grp_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
-    
-	axis2_svc_grp_impl_t *svc_grp_impl = (axis2_svc_grp_impl_t *)
+    svc_grp_impl = (axis2_svc_grp_impl_t *)
 		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_svc_grp_impl_t));
     
 	if(NULL == svc_grp_impl)
 	    AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
 	
+    svc_grp_impl->svc_grp.param_container = NULL;
+    svc_grp_impl->modules = NULL;
+    svc_grp_impl->svcs = NULL;
+    svc_grp_impl->svc_grp.ops = NULL;
+    svc_grp_impl->parent = NULL;
+    svc_grp_impl->svc_grp_name = NULL;
+    
+    svc_grp_impl->svc_grp.param_container =  axis2_param_container_create(env);
+    if(NULL == svc_grp_impl->svc_grp.param_container)
+    {
+        axis2_svc_grp_free(&(svc_grp_impl->svc_grp), env);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+    
+    svc_grp_impl->modules = axis2_array_list_create(env, 0);
+    if(NULL == svc_grp_impl->modules)
+    {
+        axis2_svc_grp_free(&(svc_grp_impl->svc_grp), env);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+    
+    svc_grp_impl->svcs = axis2_hash_make (env);				
+	if(NULL == svc_grp_impl->svcs)
+    {
+        axis2_svc_grp_free(&(svc_grp_impl->svc_grp), env);
+	    AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+    
     svc_grp_impl->svc_grp.ops = AXIS2_MALLOC((*env)->allocator, 
             sizeof(axis2_svc_grp_ops_t));
 	if(NULL == svc_grp_impl->svc_grp.ops)
@@ -109,60 +155,73 @@
 	svc_grp_impl->svc_grp.ops->get_name = axis2_svc_grp_get_name;
 	svc_grp_impl->svc_grp.ops->add_svc = axis2_svc_grp_add_svc;
 	svc_grp_impl->svc_grp.ops->get_svc = axis2_svc_grp_get_svc;
+    svc_grp_impl->svc_grp.ops->get_svcs = axis2_svc_grp_get_svcs;
 	svc_grp_impl->svc_grp.ops->remove_svc = axis2_svc_grp_remove_svc;
 	svc_grp_impl->svc_grp.ops->add_param = axis2_svc_grp_add_param;
 	svc_grp_impl->svc_grp.ops->get_param = axis2_svc_grp_get_param;
 	svc_grp_impl->svc_grp.ops->get_params = axis2_svc_grp_get_params;
 	svc_grp_impl->svc_grp.ops->is_param_locked = axis2_svc_grp_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, svc_grp_impl);
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);		
-	}
-
-	svc_grp_impl->param_container = param_container;
-	
-	/*svc_grp_impl->parent = NULL;*/
-	
-	svc_grp_impl->svcs = axis2_hash_make (env);				
-	if(NULL == svc_grp_impl->svcs)
-    {
-        AXIS2_FREE((*env)->allocator, svc_grp_impl);
-        AXIS2_FREE((*env)->allocator, svc_grp_impl->param_container);
-	    AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
-    }
-	svc_grp_impl->svc_grp_name = NULL;
+    svc_grp_impl->svc_grp.ops->add_module = axis2_svc_grp_add_module;
+    svc_grp_impl->svc_grp.ops->get_parent = axis2_svc_grp_get_parent;
+    svc_grp_impl->svc_grp.ops->set_parent = axis2_svc_grp_set_parent;	
 
 	return &(svc_grp_impl->svc_grp);	
 }
 
+axis2_svc_grp_t * AXIS2_CALL 
+axis2_svc_grp_create_with_engine_config (axis2_env_t **env,
+                                         struct axis2_engine_config *engine_config)
+{
+    axis2_svc_grp_impl_t *svc_grp_impl = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, engine_config, NULL);
+    
+    svc_grp_impl = (axis2_svc_grp_impl_t *) axis2_svc_grp_create(env);
+    if(NULL != svc_grp_impl)
+        svc_grp_impl->parent = engine_config;
+    
+    return &(svc_grp_impl->svc_grp);
+        
+}
 /******************************************************************************/
 
 axis2_status_t AXIS2_CALL 
 axis2_svc_grp_free (axis2_svc_grp_t *svc_grp, 
                     axis2_env_t **env)
 {
+    axis2_svc_grp_impl_t *svc_grp_impl = NULL;
+    
     AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
     
+    svc_grp_impl = AXIS2_INTF_TO_IMPL(svc_grp);
+    
     if(NULL != svc_grp->ops)
 		AXIS2_FREE((*env)->allocator, svc_grp->ops);
     
-	if(NULL != AXIS2_INTF_TO_IMPL(svc_grp)->param_container)
-        AXIS2_PARAM_CONTAINER_FREE(AXIS2_INTF_TO_IMPL(svc_grp)->param_container, 
+	if(NULL != svc_grp->param_container)
+        AXIS2_PARAM_CONTAINER_FREE(svc_grp->param_container, 
             env);
     
-    if(NULL != AXIS2_INTF_TO_IMPL(svc_grp)->svc_grp_name)
+    if(NULL != svc_grp_impl->svc_grp_name)
         AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(svc_grp)->svc_grp_name);
     
-    if(NULL != AXIS2_INTF_TO_IMPL(svc_grp)->svcs)
-        axis2_hash_free(AXIS2_INTF_TO_IMPL(svc_grp)->svcs, env);
+    if(NULL != svc_grp_impl->svcs)
+        axis2_hash_free(svc_grp_impl->svcs, env);
+    
+    if(NULL != svc_grp_impl->modules)
+        AXIS2_ARRAY_LIST_FREE(svc_grp_impl->modules, env);
     
-	AXIS2_FREE((*env)->allocator, svc_grp);
+    /*
+    if(NULL != svc_grp_impl->parent)
+    {
+        AXIS2_ENGINE_CONFIG_FREE(svc_grp_impl->parent, env);
+    }
+    */
+    
+    if(NULL != svc_grp_impl) 
+    {
+	    AXIS2_FREE((*env)->allocator, svc_grp_impl);
+    }
 	return AXIS2_SUCCESS;
 }
 
@@ -213,7 +272,7 @@
 axis2_svc_t * AXIS2_CALL 
 axis2_svc_grp_get_svc (axis2_svc_grp_t *svc_grp, 
                         axis2_env_t **env,
-		                const axis2_qname_t* svc_name)
+		                axis2_qname_t* svc_name)
 {
     AXIS2_FUNC_PARAM_CHECK(svc_grp, env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, svc_name, NULL);
@@ -222,10 +281,18 @@
         AXIS2_QNAME_GET_LOCALPART(svc_name, env), AXIS2_HASH_KEY_STRING));
 }
 
+axis2_hash_t *AXIS2_CALL
+axis2_svc_grp_get_svcs(axis2_svc_grp_t *svc_grp, 
+                        axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, NULL);
+    return AXIS2_INTF_TO_IMPL(svc_grp)->svcs;
+}
+
 axis2_status_t AXIS2_CALL 
 axis2_svc_grp_remove_svc (axis2_svc_grp_t *svc_grp, 
                             axis2_env_t **env,
-		                    const axis2_qname_t* svc_name)
+		                    axis2_qname_t* svc_name)
 {
     AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
     
@@ -243,18 +310,16 @@
                             axis2_param_t *param)
 {
     AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, param, AXIS2_FAILURE);
     
-    if(NULL == AXIS2_INTF_TO_IMPL(svc_grp)->param_container)
+    if(NULL == svc_grp->param_container)
+    {
 	    AXIS2_ERROR_SET((*env)->error, 
             AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, AXIS2_FAILURE);
+        return AXIS2_FAILURE;
+    }
     
-    AXIS2_PARAM_CHECK((*env)->error, param, AXIS2_FAILURE);
-	
-	axis2_hash_set (AXIS2_PARAM_CONTAINER_GET_PARAMS(AXIS2_INTF_TO_IMPL(
-        svc_grp)->param_container, env), AXIS2_PARAM_GET_NAME(param, env), 
-        AXIS2_HASH_KEY_STRING, param);
-	
-	return AXIS2_SUCCESS;
+    return AXIS2_PARAM_CONTAINER_ADD_PARAM(svc_grp->param_container, env, param);
 }
 
 axis2_param_t * AXIS2_CALL 
@@ -262,50 +327,96 @@
                             axis2_env_t **env,
 		                    const axis2_char_t *name)
 {
-    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
-    
-	if(NULL == AXIS2_INTF_TO_IMPL(svc_grp)->param_container)
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, name, NULL);
+	if(NULL == svc_grp->param_container)
+    {
 	    AXIS2_ERROR_SET((*env)->error
         , AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, NULL);
-    
-	axis2_char_t *tempname = AXIS2_STRDUP(name, env);
-    
-	if(NULL == tempname)
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FALSE);
-		
-	return (axis2_param_t *)(axis2_hash_get (AXIS2_PARAM_CONTAINER_GET_PARAMS(
-        AXIS2_INTF_TO_IMPL(svc_grp)->param_container, env), tempname, 
-        AXIS2_HASH_KEY_STRING));
+        return NULL;
+    }
 	
+    return AXIS2_PARAM_CONTAINER_GET_PARAM(svc_grp->param_container, env, name);
 }
 
-axis2_hash_t * AXIS2_CALL 
+axis2_array_list_t * AXIS2_CALL 
 axis2_svc_grp_get_params (axis2_svc_grp_t *svc_grp, 
                             axis2_env_t **env)
 {
     AXIS2_FUNC_PARAM_CHECK(svc_grp, env, NULL);
 	
-	return AXIS2_PARAM_CONTAINER_GET_PARAMS(AXIS2_INTF_TO_IMPL(svc_grp)->
-        param_container, env);
+	return AXIS2_PARAM_CONTAINER_GET_PARAMS(svc_grp->param_container, env);
 	
 }
 
-axis2_bool_t AXIS2_CALL 
-axis2_svc_grp_is_param_locked (axis2_svc_grp_t *svc_grp, 
+axis2_bool_t AXIS2_CALL
+axis2_svc_grp_is_param_locked(axis2_svc_grp_t *svc_grp,
                                 axis2_env_t **env,
-		                        const axis2_char_t *param_name)
+                                axis2_char_t *param_name) 
 {
+    axis2_bool_t locked = AXIS2_FALSE;
+    struct axis2_engine_config *parent = NULL;
+    axis2_param_t *param = NULL;
+    axis2_bool_t ret = AXIS2_FALSE;
+    
     AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FALSE);
-	
-	if(NULL == AXIS2_INTF_TO_IMPL(svc_grp)->param_container)
-	    AXIS2_ERROR_SET((*env)->error
-        , AXIS2_ERROR_INVALID_STATE_PARAM_CONTAINER, AXIS2_FALSE);
-	
-	axis2_char_t *tempname = AXIS2_STRDUP(param_name, env);
-	if(NULL == tempname)
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FALSE);
-	
-	return AXIS2_PARAM_CONTAINER_IS_PARAM_LOCKED
-		(AXIS2_INTF_TO_IMPL(svc_grp)->param_container, env, param_name); 
-	
+    AXIS2_PARAM_CHECK((*env)->error, param_name, AXIS2_FALSE);
+
+    parent = axis2_svc_grp_get_parent(svc_grp, env);
+    /* checking the locked value of parent */
+    if (NULL != parent) 
+    {
+        locked =  AXIS2_ENGINE_CONFIG_IS_PARAM_LOCKED(parent, env, param_name);
+    }
+    if(locked)
+    {
+        ret = AXIS2_TRUE;
+    } else 
+    {
+        param = axis2_svc_grp_get_param(svc_grp, env, param_name);
+        if(NULL != param && AXIS2_PARAM_IS_LOCKED(param, env))
+        {
+            ret = AXIS2_TRUE;
+        } else 
+        {
+            ret = AXIS2_FALSE;
+        }
+    }
+    return ret;
+}
+    
+axis2_status_t AXIS2_CALL
+axis2_svc_grp_add_module(axis2_svc_grp_t *svc_grp, 
+                                axis2_env_t **env,
+                                axis2_qname_t *module_qname)
+{
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
+    return AXIS2_ARRAY_LIST_ADD(AXIS2_INTF_TO_IMPL(svc_grp)->modules, env, 
+        module_qname);
+}
+
+struct axis2_engine_config * AXIS2_CALL
+axis2_svc_grp_get_parent(axis2_svc_grp_t *svc_grp,
+                            axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, NULL);
+    
+    return AXIS2_INTF_TO_IMPL(svc_grp)->parent;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_svc_grp_set_parent(axis2_svc_grp_t *svc_grp,
+                            axis2_env_t **env,
+                            struct axis2_engine_config *parent) 
+{
+    axis2_svc_grp_impl_t *svc_grp_impl = NULL;
+    
+    AXIS2_FUNC_PARAM_CHECK(svc_grp, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, parent, AXIS2_FAILURE);
+    
+    svc_grp_impl = AXIS2_INTF_TO_IMPL(svc_grp);
+    if(svc_grp_impl->parent)
+        AXIS2_ENGINE_CONFIG_FREE(svc_grp_impl->parent, env);
+    svc_grp_impl->parent = parent;
+    return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/core/description/src/transport_out_desc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/src/transport_out_desc.c?rev=351594&r1=351593&r2=351594&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/src/transport_out_desc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/src/transport_out_desc.c Thu Dec  1 21:13:39 2005
@@ -0,0 +1,396 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+#include <axis2_transport_out_desc.h>
+    
+/** 
+ * @brief Description transport out struct impl
+ * Transport out
+ * Represents a incoming transport deployed in AXis2
+ */ 
+typedef struct axis2_transport_out_desc_impl
+{
+	axis2_transport_out_desc_t transport_out;
+    
+    /** Field paramInclude */
+    struct axis2_param_container *param_container;
+    
+    /** 
+     * Field flowInclude 
+     * This will have a shallow copy and will not be freed by the descructor
+     */
+    struct axis2_flow *outflow;
+    
+    /** 
+     * Field flowInclude 
+     * This will have a shallow copy and will not be freed by the descructor
+     */
+    struct axis2_flow *faultflow;
+        
+    /** 
+     * Field name
+     * This will have a shallow copy and will not be freed by the descructor
+     */
+    axis2_qname_t *qname;
+    
+    /**
+     * This will have a shallow copy and will not be freed by the descructor
+     */
+    struct axis2_transport_sender *sender;
+    
+    /** to store handler in inFlow */
+    struct axis2_phase *outphase;
+        
+    /** to store handler Fault in inFlow */
+    struct axis2_phase *faultphase;
+    
+    
+} axis2_transport_out_desc_impl_t;
+
+#define AXIS2_INTF_TO_IMPL(transport_out) ((axis2_transport_out_desc_impl_t *)transport_out)
+
+/************************* Function prototypes ********************************/
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_free (
+                axis2_transport_out_desc_t *transport_out,
+				axis2_env_t **env);
+
+axis2_qname_t *AXIS2_CALL
+axis2_transport_out_desc_get_qname(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_qname(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        axis2_qname_t *qname);
+
+struct axis2_flow *AXIS2_CALL
+axis2_transport_out_desc_get_outflow(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_outflow(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        struct axis2_flow *outflow);
+
+struct axis2_flow *AXIS2_CALL
+axis2_transport_out_desc_get_faultflow(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_faultflow(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        struct axis2_flow *faultflow);
+
+struct axis2_transport_sender * AXIS2_CALL
+axis2_transport_out_desc_get_sender(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_sender(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        struct axis2_transport_sender *sender);
+
+struct axis2_phase * AXIS2_CALL
+axis2_transport_out_desc_get_outphase(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_outphase(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        struct axis2_phase *outphase);
+                                            
+struct axis2_phase *AXIS2_CALL
+axis2_transport_out_desc_get_faultphase(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_faultphase(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        struct axis2_phase *faultphase);
+
+
+/************************** End of function prototypes ************************/
+
+axis2_transport_out_desc_t * AXIS2_CALL 
+axis2_transport_out_create_with_qname (axis2_env_t **env, axis2_qname_t *qname)
+{
+    axis2_transport_out_desc_impl_t *transport_out_impl = NULL;
+    transport_out_impl->param_container = NULL;
+    transport_out_impl->qname = NULL;
+    transport_out_impl->outphase = NULL;
+    transport_out_impl->faultphase = NULL;
+    transport_out_impl->outflow = NULL;
+    transport_out_impl->faultflow = NULL;
+    transport_out_impl->sender = NULL;
+    transport_out_impl->transport_out.ops = NULL;
+    
+    
+	AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, qname, NULL);
+	
+	transport_out_impl = (axis2_transport_out_desc_impl_t *) AXIS2_MALLOC((*env)->
+        allocator, sizeof(axis2_transport_out_desc_impl_t));
+	
+	if(NULL == transport_out_impl)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL); 
+    
+    transport_out_impl->param_container = axis2_param_container_create(env);
+    if(NULL == transport_out_impl->param_container)
+    {
+        axis2_transport_out_desc_free(&(transport_out_impl->transport_out), env);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+    
+    transport_out_impl->qname = qname;
+    
+    transport_out_impl->outphase = axis2_phase_create(env, AXIS2_TRANSPORT_PHASE);
+    
+    transport_out_impl->faultphase = axis2_phase_create(env, AXIS2_TRANSPORT_PHASE);
+    
+	transport_out_impl->transport_out.ops = 
+		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_transport_out_desc_ops_t));
+	if(NULL == transport_out_impl->transport_out.ops)
+    {
+        axis2_transport_out_desc_free(&(transport_out_impl->transport_out), env);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+    
+    transport_out_impl->transport_out.ops->free = axis2_transport_out_desc_free;
+    
+	transport_out_impl->transport_out.ops->get_qname =  
+        axis2_transport_out_desc_get_qname;
+	transport_out_impl->transport_out.ops->set_qname =  
+        axis2_transport_out_desc_set_qname;
+	transport_out_impl->transport_out.ops->get_outflow =  
+        axis2_transport_out_desc_get_outflow;
+	transport_out_impl->transport_out.ops->set_outflow = 
+        axis2_transport_out_desc_set_outflow;
+    transport_out_impl->transport_out.ops->get_faultflow = 
+        axis2_transport_out_desc_get_faultflow;
+    transport_out_impl->transport_out.ops->set_faultflow = 
+        axis2_transport_out_desc_set_faultflow;
+    transport_out_impl->transport_out.ops->get_sender = 
+        axis2_transport_out_desc_get_sender;
+    transport_out_impl->transport_out.ops->set_sender = 
+        axis2_transport_out_desc_set_sender;
+    transport_out_impl->transport_out.ops->get_outphase = 
+        axis2_transport_out_desc_get_outphase;
+    transport_out_impl->transport_out.ops->set_outphase = 
+        axis2_transport_out_desc_set_outphase;
+    transport_out_impl->transport_out.ops->get_faultphase = 
+        axis2_transport_out_desc_get_faultphase;
+    transport_out_impl->transport_out.ops->set_faultphase = 
+        axis2_transport_out_desc_set_faultphase;
+    
+	return &(transport_out_impl->transport_out);
+}
+
+/***************************Function implementation****************************/
+
+axis2_status_t AXIS2_CALL 
+axis2_transport_out_desc_free (axis2_transport_out_desc_t *transport_out, 
+                            axis2_env_t **env)
+{
+    axis2_transport_out_desc_impl_t *transport_out_impl = 
+        AXIS2_INTF_TO_IMPL(transport_out);
+    
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, AXIS2_FAILURE);
+    
+	if(NULL != transport_out->ops)
+        AXIS2_FREE((*env)->allocator, transport_out->ops);
+    
+    if(NULL != transport_out_impl->param_container)
+    {
+        AXIS2_PARAM_CONTAINER_FREE(transport_out_impl->param_container, env);
+    }
+    
+    if(NULL != transport_out_impl->outphase)
+    {
+        AXIS2_PHASE_FREE(transport_out_impl->outphase, env);
+    }
+    
+    if(NULL != transport_out_impl->faultphase)
+    {
+        AXIS2_PHASE_FREE(transport_out_impl->faultphase, env);
+    }
+    
+    AXIS2_FREE((*env)->allocator, transport_out_impl);
+    
+	return AXIS2_SUCCESS;
+}
+
+axis2_qname_t *AXIS2_CALL
+axis2_transport_out_desc_get_qname(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, NULL);
+    return AXIS2_INTF_TO_IMPL(transport_out)->qname;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_qname(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        axis2_qname_t *qname) 
+{
+    axis2_transport_out_desc_impl_t *transport_out_impl = AXIS2_INTF_TO_IMPL(transport_out);
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, qname, AXIS2_FAILURE);
+    
+    if(transport_out_impl->qname)
+    {
+        AXIS2_PHASE_FREE(transport_out_impl->qname, env);
+        transport_out_impl->qname = NULL;
+    }
+    transport_out_impl->qname = qname;
+    return AXIS2_SUCCESS;
+}
+
+struct axis2_flow *AXIS2_CALL
+axis2_transport_out_desc_get_outflow(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, NULL);
+    return AXIS2_INTF_TO_IMPL(transport_out)->outflow;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_outflow(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        struct axis2_flow *outflow) 
+{
+    axis2_transport_out_desc_impl_t *transport_out_impl = NULL;
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, outflow, AXIS2_FAILURE);
+    transport_out_impl = AXIS2_INTF_TO_IMPL(transport_out);
+    if(transport_out_impl->outflow)
+    {
+        AXIS2_FLOW_FREE(transport_out_impl->outflow, env);
+        transport_out_impl->outflow = NULL;
+    }
+    transport_out_impl->outflow = outflow;
+    return AXIS2_SUCCESS;
+}
+
+struct axis2_flow *AXIS2_CALL
+axis2_transport_out_desc_get_faultflow(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env) 
+{
+    return AXIS2_INTF_TO_IMPL(transport_out)->faultflow;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_faultflow(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        struct axis2_flow *faultflow) 
+{
+    axis2_transport_out_desc_impl_t *transport_out_impl = AXIS2_INTF_TO_IMPL(transport_out);
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, faultflow, AXIS2_FAILURE);
+    
+    if(transport_out_impl->faultflow)
+    {
+        AXIS2_PHASE_FREE(transport_out_impl->faultflow, env);
+        transport_out_impl->faultflow = NULL;
+    }
+    transport_out_impl->faultflow = faultflow;
+    return AXIS2_SUCCESS;
+}
+
+struct axis2_transport_sender * AXIS2_CALL
+axis2_transport_out_desc_get_sender(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, NULL);
+    return AXIS2_INTF_TO_IMPL(transport_out)->sender;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_sender(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        struct axis2_transport_sender *sender) 
+{
+    axis2_transport_out_desc_impl_t *transport_out_impl = AXIS2_INTF_TO_IMPL(transport_out);
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, sender, AXIS2_FAILURE);
+    
+    if(transport_out_impl->sender)
+    {
+        AXIS2_TRANSPORT_SENDER_FREE(transport_out_impl->sender, env);
+        transport_out_impl->sender = NULL;
+    }
+    transport_out_impl->sender = sender;
+    return AXIS2_SUCCESS;
+}
+
+struct axis2_phase * AXIS2_CALL
+axis2_transport_desc_get_outphase(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, NULL);
+    
+    return AXIS2_INTF_TO_IMPL(transport_out)->outphase;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_outphase(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        struct axis2_phase *outphase) 
+{
+    axis2_transport_out_desc_impl_t *transport_out_impl = AXIS2_INTF_TO_IMPL(transport_out);
+    
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, outphase, AXIS2_FAILURE);
+    
+    if(transport_out_impl->outphase)
+    {
+        AXIS2_PHASE_FREE(transport_out_impl->outphase, env);
+        transport_out_impl->outphase = NULL;
+    }
+    
+    transport_out_impl->outphase = outphase;
+    return AXIS2_SUCCESS;
+}
+
+struct axis2_phase *AXIS2_CALL
+axis2_transport_out_desc_get_faultphase(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env) 
+{
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, NULL);
+    
+    return AXIS2_INTF_TO_IMPL(transport_out)->faultphase;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_transport_out_desc_set_faultphase(struct axis2_transport_out_desc *transport_out,
+                                        axis2_env_t **env,
+                                        struct axis2_phase *faultphase) 
+{
+    axis2_transport_out_desc_impl_t *transport_out_impl = AXIS2_INTF_TO_IMPL(transport_out);
+    AXIS2_FUNC_PARAM_CHECK(transport_out, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, faultphase, AXIS2_FAILURE);
+    
+    if(transport_out_impl->faultphase)
+    {
+        AXIS2_PHASE_FREE(transport_out_impl->faultphase, env);
+        transport_out_impl->faultphase = NULL;
+    }
+    
+    transport_out_impl->faultphase = faultphase;
+    return AXIS2_SUCCESS;
+    
+}

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

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