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 sa...@apache.org on 2006/06/04 05:09:41 UTC
svn commit: r411506 [8/27] - in /webservices/axis2/trunk/c: axiom/include/
axiom/src/attachments/ axiom/src/om/ axiom/src/parser/guththila/
axiom/src/parser/libxml2/ axiom/src/soap/ axiom/test/om/ axiom/test/soap/
guththila/src/ include/ modules/core/c...
Modified: webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/op_client.c?rev=411506&r1=411505&r2=411506&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/op_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/op_client.c Sat Jun 3 20:09:08 2006
@@ -29,17 +29,17 @@
/** op_client base struct */
axis2_op_client_t op_client;
- axis2_mep_client_t *base;
+ axis2_mep_client_t *base;
- axis2_svc_ctx_t *svc_ctx;
+ axis2_svc_ctx_t *svc_ctx;
- axis2_options_t *options;
+ axis2_options_t *options;
- axis2_op_ctx_t *op_ctx;
+ axis2_op_ctx_t *op_ctx;
- axis2_callback_t *callback;
+ axis2_callback_t *callback;
- axis2_bool_t completed;
+ axis2_bool_t completed;
/* to hold the locally created async result */
axis2_async_result_t *async_result;
axis2_callback_recv_t *callback_recv;
@@ -67,42 +67,42 @@
/** public function prototypes */
axis2_status_t AXIS2_CALL
axis2_op_client_set_options(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_options_t *options);
+ const axis2_env_t *env,
+ axis2_options_t *options);
axis2_options_t* AXIS2_CALL
axis2_op_client_get_options(struct axis2_op_client *op_client,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_status_t AXIS2_CALL
axis2_op_client_add_msg_ctx(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_msg_ctx_t *mc);
+ const axis2_env_t *env,
+ axis2_msg_ctx_t *mc);
axis2_msg_ctx_t* AXIS2_CALL
axis2_op_client_get_msg_ctx(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_char_t *message_label);
+ const axis2_env_t *env,
+ axis2_char_t *message_label);
axis2_status_t AXIS2_CALL
axis2_op_client_set_callback(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_callback_t *callback);
+ const axis2_env_t *env,
+ axis2_callback_t *callback);
axis2_status_t AXIS2_CALL
axis2_op_client_execute(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_bool_t block);
+ const axis2_env_t *env,
+ axis2_bool_t block);
axis2_status_t AXIS2_CALL
axis2_op_client_reset(struct axis2_op_client *op_client,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_status_t AXIS2_CALL
axis2_op_client_compelete(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_msg_ctx_t *mc);
+ const axis2_env_t *env,
+ axis2_msg_ctx_t *mc);
axis2_op_ctx_t* AXIS2_CALL
axis2_op_client_get_operation_context(struct axis2_op_client *op_client);
@@ -114,15 +114,15 @@
axis2_status_t AXIS2_CALL
axis2_op_client_free(struct axis2_op_client *op_client,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_op_client_t* AXIS2_CALL
axis2_op_client_create(const axis2_env_t *env, axis2_op_t *op,
- axis2_svc_ctx_t *svc_ctx,
- axis2_options_t *options)
+ axis2_svc_ctx_t *svc_ctx,
+ axis2_options_t *options)
{
axis2_op_client_impl_t *op_client_impl = NULL;
- axis2_char_t *mep_uri = NULL;
+ axis2_char_t *mep_uri = NULL;
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, op, NULL);
@@ -136,36 +136,36 @@
return NULL;
}
- /** initialize data */
+ /** initialize data */
op_client_impl->base = NULL;
- op_client_impl->svc_ctx = NULL;
- op_client_impl->options = NULL;
- op_client_impl->op_ctx = NULL;
+ op_client_impl->svc_ctx = NULL;
+ op_client_impl->options = NULL;
+ op_client_impl->op_ctx = NULL;
op_client_impl->callback = NULL;
op_client_impl->completed = AXIS2_FALSE;
op_client_impl->async_result = NULL;
op_client_impl->callback_recv = NULL;
- op_client_impl->options = options;
- op_client_impl->svc_ctx = svc_ctx;
+ op_client_impl->options = options;
+ op_client_impl->svc_ctx = svc_ctx;
op_client_impl->op_ctx = axis2_op_ctx_create(env, op,
op_client_impl->svc_ctx);
if (!(op_client_impl->op_ctx))
{
axis2_op_client_free(&(op_client_impl->op_client), env);
- return NULL;
+ return NULL;
}
- mep_uri = AXIS2_OP_GET_MSG_EXCHANGE_PATTERN(op, env);
+ mep_uri = AXIS2_OP_GET_MSG_EXCHANGE_PATTERN(op, env);
- if (!mep_uri)
- {
- axis2_op_client_free(&(op_client_impl->op_client), env);
- return NULL;
- }
+ if (!mep_uri)
+ {
+ axis2_op_client_free(&(op_client_impl->op_client), env);
+ return NULL;
+ }
- op_client_impl->base = axis2_mep_client_create(env, svc_ctx, mep_uri);
+ op_client_impl->base = axis2_mep_client_create(env, svc_ctx, mep_uri);
if (!(op_client_impl->base))
{
axis2_op_client_free(&(op_client_impl->op_client), env);
@@ -183,190 +183,190 @@
return NULL;
}
- axis2_op_client_init_ops(&(op_client_impl->op_client));
+ axis2_op_client_init_ops(&(op_client_impl->op_client));
/** initialize parser for thread safty */
axis2_xml_reader_init();
- return &(op_client_impl->op_client);
+ return &(op_client_impl->op_client);
}
axis2_status_t AXIS2_CALL
axis2_op_client_set_options(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_options_t *options)
+ const axis2_env_t *env,
+ axis2_options_t *options)
{
axis2_op_client_impl_t *op_client_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
-
- if (op_client_impl->options)
- {
- AXIS2_OPTIONS_FREE(op_client_impl->options, env);
- }
- op_client_impl->options = options;
+ op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+
+ if (op_client_impl->options)
+ {
+ AXIS2_OPTIONS_FREE(op_client_impl->options, env);
+ }
+ op_client_impl->options = options;
- return AXIS2_SUCCESS;
+ return AXIS2_SUCCESS;
}
axis2_options_t* AXIS2_CALL
axis2_op_client_get_options(struct axis2_op_client *op_client,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
axis2_op_client_impl_t *op_client_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
-
- return op_client_impl->options;
+ op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+
+ return op_client_impl->options;
}
axis2_status_t AXIS2_CALL
axis2_op_client_add_msg_ctx(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_msg_ctx_t *mc)
+ const axis2_env_t *env,
+ axis2_msg_ctx_t *mc)
{
axis2_op_client_impl_t *op_client_impl = NULL;
- axis2_msg_ctx_t *out_msg_ctx = NULL, *in_msg_ctx = NULL;
- axis2_hash_t *msg_ctx_map = NULL;
+ axis2_msg_ctx_t *out_msg_ctx = NULL, *in_msg_ctx = NULL;
+ axis2_hash_t *msg_ctx_map = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
-
- msg_ctx_map = AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_client_impl->op_ctx, env);
-
- out_msg_ctx = axis2_hash_get(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE,
- AXIS2_HASH_KEY_STRING);
- in_msg_ctx = axis2_hash_get(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE,
- AXIS2_HASH_KEY_STRING);
-
- if (out_msg_ctx && in_msg_ctx)
- {
- /*TODO:error - completed*/
- return AXIS2_FAILURE;
- }
-
- if (!out_msg_ctx)
- {
- axis2_hash_set(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE, AXIS2_HASH_KEY_STRING, mc);
- }
- else
- {
- axis2_hash_set(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING, mc);
- AXIS2_OP_CTX_SET_IS_COMPLETE(op_client_impl->op_ctx, env, AXIS2_TRUE);
- }
- return AXIS2_SUCCESS;
+ op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+
+ msg_ctx_map = AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_client_impl->op_ctx, env);
+
+ out_msg_ctx = axis2_hash_get(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE,
+ AXIS2_HASH_KEY_STRING);
+ in_msg_ctx = axis2_hash_get(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE,
+ AXIS2_HASH_KEY_STRING);
+
+ if (out_msg_ctx && in_msg_ctx)
+ {
+ /*TODO:error - completed*/
+ return AXIS2_FAILURE;
+ }
+
+ if (!out_msg_ctx)
+ {
+ axis2_hash_set(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE, AXIS2_HASH_KEY_STRING, mc);
+ }
+ else
+ {
+ axis2_hash_set(msg_ctx_map, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE, AXIS2_HASH_KEY_STRING, mc);
+ AXIS2_OP_CTX_SET_IS_COMPLETE(op_client_impl->op_ctx, env, AXIS2_TRUE);
+ }
+ return AXIS2_SUCCESS;
}
axis2_msg_ctx_t* AXIS2_CALL
axis2_op_client_get_msg_ctx(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_char_t *message_label)
+ const axis2_env_t *env,
+ axis2_char_t *message_label)
{
axis2_op_client_impl_t *op_client_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+ op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
- if (!message_label)
- {
+ if (!message_label)
+ {
/*AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);*/
- return NULL;
- }
- return AXIS2_OP_CTX_GET_MSG_CTX(op_client_impl->op_ctx, env, message_label);
+ return NULL;
+ }
+ return AXIS2_OP_CTX_GET_MSG_CTX(op_client_impl->op_ctx, env, message_label);
}
axis2_status_t AXIS2_CALL
axis2_op_client_set_callback(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_callback_t *callback)
+ const axis2_env_t *env,
+ axis2_callback_t *callback)
{
axis2_op_client_impl_t *op_client_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+ op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
- if (op_client_impl->callback)
- {
- AXIS2_CALLBACK_FREE(op_client_impl->callback, env);
- }
+ if (op_client_impl->callback)
+ {
+ AXIS2_CALLBACK_FREE(op_client_impl->callback, env);
+ }
- op_client_impl->callback = callback;
- return AXIS2_SUCCESS;
+ op_client_impl->callback = callback;
+ return AXIS2_SUCCESS;
}
axis2_status_t AXIS2_CALL
axis2_op_client_execute(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_bool_t block)
+ const axis2_env_t *env,
+ axis2_bool_t block)
{
axis2_op_client_impl_t *op_client_impl = NULL;
- axis2_conf_ctx_t *conf_ctx = NULL;
- axis2_msg_ctx_t *msg_ctx = NULL;
+ axis2_conf_ctx_t *conf_ctx = NULL;
+ axis2_msg_ctx_t *msg_ctx = NULL;
- axis2_transport_out_desc_t *transport_out = NULL;
- axis2_transport_in_desc_t *transport_in = NULL;
+ axis2_transport_out_desc_t *transport_out = NULL;
+ axis2_transport_in_desc_t *transport_in = NULL;
- axis2_status_t status = AXIS2_FAILURE;
- axis2_op_t *op = NULL;
- axis2_char_t *msg_id = NULL;
-
+ axis2_status_t status = AXIS2_FAILURE;
+ axis2_op_t *op = NULL;
+ axis2_char_t *msg_id = NULL;
+
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
- if (op_client_impl->completed)
- {
- /**TODO:error completed*/
- return AXIS2_FAILURE;
- }
-
- conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(op_client_impl->svc_ctx, env);
- msg_ctx = axis2_op_client_get_msg_ctx(op_client, env,
- AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE);
-
- if (!msg_ctx)
- {
- /*TODO:error msg ctx is null*/
- return AXIS2_FAILURE;
- }
-
- AXIS2_MSG_CTX_SET_OPTIONS(msg_ctx, env, op_client_impl->options);
-
- /**
- if the transport to use for sending is not specified, try to find it
+ if (op_client_impl->completed)
+ {
+ /**TODO:error completed*/
+ return AXIS2_FAILURE;
+ }
+
+ conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(op_client_impl->svc_ctx, env);
+ msg_ctx = axis2_op_client_get_msg_ctx(op_client, env,
+ AXIS2_WSDL_MESSAGE_LABEL_OUT_VALUE);
+
+ if (!msg_ctx)
+ {
+ /*TODO:error msg ctx is null*/
+ return AXIS2_FAILURE;
+ }
+
+ AXIS2_MSG_CTX_SET_OPTIONS(msg_ctx, env, op_client_impl->options);
+
+ /**
+ if the transport to use for sending is not specified, try to find it
from the URL
- */
- transport_out = AXIS2_OPTIONS_GET_TRANSPORT_OUT(op_client_impl->options,
- env);
- if (!transport_out)
- {
- axis2_endpoint_ref_t *to_epr = NULL;
- to_epr = AXIS2_OPTIONS_GET_TO(op_client_impl->options, env);
- if (!to_epr)
- to_epr = AXIS2_MSG_CTX_GET_TO(msg_ctx, env);
- transport_out = AXIS2_MEP_CLIENT_INFER_TRANSPORT(op_client_impl->base, env, to_epr);
- }
-
- if (!transport_out)
- {
- return AXIS2_FAILURE;
- }
+ */
+ transport_out = AXIS2_OPTIONS_GET_TRANSPORT_OUT(op_client_impl->options,
+ env);
+ if (!transport_out)
+ {
+ axis2_endpoint_ref_t *to_epr = NULL;
+ to_epr = AXIS2_OPTIONS_GET_TO(op_client_impl->options, env);
+ if (!to_epr)
+ to_epr = AXIS2_MSG_CTX_GET_TO(msg_ctx, env);
+ transport_out = AXIS2_MEP_CLIENT_INFER_TRANSPORT(op_client_impl->base, env, to_epr);
+ }
+
+ if (!transport_out)
+ {
+ return AXIS2_FAILURE;
+ }
- if (!(AXIS2_MSG_CTX_GET_TRANSPORT_OUT_DESC(msg_ctx, env)))
- AXIS2_MSG_CTX_SET_TRANSPORT_OUT_DESC(msg_ctx, env, transport_out);
+ if (!(AXIS2_MSG_CTX_GET_TRANSPORT_OUT_DESC(msg_ctx, env)))
+ AXIS2_MSG_CTX_SET_TRANSPORT_OUT_DESC(msg_ctx, env, transport_out);
- transport_in = AXIS2_OPTIONS_GET_TRANSPORT_IN(op_client_impl->options, env);
- if (!transport_in)
- {
+ transport_in = AXIS2_OPTIONS_GET_TRANSPORT_IN(op_client_impl->options, env);
+ if (!transport_in)
+ {
axis2_conf_ctx_t *conf_ctx = AXIS2_SVC_CTX_GET_CONF_CTX(op_client_impl->svc_ctx, env);
if (conf_ctx)
{
@@ -378,30 +378,30 @@
}
}
}
-
- if (!(AXIS2_MSG_CTX_GET_TRANSPORT_IN_DESC(msg_ctx, env)))
+
+ if (!(AXIS2_MSG_CTX_GET_TRANSPORT_IN_DESC(msg_ctx, env)))
{
AXIS2_MSG_CTX_SET_TRANSPORT_IN_DESC(msg_ctx, env, transport_in);
}
- op = AXIS2_OP_CTX_GET_OP(op_client_impl->op_ctx, env);
- if (!op)
- return AXIS2_FAILURE;
-
- status = AXIS2_MEP_CLIENT_PREPARE_INVOCATION(op_client_impl->base, env, op, msg_ctx);
- if (status != AXIS2_SUCCESS)
- return AXIS2_FAILURE;
-
- msg_id = (axis2_char_t*)axis2_uuid_gen(env);
- AXIS2_MSG_CTX_SET_MESSAGE_ID(msg_ctx, env, msg_id);
+ op = AXIS2_OP_CTX_GET_OP(op_client_impl->op_ctx, env);
+ if (!op)
+ return AXIS2_FAILURE;
+
+ status = AXIS2_MEP_CLIENT_PREPARE_INVOCATION(op_client_impl->base, env, op, msg_ctx);
+ if (status != AXIS2_SUCCESS)
+ return AXIS2_FAILURE;
+
+ msg_id = (axis2_char_t*)axis2_uuid_gen(env);
+ AXIS2_MSG_CTX_SET_MESSAGE_ID(msg_ctx, env, msg_id);
if(NULL != msg_id)
{
- AXIS2_FREE(env->allocator, msg_id);
- msg_id = NULL;
- }
+ AXIS2_FREE(env->allocator, msg_id);
+ msg_id = NULL;
+ }
- if (AXIS2_OPTIONS_IS_USE_SEPERATE_LISTENER(op_client_impl->options, env))
- {
+ if (AXIS2_OPTIONS_IS_USE_SEPERATE_LISTENER(op_client_impl->options, env))
+ {
axis2_engine_t *engine = NULL;
AXIS2_CALLBACK_RECV_ADD_CALLBACK(op_client_impl->callback_recv, env,
@@ -417,33 +417,33 @@
if (!engine)
return AXIS2_FAILURE;
AXIS2_ENGINE_SEND(engine, env, msg_ctx);
- }
- else
- {
- if (block)
- {
- axis2_msg_ctx_t *response_mc = NULL;
- axis2_char_t *address = NULL;
- axis2_char_t *epr_address = NULL;
- axis2_property_t *property = NULL;
-
- /* Usual Request-Response Sync implemetation */
- property = axis2_property_create(env);
- AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
- epr_address = AXIS2_ENDPOINT_REF_GET_ADDRESS(
- AXIS2_OPTIONS_GET_TO(op_client_impl->options, env), env);
- address = AXIS2_STRDUP(epr_address, env);
- AXIS2_PROPERTY_SET_VALUE(property, env, address);
- AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,
+ }
+ else
+ {
+ if (block)
+ {
+ axis2_msg_ctx_t *response_mc = NULL;
+ axis2_char_t *address = NULL;
+ axis2_char_t *epr_address = NULL;
+ axis2_property_t *property = NULL;
+
+ /* Usual Request-Response Sync implemetation */
+ property = axis2_property_create(env);
+ AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+ epr_address = AXIS2_ENDPOINT_REF_GET_ADDRESS(
+ AXIS2_OPTIONS_GET_TO(op_client_impl->options, env), env);
+ address = AXIS2_STRDUP(epr_address, env);
+ AXIS2_PROPERTY_SET_VALUE(property, env, address);
+ AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,
AXIS2_TRANSPORT_URL, property, AXIS2_FALSE);
- AXIS2_MSG_CTX_SET_SVC_CTX(msg_ctx, env, op_client_impl->svc_ctx);
- AXIS2_MSG_CTX_SET_CONF_CTX(msg_ctx, env,
+ AXIS2_MSG_CTX_SET_SVC_CTX(msg_ctx, env, op_client_impl->svc_ctx);
+ AXIS2_MSG_CTX_SET_CONF_CTX(msg_ctx, env,
AXIS2_SVC_CTX_GET_CONF_CTX(op_client_impl->svc_ctx, env));
AXIS2_MSG_CTX_SET_OP_CTX(msg_ctx, env, op_client_impl->op_ctx);
/*Send the SOAP Message and receive a response */
- response_mc = axis2_mep_client_two_way_send(env, msg_ctx);
- if (!response_mc)
+ response_mc = axis2_mep_client_two_way_send(env, msg_ctx);
+ if (!response_mc)
{
axis2_char_t *mep = AXIS2_OP_GET_MSG_EXCHANGE_PATTERN(op, env);
if (AXIS2_STRCMP(mep, AXIS2_MEP_URI_OUT_ONLY) == 0 ||
@@ -454,18 +454,18 @@
else
return AXIS2_FAILURE;
}
- axis2_op_client_add_msg_ctx(&(op_client_impl->op_client), env,
- response_mc);
- }
- else
- {
+ axis2_op_client_add_msg_ctx(&(op_client_impl->op_client), env,
+ response_mc);
+ }
+ else
+ {
axis2_thread_t *worker_thread = NULL;
axis2_op_client_worker_func_args_t *arg_list = NULL;
arg_list = AXIS2_MALLOC(env->allocator,
sizeof(axis2_op_client_worker_func_args_t));
if(NULL == arg_list)
{
- return AXIS2_FAILURE;
+ return AXIS2_FAILURE;
}
arg_list->env = env;
arg_list->op_client_impl = op_client_impl;
@@ -493,61 +493,61 @@
axis2_op_client_worker_func(NULL, (void*)arg_list);
#endif
- }
- }
- return AXIS2_SUCCESS;
+ }
+ }
+ return AXIS2_SUCCESS;
}
axis2_status_t AXIS2_CALL
axis2_op_client_reset(struct axis2_op_client *op_client,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
axis2_op_client_impl_t *op_client_impl = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
- op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
-
- if (!op_client_impl->completed)
- return AXIS2_FAILURE;
-
- op_client_impl->completed = AXIS2_FALSE;
-
- /*TODO:check
- if (op_client_impl->op_ctx)
- AXIS2_OP_CTX_FREE(op_client_impl->op_ctx, env);
- */
- op_client_impl->op_ctx = NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+
+ if (!op_client_impl->completed)
+ return AXIS2_FAILURE;
+
+ op_client_impl->completed = AXIS2_FALSE;
- return AXIS2_SUCCESS;
+ /*TODO:check
+ if (op_client_impl->op_ctx)
+ AXIS2_OP_CTX_FREE(op_client_impl->op_ctx, env);
+ */
+ op_client_impl->op_ctx = NULL;
+
+ return AXIS2_SUCCESS;
}
axis2_status_t AXIS2_CALL
axis2_op_client_compelete(struct axis2_op_client *op_client,
- const axis2_env_t *env,
- axis2_msg_ctx_t *mc)
+ const axis2_env_t *env,
+ axis2_msg_ctx_t *mc)
{
axis2_op_client_impl_t *op_client_impl = NULL;
- axis2_conf_ctx_t *conf_ctx = NULL;
- axis2_listener_manager_t *listener_manager = NULL;
- axis2_char_t *transport = NULL;
-
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
- op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
-
- conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(mc, env);
-
- if (!conf_ctx)
- return AXIS2_FAILURE;
-
- /*TODO:uncomment when implemented
- listener_manager = AXIS2_CONF_CTX_GET_LISTENER_MANAGER(conf_ctx, env);
- */
- if (!listener_manager)
- return AXIS2_FAILURE;
- /*TODO:set transport*/
- return AXIS2_LISTENER_MANAGER_STOP(listener_manager, env, transport);
+ axis2_conf_ctx_t *conf_ctx = NULL;
+ axis2_listener_manager_t *listener_manager = NULL;
+ axis2_char_t *transport = NULL;
+
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+
+ conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(mc, env);
+
+ if (!conf_ctx)
+ return AXIS2_FAILURE;
+
+ /*TODO:uncomment when implemented
+ listener_manager = AXIS2_CONF_CTX_GET_LISTENER_MANAGER(conf_ctx, env);
+ */
+ if (!listener_manager)
+ return AXIS2_FAILURE;
+ /*TODO:set transport*/
+ return AXIS2_LISTENER_MANAGER_STOP(listener_manager, env, transport);
}
axis2_op_ctx_t* AXIS2_CALL
@@ -555,20 +555,20 @@
{
axis2_op_client_impl_t *op_client_impl = NULL;
- op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
-
- return op_client_impl->op_ctx;
+ op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+
+ return op_client_impl->op_ctx;
}
-
+
axis2_status_t AXIS2_CALL
axis2_op_client_free(struct axis2_op_client *op_client,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_op_client_impl_t *op_client_impl = NULL;
+ axis2_op_client_impl_t *op_client_impl = NULL;
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
+ op_client_impl = AXIS2_INTF_TO_IMPL(op_client);
if (op_client_impl->base)
{
@@ -591,23 +591,23 @@
AXIS2_FREE(env->allocator, op_client_impl);
op_client_impl = NULL;
axis2_xml_reader_cleanup();
- return AXIS2_SUCCESS;
+ return AXIS2_SUCCESS;
}
/** private functions - implementation */
static void axis2_op_client_init_ops(axis2_op_client_t *op_client)
{
- op_client->ops->set_options = axis2_op_client_set_options;
- op_client->ops->get_options = axis2_op_client_get_options;
- op_client->ops->add_msg_ctx = axis2_op_client_add_msg_ctx;
- op_client->ops->get_msg_ctx = axis2_op_client_get_msg_ctx;
- op_client->ops->set_callback = axis2_op_client_set_callback;
- op_client->ops->execute = axis2_op_client_execute;
- op_client->ops->reset = axis2_op_client_reset;
- op_client->ops->compelete = axis2_op_client_compelete;
- op_client->ops->get_operation_context = axis2_op_client_get_operation_context;
+ op_client->ops->set_options = axis2_op_client_set_options;
+ op_client->ops->get_options = axis2_op_client_get_options;
+ op_client->ops->add_msg_ctx = axis2_op_client_add_msg_ctx;
+ op_client->ops->get_msg_ctx = axis2_op_client_get_msg_ctx;
+ op_client->ops->set_callback = axis2_op_client_set_callback;
+ op_client->ops->execute = axis2_op_client_execute;
+ op_client->ops->reset = axis2_op_client_reset;
+ op_client->ops->compelete = axis2_op_client_compelete;
+ op_client->ops->get_operation_context = axis2_op_client_get_operation_context;
op_client->ops->set_callback_recv = axis2_op_client_set_callback_recv;
- op_client->ops->free = axis2_op_client_free;
+ op_client->ops->free = axis2_op_client_free;
}
void * AXIS2_THREAD_FUNC
@@ -616,14 +616,14 @@
axis2_op_client_worker_func_args_t *args_list = NULL;
axis2_op_ctx_t *op_ctx = NULL;
axis2_msg_ctx_t *response = NULL;
- const axis2_env_t *th_env = NULL;
+ const axis2_env_t *th_env = NULL;
args_list = (axis2_op_client_worker_func_args_t *) data;
if (!args_list)
return NULL;
AXIS2_ENV_CHECK(args_list->env, AXIS2_FAILURE);
- th_env = axis2_init_thread_env(args_list->env);
+ th_env = axis2_init_thread_env(args_list->env);
op_ctx = axis2_op_ctx_create(th_env, args_list->op, args_list->op_client_impl->svc_ctx);
if (!op_ctx)
@@ -645,7 +645,7 @@
const axis2_env_t *env,
axis2_callback_recv_t *callback_recv)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- AXIS2_INTF_TO_IMPL(op_client)->callback_recv = callback_recv;
- return AXIS2_SUCCESS;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_INTF_TO_IMPL(op_client)->callback_recv = callback_recv;
+ return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/modules/core/clientapi/options.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/options.c?rev=411506&r1=411505&r2=411506&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/options.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/options.c Sat Jun 3 20:09:08 2006
@@ -26,33 +26,33 @@
/** options base struct */
axis2_options_t options;
- /** parent options */
- axis2_options_t *parent;
+ /** parent options */
+ axis2_options_t *parent;
- axis2_hash_t *properties;
+ axis2_hash_t *properties;
- axis2_char_t *soap_version_uri;
+ axis2_char_t *soap_version_uri;
int soap_version;
- long timeout_in_milli_seconds;
-
- axis2_bool_t use_seperate_listener;
+ long timeout_in_milli_seconds;
+
+ axis2_bool_t use_seperate_listener;
- /** addressing specific properties */
- axis2_msg_info_headers_t *msg_info_headers;
+ /** addressing specific properties */
+ axis2_msg_info_headers_t *msg_info_headers;
- axis2_transport_receiver_t *receiver;
+ axis2_transport_receiver_t *receiver;
- axis2_transport_in_desc_t *transport_in;
+ axis2_transport_in_desc_t *transport_in;
- axis2_char_t *transport_in_protocol;
+ axis2_char_t *transport_in_protocol;
- /** for sending and receiving messages */
- axis2_transport_out_desc_t *transport_out;
- axis2_char_t *sender_transport_protocol;
+ /** for sending and receiving messages */
+ axis2_transport_out_desc_t *transport_out;
+ axis2_char_t *sender_transport_protocol;
- axis2_bool_t manage_session;
+ axis2_bool_t manage_session;
axis2_bool_t enable_mtom;
} axis2_options_impl_t;
@@ -67,184 +67,184 @@
/** public function prototypes */
axis2_char_t* AXIS2_CALL
axis2_options_get_action(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_endpoint_ref_t* AXIS2_CALL
axis2_options_get_fault_to(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_endpoint_ref_t* AXIS2_CALL
axis2_options_get_from(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_transport_receiver_t* AXIS2_CALL
axis2_options_get_transport_receiver(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_transport_in_desc_t* AXIS2_CALL
axis2_options_get_transport_in(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_char_t* AXIS2_CALL
axis2_options_get_transport_in_protocol(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_char_t* AXIS2_CALL
axis2_options_get_message_id(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_hash_t* AXIS2_CALL
axis2_options_get_properties(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
void* AXIS2_CALL
axis2_options_get_property(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *key);
+ const axis2_env_t *env,
+ axis2_char_t *key);
axis2_relates_to_t* AXIS2_CALL
axis2_options_get_relates_to(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_endpoint_ref_t* AXIS2_CALL
axis2_options_get_reply_to(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_transport_out_desc_t* AXIS2_CALL
axis2_options_get_transport_out(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_char_t* AXIS2_CALL
axis2_options_get_sender_transport_protocol(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_char_t* AXIS2_CALL
axis2_options_get_soap_version_uri(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
long AXIS2_CALL
axis2_options_get_timeout_in_milli_seconds(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_endpoint_ref_t* AXIS2_CALL
axis2_options_get_to(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_bool_t AXIS2_CALL
axis2_options_is_use_seperate_listener(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
struct axis2_options * AXIS2_CALL
axis2_options_get_parent(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
void AXIS2_CALL
axis2_options_set_parent(struct axis2_options *options,
- const axis2_env_t *env,
- struct axis2_options *parent);
+ const axis2_env_t *env,
+ struct axis2_options *parent);
void AXIS2_CALL
axis2_options_set_action(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *action);
+ const axis2_env_t *env,
+ axis2_char_t *action);
void AXIS2_CALL
axis2_options_set_fault_to(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_endpoint_ref_t *fault_to);
+ const axis2_env_t *env,
+ axis2_endpoint_ref_t *fault_to);
void AXIS2_CALL
axis2_options_set_from(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_endpoint_ref_t *from);
+ const axis2_env_t *env,
+ axis2_endpoint_ref_t *from);
void AXIS2_CALL
axis2_options_set_to(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_endpoint_ref_t *to);
+ const axis2_env_t *env,
+ axis2_endpoint_ref_t *to);
void AXIS2_CALL
axis2_options_set_transport_receiver(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_transport_receiver_t *receiver);
+ const axis2_env_t *env,
+ axis2_transport_receiver_t *receiver);
void AXIS2_CALL
axis2_options_set_transport_in(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_transport_in_desc_t *transport_in);
+ const axis2_env_t *env,
+ axis2_transport_in_desc_t *transport_in);
void AXIS2_CALL
axis2_options_set_transport_in_protocol(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *transport_in_protocol);
+ const axis2_env_t *env,
+ axis2_char_t *transport_in_protocol);
void AXIS2_CALL
axis2_options_set_message_id(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *message_id);
+ const axis2_env_t *env,
+ axis2_char_t *message_id);
axis2_status_t AXIS2_CALL
axis2_options_set_properties(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_hash_t *properties);
+ const axis2_env_t *env,
+ axis2_hash_t *properties);
void AXIS2_CALL
axis2_options_set_property(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *property_key,
- void *property);
+ const axis2_env_t *env,
+ axis2_char_t *property_key,
+ void *property);
void AXIS2_CALL
axis2_options_set_relates_to(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_relates_to_t *relates_to);
+ const axis2_env_t *env,
+ axis2_relates_to_t *relates_to);
void AXIS2_CALL
axis2_options_set_reply_to(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_endpoint_ref_t *reply_to);
+ const axis2_env_t *env,
+ axis2_endpoint_ref_t *reply_to);
void AXIS2_CALL
axis2_options_set_transport_out(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_transport_out_desc_t *transport_out);
+ const axis2_env_t *env,
+ axis2_transport_out_desc_t *transport_out);
axis2_status_t AXIS2_CALL
axis2_options_set_sender_transport(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *sender_transport,
- axis2_conf_t *conf);
+ const axis2_env_t *env,
+ axis2_char_t *sender_transport,
+ axis2_conf_t *conf);
void AXIS2_CALL
axis2_options_set_soap_version_uri(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *soap_version_uri);
+ const axis2_env_t *env,
+ axis2_char_t *soap_version_uri);
void AXIS2_CALL
axis2_options_set_timeout_in_milli_seconds(struct axis2_options *options,
- const axis2_env_t *env,
- long timeout_in_milli_seconds);
+ const axis2_env_t *env,
+ long timeout_in_milli_seconds);
axis2_status_t AXIS2_CALL
axis2_options_set_transport_info(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *sender_transport,
- axis2_char_t *receiver_transport,
- axis2_bool_t use_seperate_listener);
+ const axis2_env_t *env,
+ axis2_char_t *sender_transport,
+ axis2_char_t *receiver_transport,
+ axis2_bool_t use_seperate_listener);
void AXIS2_CALL
axis2_options_set_use_seperate_listener(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_bool_t use_seperate_listener);
+ const axis2_env_t *env,
+ axis2_bool_t use_seperate_listener);
/*TODO:check - changed om_element to om_node*/
void AXIS2_CALL
axis2_options_add_reference_parameter(struct axis2_options *options,
@@ -266,17 +266,17 @@
int AXIS2_CALL
axis2_options_get_soap_version(struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_status_t AXIS2_CALL
axis2_options_set_soap_version(struct axis2_options *options,
- const axis2_env_t *env,
+ const axis2_env_t *env,
int soap_version);
axis2_status_t AXIS2_CALL
axis2_options_free (struct axis2_options *options,
- const axis2_env_t *env);
+ const axis2_env_t *env);
axis2_status_t AXIS2_CALL
axis2_options_set_enable_mtom(struct axis2_options *options,
@@ -301,22 +301,22 @@
return NULL;
}
- /** initialize private data */
+ /** initialize private data */
axis2_options_init_data(options_impl);
-
- options_impl->msg_info_headers = axis2_msg_info_headers_create(env, NULL, NULL);
- if (!(options_impl->msg_info_headers))
- {
- axis2_options_free(&(options_impl->options), env);
- return NULL;
- }
-
- options_impl->properties = axis2_hash_make(env);
- if (!(options_impl->properties))
- {
- axis2_options_free(&(options_impl->options), env);
- return NULL;
- }
+
+ options_impl->msg_info_headers = axis2_msg_info_headers_create(env, NULL, NULL);
+ if (!(options_impl->msg_info_headers))
+ {
+ axis2_options_free(&(options_impl->options), env);
+ return NULL;
+ }
+
+ options_impl->properties = axis2_hash_make(env);
+ if (!(options_impl->properties))
+ {
+ axis2_options_free(&(options_impl->options), env);
+ return NULL;
+ }
/** initialize ops */
options_impl->options.ops =
@@ -329,158 +329,158 @@
return NULL;
}
- axis2_options_init_ops(&(options_impl->options));
+ axis2_options_init_ops(&(options_impl->options));
return &(options_impl->options);
}
axis2_options_t* AXIS2_CALL
axis2_options_create_with_parent(const axis2_env_t *env,
- struct axis2_options *parent)
+ struct axis2_options *parent)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(axis2_options_create(env));
+ options_impl = AXIS2_INTF_TO_IMPL(axis2_options_create(env));
- if (options_impl)
- {
- options_impl->parent = parent;
- }
- return &(options_impl->options);
+ if (options_impl)
+ {
+ options_impl->parent = parent;
+ }
+ return &(options_impl->options);
}
axis2_char_t* AXIS2_CALL
axis2_options_get_action(struct axis2_options *options,
const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
- axis2_char_t *action = NULL;
+ axis2_options_impl_t *options_impl = NULL;
+ axis2_char_t *action = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- action = AXIS2_MSG_INFO_HEADERS_GET_ACTION(options_impl->msg_info_headers, env);
+ action = AXIS2_MSG_INFO_HEADERS_GET_ACTION(options_impl->msg_info_headers, env);
- if (action == NULL && options_impl->parent)
- {
- return axis2_options_get_action(options_impl->parent, env);
- }
+ if (action == NULL && options_impl->parent)
+ {
+ return axis2_options_get_action(options_impl->parent, env);
+ }
- return action;
+ return action;
}
axis2_endpoint_ref_t* AXIS2_CALL
axis2_options_get_fault_to(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
- axis2_endpoint_ref_t *fault_to = NULL;
+ axis2_options_impl_t *options_impl = NULL;
+ axis2_endpoint_ref_t *fault_to = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- fault_to = AXIS2_MSG_INFO_HEADERS_GET_FAULT_TO(options_impl->msg_info_headers, env);
+ fault_to = AXIS2_MSG_INFO_HEADERS_GET_FAULT_TO(options_impl->msg_info_headers, env);
- if (fault_to == NULL && options_impl->parent)
- {
- return axis2_options_get_fault_to(options_impl->parent, env);
- }
+ if (fault_to == NULL && options_impl->parent)
+ {
+ return axis2_options_get_fault_to(options_impl->parent, env);
+ }
- return fault_to;
+ return fault_to;
}
axis2_endpoint_ref_t* AXIS2_CALL
axis2_options_get_from(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
- axis2_endpoint_ref_t *from = NULL;
+ axis2_options_impl_t *options_impl = NULL;
+ axis2_endpoint_ref_t *from = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- from = AXIS2_MSG_INFO_HEADERS_GET_FROM(options_impl->msg_info_headers, env);
+ from = AXIS2_MSG_INFO_HEADERS_GET_FROM(options_impl->msg_info_headers, env);
- if (from == NULL && options_impl->parent)
- {
- return axis2_options_get_from(options_impl->parent, env);
- }
+ if (from == NULL && options_impl->parent)
+ {
+ return axis2_options_get_from(options_impl->parent, env);
+ }
- return from;
+ return from;
}
axis2_transport_receiver_t* AXIS2_CALL
axis2_options_get_transport_receiver(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- if (options_impl->receiver == NULL && options_impl->parent)
- {
- return axis2_options_get_transport_receiver(options_impl->parent, env);
- }
+ if (options_impl->receiver == NULL && options_impl->parent)
+ {
+ return axis2_options_get_transport_receiver(options_impl->parent, env);
+ }
- return options_impl->receiver;
+ return options_impl->receiver;
}
axis2_transport_in_desc_t* AXIS2_CALL
axis2_options_get_transport_in(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- if (options_impl->transport_in == NULL && options_impl->parent)
- {
- return axis2_options_get_transport_in(options_impl->parent, env);
- }
+ if (options_impl->transport_in == NULL && options_impl->parent)
+ {
+ return axis2_options_get_transport_in(options_impl->parent, env);
+ }
- return options_impl->transport_in;
+ return options_impl->transport_in;
}
axis2_char_t* AXIS2_CALL
axis2_options_get_transport_in_protocol(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- if (options_impl->transport_in_protocol == NULL && options_impl->parent)
- {
- return axis2_options_get_transport_in_protocol(options_impl->parent, env);
- }
+ if (options_impl->transport_in_protocol == NULL && options_impl->parent)
+ {
+ return axis2_options_get_transport_in_protocol(options_impl->parent, env);
+ }
- return options_impl->transport_in_protocol;
+ return options_impl->transport_in_protocol;
}
axis2_char_t* AXIS2_CALL
axis2_options_get_message_id(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
- axis2_char_t *message_id = NULL;
+ axis2_options_impl_t *options_impl = NULL;
+ axis2_char_t *message_id = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- message_id = AXIS2_MSG_INFO_HEADERS_GET_MESSAGE_ID(options_impl->msg_info_headers, env);
+ message_id = AXIS2_MSG_INFO_HEADERS_GET_MESSAGE_ID(options_impl->msg_info_headers, env);
- if (message_id == NULL && options_impl->parent)
- {
- return axis2_options_get_message_id(options_impl->parent, env);
- }
+ if (message_id == NULL && options_impl->parent)
+ {
+ return axis2_options_get_message_id(options_impl->parent, env);
+ }
- return message_id;
+ return message_id;
}
/*TODO:pointer is returned; do we need to copy to a new axis2_hash_t
@@ -488,439 +488,439 @@
*/
axis2_hash_t* AXIS2_CALL
axis2_options_get_properties(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- if (axis2_hash_count(options_impl->properties) == 0 && options_impl->parent)
- {
- return axis2_options_get_properties(options_impl->parent, env);
- }
+ if (axis2_hash_count(options_impl->properties) == 0 && options_impl->parent)
+ {
+ return axis2_options_get_properties(options_impl->parent, env);
+ }
- return options_impl->properties;
+ return options_impl->properties;
}
void* AXIS2_CALL
axis2_options_get_property(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *key)
+ const axis2_env_t *env,
+ axis2_char_t *key)
{
- void *property = NULL;
- axis2_options_impl_t *options_impl = NULL;
+ void *property = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
- property = axis2_hash_get(options_impl->properties, key, AXIS2_HASH_KEY_STRING);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
+ property = axis2_hash_get(options_impl->properties, key, AXIS2_HASH_KEY_STRING);
- if (property == NULL && options_impl->parent)
- {
- return axis2_options_get_property(options_impl->parent, env, key);
- }
+ if (property == NULL && options_impl->parent)
+ {
+ return axis2_options_get_property(options_impl->parent, env, key);
+ }
- return property;
+ return property;
}
axis2_relates_to_t* AXIS2_CALL
axis2_options_get_relates_to(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
- axis2_relates_to_t *relates_to = NULL;
+ axis2_options_impl_t *options_impl = NULL;
+ axis2_relates_to_t *relates_to = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- relates_to = AXIS2_MSG_INFO_HEADERS_GET_RELATES_TO(options_impl->msg_info_headers, env);
+ relates_to = AXIS2_MSG_INFO_HEADERS_GET_RELATES_TO(options_impl->msg_info_headers, env);
- if (relates_to == NULL && options_impl->parent)
- {
- return axis2_options_get_relates_to(options_impl->parent, env);
- }
+ if (relates_to == NULL && options_impl->parent)
+ {
+ return axis2_options_get_relates_to(options_impl->parent, env);
+ }
- return relates_to;
+ return relates_to;
}
axis2_endpoint_ref_t* AXIS2_CALL
axis2_options_get_reply_to(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
- axis2_endpoint_ref_t *reply_to = NULL;
+ axis2_options_impl_t *options_impl = NULL;
+ axis2_endpoint_ref_t *reply_to = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- reply_to = AXIS2_MSG_INFO_HEADERS_GET_REPLY_TO(options_impl->msg_info_headers, env);
+ reply_to = AXIS2_MSG_INFO_HEADERS_GET_REPLY_TO(options_impl->msg_info_headers, env);
- if (reply_to == NULL && options_impl->parent)
- {
- return axis2_options_get_reply_to(options_impl->parent, env);
- }
+ if (reply_to == NULL && options_impl->parent)
+ {
+ return axis2_options_get_reply_to(options_impl->parent, env);
+ }
- return reply_to;
+ return reply_to;
}
axis2_transport_out_desc_t* AXIS2_CALL
axis2_options_get_transport_out(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- if (options_impl->transport_out == NULL && options_impl->parent)
- {
- return axis2_options_get_transport_out(options_impl->parent, env);
- }
+ if (options_impl->transport_out == NULL && options_impl->parent)
+ {
+ return axis2_options_get_transport_out(options_impl->parent, env);
+ }
- return options_impl->transport_out;
+ return options_impl->transport_out;
}
axis2_char_t* AXIS2_CALL
axis2_options_get_sender_transport_protocol(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- if (options_impl->sender_transport_protocol == NULL && options_impl->parent)
- {
- return axis2_options_get_sender_transport_protocol(options_impl->parent, env);
- }
+ if (options_impl->sender_transport_protocol == NULL && options_impl->parent)
+ {
+ return axis2_options_get_sender_transport_protocol(options_impl->parent, env);
+ }
- return options_impl->sender_transport_protocol;
+ return options_impl->sender_transport_protocol;
}
axis2_char_t* AXIS2_CALL
axis2_options_get_soap_version_uri(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- if (options_impl->soap_version_uri == NULL && options_impl->parent)
- {
- return axis2_options_get_soap_version_uri(options_impl->parent, env);
- }
-
- if (options_impl->soap_version_uri)
- {
- return options_impl->soap_version_uri;
- }
- /**TODO:java returns 11- isn't the default is 12?*/
- return AXIS2_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI;
+ if (options_impl->soap_version_uri == NULL && options_impl->parent)
+ {
+ return axis2_options_get_soap_version_uri(options_impl->parent, env);
+ }
+
+ if (options_impl->soap_version_uri)
+ {
+ return options_impl->soap_version_uri;
+ }
+ /**TODO:java returns 11- isn't the default is 12?*/
+ return AXIS2_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI;
}
long AXIS2_CALL
axis2_options_get_timeout_in_milli_seconds(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- if (options_impl->timeout_in_milli_seconds == -1 && options_impl->parent)
- {
- return axis2_options_get_timeout_in_milli_seconds(options_impl->parent, env);
- }
-
- if (options_impl->timeout_in_milli_seconds == -1)
- {
- return AXIS2_DEFAULT_TIMEOUT_MILLISECONDS;
- }
-
- return options_impl->timeout_in_milli_seconds;
+ if (options_impl->timeout_in_milli_seconds == -1 && options_impl->parent)
+ {
+ return axis2_options_get_timeout_in_milli_seconds(options_impl->parent, env);
+ }
+
+ if (options_impl->timeout_in_milli_seconds == -1)
+ {
+ return AXIS2_DEFAULT_TIMEOUT_MILLISECONDS;
+ }
+
+ return options_impl->timeout_in_milli_seconds;
}
axis2_endpoint_ref_t* AXIS2_CALL
axis2_options_get_to(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
- axis2_endpoint_ref_t *to = NULL;
+ axis2_options_impl_t *options_impl = NULL;
+ axis2_endpoint_ref_t *to = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- to = AXIS2_MSG_INFO_HEADERS_GET_TO(options_impl->msg_info_headers, env);
+ to = AXIS2_MSG_INFO_HEADERS_GET_TO(options_impl->msg_info_headers, env);
- if (to == NULL && options_impl->parent)
- {
- return axis2_options_get_to(options_impl->parent, env);
- }
+ if (to == NULL && options_impl->parent)
+ {
+ return axis2_options_get_to(options_impl->parent, env);
+ }
- return to;
+ return to;
}
axis2_bool_t AXIS2_CALL
axis2_options_is_use_seperate_listener(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
/*AXIS2_ENV_CHECK(env, NULL);*/
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- if (options_impl->use_seperate_listener == -1 && options_impl->parent)
- {
- return axis2_options_is_use_seperate_listener(options_impl->parent, env);
- }
-
- if (options_impl->use_seperate_listener == -1)
- {
- return AXIS2_FALSE;
- }
-
- return options_impl->use_seperate_listener;
+ if (options_impl->use_seperate_listener == -1 && options_impl->parent)
+ {
+ return axis2_options_is_use_seperate_listener(options_impl->parent, env);
+ }
+
+ if (options_impl->use_seperate_listener == -1)
+ {
+ return AXIS2_FALSE;
+ }
+
+ return options_impl->use_seperate_listener;
}
struct axis2_options * AXIS2_CALL
axis2_options_get_parent(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
/*AXIS2_ENV_CHECK(env, NULL);*/
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- return options_impl->parent;
+ return options_impl->parent;
}
void AXIS2_CALL
axis2_options_set_parent(struct axis2_options *options,
- const axis2_env_t *env,
- struct axis2_options *parent)
+ const axis2_env_t *env,
+ struct axis2_options *parent)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
/*AXIS2_ENV_CHECK(env, NULL);*/
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- options_impl->parent = parent;
+ options_impl->parent = parent;
}
void AXIS2_CALL
axis2_options_set_action(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *action)
+ const axis2_env_t *env,
+ axis2_char_t *action)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
/*AXIS2_ENV_CHECK(env, NULL);*/
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- AXIS2_MSG_INFO_HEADERS_SET_ACTION(options_impl->msg_info_headers, env, action);
+ AXIS2_MSG_INFO_HEADERS_SET_ACTION(options_impl->msg_info_headers, env, action);
}
void AXIS2_CALL
axis2_options_set_fault_to(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_endpoint_ref_t *fault_to)
+ const axis2_env_t *env,
+ axis2_endpoint_ref_t *fault_to)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- AXIS2_MSG_INFO_HEADERS_SET_FAULT_TO(options_impl->msg_info_headers, env, fault_to);
+ AXIS2_MSG_INFO_HEADERS_SET_FAULT_TO(options_impl->msg_info_headers, env, fault_to);
}
void AXIS2_CALL
axis2_options_set_from(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_endpoint_ref_t *from)
+ const axis2_env_t *env,
+ axis2_endpoint_ref_t *from)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- AXIS2_MSG_INFO_HEADERS_SET_FROM(options_impl->msg_info_headers, env, from);
+ AXIS2_MSG_INFO_HEADERS_SET_FROM(options_impl->msg_info_headers, env, from);
}
void AXIS2_CALL
axis2_options_set_to(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_endpoint_ref_t *to)
+ const axis2_env_t *env,
+ axis2_endpoint_ref_t *to)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- AXIS2_MSG_INFO_HEADERS_SET_TO(options_impl->msg_info_headers, env, to);
+ AXIS2_MSG_INFO_HEADERS_SET_TO(options_impl->msg_info_headers, env, to);
}
void AXIS2_CALL
axis2_options_set_transport_receiver(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_transport_receiver_t *receiver)
+ const axis2_env_t *env,
+ axis2_transport_receiver_t *receiver)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- options_impl->receiver = receiver;
+ options_impl->receiver = receiver;
}
void AXIS2_CALL
axis2_options_set_transport_in(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_transport_in_desc_t *transport_in)
+ const axis2_env_t *env,
+ axis2_transport_in_desc_t *transport_in)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- options_impl->transport_in = transport_in;
+ options_impl->transport_in = transport_in;
}
void AXIS2_CALL
axis2_options_set_transport_in_protocol(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *transport_in_protocol)
+ const axis2_env_t *env,
+ axis2_char_t *transport_in_protocol)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- options_impl->transport_in_protocol = transport_in_protocol;
+ options_impl->transport_in_protocol = transport_in_protocol;
}
void AXIS2_CALL
axis2_options_set_message_id(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *message_id)
+ const axis2_env_t *env,
+ axis2_char_t *message_id)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- AXIS2_MSG_INFO_HEADERS_SET_MESSAGE_ID(options_impl->msg_info_headers, env, message_id);
+ AXIS2_MSG_INFO_HEADERS_SET_MESSAGE_ID(options_impl->msg_info_headers, env, message_id);
}
axis2_status_t AXIS2_CALL
axis2_options_set_properties(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_hash_t *properties)
+ const axis2_env_t *env,
+ axis2_hash_t *properties)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- /*TODO:what happens to hash objects when freeing??*/
- if (options_impl->properties)
- {
- axis2_hash_free(options_impl->properties, env);
- }
- options_impl->properties = properties;
- return AXIS2_SUCCESS;
+ /*TODO:what happens to hash objects when freeing??*/
+ if (options_impl->properties)
+ {
+ axis2_hash_free(options_impl->properties, env);
+ }
+ options_impl->properties = properties;
+ return AXIS2_SUCCESS;
}
void AXIS2_CALL
axis2_options_set_property(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *property_key,
- void *property)
-{
- axis2_options_impl_t *options_impl = NULL;
-
- options_impl = AXIS2_INTF_TO_IMPL(options);
- axis2_hash_set(options_impl->properties, property_key,
- AXIS2_HASH_KEY_STRING, property);
+ const axis2_env_t *env,
+ axis2_char_t *property_key,
+ void *property)
+{
+ axis2_options_impl_t *options_impl = NULL;
+
+ options_impl = AXIS2_INTF_TO_IMPL(options);
+ axis2_hash_set(options_impl->properties, property_key,
+ AXIS2_HASH_KEY_STRING, property);
}
void AXIS2_CALL
axis2_options_set_relates_to(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_relates_to_t *relates_to)
+ const axis2_env_t *env,
+ axis2_relates_to_t *relates_to)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- AXIS2_MSG_INFO_HEADERS_SET_RELATES_TO(options_impl->msg_info_headers, env, relates_to);
+ AXIS2_MSG_INFO_HEADERS_SET_RELATES_TO(options_impl->msg_info_headers, env, relates_to);
}
void AXIS2_CALL
axis2_options_set_reply_to(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_endpoint_ref_t *reply_to)
+ const axis2_env_t *env,
+ axis2_endpoint_ref_t *reply_to)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- AXIS2_MSG_INFO_HEADERS_SET_REPLY_TO(options_impl->msg_info_headers, env, reply_to);
+ AXIS2_MSG_INFO_HEADERS_SET_REPLY_TO(options_impl->msg_info_headers, env, reply_to);
}
void AXIS2_CALL
axis2_options_set_transport_out(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_transport_out_desc_t *transport_out)
+ const axis2_env_t *env,
+ axis2_transport_out_desc_t *transport_out)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- options_impl->transport_out = transport_out;
+ options_impl->transport_out = transport_out;
}
axis2_status_t AXIS2_CALL
axis2_options_set_sender_transport(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *sender_transport,
- axis2_conf_t *conf)
+ const axis2_env_t *env,
+ axis2_char_t *sender_transport,
+ axis2_conf_t *conf)
{
- axis2_options_impl_t *options_impl = NULL;
- axis2_qname_t *tmp = NULL;
+ axis2_options_impl_t *options_impl = NULL;
+ axis2_qname_t *tmp = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- options_impl = AXIS2_INTF_TO_IMPL(options);
-
- tmp = axis2_qname_create(env, sender_transport, NULL, NULL);
- if (!tmp)
- {
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return AXIS2_FAILURE;
- }
-
- options_impl->transport_out = AXIS2_CONF_GET_TRANSPORT_OUT(conf, env, tmp);
- AXIS2_QNAME_FREE(tmp, env);
-
- if (!(options_impl->transport_out))
- {
- /*TODO:error*/
- return AXIS2_FAILURE;
- }
- return AXIS2_SUCCESS;
+ options_impl = AXIS2_INTF_TO_IMPL(options);
+
+ tmp = axis2_qname_create(env, sender_transport, NULL, NULL);
+ if (!tmp)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return AXIS2_FAILURE;
+ }
+
+ options_impl->transport_out = AXIS2_CONF_GET_TRANSPORT_OUT(conf, env, tmp);
+ AXIS2_QNAME_FREE(tmp, env);
+
+ if (!(options_impl->transport_out))
+ {
+ /*TODO:error*/
+ return AXIS2_FAILURE;
+ }
+ return AXIS2_SUCCESS;
}
void AXIS2_CALL
axis2_options_set_soap_version_uri(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *soap_version_uri)
+ const axis2_env_t *env,
+ axis2_char_t *soap_version_uri)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
if (options_impl->soap_version_uri)
{
@@ -936,61 +936,61 @@
void AXIS2_CALL
axis2_options_set_timeout_in_milli_seconds(struct axis2_options *options,
- const axis2_env_t *env,
- long timeout_in_milli_seconds)
+ const axis2_env_t *env,
+ long timeout_in_milli_seconds)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- options_impl->timeout_in_milli_seconds = timeout_in_milli_seconds;
+ options_impl->timeout_in_milli_seconds = timeout_in_milli_seconds;
}
axis2_status_t AXIS2_CALL
axis2_options_set_transport_info(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_char_t *sender_transport,
- axis2_char_t *receiver_transport,
- axis2_bool_t use_seperate_listener)
+ const axis2_env_t *env,
+ axis2_char_t *sender_transport,
+ axis2_char_t *receiver_transport,
+ axis2_bool_t use_seperate_listener)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- options_impl = AXIS2_INTF_TO_IMPL(options);
- /**
- here we check for the legal combination
- */
- if (!use_seperate_listener)
- {
- if (0 != strcmp(sender_transport, receiver_transport))
- {
- /*TODO:error*/
- return AXIS2_FAILURE;
- }
- /*TODO: check the transport is either HTTP or TCP*/
- }
- else
- {
- axis2_options_set_use_seperate_listener(&(options_impl->options),
- env, use_seperate_listener);
- }
- axis2_options_set_transport_in_protocol(&(options_impl->options), env, receiver_transport);
- options_impl->sender_transport_protocol = sender_transport;
+ options_impl = AXIS2_INTF_TO_IMPL(options);
+ /**
+ here we check for the legal combination
+ */
+ if (!use_seperate_listener)
+ {
+ if (0 != strcmp(sender_transport, receiver_transport))
+ {
+ /*TODO:error*/
+ return AXIS2_FAILURE;
+ }
+ /*TODO: check the transport is either HTTP or TCP*/
+ }
+ else
+ {
+ axis2_options_set_use_seperate_listener(&(options_impl->options),
+ env, use_seperate_listener);
+ }
+ axis2_options_set_transport_in_protocol(&(options_impl->options), env, receiver_transport);
+ options_impl->sender_transport_protocol = sender_transport;
- return AXIS2_SUCCESS;
+ return AXIS2_SUCCESS;
}
void AXIS2_CALL
axis2_options_set_use_seperate_listener(struct axis2_options *options,
- const axis2_env_t *env,
- axis2_bool_t use_seperate_listener)
+ const axis2_env_t *env,
+ axis2_bool_t use_seperate_listener)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- options_impl->use_seperate_listener = use_seperate_listener;
+ options_impl->use_seperate_listener = use_seperate_listener;
}
void AXIS2_CALL
@@ -999,12 +999,12 @@
axis2_om_node_t *reference_parameter)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- AXIS2_MSG_INFO_HEADERS_ADD_REF_PARAM(options_impl->msg_info_headers,
- env, reference_parameter);
+ AXIS2_MSG_INFO_HEADERS_ADD_REF_PARAM(options_impl->msg_info_headers,
+ env, reference_parameter);
}
@@ -1013,45 +1013,45 @@
const axis2_env_t *env,
axis2_bool_t manage_session)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- options_impl->manage_session = manage_session;
+ options_impl->manage_session = manage_session;
}
axis2_bool_t AXIS2_CALL
axis2_options_is_manage_session(struct axis2_options *options,
const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FALSE);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- if (options_impl->manage_session == -1 && options_impl->parent)
- {
- return axis2_options_is_manage_session(options_impl->parent, env);
- }
-
- if (options_impl->manage_session == -1)
- {
- return AXIS2_FALSE;
- }
-
- return options_impl->manage_session;
+ if (options_impl->manage_session == -1 && options_impl->parent)
+ {
+ return axis2_options_is_manage_session(options_impl->parent, env);
+ }
+
+ if (options_impl->manage_session == -1)
+ {
+ return AXIS2_FALSE;
+ }
+
+ return options_impl->manage_session;
}
axis2_msg_info_headers_t* AXIS2_CALL
axis2_options_get_msg_info_headers(struct axis2_options *options,
const axis2_env_t *env)
{
- axis2_options_impl_t *options_impl = NULL;
+ axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, NULL);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
- return options_impl->msg_info_headers;
+ return options_impl->msg_info_headers;
}
axis2_status_t AXIS2_CALL
@@ -1070,19 +1070,19 @@
options_impl->options.ops = NULL;
}
- if (options_impl->properties)
- {
- axis2_hash_free(options_impl->properties, env);
- options_impl->properties = NULL;
- }
+ if (options_impl->properties)
+ {
+ axis2_hash_free(options_impl->properties, env);
+ options_impl->properties = NULL;
+ }
- if (options_impl->soap_version_uri)
+ if (options_impl->soap_version_uri)
{
AXIS2_FREE(env->allocator, options_impl->soap_version_uri);
options_impl->soap_version_uri = NULL;
}
- if (options_impl->transport_in_protocol)
+ if (options_impl->transport_in_protocol)
{
AXIS2_FREE(env->allocator, options_impl->transport_in_protocol);
options_impl->transport_in_protocol = NULL;
@@ -1103,21 +1103,21 @@
static void axis2_options_init_data(axis2_options_impl_t *options_impl)
{
options_impl->options.ops = NULL;
- options_impl->parent = NULL;
- options_impl->properties = NULL;
- options_impl->soap_version_uri = NULL;
- /*AXIS2_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI;*/
- options_impl->timeout_in_milli_seconds = -1;
- /*AXIS2_DEFAULT_TIMEOUT_MILLISECONDS;*/
- options_impl->use_seperate_listener = -1;
- /*AXIS2_FALSE;*/
-
- options_impl->receiver = NULL;
- options_impl->transport_in = NULL;
- options_impl->transport_in_protocol = NULL;
- options_impl->transport_out = NULL;
- options_impl->sender_transport_protocol = NULL;
- options_impl->manage_session = -1;
+ options_impl->parent = NULL;
+ options_impl->properties = NULL;
+ options_impl->soap_version_uri = NULL;
+ /*AXIS2_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI;*/
+ options_impl->timeout_in_milli_seconds = -1;
+ /*AXIS2_DEFAULT_TIMEOUT_MILLISECONDS;*/
+ options_impl->use_seperate_listener = -1;
+ /*AXIS2_FALSE;*/
+
+ options_impl->receiver = NULL;
+ options_impl->transport_in = NULL;
+ options_impl->transport_in_protocol = NULL;
+ options_impl->transport_out = NULL;
+ options_impl->sender_transport_protocol = NULL;
+ options_impl->manage_session = -1;
options_impl->soap_version = AXIS2_SOAP12;
options_impl->enable_mtom = AXIS2_FALSE;
}
@@ -1125,57 +1125,57 @@
static void axis2_options_init_ops(struct axis2_options *options)
{
- options->ops->get_action = axis2_options_get_action;
- options->ops->get_fault_to = axis2_options_get_fault_to;
- options->ops->get_from = axis2_options_get_from;
- options->ops->get_transport_receiver = axis2_options_get_transport_receiver;
- options->ops->get_transport_in = axis2_options_get_transport_in;
- options->ops->get_transport_in_protocol = axis2_options_get_transport_in_protocol;
- options->ops->get_message_id = axis2_options_get_message_id;
- options->ops->get_properties = axis2_options_get_properties;
- options->ops->get_property = axis2_options_get_property;
- options->ops->get_relates_to = axis2_options_get_relates_to;
- options->ops->get_reply_to = axis2_options_get_reply_to;
- options->ops->get_transport_out = axis2_options_get_transport_out;
- options->ops->get_sender_transport_protocol = axis2_options_get_sender_transport_protocol;
- options->ops->get_soap_version_uri = axis2_options_get_soap_version_uri;
- options->ops->get_timeout_in_milli_seconds = axis2_options_get_timeout_in_milli_seconds;
- options->ops->get_to = axis2_options_get_to;
- options->ops->is_use_seperate_listener = axis2_options_is_use_seperate_listener;
- options->ops->get_parent = axis2_options_get_parent;
- options->ops->set_parent = axis2_options_set_parent;
- options->ops->set_action = axis2_options_set_action;
- options->ops->set_fault_to = axis2_options_set_fault_to;
- options->ops->set_from = axis2_options_set_from;
- options->ops->set_to = axis2_options_set_to;
- options->ops->set_transport_receiver = axis2_options_set_transport_receiver;
- options->ops->set_transport_in = axis2_options_set_transport_in;
- options->ops->set_transport_in_protocol = axis2_options_set_transport_in_protocol;
- options->ops->set_message_id = axis2_options_set_message_id;
- options->ops->set_properties = axis2_options_set_properties;
- options->ops->set_property = axis2_options_set_property;
- options->ops->set_relates_to = axis2_options_set_relates_to;
- options->ops->set_reply_to = axis2_options_set_reply_to;
- options->ops->set_transport_out = axis2_options_set_transport_out;
- options->ops->set_sender_transport = axis2_options_set_sender_transport;
- options->ops->set_soap_version_uri = axis2_options_set_soap_version_uri;
- options->ops->set_timeout_in_milli_seconds = axis2_options_set_timeout_in_milli_seconds;
- options->ops->set_transport_info = axis2_options_set_transport_info;
- options->ops->set_use_seperate_listener = axis2_options_set_use_seperate_listener;
- options->ops->add_reference_parameter = axis2_options_add_reference_parameter;
- options->ops->set_manage_session = axis2_options_set_manage_session;
- options->ops->is_manage_session = axis2_options_is_manage_session;
+ options->ops->get_action = axis2_options_get_action;
+ options->ops->get_fault_to = axis2_options_get_fault_to;
+ options->ops->get_from = axis2_options_get_from;
+ options->ops->get_transport_receiver = axis2_options_get_transport_receiver;
+ options->ops->get_transport_in = axis2_options_get_transport_in;
+ options->ops->get_transport_in_protocol = axis2_options_get_transport_in_protocol;
+ options->ops->get_message_id = axis2_options_get_message_id;
+ options->ops->get_properties = axis2_options_get_properties;
+ options->ops->get_property = axis2_options_get_property;
+ options->ops->get_relates_to = axis2_options_get_relates_to;
+ options->ops->get_reply_to = axis2_options_get_reply_to;
+ options->ops->get_transport_out = axis2_options_get_transport_out;
+ options->ops->get_sender_transport_protocol = axis2_options_get_sender_transport_protocol;
+ options->ops->get_soap_version_uri = axis2_options_get_soap_version_uri;
+ options->ops->get_timeout_in_milli_seconds = axis2_options_get_timeout_in_milli_seconds;
+ options->ops->get_to = axis2_options_get_to;
+ options->ops->is_use_seperate_listener = axis2_options_is_use_seperate_listener;
+ options->ops->get_parent = axis2_options_get_parent;
+ options->ops->set_parent = axis2_options_set_parent;
+ options->ops->set_action = axis2_options_set_action;
+ options->ops->set_fault_to = axis2_options_set_fault_to;
+ options->ops->set_from = axis2_options_set_from;
+ options->ops->set_to = axis2_options_set_to;
+ options->ops->set_transport_receiver = axis2_options_set_transport_receiver;
+ options->ops->set_transport_in = axis2_options_set_transport_in;
+ options->ops->set_transport_in_protocol = axis2_options_set_transport_in_protocol;
+ options->ops->set_message_id = axis2_options_set_message_id;
+ options->ops->set_properties = axis2_options_set_properties;
+ options->ops->set_property = axis2_options_set_property;
+ options->ops->set_relates_to = axis2_options_set_relates_to;
+ options->ops->set_reply_to = axis2_options_set_reply_to;
+ options->ops->set_transport_out = axis2_options_set_transport_out;
+ options->ops->set_sender_transport = axis2_options_set_sender_transport;
+ options->ops->set_soap_version_uri = axis2_options_set_soap_version_uri;
+ options->ops->set_timeout_in_milli_seconds = axis2_options_set_timeout_in_milli_seconds;
+ options->ops->set_transport_info = axis2_options_set_transport_info;
+ options->ops->set_use_seperate_listener = axis2_options_set_use_seperate_listener;
+ options->ops->add_reference_parameter = axis2_options_add_reference_parameter;
+ options->ops->set_manage_session = axis2_options_set_manage_session;
+ options->ops->is_manage_session = axis2_options_is_manage_session;
options->ops->get_msg_info_headers = axis2_options_get_msg_info_headers;
options->ops->set_soap_version = axis2_options_set_soap_version;
options->ops->get_soap_version = axis2_options_get_soap_version;
options->ops->set_enable_mtom = axis2_options_set_enable_mtom;
options->ops->get_enable_mtom = axis2_options_get_enable_mtom;
- options->ops->free = axis2_options_free;
+ options->ops->free = axis2_options_free;
}
int AXIS2_CALL
axis2_options_get_soap_version(struct axis2_options *options,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
return AXIS2_INTF_TO_IMPL(options)->soap_version;
@@ -1184,13 +1184,13 @@
axis2_status_t AXIS2_CALL
axis2_options_set_soap_version(struct axis2_options *options,
- const axis2_env_t *env,
+ const axis2_env_t *env,
int soap_version)
{
axis2_options_impl_t *options_impl = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- options_impl = AXIS2_INTF_TO_IMPL(options);
+ options_impl = AXIS2_INTF_TO_IMPL(options);
if (soap_version == AXIS2_SOAP11)
{
@@ -1212,8 +1212,8 @@
const axis2_env_t *env,
axis2_bool_t enable_mtom)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- AXIS2_INTF_TO_IMPL(options)->enable_mtom = enable_mtom;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ AXIS2_INTF_TO_IMPL(options)->enable_mtom = enable_mtom;
if (enable_mtom)
{
@@ -1232,6 +1232,6 @@
axis2_options_get_enable_mtom(struct axis2_options *options,
const axis2_env_t *env)
{
- AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- return AXIS2_INTF_TO_IMPL(options)->enable_mtom;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ return AXIS2_INTF_TO_IMPL(options)->enable_mtom;
}
Modified: webservices/axis2/trunk/c/modules/core/clientapi/stub.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/stub.c?rev=411506&r1=411505&r2=411506&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/stub.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/stub.c Sat Jun 3 20:09:08 2006
@@ -25,7 +25,7 @@
axis2_svc_client_t *svc_client;
axis2_options_t *options;
-
+
} axis2_stub_impl_t;
#define AXIS2_INTF_TO_IMPL(stub) \
@@ -106,11 +106,11 @@
stub_impl->stub.ops = NULL;
stub_impl->stub.ops =
- AXIS2_MALLOC (env->allocator, sizeof(axis2_stub_ops_t));
+ AXIS2_MALLOC (env->allocator, sizeof(axis2_stub_ops_t));
if(NULL == stub_impl->stub.ops)
{
axis2_stub_free(&(stub_impl->stub), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
@@ -140,7 +140,7 @@
stub_impl = (axis2_stub_impl_t *) axis2_stub_create(env);
if(!stub_impl)
{
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
/* create service_client*/
@@ -149,7 +149,7 @@
if(!stub_impl->svc_client )
{
axis2_stub_free(&(stub_impl->stub), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
/* create options */
@@ -157,14 +157,14 @@
if (!stub_impl->options )
{
axis2_stub_free(&(stub_impl->stub), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
- return NULL;
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
}
/* Set service client options */
AXIS2_SVC_CLIENT_SET_OPTIONS( stub_impl->svc_client,
- env,
- stub_impl-> options);
+ env,
+ stub_impl-> options);
AXIS2_OPTIONS_SET_TO( stub_impl->options, env, endpoint_ref);
@@ -194,7 +194,7 @@
if(!stub_impl)
{
axis2_stub_free(&(stub_impl->stub), env);
- AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
@@ -285,7 +285,7 @@
stub_impl = AXIS2_INTF_TO_IMPL(stub);
AXIS2_OPTIONS_SET_USE_SEPERATE_LISTENER ( stub_impl-> options, env,
- use_separate_listener );
+ use_separate_listener );
return AXIS2_SUCCESS;
}
@@ -322,7 +322,7 @@
return AXIS2_FAILURE;
}
return AXIS2_OPTIONS_SET_SOAP_VERSION( stub_impl-> options,
- env, soap_version );
+ env, soap_version );
}
axis2_char_t *AXIS2_CALL
@@ -337,7 +337,7 @@
stub_impl = AXIS2_INTF_TO_IMPL(stub);
svc_ctx = AXIS2_SVC_CLIENT_GET_SERVICE_CONTEXT(stub_impl->svc_client,
- env );
+ env );
svc_ctx_id = AXIS2_SVC_CTX_GET_SVC_ID ( svc_ctx, env );
return svc_ctx_id;
}
@@ -352,7 +352,7 @@
axis2_options_t *AXIS2_CALL
axis2_stub_get_options(axis2_stub_t *stub,
- const axis2_env_t *env)
+ const axis2_env_t *env)
{
AXIS2_ENV_CHECK(env, NULL);
return AXIS2_INTF_TO_IMPL(stub)->options;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org