axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dami...@apache.org
Subject svn commit: r332018 - in /webservices/axis2/trunk/c/modules: core/description/src/svc.c wsdl/src/wsdl_svc.c
Date Wed, 09 Nov 2005 11:13:16 GMT
Author: damitha
Date: Wed Nov  9 03:13:03 2005
New Revision: 332018

URL: http://svn.apache.org/viewcvs?rev=332018&view=rev
Log:
More work on wsdl_svc

Modified:
    webservices/axis2/trunk/c/modules/core/description/src/svc.c
    webservices/axis2/trunk/c/modules/wsdl/src/wsdl_svc.c

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=332018&r1=332017&r2=332018&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/src/svc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/src/svc.c Wed Nov  9 03:13:03 2005
@@ -107,6 +107,7 @@
 		axis2_param_container_create(env);		
 	if(NULL == param_container)
 	{
+        AXIS2_FREE((*env)->allocator, svc_impl->svc.ops);
         AXIS2_FREE((*env)->allocator, svc_impl);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);		
 	}
@@ -117,6 +118,8 @@
 		axis2_param_container_create(env);		
 	if(NULL == wsdl_svc)
 	{
+        AXIS2_FREE((*env)->allocator, svc_impl->svc.ops);
+        AXIS2_PARAM_CONTAINER_FREE(svc_impl->param_container, env);
         AXIS2_FREE((*env)->allocator, svc_impl);
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);		
 	}
@@ -128,8 +131,10 @@
 	svc_impl->wasaction_opeartionmap = axis2_hash_make (env);				
 	if(NULL == svc_impl->wasaction_opeartionmap)
 	{
+        AXIS2_FREE((*env)->allocator, svc_impl->svc.ops);
+        AXIS2_PARAM_CONTAINER_FREE(svc_impl->param_container, env);
+        AXIS2_WSDL_SVC_FREE(svc_impl->wsdl_svc, env);
         AXIS2_FREE((*env)->allocator, svc_impl);
-        AXIS2_FREE((*env)->allocator, svc_impl->param_container);
 		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);		
 	}
 	svc_impl->qname = NULL;

Modified: webservices/axis2/trunk/c/modules/wsdl/src/wsdl_svc.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/src/wsdl_svc.c?rev=332018&r1=332017&r2=332018&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/src/wsdl_svc.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/src/wsdl_svc.c Wed Nov  9 03:13:03 2005
@@ -25,6 +25,7 @@
 struct axis2_wsdl_svc_impl_s
 {
 	axis2_wsdl_svc_t wsdl_svc;
+    axis2_hash_t * component_properties;
     axis2_qname_t *qname;
 	
 };
@@ -59,13 +60,20 @@
 	{
 		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
 	}
-	
+    
+    wsdl_svc_impl->component_properties = axis2_hash_make(env);
+    if(NULL == wsdl_svc_impl->component_properties)
+	{
+        AXIS2_FREE((*env)->allocator, wsdl_svc_impl);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }
 	wsdl_svc_impl->wsdl_svc.ops = 
         (axis2_wsdl_svc_ops_t *) AXIS2_MALLOC ((*env)->allocator, 
         sizeof(axis2_wsdl_svc_ops_t));
     
 	if(NULL == wsdl_svc_impl->wsdl_svc.ops)
 	{
+        axis2_hash_free(wsdl_svc_impl->component_properties, env);
 		AXIS2_FREE((*env)->allocator, wsdl_svc_impl);
 		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);	
 	}
@@ -84,6 +92,10 @@
                         axis2_env_t **env)
 {
 	AXIS2_FUNC_PARAM_CHECK(wsdl_svc, env, AXIS2_FAILURE);
+    
+    if(NULL != AXIS2_INTF_TO_IMPL(wsdl_svc)->component_properties)
+        axis2_hash_free(AXIS2_INTF_TO_IMPL(wsdl_svc)->component_properties, env);
+    
     if(NULL != wsdl_svc->ops)
         AXIS2_FREE((*env)->allocator, wsdl_svc->ops);
     
@@ -108,6 +120,49 @@
     AXIS2_FUNC_PARAM_CHECK(wsdl_svc, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, qname, AXIS2_FAILURE);
     AXIS2_INTF_TO_IMPL(wsdl_svc)->qname = qname;
+    
+    return AXIS2_SUCCESS;
+}
+
+axis2_hash_t * AXIS2_CALL
+axis2_wsdl_svc_get_component_properties(axis2_wsdl_svc_t *wsdl_svc,
+                                        axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(wsdl_svc, env, NULL);
+    return AXIS2_INTF_TO_IMPL(wsdl_svc)->component_properties;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_svc_set_component_properties(axis2_wsdl_svc_t *wsdl_svc,
+                                        axis2_env_t **env,
+                                        axis2_hash_t *properties)
+{
+    AXIS2_FUNC_PARAM_CHECK(wsdl_svc, env, AXIS2_FAILURE);
+    AXIS2_INTF_TO_IMPL(wsdl_svc)->component_properties = properties;
+    return AXIS2_SUCCESS;
+}
+
+axis2_wsdl_component_t * AXIS2_CALL
+axis2_wsdl_svc_get_component_property(axis2_wsdl_svc_t *wsdl_svc,
+                                        axis2_env_t **env,
+                                        const axis2_char_t *key)
+{
+    AXIS2_FUNC_PARAM_CHECK(wsdl_svc, env, NULL);
+    AXIS2_PARAM_CHECK((*env)->error, key, NULL);
+    return axis2_hash_get(AXIS2_INTF_TO_IMPL(wsdl_svc)->component_properties,
+        (axis2_char_t *) key, AXIS2_HASH_KEY_STRING); 
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_svc_set_component_property (axis2_wsdl_svc_t *wsdl_svc,
+                                        axis2_env_t **env,
+                                        const void *key,
+                                        void *value)
+{
+    AXIS2_FUNC_PARAM_CHECK(wsdl_svc, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, key, AXIS2_FAILURE);
+    axis2_hash_set (AXIS2_INTF_TO_IMPL(wsdl_svc)->component_properties,
+        (axis2_char_t *) key, AXIS2_HASH_KEY_STRING, value);
     
     return AXIS2_SUCCESS;
 }



Mime
View raw message