You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2005/11/09 06:48:45 UTC

svn commit: r331958 - in /webservices/axis2/trunk/c: include/axis2_error.h include/axis2_wsdl_component.h include/axis2_wsdl_operation.h modules/wsdl/src/wsdl_operation.c

Author: damitha
Date: Tue Nov  8 21:48:36 2005
New Revision: 331958

URL: http://svn.apache.org/viewcvs?rev=331958&view=rev
Log:
wsdl component and wsdl operation are now compiling

Modified:
    webservices/axis2/trunk/c/include/axis2_error.h
    webservices/axis2/trunk/c/include/axis2_wsdl_component.h
    webservices/axis2/trunk/c/include/axis2_wsdl_operation.h
    webservices/axis2/trunk/c/modules/wsdl/src/wsdl_operation.c

Modified: webservices/axis2/trunk/c/include/axis2_error.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_error.h?rev=331958&r1=331957&r2=331958&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_error.h (original)
+++ webservices/axis2/trunk/c/include/axis2_error.h Tue Nov  8 21:48:36 2005
@@ -163,6 +163,8 @@
         AXIS2_ERROR_INVALID_STATE_SVC,
         /** Service group accessed has invalid state */
         AXIS2_ERROR_INVALID_STATE_SVC_GRP,
+        /** Wsdl operation accessed has invalid state */
+        AXIS2_ERROR_INVALID_STATE_WSDL_OPERATION,
         /** Array list index out of bounds */
         AXIS2_ERROR_INDEX_OUT_OF_BOUNDS
     };

Modified: webservices/axis2/trunk/c/include/axis2_wsdl_component.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_wsdl_component.h?rev=331958&r1=331957&r2=331958&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_wsdl_component.h (original)
+++ webservices/axis2/trunk/c/include/axis2_wsdl_component.h Tue Nov  8 21:48:36 2005
@@ -106,20 +106,16 @@
 		((wsdl_component->ops)->set_component_properties(wsdl_component , env, \
             properties))
 	
-#define AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTIES(wsdl_component, env, \
-		properties) \
-		((wsdl_component->ops)->get_component_properties(wsdl_component, env, \
-		    properties))
+#define AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTIES(wsdl_component, env) \
+		((wsdl_component->ops)->get_component_properties(wsdl_component, env))
 
 #define AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY(wsdl_component, env, \
 		key, value) \
-		((wsdl_component->ops)->set_component_property(env , wsdl_component, \
+		((wsdl_component->ops)->set_component_property(wsdl_component, env,\
             key, value))
 		
-#define AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(wsdl_component, env, \
-		key, value) \
-		((wsdl_component->ops)->get_component_property(wsdl_component, env, \
-            key, value))
+#define AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(wsdl_component, env, key) \
+		((wsdl_component->ops)->get_component_property(wsdl_component, env, key))
 		
 /**************************** End of function macros **************************/
 

Modified: webservices/axis2/trunk/c/include/axis2_wsdl_operation.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_wsdl_operation.h?rev=331958&r1=331957&r2=331958&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_wsdl_operation.h (original)
+++ webservices/axis2/trunk/c/include/axis2_wsdl_operation.h Tue Nov  8 21:48:36 2005
@@ -80,7 +80,7 @@
     axis2_status_t (AXIS2_CALL *set_name) (
                                         axis2_wsdl_operation_t *wsdl_operation, 
                                         axis2_env_t **env,
-                                        const axis2_qname_t *name);
+                                        axis2_qname_t *name);
                                         
     /**
      * Get the name of wsdl operation
@@ -96,8 +96,10 @@
      * @param axis2_char_t style
      * @return status code
      */
-    axis2_status_t (AXIS2_CALL *set_style) (axis2_env_t *env
-    , axis2_wsdl_operation_t *wsdl_operation, const axis2_char_t *style);
+    axis2_status_t (AXIS2_CALL *set_style) (
+                                        axis2_wsdl_operation_t *wsdl_operation,
+                                        axis2_env_t **env,
+                                        const axis2_char_t *style);
     
     /**
      * Get style
@@ -156,7 +158,7 @@
 };
 
 AXIS2_DECLARE(axis2_wsdl_operation_t *) axis2_wsdl_operation_create (
-                                                            axis2_env_t *env);
+                                                            axis2_env_t **env);
 
 /**************************** Start of function macros ************************/
 
@@ -187,11 +189,11 @@
 #define AXIS2_WSDL_OPERATION_GET_COMPONENT_PROPERTIES(wsdl_operation, env, properties) \
 		((wsdl_operation->ops)->get_component_properties(wsdl_operation, env, properties))
 
-#define AXIS2_WSDL_OPERATION_SET_COMPONENT_PROPERTY(wsdl_operation, env, property) \
-		((wsdl_operation->ops)->set_component_property(wsdl_operation, env, property))
+#define AXIS2_WSDL_OPERATION_SET_COMPONENT_PROPERTY(wsdl_operation, env, key, value) \
+		((wsdl_operation->ops)->set_component_property(wsdl_operation, env, key, value))
 		
