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 08:14:11 UTC
svn commit: r331968 - in /webservices/axis2/trunk/c: ides/anjuta/axis2c.prj
include/axis2_wsdl_svc.h modules/test/util/test_util.c
modules/wsdl/src/wsdl_operation.c modules/wsdl/src/wsdl_svc.c
Author: damitha
Date: Tue Nov 8 23:13:58 2005
New Revision: 331968
URL: http://svn.apache.org/viewcvs?rev=331968&view=rev
Log:
wsdl svc also compiling now
Modified:
webservices/axis2/trunk/c/ides/anjuta/axis2c.prj
webservices/axis2/trunk/c/include/axis2_wsdl_svc.h
webservices/axis2/trunk/c/modules/test/util/test_util.c
webservices/axis2/trunk/c/modules/wsdl/src/wsdl_operation.c
webservices/axis2/trunk/c/modules/wsdl/src/wsdl_svc.c
Modified: webservices/axis2/trunk/c/ides/anjuta/axis2c.prj
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/ides/anjuta/axis2c.prj?rev=331968&r1=331967&r2=331968&view=diff
==============================================================================
--- webservices/axis2/trunk/c/ides/anjuta/axis2c.prj (original)
+++ webservices/axis2/trunk/c/ides/anjuta/axis2c.prj Tue Nov 8 23:13:58 2005
@@ -174,8 +174,8 @@
modules/core/description/src/svc_grp.c\
modules/core/engine/src/engine_config.c\
modules/core/engine/src/msg_recv.c\
- modules/wsdl/src/wsdl_scv.c\
- modules/core/context/src/msg_ctx.c
+ modules/core/context/src/msg_ctx.c\
+ modules/wsdl/src/wsdl_svc.c
module.pixmap.name=.
module.pixmap.type=
Modified: webservices/axis2/trunk/c/include/axis2_wsdl_svc.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_wsdl_svc.h?rev=331968&r1=331967&r2=331968&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_wsdl_svc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_wsdl_svc.h Tue Nov 8 23:13:58 2005
@@ -14,12 +14,12 @@
* limitations under the License.
*/
-#ifndef AXIS2_WSDL_SERVICE_H
-#define AXIS2_WSDL_SERVICE_H
+#ifndef AXIS2_WSDL_SVC_H
+#define AXIS2_WSDL_SVC_H
/**
- * @file axis2_wsdl_service.h
- * @brief axis2 WSDL service
+ * @file axis2_wsdl_svc.h
+ * @brief axis2 wsdl service interface
*/
#include <axis2.h>
@@ -37,63 +37,54 @@
{
#endif
-/** @cond */
-struct axis2_wsdl_service_ops_s;
-struct axis2_wsdl_service_s;
-/** @endcond */
-typedef struct axis2_wsdl_service_ops_s axis2_wsdl_service_ops_t;
-typedef struct axis2_wsdl_service_s axis2_wsdl_service_t;
+typedef struct axis2_wsdl_svc_ops_s axis2_wsdl_svc_ops_t;
+typedef struct axis2_wsdl_svc_s axis2_wsdl_svc_t;
-/** @defgroup axis2_wsdl WSDL (Axis2 wsdl)
- * @ingroup axis2
+/** @defgroup axis2_wsdl_svc Wsdl Service
+ * @ingroup axis2_wsdl
* @{
*/
-/** @} */
+/**
+ * @brief Wsdl Service operations struct
+ * Encapsulator struct for operations of axis2_wsdl_service
+ */
+struct axis2_wsdl_svc_ops_s
+{
+ /** Deallocate memory
+ * @return status code
+ */
+ axis2_status_t (AXIS2_CALL *free) (axis2_wsdl_svc_t *wsdl_svc,
+ axis2_env_t **env);
+
+};
/**
- * @defgroup axis2_wsdl_service WSDL Service
- * @ingroup axis2_wsdl
- * @{
+ * @brief Wsdl Service struct
+ * Axis2 Wsdl Service
+ */
+struct axis2_wsdl_svc_s
+{
+ axis2_wsdl_svc_ops_t *ops;
+};
+
+/** create Wsdl Service struct
+ * @return pointer to newly created wsdl service
*/
+AXIS2_DECLARE(axis2_wsdl_svc_t *)
+axis2_wsdl_svc_create (axis2_env_t **env);
/**************************** Start of function macros ************************/
-#define AXIS2_WSDL_SERVICE_FREE(env, wsdl_srv) ((wsdl_srv->ops)->free (env, \
- wsdl_srv))
+#define AXIS2_WSDL_SERVICE_FREE(wsdl_svc, env) ((wsdl_svc->ops)->free (wsdl_svc, \
+ env))
/**************************** End of function macros **************************/
-/**************************** Function pointers *******************************/
-
-/** Deallocate memory
- * @return status code
- */
-typedef axis2_status_t (*axis2_wsdl_service_free_t) (axis2_env_t *env
- , axis2_wsdl_service_t *wsdl_srv);
-
-
-
-/*************************** End of function pointers *************************/
-
-struct axis2_wsdl_service_ops_s
-{
- axis2_wsdl_service_free_t free;
-
-};
-
-struct axis2_wsdl_service_s
-{
- axis2_wsdl_service_ops_t *ops;
-};
-
-axis2_status_t axis2_wsdl_service_create
- (axis2_env_t *env, axis2_wsdl_service_t **wsdl_srv);
-
/** @} */
#ifdef __cplusplus
}
#endif
-#endif /* AXIS2_WSDL_SERVICE_H */
+#endif /* AXIS2_WSDL_SVC_H */
Modified: webservices/axis2/trunk/c/modules/test/util/test_util.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/util/test_util.c?rev=331968&r1=331967&r2=331968&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/test/util/test_util.c (original)
+++ webservices/axis2/trunk/c/modules/test/util/test_util.c Tue Nov 8 23:13:58 2005
@@ -35,7 +35,7 @@
return env;
}
-int test_hash_get (axis2_env_t *environment)
+int test_hash_get (axis2_env_t *env)
{
axis2_hash_t *ht;
a *a1, *a2, *a3, *a4;
@@ -48,25 +48,25 @@
char *key3 = "key3";
char *key4 = "key4";
- a1 = (a *) AXIS2_MALLOC(environment->allocator, sizeof (a));
- a2 = (a *) AXIS2_MALLOC(environment->allocator, sizeof (a));
- a3 = (a *) AXIS2_MALLOC(environment->allocator, sizeof (a));
- a4 = (a *) AXIS2_MALLOC(environment->allocator, sizeof (a));
+ a1 = (a *) AXIS2_MALLOC(env->allocator, sizeof (a));
+ a2 = (a *) AXIS2_MALLOC(env->allocator, sizeof (a));
+ a3 = (a *) AXIS2_MALLOC(env->allocator, sizeof (a));
+ a4 = (a *) AXIS2_MALLOC(env->allocator, sizeof (a));
- a1->value = axis2_strdup("value1");
- a2->value = axis2_strdup("value2");
- a3->value = axis2_strdup("value3");
- a4->value = axis2_strdup("value4");
+ a1->value = AXIS2_STRDUP("value1", &env);
+ a2->value = AXIS2_STRDUP("value2", &env);
+ a3->value = AXIS2_STRDUP("value3", &env);
+ a4->value = AXIS2_STRDUP("value4", &env);
- ht = axis2_hash_make (&environment);
+ ht = axis2_hash_make (&env);
axis2_hash_set (ht, key1, AXIS2_HASH_KEY_STRING, a1);
axis2_hash_set (ht, key2, AXIS2_HASH_KEY_STRING, a2);
axis2_hash_set (ht, key3, AXIS2_HASH_KEY_STRING, a3);
axis2_hash_set (ht, key4, AXIS2_HASH_KEY_STRING, a4);
- for (i = axis2_hash_first (ht, &environment); i; i = axis2_hash_next (&environment, i))
+ for (i = axis2_hash_first (ht, &env); i; i = axis2_hash_next (&env, i))
{
axis2_hash_this (i, NULL, NULL, &v);
@@ -95,8 +95,10 @@
*/
int test_file_diff(axis2_env_t *env)
{
- axis2_char_t *expected_file_name = axis2_strdup("expected");
- axis2_char_t *actual_file_name = axis2_strdup("actual");
+ /*axis2_char_t *expected_file_name = AXIS2_STRDUP("expected", &env);
+ axis2_char_t *actual_file_name = AXIS2_STRDUP("actual", &env); */
+ axis2_char_t *expected_file_name = strdup("expected");
+ axis2_char_t *actual_file_name = strdup("actual");
axis2_file_diff(env, expected_file_name, actual_file_name);
return 0;
}
@@ -113,7 +115,7 @@
AXIS2_ERROR_SET_ERROR_NUMBER((*env)->error, AXIS2_ERROR_ENVIRONMENT_IS_NULL);
return NULL;
}
- return "environment not null, so be happy";
+ return "env not null, so be happy";
}
int test_env_null()
@@ -126,7 +128,7 @@
* test_funct_for_test_env_null
*/
char *msg = test_funct_for_test_env_null(&env);
- int status = axis2_env_check_status(env);
+ int status = axis2_env_check_status(&env);
if(AXIS2_SUCCESS == status)
printf("%s\n", msg);
else
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=331968&r1=331967&r2=331968&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 23:13:58 2005
@@ -169,9 +169,22 @@
if(NULL != wsdl_operation->ops)
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_operation)->
wsdl_component, env);
+
+ if(NULL != AXIS2_INTF_TO_IMPL(wsdl_operation)->msg_exchange_pattern)
+ AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(wsdl_operation)->
+ msg_exchange_pattern);
+
+ if(NULL != AXIS2_INTF_TO_IMPL(wsdl_operation)->name)
+ AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(wsdl_operation)->
+ name);
+
+ if(NULL != AXIS2_INTF_TO_IMPL(wsdl_operation)->style)
+ AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(wsdl_operation)->
+ style);
AXIS2_FREE((*env)->allocator, wsdl_operation);
return AXIS2_SUCCESS;
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=331968&r1=331967&r2=331968&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/wsdl/src/wsdl_svc.c (original)
+++ webservices/axis2/trunk/c/modules/wsdl/src/wsdl_svc.c Tue Nov 8 23:13:58 2005
@@ -14,70 +14,69 @@
* limitations under the License.
*/
-#include <axis2_wsdl_service.h>
+#include <axis2_wsdl_svc.h>
-/** @struct axis2_wsdl_service_s
- * @brief WSDL service
- * This holds operations of wsdl service
- */
+/**
+ * @brief Wsdl Service struct impl
+ * Axis2 Wsdl Service impl
+ */
+typedef struct axis2_wsdl_svc_impl_s axis2_wsdl_svc_impl_t;
-typedef struct axis2_wsdl_impl_service_s axis2_wsdl_impl_service_t;
-
-struct axis2_wsdl_impl_service_s
+struct axis2_wsdl_svc_impl_s
{
- axis2_wsdl_service_t wsdl_srv;
+ axis2_wsdl_svc_t wsdl_svc;
};
+#define AXIS2_INTF_TO_IMPL(wsdl_svc) ((axis2_wsdl_svc_impl_t *)(wsdl_svc))
+
/***************************** Function headers *******************************/
-axis2_status_t axis2_wsdl_service_free(axis2_env_t *env
- , axis2_wsdl_service_t *wsdl_srv);
+axis2_status_t AXIS2_CALL
+axis2_wsdl_svc_free(axis2_wsdl_svc_t *wsdl_svc,
+ axis2_env_t **env);
/***************************** End of function headers ************************/
-axis2_status_t axis2_wsdl_service_create
- (axis2_env_t *env, axis2_wsdl_service_t **wsdl_srv)
+axis2_wsdl_svc_t * AXIS2_CALL
+axis2_wsdl_svc_create (axis2_env_t **env)
{
- axis2_wsdl_impl_service_t *wsdl_impl_srv
- = (axis2_wsdl_impl_service_t *)
- axis2_malloc (env->allocator, sizeof(axis2_wsdl_service_t));
- if(NULL == wsdl_impl_srv)
+ AXIS2_ENV_CHECK(env, NULL);
+
+ axis2_wsdl_svc_impl_t *wsdl_svc_impl = (axis2_wsdl_svc_impl_t *)
+ AXIS2_MALLOC ((*env)->allocator, sizeof(axis2_wsdl_svc_t));
+ if(NULL == wsdl_svc_impl)
{
- return AXIS2_ERROR_NO_MEMORY;
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
}
- axis2_wsdl_service_t *wsdl_srv_l
- = (axis2_wsdl_service_t *)
- axis2_malloc (env->allocator, sizeof(axis2_wsdl_service_t));
- if(NULL == wsdl_srv_l)
- {
- axis2_free(env->allocator, wsdl_impl_srv);
- return AXIS2_ERROR_NO_MEMORY;
- }
- wsdl_srv_l->ops
- = (axis2_wsdl_service_ops_t *)
- axis2_malloc (env->allocator, sizeof(axis2_wsdl_service_ops_t));
- if(NULL == wsdl_srv_l->ops)
+
+ 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_free(env->allocator, wsdl_impl_srv);
- axis2_free(env->allocator, wsdl_srv_l);
- return AXIS2_ERROR_NO_MEMORY;
+ AXIS2_FREE((*env)->allocator, wsdl_svc_impl);
+ AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
}
- (wsdl_srv_l->ops)->free = axis2_wsdl_service_free;
- wsdl_impl_srv->wsdl_srv = *wsdl_srv_l;
- *(wsdl_srv) = &(wsdl_impl_srv->wsdl_srv);
+
+ wsdl_svc_impl->wsdl_svc.ops->free = axis2_wsdl_svc_free;
- return AXIS2_SUCCESS;
+ return &(wsdl_svc_impl->wsdl_svc);
}
/******************************************************************************/
-axis2_status_t axis2_wsdl_service_free(axis2_env_t *env
- , axis2_wsdl_service_t *wsdl_srv)
+axis2_status_t AXIS2_CALL
+axis2_wsdl_svc_free (axis2_wsdl_svc_t *wsdl_svc,
+ axis2_env_t **env)
{
- if(!env || !wsdl_srv)
- return AXIS2_ERROR_INVALID_NULL_PARAM;
- axis2_free(env->allocator, wsdl_srv);
+ AXIS2_FUNC_PARAM_CHECK(wsdl_svc, env, AXIS2_FAILURE);
+ if(NULL != wsdl_svc->ops)
+ AXIS2_FREE((*env)->allocator, wsdl_svc->ops);
+
+ AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(wsdl_svc));
+
return AXIS2_SUCCESS;
}