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/11/09 05:51:27 UTC
svn commit: r331951 - in /webservices/axis2/trunk/c: include/axis2_env.h
include/axis2_wsdl_operation.h modules/util/src/env.c
modules/wsdl/src/wsdl_component.c modules/wsdl/src/wsdl_operation.c
Author: damitha
Date: Tue Nov 8 20:51:18 2005
New Revision: 331951
URL: http://svn.apache.org/viewcvs?rev=331951&view=rev
Log:
Fixed a bug in env.c
Modified:
webservices/axis2/trunk/c/include/axis2_env.h
webservices/axis2/trunk/c/include/axis2_wsdl_operation.h
webservices/axis2/trunk/c/modules/util/src/env.c
webservices/axis2/trunk/c/modules/wsdl/src/wsdl_component.c
webservices/axis2/trunk/c/modules/wsdl/src/wsdl_operation.c
Modified: webservices/axis2/trunk/c/include/axis2_env.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_env.h?rev=331951&r1=331950&r2=331951&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_env.h (original)
+++ webservices/axis2/trunk/c/include/axis2_env.h Tue Nov 8 20:51:18 2005
@@ -117,6 +117,11 @@
* @return pointer to the newly created environment struct
*/
AXIS2_DECLARE(axis2_status_t) axis2_env_free (axis2_env_t *env);
+
+ /**
+ * Enables logging
+ */
+ AXIS2_DECLARE(axis2_status_t) axis2_env_enable_log (axis2_env_t *env, axis2_bool_t enable);
/**
*
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=331951&r1=331950&r2=331951&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_wsdl_operation.h (original)
+++ webservices/axis2/trunk/c/include/axis2_wsdl_operation.h Tue Nov 8 20:51:18 2005
@@ -19,7 +19,7 @@
/**
* @file axis2_wsdl_operation.h
- * @brief axis2 WSDL operation
+ * @brief axis2 wsdl operation interface
*/
#include <axis2.h>
@@ -42,131 +42,111 @@
typedef struct axis2_wsdl_operation_s axis2_wsdl_operation_t;
-/** @defgroup axis2_wsdl WSDL (Axis2 wsdl)
- * @ingroup axis2
+/** @defgroup axis2_wsdl_operation Wsdl Operation
+ * @ingroup axis2_wsdl
* @{
*/
-
-/**************************** Function pointers *******************************/
-
-/** Deallocate memory
- * @return status code
- */
-typedef axis2_status_t (*axis2_wsdl_operation_free_t)
- (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt);
-
-/**
- * get the message exchange pattern
- * @return axis2_char_t* msg_exchange_pattern
- */
-typedef axis2_status_t (*axis2_wsdl_operation_get_msg_exchange_pattern_t)
- (axis2_env_t *env, axis2_wsdl_operation_t *wsdl_opt
- , axis2_char_t **pattern);
-
-/**
- * set the message exchange pattern
- *
- * @param axis2_char_t *message exchange pattern
- * @return status code
- */
-typedef axis2_status_t (*axis2_wsdl_operation_set_msg_exchange_pattern_t)
- (axis2_env_t *env, axis2_wsdl_operation_t *wsdl_opt
- , const axis2_char_t *msg_exchange_pattern);
-
-/**
- * get name
- * @return axis2_qname_t** operation name
- */
-typedef axis2_status_t (*axis2_wsdl_operation_get_name_t) (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, axis2_qname_t **name);
-
-/**
- * set name
- *
- * @param axis2_qname_t* operation name
- */
-typedef axis2_status_t (*axis2_wsdl_operation_set_name_t) (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, const axis2_qname_t *name);
-
-/**
- * get style
- * return axis2_char_t** style
- */
-typedef axis2_status_t (*axis2_wsdl_operation_get_style_t) (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, axis2_char_t **style);
-
-/**
- * set style
- * @param axis2_char_t* style
- * @return status code
- */
-typedef axis2_status_t (*axis2_wsdl_operation_set_style_t) (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, const axis2_char_t *style);
-
-/**
- * Sets the properties of the operation if any
- * @param axis2_hash_t* properties
- */
-typedef axis2_status_t (*axis2_wsdl_operation_set_component_properties_t)
- (axis2_env_t *env, axis2_wsdl_operation_t *wsdl_opt
- , axis2_hash_t *properties);
-
-/**
- * Returns the properties that are specific to this WSDL operation
- * @return axis2_hash_t** component properties
- */
-typedef axis2_status_t (*axis2_wsdl_operation_get_component_properties_t)
- (axis2_env_t *env, axis2_wsdl_operation_t *wsdl_opt
- , axis2_hash_t **properties);
-
-/**
- * Will set the property keyed with the relavent key
- * @param void* Key in the map
- * @param void* value to be put
- */
-typedef axis2_status_t (*axis2_wsdl_operation_set_component_property_t)
- (axis2_env_t *env, axis2_wsdl_operation_t *wsdl_opt
- , const void *key, void *value);
-
-
-
-typedef ;
-
-/*************************** End of function pointers *************************/
-
struct axis2_wsdl_operation_ops_s
{
- axis2_wsdl_operation_free_t free;
-
- axis2_wsdl_operation_get_msg_exchange_pattern_t get_msg_exchange_pattern;
-
- axis2_wsdl_operation_set_msg_exchange_pattern_t set_msg_exchange_pattern;
+ /** Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *free) (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env);
+
+ /**
+ * set the message exchange pattern
+ * @param axis2_char_t message exchange pattern
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *set_msg_exchange_pattern)
+ (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const axis2_char_t *msg_exchange_pattern);
+
+ /**
+ * get the message exchange pattern
+ * @return axis2_char_t message exchange pattern
+ */
+ axis2_char_t *(AXIS2_CALL *get_msg_exchange_pattern)
+ (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env);
+
+ /**
+ * Set the wsdl operation name
+ * @param axis2_qname_t* operation name
+ */
+ axis2_status_t (AXIS2_CALL *set_name) (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const axis2_qname_t *name);
+
+ /**
+ * Get the name of wsdl operation
+ * @return axis2_qname_t wsdl operation name
+ */
+ axis2_qname_t *(AXIS2_CALL *get_name) (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env);
- axis2_wsdl_operation_get_name_t get_name;
+
+ /**
+ * set style
+ * @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_wsdl_operation_set_name_t set_name;
+ /**
+ * Get style
+ * @return axis2_char_t style
+ */
+ axis2_char_t *(AXIS2_CALL *get_style) (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env);
- axis2_wsdl_operation_get_style_t get_style;
- axis2_wsdl_operation_set_style_t set_style;
- axis2_wsdl_operation_set_component_properties_t set_component_properties;
+ /**
+ * Sets the properties of the operation if any
+ * @param axis2_hash_t properties
+ */
+ axis2_status_t (AXIS2_CALL *set_component_properties) (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ axis2_hash_t *properties);
- axis2_wsdl_operation_get_component_properties_t get_component_properties;
+ /**
+ * Returns the properties that are specific to this WSDL operation
+ * @return axis2_hash_t component properties
+ */
+ axis2_hash_t *(AXIS2_CALL *get_component_properties) (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env);
- axis2_wsdl_operation_set_component_property_t set_component_property;
+ /**
+ * Will set the property keyed with the relavent key
+ * @param void Key in the map
+ * @param void value to be put
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *set_component_property) (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const void *key,
+ void *value);
/**
- * Gets the component property
- *
- * @param void* key for the map search.
- * @return void* value for the key
- */
- axis2_status_t (*get_component_property)
- (axis2_env_t *env, axis2_wsdl_operation_t *wsdl_opt
- , const void *key, void **value) ;
+ * Gets the component property
+ * @param void key for the map search.
+ * @return void value for the key
+ */
+ void *(AXIS2_CALL *get_component_property) (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const void *key);
};
@@ -175,43 +155,43 @@
axis2_wsdl_operation_ops_t *ops;
};
-axis2_status_t axis2_wsdl_operation_create
- (axis2_env_t *env, axis2_wsdl_operation_t **wsdl_opt);
+AXIS2_DECLARE(axis2_wsdl_operation_t *) axis2_wsdl_operation_create (
+ axis2_env_t *env);
/**************************** Start of function macros ************************/
-#define AXIS2_WSDL_OPERATION_FREE(wsdl_opt, env) \
- ((wsdl_opt->ops)->free (wsdl_opt, env))
+#define AXIS2_WSDL_OPERATION_FREE(wsdl_operation, env) \
+ ((wsdl_operation->ops)->free (wsdl_operation, env))
-#define AXIS2_WSDL_OPERATION_GET_MSG_EXCHANGE_PATTERN(wsdl_opt, env, pattern) \
- ((wsdl_opt->ops)->get_msg_exchange_pattern(wsdl_opt, env, pattern))
+#define AXIS2_WSDL_OPERATION_GET_MSG_EXCHANGE_PATTERN(wsdl_operation, env, pattern) \
+ ((wsdl_operation->ops)->get_msg_exchange_pattern(wsdl_operation, env, pattern))
-#define AXIS2_WSDL_OPERATION_SET_MSG_EXCHANGE_PATTERN(wsdl_opt, env, pattern) \
- ((wsdl_opt->ops)->set_msg_exchange_pattern(wsdl_opt, env, pattern))
+#define AXIS2_WSDL_OPERATION_SET_MSG_EXCHANGE_PATTERN(wsdl_operation, env, pattern) \
+ ((wsdl_operation->ops)->set_msg_exchange_pattern(wsdl_operation, env, pattern))
-#define AXIS2_WSDL_OPERATION_GET_NAME(wsdl_opt, env, name) \
- ((wsdl_opt->ops)->get_name(wsdl_opt, env, name))
+#define AXIS2_WSDL_OPERATION_GET_NAME(wsdl_operation, env, name) \
+ ((wsdl_operation->ops)->get_name(wsdl_operation, env, name))
-#define AXIS2_WSDL_OPERATION_SET_NAME(wsdl_opt, env, name) \
- ((wsdl_opt->ops)->set_name(wsdl_opt, env, name))
+#define AXIS2_WSDL_OPERATION_SET_NAME(wsdl_operation, env, name) \
+ ((wsdl_operation->ops)->set_name(wsdl_operation, env, name))
-#define AXIS2_WSDL_OPERATION_SET_STYLE(wsdl_opt, env, style) \
- ((wsdl_opt->ops)->get_style(wsdl_opt, env, style))
+#define AXIS2_WSDL_OPERATION_SET_STYLE(wsdl_operation, env, style) \
+ ((wsdl_operation->ops)->get_style(wsdl_operation, env, style))
-#define AXIS2_WSDL_OPERATION_GET_STYLE(wsdl_opt, env, style) \
- ((wsdl_opt->ops)->set_style(wsdl_opt, env, style))
+#define AXIS2_WSDL_OPERATION_GET_STYLE(wsdl_operation, env, style) \
+ ((wsdl_operation->ops)->set_style(wsdl_operation, env, style))
-#define AXIS2_WSDL_OPERATION_SET_COMPONENT_PROPERTIES(wsdl_opt, env, properties) \
- ((wsdl_opt->ops)->set_component_properties(wsdl_opt, env, properties))
+#define AXIS2_WSDL_OPERATION_SET_COMPONENT_PROPERTIES(wsdl_operation, env, properties) \
+ ((wsdl_operation->ops)->set_component_properties(wsdl_operation, env, properties))
-#define AXIS2_WSDL_OPERATION_GET_COMPONENT_PROPERTIES(wsdl_opt, env, properties) \
- ((wsdl_opt->ops)->get_component_properties(wsdl_opt, env, properties))
+#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_opt, env, property) \
- ((wsdl_opt->ops)->set_component_property(wsdl_opt, env, property))
+#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_GET_COMPONENT_PROPERTY(wsdl_opt, env, property) \
- ((wsdl_opt->ops)->get_component_property(wsdl_opt, env, property))
+#define AXIS2_WSDL_OPERATION_GET_COMPONENT_PROPERTY(wsdl_operation, env, property) \
+ ((wsdl_operation->ops)->get_component_property(wsdl_operation, env, property))
/**************************** End of function macros **************************/
Modified: webservices/axis2/trunk/c/modules/util/src/env.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/src/env.c?rev=331951&r1=331950&r2=331951&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/src/env.c (original)
+++ webservices/axis2/trunk/c/modules/util/src/env.c Tue Nov 8 20:51:18 2005
@@ -106,13 +106,12 @@
}
-AXIS2_DECLARE(axis2_status_t)
+axis2_status_t AXIS2_CALL
axis2_env_check_status (axis2_env_t *env)
{
if(NULL == env)
{
- AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_FAILURE);
- AXIS2_ERROR_SET_ERROR_NUMBER(env->error, AXIS2_ERROR_ENVIRONMENT_IS_NULL);
+ AXIS2_ENV_CHECK(&env, AXIS2_CRTICAL_FAILURE);
}
return AXIS2_ERROR_GET_STATUS_CODE(env->error);
}
Modified: webservices/axis2/trunk/c/modules/wsdl/src/wsdl_component.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/wsdl/src/wsdl_component.c?rev=331951&r1=331950&r2=331951&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/src/wsdl_component.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/src/wsdl_component.c Tue Nov 8 20:51:18 2005
@@ -15,6 +15,7 @@
#define AXIS2_INTF_TO_IMPL(wsdl_component) \
((axis2_wsdl_component_impl_t *)(wsdl_component))
+
/***************************** Function headers *******************************/
axis2_status_t AXIS2_CALL
@@ -63,6 +64,7 @@
wsdl_impl_component->wsdl_component.ops = (axis2_wsdl_component_ops_t *)
AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_component_ops_t));
+
if(NULL == wsdl_impl_component->wsdl_component.ops)
{
AXIS2_FREE ((*env)->allocator, wsdl_impl_component);
@@ -70,7 +72,19 @@
}
wsdl_impl_component->wsdl_component.ops->free = axis2_wsdl_component_free;
-
+
+ wsdl_impl_component->wsdl_component.ops->set_component_properties =
+ axis2_wsdl_component_set_component_properties;
+
+ wsdl_impl_component->wsdl_component.ops->get_component_properties =
+ axis2_wsdl_component_get_component_properties;
+
+ wsdl_impl_component->wsdl_component.ops->set_component_property =
+ axis2_wsdl_component_set_component_property;
+
+ wsdl_impl_component->wsdl_component.ops->get_component_property =
+ axis2_wsdl_component_get_component_property;
+
wsdl_impl_component->component_properties = axis2_hash_make (env);
return &(wsdl_impl_component->wsdl_component);
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=331951&r1=331950&r2=331951&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 20:51:18 2005
@@ -16,301 +16,327 @@
#include <axis2_wsdl_operation.h>
-typedef struct axis2_wsdl_impl_operation_s axis2_wsdl_impl_operation_t;
+typedef struct axis2_wsdl_operation_impl_s axis2_wsdl_operation_impl_t;
-/** @struct axis2_wsdl_operation_s
- * @brief WSDL operation
- * This holds operations of wsdl operation
- */
-struct axis2_wsdl_impl_operation_s
+/**
+ * @brief Wsdl Component struct impl
+ * Axis2 Wsdl Component impl
+ */
+struct axis2_wsdl_operation_impl_s
{
- axis2_wsdl_operation_t wsdl_opt;
+ axis2_wsdl_operation_t wsdl_operation;
axis2_wsdl_component_t *wsdl_component;
axis2_char_t *msg_exchange_pattern;
axis2_char_t *style;
axis2_qname_t *name;
-
-
+
};
-/***************************** Function headers *******************************/
-
-axis2_status_t axis2_wsdl_operation_free (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt);
+#define AXIS2_INTF_TO_IMPL(wsdl_operation) \
+ ((axis2_wsdl_operation_impl_t *)(wsdl_operation))
-/**
- * get the message exchange pattern
- * @return axis2_char_t* msg_exchange_pattern
- */
-axis2_status_t axis2_wsdl_operation_get_msg_exchange_pattern
- (axis2_env_t *env, axis2_wsdl_operation_t *wsdl_opt
- , axis2_char_t **pattern);
-
-/**
- * set the message exchange pattern
- *
- * @param axis2_char_t *message exchange pattern
- * @return status code
- */
-axis2_status_t axis2_wsdl_operation_set_msg_exchange_pattern
- (axis2_env_t *env, axis2_wsdl_operation_t *wsdl_opt
- , const axis2_char_t *msg_exchange_pattern);
-
-/**
- * get name
- * @return axis2_qname_t** operation name
- */
-axis2_status_t axis2_wsdl_operation_get_name (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, axis2_qname_t **name);
-
-/**
- * set name
- *
- * @param axis2_qname_t* operation name
- */
-axis2_status_t axis2_wsdl_operation_set_name (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, const axis2_qname_t *name);
-
-/**
- * get style
- * return axis2_char_t** style
- */
-axis2_status_t axis2_wsdl_operation_get_style (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, axis2_char_t **style);
+/***************************** Function headers *******************************/
-/**
- * set style
- * @param axis2_char_t* style
- * @return status code
- */
-axis2_status_t axis2_wsdl_operation_set_style (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, const axis2_char_t *style);
+axis2_status_t AXIS2_CALL
+axis2_wsdl_operation_free (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_operation_set_msg_exchange_pattern (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const axis2_char_t *msg_exchange_pattern);
+
+axis2_char_t * AXIS2_CALL
+axis2_wsdl_operation_get_msg_exchange_pattern
+ (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env);
+
+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 * AXIS2_CALL
+axis2_wsdl_operation_get_name (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_operation_set_style (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const axis2_char_t *style);
+
+axis2_char_t * AXIS2_CALL
+axis2_wsdl_operation_get_style (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env);
-
-/**
- * Sets the properties of the operation if any
- * @param axis2_hash_t* properties
- */
-axis2_status_t axis2_wsdl_operation_set_component_properties(axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, axis2_hash_t *properties);
-
-/**
- * Returns the properties that are specific to this WSDL operation
- * @return axis2_hash_t** component properties
- */
-axis2_status_t axis2_wsdl_operation_get_component_properties(axis2_env_t *env
- ,axis2_wsdl_operation_t *wsdl_opt, axis2_hash_t **properties);
-
-/**
- * Will set the property keyed with the relavent key
- * @param void* Key in the map
- * @param void* value to be put
- */
-axis2_status_t axis2_wsdl_operation_set_component_property(axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, const void *key, void *value);
-
-
-/**
- * Gets the component property
- *
- * @param void* key for the map search.
- * @return void* value for the key
- */
-axis2_status_t axis2_wsdl_operation_get_component_property(axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, const void *key, void **value) ;
+axis2_status_t AXIS2_CALL
+axis2_wsdl_operation_set_component_properties (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ axis2_hash_t *properties);
+
+axis2_hash_t * AXIS2_CALL
+axis2_wsdl_operation_get_component_properties (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env);
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_operation_set_component_property (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const void *key,
+ void *value);
+
+void * AXIS2_CALL
+axis2_wsdl_operation_get_component_property (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const void *key);
/***************************** End of function headers ************************/
-axis2_status_t axis2_wsdl_operation_create
- (axis2_env_t *env, axis2_wsdl_operation_t **wsdl_opt)
+axis2_wsdl_operation_t * AXIS2_CALL
+axis2_wsdl_operation_create (axis2_env_t **env)
{
- axis2_wsdl_impl_operation_t *wsdl_impl_opt
- = (axis2_wsdl_impl_operation_t *)
- axis2_malloc (env->allocator, sizeof(axis2_wsdl_impl_operation_t));
- if(!wsdl_impl_opt)
+ axis2_wsdl_operation_impl_t *wsdl_operation_impl =
+ (axis2_wsdl_operation_impl_t *) AXIS2_MALLOC (env->allocator,
+ sizeof(axis2_wsdl_operation_impl_t));
+
+ if(!wsdl_operation_impl)
{
- return AXIS2_ERROR_NO_MEMORY;
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
}
- axis2_wsdl_operation_t *wsdl_opt_l = (axis2_wsdl_operation_t *)
- axis2_malloc(env->allocator, sizeof(axis2_wsdl_operation_t));
- if(!wsdl_opt_l)
- {
- axis2_free(env->allocator, wsdl_impl_opt);
- return AXIS2_ERROR_NO_MEMORY;
- }
- wsdl_opt_l->ops
- = (axis2_wsdl_operation_ops_t *)
- axis2_malloc (env->allocator, sizeof(axis2_wsdl_operation_ops_t));
- if(!wsdl_opt_l->ops)
+ wsdl_operation_impl->wsdl_operation.ops = (axis2_wsdl_operation_ops_t *)
+ AXIS2_MALLOC (env->allocator, sizeof(axis2_wsdl_operation_ops_t));
+
+ if(NULL == wsdl_operation_impl->wsdl_operation.ops)
{
- axis2_free(env->allocator, wsdl_impl_opt);
- axis2_free(env->allocator, wsdl_opt);
- return AXIS2_ERROR_NO_MEMORY;
+ AXIS2_FREE((*env)->allocator, wsdl_operation_impl->wsdl_operation.ops);
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
}
- (wsdl_opt_l->ops)->free = axis2_wsdl_operation_free;
+
+ wsdl_operation_impl->wsdl_operation.ops->free = axis2_wsdl_operation_free;
- wsdl_impl_opt->wsdl_opt = *wsdl_opt_l;
- axis2_wsdl_component_create(env, &(wsdl_impl_opt->wsdl_component));
- wsdl_impl_opt->msg_exchange_pattern = NULL;
- wsdl_impl_opt->style = NULL;
- wsdl_impl_opt->name = NULL;
+ wsdl_operation_impl->wsdl_operation.ops->set_msg_exchange_pattern =
+ axis2_wsdl_operation_set_msg_exchange_pattern;
+
+ wsdl_operation_impl->wsdl_operation.ops->get_msg_exchange_pattern =
+ axis2_wsdl_operation_get_msg_exchange_pattern;
+
+ wsdl_operation_impl->wsdl_operation.ops->set_name =
+ axis2_wsdl_operation_set_name;
+
+ wsdl_operation_impl->wsdl_operation.ops->get_name =
+ axis2_wsdl_operation_get_name;
+
+ wsdl_operation_impl->wsdl_operation.ops->set_style =
+ axis2_wsdl_operation_set_style;
+
+ wsdl_operation_impl->wsdl_operation.ops->get_style =
+ axis2_wsdl_operation_get_style;
+
+ wsdl_operation_impl->wsdl_operation.ops->set_component_properties =
+ axis2_wsdl_operation_set_component_properties;
+
+ wsdl_operation_impl->wsdl_operation.ops->get_component_properties =
+ axis2_wsdl_operation_get_component_properties;
+
+ wsdl_operation_impl->wsdl_operation.ops->set_component_property =
+ axis2_wsdl_operation_set_component_property;
+
+ wsdl_operation_impl->wsdl_operation.ops->get_component_property =
+ axis2_wsdl_operation_get_component_property;
+
+
+ wsdl_operation_impl->wsdl_component = AXIS2_INTF_TO_IMPL(
+ axis2_wsdl_component_create(env));
+ wsdl_operation_impl->msg_exchange_pattern = NULL;
+ wsdl_operation_impl->style = NULL;
+ wsdl_operation_impl->name = NULL;
- *wsdl_opt = &(wsdl_impl_opt->wsdl_opt);
-
- return AXIS2_SUCCESS;
+ return &(wsdl_operation_impl->wsdl_operation);
}
/******************************************************************************/
-axis2_status_t axis2_wsdl_operation_free(axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt)
-{
- if(!env || !wsdl_opt)
- return AXIS2_ERROR_INVALID_NULL_PARAM;
- axis2_free(env->allocator, wsdl_opt);
+axis2_status_t AXIS2_CALL
+axis2_wsdl_operation_free (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env)
+{
+ AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, AXIS2_FAILURE);
+
+ if(NULL != wsdl_operation->ops)
+ AXIS2_FREE((*env)->allocator, wsdl_operation->ops, AXIS2_FAILURE);
+ if(NULL != AXIS2_INTF_TO_IMPL(wsdl_operation)->wsdl_component)
+ AXIS2_WSDL_COMPONENT_FREE(AXIS2_INTF_TO_IMPL(wsdl_component)->
+ wsdl_component, env);
+
+ AXIS2_FREE(env->allocator, wsdl_operation);
return AXIS2_SUCCESS;
}
-axis2_status_t axis2_wsdl_operation_get_msg_exchange_pattern
- (axis2_env_t *env, axis2_wsdl_operation_t *wsdl_opt
- , axis2_char_t **pattern)
-{
- if(NULL == wsdl_opt)
- return AXIS2_ERROR_INVALID_NULL_PARAM;
- *pattern = ((axis2_wsdl_impl_operation_t *) wsdl_opt)->msg_exchange_pattern;
- return AXIS2_SUCCESS;
-}
-
-axis2_status_t axis2_wsdl_operation_set_msg_exchange_pattern
- (axis2_env_t *env, axis2_wsdl_operation_t *wsdl_opt
- , const axis2_char_t *msg_exchange_pattern)
-{
- if(NULL == wsdl_opt || NULL == msg_exchange_pattern) return AXIS2_ERROR_INVALID_NULL_PARAM;
-
- ((axis2_wsdl_impl_operation_t *)(wsdl_opt))->msg_exchange_pattern
- = axis2_strdup(env->string, msg_exchange_pattern);
+axis2_status_t AXIS2_CALL
+axis2_wsdl_operation_set_msg_exchange_pattern (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const axis2_char_t *msg_exchange_pattern)
+{
+ AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, msg_exchange_pattern, AXIS2_FAILURE);
+
+ axis2_char_t *tempname = AXIS2_STRDUP(msg_exchange_pattern, env);
+ if(NULL == tempname)
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+
+ (AXIS2_INTF_TO_IMPL((wsdl_operation))->msg_exchange_pattern
+ = tempname;
return AXIS2_SUCCESS;
}
-axis2_status_t axis2_wsdl_operation_get_name (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, axis2_qname_t **name)
-{
- if(NULL == wsdl_opt)
- return AXIS2_ERROR_INVALID_NULL_PARAM;
- *name = ((axis2_wsdl_impl_operation_t *) wsdl_opt)->name;
+axis2_char_t * AXIS2_CALL
+axis2_wsdl_operation_get_msg_exchange_pattern (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env)
+{
+ AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, NULL);
+
+ 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_FUNC_PARAM_CHECK(wsdl_operation, env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, name, AXIS2_FAILURE);
+
+ (AXIS2_INTF_TO_IMPL((wsdl_operation))->name = name;
+
return AXIS2_SUCCESS;
}
-axis2_status_t axis2_wsdl_operation_set_name (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, const axis2_qname_t *name)
-{
- if(NULL == wsdl_opt || NULL == name) return AXIS2_ERROR_INVALID_NULL_PARAM;
-
- ((axis2_wsdl_impl_operation_t *)(wsdl_opt))->name = axis2_strdup(env->string
- , name);
- return AXIS2_SUCCESS;
-}
-axis2_status_t axis2_wsdl_operation_get_style (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, axis2_char_t **style)
-{
- if(NULL == wsdl_opt) return AXIS2_ERROR_INVALID_NULL_PARAM;
+axis2_qname_t * AXIS2_CALL
+axis2_wsdl_operation_get_name (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env)
+{
+ AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, NULL);
+
+ return (AXIS2_INTF_TO_IMPL(wsdl_operation)->name;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_operation_set_style (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const axis2_char_t *style)
+{
+ AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, AXIS2_FAILURE);
+ AXIS2_PARAM_CHECK((*env)->error, style, AXIS2_FAILURE);
+
+ axis2_char_t *tempstyle = AXIS2_STRDUP(style, env);
+ if(NULL == tempstyle)
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+
+ (AXIS2_INTF_TO_IMPL((wsdl_operation))->style = tempstyle;
- *style = ((axis2_wsdl_impl_operation_t *)(wsdl_opt))->style;
- return AXIS2_SUCCESS;
+ return AXIS2_SUCCESS;
}
-axis2_status_t axis2_wsdl_operation_set_style (axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, const axis2_char_t *style)
+axis2_char_t * AXIS2_CALL
+axis2_wsdl_operation_get_style (axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env)
{
- if(NULL == wsdl_opt || NULL == style) return AXIS2_ERROR_INVALID_NULL_PARAM;
-
- ((axis2_wsdl_impl_operation_t *)(wsdl_opt))->style = axis2_strdup(env->string
- , style);
+ AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, NULL);
- return AXIS2_SUCCESS;
+ return (AXIS2_INTF_TO_IMPL((wsdl_operation))->style;
}
-/**
- * Sets the properties of the operation if any
- * @param axis2_hash_t* properties
- */
-axis2_status_t axis2_wsdl_operation_set_component_properties(axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, axis2_hash_t *properties)
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_operation_set_component_properties (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env
+ axis2_hash_t *properties)
{
- axis2_wsdl_impl_operation_t *wsdl_impl_opt = (axis2_wsdl_impl_operation_t *)
- (wsdl_opt);
- if(NULL == wsdl_impl_opt || wsdl_impl_opt->wsdl_component || NULL == properties)
- return AXIS2_ERROR_INVALID_NULL_PARAM;
+ 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);
if(AXIS2_SUCCESS != AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTIES(env
- , wsdl_impl_opt->wsdl_component, properties))
+ , wsdl_operation_impl->wsdl_component, properties))
{
/* do error handling here */
}
return AXIS2_SUCCESS;
}
-/**
- * Returns the properties that are specific to this WSDL operation
- * @return axis2_hash_t** component properties
- */
-axis2_status_t axis2_wsdl_operation_get_component_properties(axis2_env_t *env
- ,axis2_wsdl_operation_t *wsdl_opt, axis2_hash_t **properties)
-{
- axis2_wsdl_impl_operation_t *wsdl_impl_opt = (axis2_wsdl_impl_operation_t *)
- (wsdl_opt);
- if(NULL == wsdl_impl_opt) return AXIS2_ERROR_INVALID_NULL_PARAM;
+axis2_hash_t * AXIS2_CALL
+axis2_wsdl_operation_get_component_properties (
+ axis2_wsdl_operation_t *wsdl_operation,
+ 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_impl_opt->wsdl_component, properties))
+ , wsdl_operation_impl->wsdl_component, properties))
{
/* do error handling here */
}
return AXIS2_SUCCESS;
}
-/**
- * Will set the property keyed with the relavent key
- * @param void* Key in the map
- * @param void* value to be put
- */
-axis2_status_t axis2_wsdl_operation_set_component_property(axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, const void *key, void *value)
-{
- axis2_wsdl_impl_operation_t *wsdl_impl_opt = (axis2_wsdl_impl_operation_t *)
- (wsdl_opt);
- if(NULL == wsdl_impl_opt || wsdl_impl_opt->wsdl_component || NULL == key
+
+axis2_status_t AXIS2_CALL
+axis2_wsdl_operation_set_component_property (
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const void *key,
+ void *value)
+{
+ AXIS2_FUNC_PARAM_CHECK(wsdl_operation, env, AXIS2_FAILURE);
+ 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(AXIS2_SUCCESS != AXIS2_WSDL_COMPONENT_SET_COMPONENT_PROPERTY(env
- , wsdl_impl_opt->wsdl_component, key, value))
+ , wsdl_operation_impl->wsdl_component, key, value))
{
/* do error handling here */
}
return AXIS2_SUCCESS;
}
-
-/**
- * Gets the component property
- *
- * @param void* key for the map search.
- * @return void* value for the key
- */
-axis2_status_t axis2_wsdl_operation_get_component_property(axis2_env_t *env
- , axis2_wsdl_operation_t *wsdl_opt, const void *key, void **value)
-{
- axis2_wsdl_impl_operation_t *wsdl_impl_opt = (axis2_wsdl_impl_operation_t *)
- (wsdl_opt);
- if(NULL == wsdl_impl_opt || NULL == key)
+void * AXIS2_CALL
+axis2_wsdl_operation_get_component_property(
+ axis2_wsdl_operation_t *wsdl_operation,
+ axis2_env_t **env,
+ const void *key)
+{
+ 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_impl_opt->wsdl_component, key, value))
+ , wsdl_operation_impl->wsdl_component, key, value))
{
/* do error handling here */
}