axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r328524 - in /webservices/axis2/trunk/c: include/ modules/core/description/src/ modules/core/engine/src/
Date Wed, 26 Oct 2005 02:16:44 GMT
Author: damitha
Date: Tue Oct 25 19:16:31 2005
New Revision: 328524

URL: http://svn.apache.org/viewcvs?rev=328524&view=rev
Log:
Code added

Modified:
    webservices/axis2/trunk/c/include/axis2_description_param_include.h
    webservices/axis2/trunk/c/include/axis2_description_service.h
    webservices/axis2/trunk/c/include/axis2_description_servicegroup.h
    webservices/axis2/trunk/c/modules/core/description/src/axis2_description_service.c
    webservices/axis2/trunk/c/modules/core/description/src/axis2_description_servicegroup.c
    webservices/axis2/trunk/c/modules/core/engine/src/axis2_engine_config.c

Modified: webservices/axis2/trunk/c/include/axis2_description_param_include.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_description_param_include.h?rev=328524&r1=328523&r2=328524&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_description_param_include.h (original)
+++ webservices/axis2/trunk/c/include/axis2_description_param_include.h Tue Oct 25 19:16:31
2005
@@ -71,8 +71,8 @@
 	param_include)->get_params (env, param_include))
 
 #define axis2_description_param_include_is_param_locked(env, \
-	param_include) (axis2_description_param_include_get_ops(env, \
-	param_include)->is_param_locked (env, param_include))
+	param_include, param_name) (axis2_description_param_include_get_ops(env, \
+	param_include)->is_param_locked (env, param_include, param_name))
 
 /*************************** End of function macros ***************************/
 
@@ -81,35 +81,32 @@
 /** Deallocate memory
   * @return status code
   */
-    typedef axis2_status_t (*axis2_description_param_include_free_t)
-        (axis2_environment_t * env,
-         axis2_description_param_include_t * param_include);
+typedef axis2_status_t (*axis2_description_param_include_free_t)
+		(axis2_environment_t * env,
+		 axis2_description_param_include_t * param_include);
 
 /** Add a parameter
   * @param parameters
   * @return status code
   */
-    typedef axis2_status_t (*axis2_description_param_include_add_param_t)
-        (axis2_environment_t * env,
-         axis2_description_param_include_t * param_include,
-         const axis2_description_param_t * param);
+typedef axis2_status_t (*axis2_description_param_include_add_param_t)
+		(axis2_environment_t * env,
+		 axis2_description_param_include_t * param_include,
+		 const axis2_description_param_t * param);
 
 /** To get a parameter in a given description 
   * @param parameter name
   * @return parameter
   */
-    typedef axis2_description_param_t
-        *(*axis2_description_param_include_get_param_t) (axis2_environment_t *
-                                                         env,
-                                                         axis2_description_param_include_t
-                                                         * param_include,
-                                                         const axis2_char_t *
-                                                         name);
+typedef axis2_description_param_t
+		*(*axis2_description_param_include_get_param_t) 
+		(axis2_environment_t *env, axis2_description_param_include_t *param_include,
+		const axis2_char_t *name);
 
 /** To get all the parameters in a given description
   * @return all the parameters contained
   */
-    typedef axis2_hash_t *(*axis2_description_param_include_get_params_t)
+typedef axis2_hash_t *(*axis2_description_param_include_get_params_t)
         (axis2_environment_t * env,
          axis2_description_param_include_t * param_include);
 
@@ -117,10 +114,10 @@
   * @param parameter name
   * @return whether parameter is locked
   */
-    typedef axis2_bool_t (*axis2_description_param_include_is_param_locked_t)
-        (axis2_environment_t * env,
-         axis2_description_param_include_t * param_include,
-         const axis2_char_t * param_name);
+typedef axis2_bool_t (*axis2_description_param_include_is_param_locked_t)
+		(axis2_environment_t *env,
+		axis2_description_param_include_t *param_include,
+		const axis2_char_t *param_name);
 
 /****************************** End of function pointers **********************/
 
@@ -128,34 +125,32 @@
   * Paramter can be any thing it can be XML element with number of child 
   * elements
   */