-#define AXIS2_WSDL_OPERATION_GET_COMPONENT_PROPERTY(wsdl_operation, env, property) \
-		((wsdl_operation->ops)->get_component_property(wsdl_operation, env, property))		
+#define AXIS2_WSDL_OPERATION_GET_COMPONENT_PROPERTY(wsdl_operation, env, key) \
+		((wsdl_operation->ops)->get_component_property(wsdl_operation, env, key))		
 		
 /**************************** End of function macros **************************/
 

Modified: webservices/axis2/trunk/c/modules/wsdl/src/wsdl_operation.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/src/wsdl_operation.c?rev=331958&r1=331957&r2=331958&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/src/wsdl_operation.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/src/wsdl_operation.c Tue Nov  8 21:48:36 2005
@@ -55,7 +55,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_wsdl_operation_set_name (axis2_wsdl_operation_t *wsdl_operation, 
                                 axis2_env_t **env,
-		                        const axis2_qname_t *name);
+		                        axis2_qname_t *name);
 
 axis2_qname_t * AXIS2_CALL 
 axis2_wsdl_operation_get_name (axis2_wsdl_operation_t *wsdl_operation,
@@ -101,7 +101,7 @@
 axis2_wsdl_operation_create (axis2_env_t **env)
 {
 	axis2_wsdl_operation_impl_t *wsdl_operation_impl = 
-        (axis2_wsdl_operation_impl_t *) AXIS2_MALLOC (env->allocator, 
+        (axis2_wsdl_operation_impl_t *) AXIS2_MALLOC ((*env)->allocator, 
         sizeof(axis2_wsdl_operation_impl_t));
     
 	if(!wsdl_operation_impl)
@@ -110,7 +110,7 @@
 	}
 	
 	wsdl_operation_impl->wsdl_operation.ops = (axis2_wsdl_operation_ops_t *)
-		AXIS2_MALLOC (env->allocator, sizeof(axis2_wsdl_operation_ops_t));
+		AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_operation_ops_t));
     
 	if(NULL == wsdl_operation_impl->wsdl_operation.ops)
 	{
@@ -151,8 +151,7 @@
         axis2_wsdl_operation_get_component_property;
     
 	
-	wsdl_operation_impl->wsdl_component = AXIS2_INTF_TO_IMPL(
-        axis2_wsdl_component_create(env));
+	wsdl_operation_impl->wsdl_component = axis2_wsdl_component_create(env);
 	wsdl_operation_impl->msg_exchange_pattern = NULL;
 	wsdl_operation_impl->style = NULL;
 	wsdl_operation_impl->name = NULL;
@@ -169,12 +168,12 @@
 	AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, AXIS2_FAILURE);
     
     if(NULL != wsdl_operation->ops)
-        AXIS2_FREE((*env)->allocator, wsdl_operation->ops, AXIS2_FAILURE);
+        AXIS2_FREE((*env)->allocator, wsdl_operation->ops);
     if(NULL != AXIS2_INTF_TO_IMPL(wsdl_operation)->wsdl_component)
-        AXIS2_WSDL_COMPONENT_FREE(AXIS2_INTF_TO_IMPL(wsdl_component)->
+        AXIS2_WSDL_COMPONENT_FREE(AXIS2_INTF_TO_IMPL(wsdl_operation)->
             wsdl_component, env);
     
-    AXIS2_FREE(env->allocator, wsdl_operation);
+    AXIS2_FREE((*env)->allocator, wsdl_operation);
 	return AXIS2_SUCCESS;
 }
 
@@ -191,8 +190,7 @@
     if(NULL == tempname)
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
     
-	(AXIS2_INTF_TO_IMPL((wsdl_operation))->msg_exchange_pattern 
-		= tempname;
+	AXIS2_INTF_TO_IMPL(wsdl_operation)->msg_exchange_pattern = tempname;
 	
 	return AXIS2_SUCCESS;
 }
@@ -204,18 +202,18 @@
 {
 	AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, NULL);
     
-	return (AXIS2_INTF_TO_IMPL( wsdl_operation)->msg_exchange_pattern;
+	return AXIS2_INTF_TO_IMPL(wsdl_operation)->msg_exchange_pattern;
 }
 
 axis2_status_t AXIS2_CALL 
 axis2_wsdl_operation_set_name (axis2_wsdl_operation_t *wsdl_operation, 
-                                axis2_env_t **env
-		                        const axis2_qname_t *name)
+                                axis2_env_t **env,
+		                        axis2_qname_t *name)
 {
     AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, name, AXIS2_FAILURE);
     	