-    struct axis2_description_param_include_ops_s
-    {
-        axis2_description_param_include_free_t free;
+struct axis2_description_param_include_ops_s
+{
+	axis2_description_param_include_free_t free;
 
-        axis2_description_param_include_add_param_t add_param;
+	axis2_description_param_include_add_param_t add_param;
 
-        axis2_description_param_include_get_param_t get_param;
+	axis2_description_param_include_get_param_t get_param;
 
-        axis2_description_param_include_get_params_t get_params;
+	axis2_description_param_include_get_params_t get_params;
 
-        axis2_description_param_include_is_param_locked_t is_param_locked;
+	axis2_description_param_include_is_param_locked_t is_param_locked;
 
-    };
+};
 
 /** This will return the operations struct of the 
   * axis2_description_param_include_t struct
   * @return operations for axis2_description_param_include_t
   */
-    axis2_description_param_include_ops_t
-        *axis2_description_param_include_get_ops (axis2_environment_t * env,
-                                                  axis2_description_param_include_t
-                                                  * param_include);
+axis2_description_param_include_ops_t*axis2_description_param_include_get_ops 
+		(axis2_environment_t *env, axis2_description_param_include_t *param_include);
 
 /**
   *	Create axis2_description_param_include_t
   * @return axis2_description_param_include_t
   */
-    axis2_description_param_include_t *axis2_description_param_include_create
+axis2_description_param_include_t *axis2_description_param_include_create
         (axis2_environment_t * env);
 
 /** @} */

Modified: webservices/axis2/trunk/c/include/axis2_description_service.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_description_service.h?rev=328524&r1=328523&r2=328524&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_description_service.h (original)
+++ webservices/axis2/trunk/c/include/axis2_description_service.h Tue Oct 25 19:16:31 2005
@@ -52,18 +52,6 @@
 		(axis2_description_service_get_ops(env, service_desc)->free \
 		(env, service_desc));
 
-#define axis2_description_service_add_param(env, service_desc, param) \
-		(axis2_description_service_get_ops(env, service_desc)->add_param \
-		(env, service_desc, param));
-
-#define axis2_description_service_get_param(env, service_desc) \
-		(axis2_description_service_get_ops(env, service_desc)->get_param \
-		(env, service_desc));
-
-#define axis2_description_service_get_params(env, service_desc) \
-		(axis2_description_service_get_ops(env, service_desc)->get_params \
-		(env, service_desc));
-
 #define axis2_description_service_add_operation(env, service_desc, operation_desc) \
 		(axis2_description_service_get_ops(env, service_desc)->add_operation \
 		(env, service_desc, operation_desc));
@@ -91,25 +79,33 @@
 #define axis2_description_service_get_name(env, service_desc) \
 		(axis2_description_service_get_ops(env, service_desc)->get_name(env \
 		,service_desc));
+		
+#define axis2_description_service_add_param(env, service_desc, param) \
+		(axis2_description_service_get_ops(env, service_desc)->add_param(env \
+		, service_desc, param));
+		
 
-/**************************** End of function macros **************************/
-/**************************** Function pointers *******************************/
+#define axis2_description_service_get_param(env, service_desc, name) \
+		(axis2_description_service_get_ops(env, service_desc)->get_param(env \
+		, service_desc, name));
+		
 
+#define axis2_description_service_get_params(env, service_desc) \
+		(axis2_description_service_get_ops(env, service_desc)->get_params(env \
+		, service_desc));
+		
+		
 
-typedef axis2_status_t (*axis2_description_service_free_t)
-		(axis2_environment_t * env,
-	 	axis2_description_service_t * service_desc);
+#define axis2_description_service_is_param_locked(env, service_desc, \
+		param_name) (axis2_description_service_get_ops(env \
+		, service_desc)->is_parameter_locked(env, service_desc, param_name));
+				
 
-typedef axis2_status_t (*axis2_description_service_add_param_t)
-		(axis2_environment_t * env,
-	 	axis2_description_service_t * service_desc,
-	 	axis2_description_param_t * param);
+/**************************** End of function macros **************************/
+/**************************** Function pointers *******************************/
 
-typedef axis2_description_param_t
-		*(*axis2_description_service_get_param_t) (axis2_environment_t * env,
-		axis2_description_service_t *service_desc,const axis2_char_t *name);
 
-typedef axis2_hash_t *(*axis2_description_service_get_params_t)
+typedef axis2_status_t (*axis2_description_service_free_t)
 		(axis2_environment_t * env,
 	 	axis2_description_service_t * service_desc);
 
@@ -146,6 +142,22 @@
 		 
 typedef axis2_qname_t *(*axis2_description_service_get_name_t)
 		(axis2_environment_t *env, axis2_description_service_t *service_desc);
+		
+typedef axis2_status_t (*axis2_description_service_add_param_t)
+		(axis2_environment_t *env
+		, axis2_description_service_t *service_desc
+		, axis2_description_param_t *param);
+
+typedef axis2_description_param_t *(*axis2_description_service_get_param_t)
+		(axis2_environment_t *env, axis2_description_service_t *service_desc
+		, const axis2_char_t *name);
+
+typedef axis2_hash_t *(*axis2_description_service_get_params_t)
+		(axis2_environment_t *env, axis2_description_service_t *service_desc);
+
+typedef axis2_bool_t (*axis2_description_service_is_param_locked_t)
+		(axis2_environment_t *env, axis2_description_service_t *service_desc
+		, const axis2_char_t *param_name);		
 
 /************************ End function pointers *******************************/
 
@@ -159,13 +171,7 @@
 
 	axis2_description_service_add_operation_t add_operation;
 
-	axis2_description_service_add_param_t add_param;
-
-	axis2_description_service_get_param_t get_param;
-
-	axis2_description_service_get_params_t get_params;
-
-	  axis2_description_service_get_operation_with_qname_t
+	axis2_description_service_get_operation_with_qname_t
 		get_operation_with_qname;
 
 	axis2_description_service_get_operation_with_name_t
@@ -179,6 +185,13 @@
 	
 	axis2_description_service_get_name_t get_name;
 
+	axis2_description_service_add_param_t add_param;
+
+	axis2_description_service_get_param_t get_param;
+
+	axis2_description_service_get_params_t get_params;
+	
+	axis2_description_service_is_param_locked_t is_param_locked;
 };
 
 /** To get the operation struct for axis_description_service_t call this

Modified: webservices/axis2/trunk/c/include/axis2_description_servicegroup.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_description_servicegroup.h?rev=328524&r1=328523&r2=328524&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_description_servicegroup.h (original)
+++ webservices/axis2/trunk/c/include/axis2_description_servicegroup.h Tue Oct 25 19:16:31
2005
@@ -63,9 +63,32 @@
 		servicegroup_desc)->add_service (env, servicegroup_desc, service_desc));
 
 #define axis2_description_servicegroup_get_service(env, servicegroup_desc \
-		, service_desc) ((axis2_description_servicegroup_get_ops(env, \
+		, service_desc) (axis2_description_servicegroup_get_ops(env, \
 		servicegroup_desc)->get_service(env, servicegroup_desc, service_desc));
+		
+#define axis2_description_servicegroup_remove_service(env, servicegroup_desc \
+		, service_name) (axis2_description_servicegroup_get_ops(env, \
+		servicegroup_desc)->remove_service(env, servicegroup_desc, service_name));		
+
+#define axis2_description_servicegroup_add_param(env, servicegroup_desc, param) \
+		(axis2_description_servicegroup_get_ops(env, \
+		servicegroup_desc)->add_param(env, servicegroup_desc, param));
+		
+		
 
+#define axis2_description_servicegroup_get_param(env, servicegroup_desc, name) \
+		(axis2_description_servicegroup_get_ops(env, \
+		servicegroup_desc)->get_param(env, servicegroup_desc, name));
+		
+#define axis2_description_servicegroup_get_params(env, servicegroup_desc) \
+		(axis2_description_servicegroup_get_ops(env, \
+		servicegroup_desc)->get_params(env, servicegroup_desc));
+		
+		
+#define axis2_description_servicegroup_is_param_locked(env, servicegroup_desc \
+		, param_name)(axis2_description_servicegroup_get_ops(env, \
+		servicegroup_desc)->is_param_locked(env, servicegroup_desc, param_name));
+		
 /**************************** End of function macros **************************/
 /**************************** Function pointers *******************************/
 
@@ -109,8 +132,31 @@
 		*(*axis2_description_servicegroup_get_service_t)
 		(axis2_environment_t *env
 		, axis2_description_servicegroup_t *servicegroup_desc
-		, const axis2_qname_t* service_name);		
+		, const axis2_qname_t* service_name);
 