-	(AXIS2_INTF_TO_IMPL((wsdl_operation))->name = name;
+	AXIS2_INTF_TO_IMPL(wsdl_operation)->name = name;
     
 	return AXIS2_SUCCESS;
 }
@@ -227,7 +225,7 @@
 {
 	AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, NULL);
     
-	return (AXIS2_INTF_TO_IMPL(wsdl_operation)->name;
+	return AXIS2_INTF_TO_IMPL(wsdl_operation)->name;
 }
 
 axis2_status_t AXIS2_CALL 
@@ -242,7 +240,7 @@
     if(NULL == tempstyle)
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
     
-	(AXIS2_INTF_TO_IMPL((wsdl_operation))->style = tempstyle;
+	AXIS2_INTF_TO_IMPL(wsdl_operation)->style = tempstyle;
 	
 	return AXIS2_SUCCESS;		
 }
@@ -253,28 +251,25 @@
 {
 	AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, NULL);
 	
-	return (AXIS2_INTF_TO_IMPL((wsdl_operation))->style;
+	return AXIS2_INTF_TO_IMPL(wsdl_operation)->style;
 }
 
 
 axis2_status_t AXIS2_CALL 
 axis2_wsdl_operation_set_component_properties (
                                         axis2_wsdl_operation_t *wsdl_operation,
-                                        axis2_env_t **env
+                                        axis2_env_t **env,
 		                                axis2_hash_t *properties)
 {
     AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, properties, AXIS2_FAILURE);
     
 	if(NULL == AXIS2_INTF_TO_IMPL(wsdl_operation)->wsdl_component) 
-		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_STATE_OPERATION);
+		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_STATE_WSDL_OPERATION,
+            AXIS2_FAILURE);
 	
-	if(AXIS2_SUCCESS != AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTIES(env
-		, wsdl_operation_impl->wsdl_component, properties))
-	{
-		/* do error handling here */
-	}
-	return AXIS2_SUCCESS;
+	return AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTIES(
+		AXIS2_INTF_TO_IMPL(wsdl_operation)->wsdl_component, env, properties);
 }
 
 axis2_hash_t * AXIS2_CALL 
@@ -283,18 +278,9 @@
                                         axis2_env_t **env)		
 {
     AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, NULL);
-    
-	axis2_wsdl_operation_impl_t *wsdl_operation_impl = AXIS2_INTF_TO_IMPL(
-		(wsdl_operation);
-	if(NULL == wsdl_operation_impl) return AXIS2_ERROR_INVALID_NULL_PARAM;
 	
-	if(AXIS2_SUCCESS != AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTIES(env
-		, wsdl_operation_impl->wsdl_component, properties))
-	{
-		/* do error handling here */
-	}
-		
-	return AXIS2_SUCCESS;
+	return AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTIES (
+		AXIS2_INTF_TO_IMPL(wsdl_operation)->wsdl_component, env);
 }
 
 axis2_status_t AXIS2_CALL 
@@ -308,17 +294,12 @@
     AXIS2_PARAM_CHECK((*env)->error, key, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, value, AXIS2_FAILURE);
     
-	axis2_wsdl_operation_impl_t *wsdl_operation_impl = AXIS2_INTF_TO_IMPL(
-		(wsdl_operation);
-	if(NULL == wsdl_operation_impl || wsdl_operation_impl->wsdl_component || NULL == key 
-		|| NULL == value) return AXIS2_ERROR_INVALID_NULL_PARAM;
+	if(NULL == AXIS2_INTF_TO_IMPL(wsdl_operation)->wsdl_component)
+	    AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_INVALID_STATE_WSDL_OPERATION, 
+            AXIS2_FAILURE);	
 	
-	if(AXIS2_SUCCESS != AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY(env
-		, wsdl_operation_impl->wsdl_component, key, value))
-	{
-		/* do error handling here */
-	}
-	return AXIS2_SUCCESS;
+	return AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY (
+        AXIS2_INTF_TO_IMPL(wsdl_operation)->wsdl_component, env, key, value);
 }
 	
 void * AXIS2_CALL 
@@ -329,17 +310,7 @@
 {
     AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, key, AXIS2_FAILURE);
-    
-	axis2_wsdl_operation_impl_t *wsdl_operation_impl = AXIS2_INTF_TO_IMPL(
-		(wsdl_operation);
-	if(NULL == wsdl_operation_impl || NULL == key) 
-		return AXIS2_ERROR_INVALID_NULL_PARAM;
 	
-	if(AXIS2_SUCCESS != AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY(env
-		, wsdl_operation_impl->wsdl_component, key, value))
-	{
-		/* do error handling here */
-	}
-		
-	return AXIS2_SUCCESS;
+	return AXIS2_WSDL_COMPONENT_GET_COMPONENT_PROPERTY (
+		AXIS2_INTF_TO_IMPL(wsdl_operation)->wsdl_component, env, key);
 }