+typedef axis2_status_t (*axis2_description_servicegroup_remove_service_t)
+		(axis2_environment_t *env
+		, axis2_description_servicegroup_t *servicegroup_desc
+		, const axis2_qname_t* service_name);
+		
+typedef axis2_status_t (*axis2_description_servicegroup_add_param_t)
+		(axis2_environment_t *env
+		, axis2_description_servicegroup_t *servicegroup_desc
+		, axis2_description_param_t *param);
+		
+
+typedef axis2_description_param_t *(*axis2_description_servicegroup_get_param_t)(
+		axis2_environment_t *env, axis2_description_servicegroup_t *servicegroup_desc
+		, const axis2_char_t *name);
+		
+typedef axis2_hash_t *(*axis2_description_servicegroup_get_params_t)
+		(axis2_environment_t *env
+		, axis2_description_servicegroup_t *servicegroup_desc);
+		
+typedef axis2_bool_t (*axis2_description_servicegroup_is_param_locked_t)
+		(axis2_environment_t *env, axis2_description_servicegroup_t *servicegroup_desc
+		, const axis2_char_t *param_name);
+		
 /*************************** End of function pointers *************************/
 
 struct axis2_description_servicegroup_ops_s
@@ -120,6 +166,11 @@
 	axis2_description_servicegroup_get_name_t get_name;
 	axis2_description_servicegroup_add_service_t add_service;
 	axis2_description_servicegroup_get_service_t get_service;
+	axis2_description_servicegroup_remove_service_t remove_service;
+	axis2_description_servicegroup_add_param_t add_param;
+	axis2_description_servicegroup_get_param_t get_param;
+	axis2_description_servicegroup_get_params_t get_params;
+	axis2_description_servicegroup_is_param_locked_t is_param_locked;
 };
 
 axis2_description_servicegroup_ops_t *axis2_description_servicegroup_get_ops 

Modified: webservices/axis2/trunk/c/modules/core/description/src/axis2_description_service.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/src/axis2_description_service.c?rev=328524&r1=328523&r2=328524&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/src/axis2_description_service.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/src/axis2_description_service.c Tue
Oct 25 19:16:31 2005
@@ -20,17 +20,6 @@
 axis2_status_t axis2_description_service_ops_free (axis2_environment_t *env
 		, axis2_description_service_t *service_desc);
 
-axis2_status_t axis2_description_service_ops_add_param(axis2_environment_t *env
-		, axis2_description_service_t *operation_desc
-		, axis2_description_param_t *param);
-
-axis2_description_param_t *axis2_description_service_ops_get_param
-		(axis2_environment_t *env, axis2_description_service_t *service_desc
-		, const axis2_char_t *name);
-
-axis2_hash_t *axis2_description_service_ops_get_params
-		(axis2_environment_t *env, axis2_description_service_t *service_desc);
-
 axis2_status_t axis2_description_service_ops_add_operation
 		(axis2_environment_t *env, axis2_description_service_t *service_desc
 		, axis2_description_operation_t *operation_desc);
@@ -57,6 +46,21 @@
 		
 axis2_qname_t *axis2_description_service_ops_get_name
 		(axis2_environment_t *env, axis2_description_service_t *service_desc);	
+
+axis2_status_t axis2_description_service_ops_add_param(axis2_environment_t *env
+		, axis2_description_service_t *service_desc
+		, axis2_description_param_t *param);
+
+axis2_description_param_t *axis2_description_service_ops_get_param
+		(axis2_environment_t *env, axis2_description_service_t *service_desc
+		, const axis2_char_t *name);
+
+axis2_hash_t *axis2_description_service_ops_get_params
+		(axis2_environment_t *env, axis2_description_service_t *service_desc);
+
+axis2_bool_t axis2_description_service_ops_is_param_locked(
+		axis2_environment_t *env, axis2_description_service_t *service_desc
+		, const axis2_char_t *param_name);
 		
 /************************* End of function headers ***************************/
 
@@ -147,6 +151,8 @@
 axis2_status_t axis2_description_service_ops_free
 		(axis2_environment_t *env, axis2_description_service_t *service_desc)
 {
+	if(!env)
+		return AXIS2_ERROR_INVALID_NULL_PARAMETER;
 	if(service_desc)
 	{
 		axis2_free(env->allocator, service_desc);
@@ -155,55 +161,6 @@
 	return AXIS2_ERROR_UNALLOCATED_MEMEORY_RELEASE_REQUESTED;
 }
 
-axis2_status_t axis2_description_service_ops_add_param(axis2_environment_t *env
-		, axis2_description_service_t *service_desc
-		, axis2_description_param_t *param)
-{
-	if(!service_desc || !service_desc->param_include || !param)
-	{
-		return AXIS2_ERROR_INVALID_NULL_PARAMETER;
-	}
-	axis2_hash_set (axis2_description_param_include_get_params(env
-		, service_desc->param_include), axis2_description_param_get_name(env
-		, param)
-		, AXIS2_HASH_KEY_STRING, param);	
-	return AXIS2_SUCCESS;
-}
-
-axis2_description_param_t *axis2_description_service_ops_get_param(
-		axis2_environment_t *env, axis2_description_service_t *service_desc
-		, const axis2_char_t *name)
-{
-	if(!service_desc || !service_desc->param_include)
-	{
-		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
-		return NULL;
-	}
-	axis2_char_t *tempname = axis2_strdup(env->string, name);
-	if(!tempname)
-	{
-		env->error->errorno = AXIS2_ERROR_NO_MEMORY;
-		return NULL;
-	}
-		
-	return (axis2_description_param_t *)(axis2_hash_get 
-		(axis2_description_param_include_get_params(env
-		, service_desc->param_include), tempname, AXIS2_HASH_KEY_STRING));
-	
-}
-
-axis2_hash_t *axis2_description_service_ops_get_params
-		(axis2_environment_t *env, axis2_description_service_t *service_desc)
-{
-	if(!service_desc)
-	{
-		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
-		return NULL;		
-	}
-	return axis2_description_param_include_get_params(env
-		, service_desc->param_include);
-	
-}
 
 axis2_status_t axis2_description_service_ops_add_operation
 		(axis2_environment_t *env, axis2_description_service_t *service_desc
@@ -311,4 +268,75 @@
 		return NULL;	
 	}
 	return service_desc->name;
+}
+
+axis2_status_t axis2_description_service_ops_add_param(axis2_environment_t *env
+		, axis2_description_service_t *service_desc
+		, axis2_description_param_t *param)
+{
+	if(!env || !service_desc || !service_desc->param_include || !param)
+	{
+		return AXIS2_ERROR_INVALID_NULL_PARAMETER;
+	}
+	axis2_hash_set (axis2_description_param_include_get_params(env
+		, service_desc->param_include), axis2_description_param_get_name(env
+		, param)
+		, AXIS2_HASH_KEY_STRING, param);	
+	return AXIS2_SUCCESS;
+}
+
+axis2_description_param_t *axis2_description_service_ops_get_param(
+		axis2_environment_t *env, axis2_description_service_t *service_desc
+		, const axis2_char_t *name)
+{
+	if(!env || !service_desc || !service_desc->param_include)
+	{
+		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
+		return NULL;
+	}
+	axis2_char_t *tempname = axis2_strdup(env->string, name);
+	if(!tempname)
+	{
+		env->error->errorno = AXIS2_ERROR_NO_MEMORY;
+		return NULL;
+	}
+		
+	return (axis2_description_param_t *)(axis2_hash_get 
+		(axis2_description_param_include_get_params(env
+		, service_desc->param_include), tempname, AXIS2_HASH_KEY_STRING));
+	
+}
+
+axis2_hash_t *axis2_description_service_ops_get_params
+		(axis2_environment_t *env, axis2_description_service_t *service_desc)
+{
+	if(!env || !service_desc)
+	{
+		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
+		return NULL;		
+	}
+	return axis2_description_param_include_get_params(env
+		, service_desc->param_include);
+	
+}
+
+axis2_bool_t axis2_description_service_ops_is_param_locked(
+		axis2_environment_t *env, axis2_description_service_t *service_desc
+		, const axis2_char_t *param_name)
+{
+	if(!env || !service_desc || !service_desc->param_include)
+	{
+		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
+		return AXIS2_FALSE;
+	}
+	axis2_char_t *tempname = axis2_strdup(env->string, param_name);
+	if(!tempname)
+	{
+		env->error->errorno = AXIS2_ERROR_NO_MEMORY;
+		return AXIS2_FALSE;
+	}
+		
+	return axis2_description_param_include_is_param_locked (env
+		, service_desc->param_include, param_name); 
+	
 }

Modified: webservices/axis2/trunk/c/modules/core/description/src/axis2_description_servicegroup.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/description/src/axis2_description_servicegroup.c?rev=328524&r1=328523&r2=328524&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/src/axis2_description_servicegroup.c
(original)
+++ webservices/axis2/trunk/c/modules/core/description/src/axis2_description_servicegroup.c
Tue Oct 25 19:16:31 2005
@@ -52,6 +52,29 @@
 		(axis2_environment_t *env
 		, axis2_description_servicegroup_t *servicegroup_desc
 		, const axis2_qname_t* service_name);
+		
+axis2_status_t axis2_description_servicegroup_ops_remove_service
+		(axis2_environment_t *env
+		, axis2_description_servicegroup_t *servicegroup_desc
+		, const axis2_qname_t* service_name);
+		
+axis2_status_t axis2_description_servicegroup_ops_add_param
+		(axis2_environment_t *env
+		, axis2_description_servicegroup_t *servicegroup_desc
+		, axis2_description_param_t *param);
+		
+
+axis2_description_param_t *axis2_description_servicegroup_ops_get_param(
+		axis2_environment_t *env, axis2_description_servicegroup_t *servicegroup_desc
+		, const axis2_char_t *name);
+		
+axis2_hash_t *axis2_description_servicegroup_ops_get_params
+		(axis2_environment_t *env
+		, axis2_description_servicegroup_t *servicegroup_desc);
+		
+axis2_bool_t axis2_description_servicegroup_ops_is_param_locked(
+		axis2_environment_t *env, axis2_description_servicegroup_t *servicegroup_desc
+		, const axis2_char_t *param_name);
 
 /***************************** End of function headers ************************/
 
@@ -146,7 +169,7 @@
 		(axis2_environment_t *env
 		, axis2_description_servicegroup_t *servicegroup_desc)
 {
-	if(!servicegroup_desc)
+	if(!env || !servicegroup_desc)
 	{
 		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
 		return NULL;
@@ -173,7 +196,7 @@
 		, axis2_description_servicegroup_t *servicegroup_desc
 		, const axis2_qname_t* service_name)
 {
-	if(!servicegroup_desc || ! service_name)
+	if(!env || !servicegroup_desc || ! service_name)
 	{
 		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
 		return NULL;
@@ -181,4 +204,92 @@
 	return (axis2_description_service_t *) (axis2_hash_get 
 		(servicegroup_desc->services, service_name->localpart
 		, AXIS2_HASH_KEY_STRING));
+}
+
+axis2_status_t axis2_description_servicegroup_ops_remove_service
+		(axis2_environment_t *env
+		, axis2_description_servicegroup_t *servicegroup_desc
+		, const axis2_qname_t* service_name)
+{
+	if(!env || !servicegroup_desc || ! service_name)
+	{
+		return AXIS2_ERROR_INVALID_NULL_PARAMETER;
+	}
+	axis2_hash_set (servicegroup_desc->services, service_name->localpart
+		, AXIS2_HASH_KEY_STRING, NULL);
+	
+	return AXIS2_SUCCESS;
+}
+
+axis2_status_t axis2_description_servicegroup_ops_add_param
+		(axis2_environment_t *env
+		, axis2_description_servicegroup_t *servicegroup_desc
+		, axis2_description_param_t *param)
+{
+	if(!env || !servicegroup_desc || !servicegroup_desc->param_include || !param)
+	{
+		return AXIS2_ERROR_INVALID_NULL_PARAMETER;
+	}
+	axis2_hash_set (axis2_description_param_include_get_params(env
+		, servicegroup_desc->param_include), axis2_description_param_get_name(env
+		, param)
+		, AXIS2_HASH_KEY_STRING, param);	
+	return AXIS2_SUCCESS;
+}
+
+axis2_description_param_t *axis2_description_servicegroup_ops_get_param(
+		axis2_environment_t *env, axis2_description_servicegroup_t *servicegroup_desc
+		, const axis2_char_t *name)
+{
+	if(!env || !servicegroup_desc || !servicegroup_desc->param_include)
+	{
+		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
+		return NULL;
+	}
+	axis2_char_t *tempname = axis2_strdup(env->string, name);
+	if(!tempname)
+	{
+		env->error->errorno = AXIS2_ERROR_NO_MEMORY;
+		return NULL;
+	}
+		
+	return (axis2_description_param_t *)(axis2_hash_get 
+		(axis2_description_param_include_get_params(env
+		, servicegroup_desc->param_include), tempname, AXIS2_HASH_KEY_STRING));
+	
+}
+
+axis2_hash_t *axis2_description_servicegroup_ops_get_params
+		(axis2_environment_t *env
+		, axis2_description_servicegroup_t *servicegroup_desc)
+{
+	if(!env || !servicegroup_desc)
+	{
+		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
+		return NULL;		
+	}
+	return axis2_description_param_include_get_params(env
+		, servicegroup_desc->param_include);
+	
+}
+
+axis2_bool_t axis2_description_servicegroup_ops_is_param_locked(
+		axis2_environment_t *env, axis2_description_servicegroup_t *servicegroup_desc
+		, const axis2_char_t *param_name)
+{
+	if(!env || !servicegroup_desc || !servicegroup_desc->param_include)
+	{
+		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
+		return AXIS2_FALSE;
+	}
+	axis2_char_t *tempname = axis2_strdup(env->string, param_name);
+	if(!tempname)
+	{
+		env->error->errorno = AXIS2_ERROR_NO_MEMORY;
+		return AXIS2_FALSE;
+	}
+		
+	return axis2_description_param_include_is_param_locked (env
+		, servicegroup_desc->param_include, param_name); 
+	
 }

Modified: webservices/axis2/trunk/c/modules/core/engine/src/axis2_engine_config.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/src/axis2_engine_config.c?rev=328524&r1=328523&r2=328524&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/src/axis2_engine_config.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/src/axis2_engine_config.c Tue Oct 25 19:16:31
2005
@@ -55,6 +55,10 @@
 axis2_status_t axis2_engine_config_ops_remove_service
 		(axis2_environment_t *env, axis2_engine_config_t *engine_config
 		, const axis2_char_t *name);
+		
+axis2_status_t split_service_name(axis2_environment_t *env
+		, axis2_char_t *service_name, axis2_char_t **service_name_st);
+		
 
 /************************** End of function prototypes ************************/
 
@@ -195,6 +199,18 @@
 		axis2_environment_t *env, axis2_engine_config_t *engine_config
 		, const axis2_char_t* service_name)
 {
+	if(!env || !engine_config)
+	{
+		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
+		return NULL;
+	}
+	axis2_char_t *tempname = axis2_strdup(env->string, service_name);
+	if(!tempname)
+	{
+		env->error->errorno = AXIS2_ERROR_INVALID_NULL_PARAMETER;
+		return NULL;
+	}
+	
 	axis2_description_servicegroup_t *sg = NULL;
 	int len = strlen(service_name);
 	axis2_char_t *service_st[2];
@@ -213,16 +229,44 @@
 	axis2_char_t *srv_name = *(service_st + 1);
 	axis2_qname_t *qname = (axis2_qname_t*) axis2_qname_create(env, srv_name, NULL, NULL); 
 	
-	/*return axis2_description_servicegroup_get_service(env, sg, qname);*/
+	return axis2_description_servicegroup_get_service(env, sg, qname);
 	return NULL;
 			
 }
 
 axis2_status_t axis2_engine_config_ops_remove_service
 		(axis2_environment_t *env, axis2_engine_config_t *engine_config
-		, const axis2_char_t *name)
+		, const axis2_char_t *service_name)
 {
+	if(!env || !engine_config)
+		return AXIS2_ERROR_INVALID_NULL_PARAMETER;
+	axis2_char_t *tempname = axis2_strdup(env->string, service_name);
+	if(!tempname)
+		return AXIS2_ERROR_INVALID_NULL_PARAMETER;
+	
+	axis2_description_servicegroup_t *sg = NULL;
+	int len = strlen(service_name);
+	axis2_char_t *service_st[2];
+	service_st[1] = (axis2_char_t*) axis2_malloc
+		(env->allocator, len * sizeof(axis2_char_t));
+	service_st[2] = (axis2_char_t*) axis2_malloc
+		(env->allocator, len * sizeof(axis2_char_t));
+	
+	if(AXIS2_SUCCESS == split_service_name(env, service_name, service_st))
+	{
+		axis2_char_t *grp_name = *(service_st + 2);
+		sg = axis2_engine_config_ops_get_servicegroup(env, engine_config
+			, grp_name);
+		if(!sg)
+			return AXIS2_ERROR_INVALID_NULL_PARAMETER;
+	}
+	axis2_char_t *srv_name = *(service_st + 1);
+	axis2_qname_t *qname = (axis2_qname_t*) axis2_qname_create(env, srv_name
+		, NULL, NULL);
 	
+	axis2_description_servicegroup_remove_service(env, sg, qname);
+	
+	return AXIS2_SUCCESS;
 }
 	
 /**



Mime
View raw message