Author: damitha
Date: Fri May 30 03:11:43 2008
New Revision: 661628
URL: http://svn.apache.org/viewvc?rev=661628&view=rev
Log:
cleaning the code base
Modified:
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_constants.h
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c
Modified:
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_constants.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_constants.h?rev=661628&r1=661627&r2=661628&view=diff
==============================================================================
---
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_constants.h
(original)
+++
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_constants.h
Fri May 30 03:11:43 2008
@@ -283,8 +283,6 @@
#define SANDESHA2_SEQ_PROP_HIGHEST_OUT_RELATES_TO "HighestOutRelatesTo"
- #define SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_KEY "HighestOutMsgKey"
-
#define SANDESHA2_SEQ_PROP_LAST_OUT_MESSAGE_NO "LastOutMessage"
#define SANDESHA2_SEQ_PROP_LAST_IN_MESSAGE_NO "LastInMessage"
Modified:
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h?rev=661628&r1=661627&r2=661628&view=diff
==============================================================================
---
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h
(original)
+++
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/include/sandesha2_seq_mgr.h
Fri May 30 03:11:43 2008
@@ -76,8 +76,7 @@
axis2_msg_ctx_t *first_app_msg,
axis2_char_t *int_seq_id,
axis2_char_t *spec_version,
- struct sandesha2_seq_property_mgr *seq_prop_mgr,
- const axis2_bool_t persistent);
+ struct sandesha2_seq_property_mgr *seq_prop_mgr);
/** @} */
#ifdef __cplusplus
Modified:
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c?rev=661628&r1=661627&r2=661628&view=diff
==============================================================================
---
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c
(original)
+++
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/msgprocessors/app_msg_processor.c
Fri May 30 03:11:43 2008
@@ -1322,16 +1322,11 @@
if(last_msg)
{
- sandesha2_seq_property_bean_t *res_highest_msg_key_bean = NULL;
sandesha2_seq_property_bean_t *res_last_msg_key_bean = NULL;
- res_highest_msg_key_bean =
sandesha2_seq_property_bean_create_with_data(env,
- rms_internal_sequence_id,
SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_KEY, storage_key);
-
res_last_msg_key_bean =
sandesha2_seq_property_bean_create_with_data(env,
rms_internal_sequence_id,
SANDESHA2_SEQ_PROP_LAST_OUT_MESSAGE_NO, msg_number_str);
- sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
res_highest_msg_key_bean);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
res_last_msg_key_bean);
}
@@ -1418,15 +1413,7 @@
send_create_seq = AXIS2_TRUE;
}
- if(is_svr_side)
- {
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Starting the server sequence with rms internal sequence
id %s",
- rms_internal_sequence_id);
- sandesha2_seq_mgr_setup_new_rms_sequence(env, msg_ctx,
rms_internal_sequence_id, spec_ver,
- seq_prop_mgr, AXIS2_TRUE);
- }
- else
+ if(!is_svr_side)
{
axutil_property_t *property = NULL;
axis2_ctx_t *ctx = axis2_conf_ctx_get_base(conf_ctx, env);
@@ -1435,21 +1422,23 @@
property = axis2_ctx_get_property(ctx, env, SANDESHA2_MSG_CTX_MAP);
if(!property)
{
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "[sandesha2]msg_ctx_map not found in the conf_ctx");
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "[sandesha2]msg_ctx_map not found in the conf_ctx");
+
msg_ctx_map = axutil_hash_make(env);
- property = axutil_property_create_with_args(env,
AXIS2_SCOPE_APPLICATION,
- AXIS2_TRUE, axutil_hash_free_void_arg, msg_ctx_map);
- axis2_ctx_set_property(ctx, env, SANDESHA2_MSG_CTX_MAP,
- property);
- }
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "Starting the client sequence with rms internal sequence
id %s",
- rms_internal_sequence_id);
+ property = axutil_property_create_with_args(env,
AXIS2_SCOPE_APPLICATION, AXIS2_TRUE,
+ axutil_hash_free_void_arg, msg_ctx_map);
- sandesha2_seq_mgr_setup_new_rms_sequence(env, msg_ctx,
rms_internal_sequence_id,
- spec_ver, seq_prop_mgr, AXIS2_FALSE);
+ axis2_ctx_set_property(ctx, env, SANDESHA2_MSG_CTX_MAP,
property);
+ }
}
+
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "Starting the rms sequence with rms rms internal sequence id
%s",
+ rms_internal_sequence_id);
+
+ sandesha2_seq_mgr_setup_new_rms_sequence(env, msg_ctx,
rms_internal_sequence_id, spec_ver,
+ seq_prop_mgr);
}
if(send_create_seq)
@@ -1526,6 +1515,7 @@
acks_to, storage_mgr, seq_prop_mgr, create_seq_mgr,
sender_mgr);
}
}
+
soap_env = sandesha2_msg_ctx_get_soap_envelope(rm_msg_ctx, env);
if(!soap_env)
{
@@ -1533,6 +1523,7 @@
AXIOM_SOAP12);
sandesha2_msg_ctx_set_soap_envelope(rm_msg_ctx, env, soap_env);
}
+
if(!sandesha2_msg_ctx_get_msg_id(rm_msg_ctx, env))
{
axis2_char_t *msg_id = NULL;
@@ -1551,8 +1542,11 @@
ctx = axis2_op_ctx_get_base(op_ctx, env);
property = axis2_ctx_get_property(ctx, env, SANDESHA2_ACK_WRITTEN);
if(property)
+ {
written = axutil_property_get_value(property, env);
- if(!written || 0 != axutil_strcmp(written, AXIS2_VALUE_TRUE))
+ }
+
+ if(!written || axutil_strcmp(written, AXIS2_VALUE_TRUE))
{
if (op_ctx)
{
@@ -1563,6 +1557,7 @@
op_name = axutil_qname_get_localpart(axis2_op_get_qname(
axis2_op_ctx_get_op(
axis2_msg_ctx_get_op_ctx(msg_ctx, env), env), env), env);
+
if (to_epr)
{
to_addr = (axis2_char_t*)axis2_endpoint_ref_get_address(to_epr, env);
Modified:
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c?rev=661628&r1=661627&r2=661628&view=diff
==============================================================================
---
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c
(original)
+++
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-30may2008/src/util/seq_mgr.c
Fri May 30 03:11:43 2008
@@ -46,12 +46,6 @@
axis2_char_t *property_key,
sandesha2_seq_property_mgr_t *seq_prop_mgr);
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-sandesha2_seq_mgr_update_client_side_listener_if_needed(
- const axutil_env_t *env,
- axis2_msg_ctx_t *msg_ctx,
- axis2_char_t *addr_anon_uri);
-
AXIS2_EXTERN axis2_char_t *AXIS2_CALL
sandesha2_seq_mgr_setup_new_rmd_sequence(
const axutil_env_t *env,
@@ -84,34 +78,33 @@
axis2_char_t *reply_to_addr = NULL;
axis2_char_t *rms_internal_sequence_id = NULL;
- AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
- "[sandesha2]Entry:sandesha2_seq_mgr_setup_new_rmd_sequence");
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
"[sandesha2]Entry:sandesha2_seq_mgr_setup_new_rmd_sequence");
rmd_sequence_id = axutil_uuid_gen(env);
to = sandesha2_msg_ctx_get_to(create_seq_msg, env);
if(!to)
{
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "To is NULL");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "To is NULL");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_TO_IS_NULL, AXIS2_FAILURE);
return NULL;
}
+
reply_to = sandesha2_msg_ctx_get_reply_to(create_seq_msg, env);
create_seq = sandesha2_msg_ctx_get_create_seq(create_seq_msg, env);
if(!create_seq)
{
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Create Sequence Part is
NULL");
- AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CREATE_SEQ_PART_IS_NULL,
- AXIS2_FAILURE);
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Create Sequence
Part is NULL");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CREATE_SEQ_PART_IS_NULL,
AXIS2_FAILURE);
return NULL;
}
+
temp_acks_to = sandesha2_create_seq_get_acks_to(create_seq, env);
temp_address = sandesha2_acks_to_get_address(temp_acks_to, env);
acks_to = sandesha2_address_get_epr(temp_address, env);
if(!acks_to)
{
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Acks To is NULL");
- AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_ACKS_TO_IS_NULL,
- AXIS2_FAILURE);
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Acks To is NULL");
+ AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_ACKS_TO_IS_NULL,
AXIS2_FAILURE);
return NULL;
}
msg_ctx = sandesha2_msg_ctx_get_msg_ctx(create_seq_msg, env);
@@ -125,8 +118,8 @@
SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE,
addressing_ns_value);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, addressing_ns_bean);
- anonymous_uri = sandesha2_spec_specific_consts_get_anon_uri(env,
- addressing_ns_value);
+ anonymous_uri = sandesha2_spec_specific_consts_get_anon_uri(env,
addressing_ns_value);
+
/* If no replyTo value. Send responses as sync. */
if(reply_to)
{
@@ -139,12 +132,15 @@
to_bean = sandesha2_seq_property_bean_create_with_data(env,
rmd_sequence_id,
SANDESHA2_SEQ_PROP_TO_EPR, anonymous_uri);
}
+
address = (axis2_char_t*)axis2_endpoint_ref_get_address(to, env);
reply_to_bean = sandesha2_seq_property_bean_create_with_data(env,
rmd_sequence_id,
SANDESHA2_SEQ_PROP_REPLY_TO_EPR, address);
+
address = (axis2_char_t*)axis2_endpoint_ref_get_address(acks_to, env);
acks_to_bean = sandesha2_seq_property_bean_create_with_data(env,
rmd_sequence_id,
SANDESHA2_SEQ_PROP_ACKS_TO_EPR, address);
+
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, received_msg_bean);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, reply_to_bean);
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, acks_to_bean);
@@ -152,6 +148,7 @@
{
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, to_bean);
}
+
next_msg_bean = sandesha2_next_msg_bean_create_with_data(env,
rmd_sequence_id, 1);
/* 1 will be the next */
rms_internal_sequence_id =
sandesha2_utils_get_rms_internal_sequence_id(env, rmd_sequence_id);
@@ -159,13 +156,15 @@
sandesha2_next_msg_mgr_insert(next_msg_mgr, env, next_msg_bean);
/* Message to invoke. This will apply for only in-order invocations */
- /*if(!axis2_msg_ctx_get_server_side(msg_ctx, env) ||
- !sandesha2_utils_is_anon_uri(env, reply_to_addr))
- sandesha2_utils_start_sender_for_seq(env, conf_ctx,
rmd_sequence_id);*/
+ /*if(!axis2_msg_ctx_get_server_side(msg_ctx, env) ||
!sandesha2_utils_is_anon_uri(env,
+ * reply_to_addr))
+ * {
+ * sandesha2_utils_start_sender_for_seq(env, conf_ctx, rmd_sequence_id);
+ *}*/
+
/* Setting the RM Spec version for this sequence */
- create_seq_msg_action = sandesha2_msg_ctx_get_wsa_action(create_seq_msg,
- env);
- if(create_seq_msg_action == NULL)
+ create_seq_msg_action = sandesha2_msg_ctx_get_wsa_action(create_seq_msg,
env);
+ if(!create_seq_msg_action)
{
AXIS2_ERROR_SET(env->error,
SANDESHA2_ERROR_CREATE_SEQ_MSG_DOES_NOT_HAVE_WSA_ACTION_VALUE,
AXIS2_FAILURE);
@@ -222,15 +221,16 @@
last_activated_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr,
env,
property_key, SANDESHA2_SEQ_PROP_LAST_ACTIVATED_TIME);
+
if(!last_activated_bean)
{
added = AXIS2_TRUE;
last_activated_bean = sandesha2_seq_property_bean_create(env);
- sandesha2_seq_property_bean_set_seq_id(last_activated_bean, env,
- property_key);
+ sandesha2_seq_property_bean_set_seq_id(last_activated_bean, env,
property_key);
sandesha2_seq_property_bean_set_name(last_activated_bean, env,
SANDESHA2_SEQ_PROP_LAST_ACTIVATED_TIME);
}
+
current_time = sandesha2_utils_get_current_time_in_millis(env);
sprintf(current_time_str, "%ld", current_time);
sandesha2_seq_property_bean_set_value(last_activated_bean, env,
current_time_str);
@@ -263,42 +263,40 @@
long current_time = -1;
long timeout_interval = -1;
- AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
- "[sandesha2]Entry:sandesha2_seq_mgr_has_seq_timedout");
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2]
Entry:sandesha2_seq_mgr_has_seq_timedout");
+
AXIS2_PARAM_CHECK(env->error, property_key, AXIS2_FALSE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FALSE);
AXIS2_PARAM_CHECK(env->error, seq_prop_mgr, AXIS2_FALSE);
/* Avoid retrieving property bean from operation until it is availbale */
- /*property_bean = sandesha2_utils_get_property_bean_from_op(env,
- axis2_msg_ctx_get_op(sandesha2_msg_ctx_get_msg_ctx(
- rm_msg_ctx, env), env));*/
- property_bean = sandesha2_utils_get_property_bean(env,
- axis2_conf_ctx_get_conf(conf_ctx, env));
- timeout_interval = sandesha2_property_bean_get_inactive_timeout_interval(
- property_bean, env);
+ /*property_bean = sandesha2_utils_get_property_bean_from_op(env,
axis2_msg_ctx_get_op(
+ * sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env), env));*/
+
+ property_bean = sandesha2_utils_get_property_bean(env,
axis2_conf_ctx_get_conf(conf_ctx, env));
+ timeout_interval =
sandesha2_property_bean_get_inactive_timeout_interval(property_bean, env);
if(timeout_interval <= 0)
+ {
return AXIS2_FALSE;
- last_activated_time = sandesha2_seq_mgr_get_last_activated_time(env,
- property_key, seq_prop_mgr);
+ }
+
+ last_activated_time = sandesha2_seq_mgr_get_last_activated_time(env,
property_key, seq_prop_mgr);
current_time = sandesha2_utils_get_current_time_in_millis(env);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]timeout_interval:%ld",
- timeout_interval);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
"[sandesha2]last_activated_time:%ld",
- last_activated_time);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]current_time:%ld",
- current_time);
- if(last_activated_time > 0 && ((last_activated_time + timeout_interval) <
- current_time))
+
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]timeout_interval:%ld",
timeout_interval);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
"[sandesha2]last_activated_time:%ld", last_activated_time);
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]current_time:%ld",
current_time);
+
+ if(last_activated_time > 0 && ((last_activated_time + timeout_interval) <
current_time))
{
seq_timedout = AXIS2_TRUE;
}
- AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
- "[sandesha2]Exit:sandesha2_seq_mgr_has_seq_timedout");
+
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2]
Exit:sandesha2_seq_mgr_has_seq_timedout");
+
return seq_timedout;
}
-
long AXIS2_CALL
sandesha2_seq_mgr_get_last_activated_time(
const axutil_env_t *env,
@@ -331,8 +329,7 @@
axis2_msg_ctx_t *first_app_msg,
axis2_char_t *rms_internal_sequence_id,
axis2_char_t *spec_version,
- sandesha2_seq_property_mgr_t *seq_prop_mgr,
- const axis2_bool_t persistent)
+ sandesha2_seq_property_mgr_t *seq_prop_mgr)
{
axis2_conf_ctx_t *conf_ctx = NULL;
axis2_char_t *addr_ns_val = NULL;
@@ -344,17 +341,14 @@
sandesha2_seq_property_bean_t *to_bean = NULL;
sandesha2_seq_property_bean_t *reply_to_bean = NULL;
sandesha2_seq_property_bean_t *acks_to_bean = NULL;
- axis2_ctx_t *ctx = NULL;
- AXIS2_TRANSPORT_ENUMS transport_in_protocol = -1;
- axis2_listener_manager_t *listener_manager = NULL;
sandesha2_seq_property_bean_t *msgs_bean = NULL;
axis2_char_t *transport_to = NULL;
sandesha2_seq_property_bean_t *spec_version_bean = NULL;
axis2_endpoint_ref_t *reply_to_epr = NULL;
- axis2_char_t *addr = NULL;
- axis2_endpoint_ref_t *epr = NULL;
+ axis2_bool_t is_svr_side = AXIS2_FALSE;
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
"Entry:sandesha2_seq_mgr_setup_new_rms_sequence");
+
AXIS2_PARAM_CHECK(env->error, first_app_msg, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rms_internal_sequence_id, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, spec_version, AXIS2_FAILURE);
@@ -364,118 +358,110 @@
property = axis2_msg_ctx_get_property(first_app_msg, env,
AXIS2_WSA_VERSION);
if(property)
+ {
addr_ns_val = axutil_property_get_value(property, env);
+ }
+
if(!addr_ns_val)
{
axis2_op_ctx_t *op_ctx = NULL;
axis2_msg_ctx_t *req_msg_ctx = NULL;
+
op_ctx = axis2_msg_ctx_get_op_ctx(first_app_msg, env);
- req_msg_ctx = axis2_op_ctx_get_msg_ctx(op_ctx, env,
- AXIS2_WSDL_MESSAGE_LABEL_IN);
+ req_msg_ctx = axis2_op_ctx_get_msg_ctx(op_ctx, env,
AXIS2_WSDL_MESSAGE_LABEL_IN);
+
if(req_msg_ctx)
{
- property = axis2_msg_ctx_get_property(req_msg_ctx, env,
- AXIS2_WSA_VERSION);
+ property = axis2_msg_ctx_get_property(req_msg_ctx, env,
AXIS2_WSA_VERSION);
if(property)
+ {
addr_ns_val = axutil_property_get_value(property, env);
+ }
}
}
+
if(!addr_ns_val)
+ {
addr_ns_val = AXIS2_WSA_NAMESPACE;
+ }
- addr_ns_bean = sandesha2_seq_property_bean_create_with_data(env,
- rms_internal_sequence_id,
- SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE,
- addr_ns_val);
+ addr_ns_bean = sandesha2_seq_property_bean_create_with_data(env,
rms_internal_sequence_id,
+ SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, addr_ns_val);
+
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, addr_ns_bean);
anon_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addr_ns_val);
to_epr = axis2_msg_ctx_get_to(first_app_msg, env);
- property = axis2_msg_ctx_get_property(first_app_msg, env,
- SANDESHA2_CLIENT_ACKS_TO);
+ property = axis2_msg_ctx_get_property(first_app_msg, env,
SANDESHA2_CLIENT_ACKS_TO);
if(property)
- acks_to_str = axutil_property_get_value(property, env);
- /*if(!to_epr)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] WSA To is NULL");
- return AXIS2_FAILURE;
- }*/
-
+ acks_to_str = axutil_property_get_value(property, env);
+ }
+
if (to_epr)
{
- to_bean = sandesha2_seq_property_bean_create_with_data(env,
rms_internal_sequence_id,
- SANDESHA2_SEQ_PROP_TO_EPR,
- (axis2_char_t*)axis2_endpoint_ref_get_address(to_epr,
+ to_bean = sandesha2_seq_property_bean_create_with_data(env,
rms_internal_sequence_id,
+ SANDESHA2_SEQ_PROP_TO_EPR,
(axis2_char_t*)axis2_endpoint_ref_get_address(to_epr,
env));
}
- if(axis2_msg_ctx_get_server_side(first_app_msg, env))
+ is_svr_side = axis2_msg_ctx_get_server_side(first_app_msg, env);
+
+ if(is_svr_side)
{
axis2_op_ctx_t *op_ctx = NULL;
axis2_msg_ctx_t *req_msg_ctx = NULL;
op_ctx = axis2_msg_ctx_get_op_ctx(first_app_msg, env);
- req_msg_ctx = axis2_op_ctx_get_msg_ctx(op_ctx, env,
- AXIS2_WSDL_MESSAGE_LABEL_IN);
+
+ req_msg_ctx = axis2_op_ctx_get_msg_ctx(op_ctx, env,
AXIS2_WSDL_MESSAGE_LABEL_IN);
if(!req_msg_ctx)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cannot find"
- " the request message from the operation context");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2] Cannot find the request message from the
operation context");
return AXIS2_FAILURE;
}
+
reply_to_epr = axis2_msg_ctx_get_to(req_msg_ctx, env);
- /*ctx = axis2_op_ctx_get_base(op_ctx, env);
- property = axis2_ctx_get_property(ctx, env,
- SANDESHA2_SEQ_PROP_REPLY_TO_EPR, AXIS2_FALSE);
- reply_to_epr = axutil_property_get_value(property, env);*/
+
if(reply_to_epr)
- reply_to_bean = sandesha2_seq_property_bean_create_with_data(env,
- rms_internal_sequence_id,
SANDESHA2_SEQ_PROP_REPLY_TO_EPR,
- (axis2_char_t*)axis2_endpoint_ref_get_address(
+ {
+ reply_to_bean = sandesha2_seq_property_bean_create_with_data(env,
rms_internal_sequence_id,
+ SANDESHA2_SEQ_PROP_REPLY_TO_EPR,
(axis2_char_t*)axis2_endpoint_ref_get_address(
reply_to_epr, env));
+ }
else
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cannot get"\
- " request message from the operation context");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2] Cannot get request message from the operation
context");
+
return AXIS2_FAILURE;
}
}
else
{
reply_to_epr = axis2_msg_ctx_get_reply_to(first_app_msg, env);
- /* Set replyTo bean */
+
if(reply_to_epr)
{
- reply_to_bean = sandesha2_seq_property_bean_create_with_data(env,
- rms_internal_sequence_id,
SANDESHA2_SEQ_PROP_REPLY_TO_EPR,
- (axis2_char_t*)axis2_endpoint_ref_get_address(
+ reply_to_bean = sandesha2_seq_property_bean_create_with_data(env,
rms_internal_sequence_id,
+ SANDESHA2_SEQ_PROP_REPLY_TO_EPR,
(axis2_char_t*)axis2_endpoint_ref_get_address(
reply_to_epr, env));
}
}
+
if(!acks_to_str)
+ {
acks_to_str = anon_uri;
-
- acks_to_bean = sandesha2_seq_property_bean_create_with_data(env,
- rms_internal_sequence_id,
SANDESHA2_SEQ_PROP_ACKS_TO_EPR,
- acks_to_str);
- if(!axis2_msg_ctx_get_server_side(first_app_msg, env) &&
- !sandesha2_utils_is_anon_uri(env, acks_to_str))
- {
- ctx = axis2_msg_ctx_get_base(first_app_msg, env);
- /* TODO currently axis2 doesn't expose the *options* at msg ctx level.
- * Once it is finished change to get from there
- */
- /*options = AXIS2_CTX_GET_OPTIONS(ctx, env);
- transport_in_protocol =
axis2_options_get_transport_in_protocol(options, env);*/
- transport_in_protocol = AXIS2_TRANSPORT_ENUM_HTTP;
-
- axis2_listener_manager_make_sure_started(listener_manager, env,
- transport_in_protocol, conf_ctx);
}
+ acks_to_bean = sandesha2_seq_property_bean_create_with_data(env,
rms_internal_sequence_id,
+ SANDESHA2_SEQ_PROP_ACKS_TO_EPR, acks_to_str);
+
msgs_bean = sandesha2_seq_property_bean_create_with_data(env,
rms_internal_sequence_id,
SANDESHA2_SEQ_PROP_CLIENT_COMPLETED_MESSAGES, "");
+
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, msgs_bean);
if (to_bean)
{
@@ -483,74 +469,34 @@
}
if(acks_to_bean)
+ {
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, acks_to_bean);
+ }
+
if(reply_to_bean)
+ {
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, reply_to_bean);
-
+ }
transport_to = axis2_msg_ctx_get_transport_url(first_app_msg, env);
if(transport_to)
{
sandesha2_seq_property_bean_t *transport_to_bean = NULL;
- transport_to_bean = sandesha2_seq_property_bean_create_with_data(env,
- rms_internal_sequence_id,
SANDESHA2_SEQ_PROP_TRANSPORT_TO,
- transport_to);
+ transport_to_bean = sandesha2_seq_property_bean_create_with_data(env,
rms_internal_sequence_id,
+ SANDESHA2_SEQ_PROP_TRANSPORT_TO, transport_to);
+
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
transport_to_bean);
}
- spec_version_bean = sandesha2_seq_property_bean_create_with_data(env,
- rms_internal_sequence_id,
SANDESHA2_SEQ_PROP_RM_SPEC_VERSION,
- spec_version);
+
+ spec_version_bean = sandesha2_seq_property_bean_create_with_data(env,
rms_internal_sequence_id,
+ SANDESHA2_SEQ_PROP_RM_SPEC_VERSION, spec_version);
+
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, spec_version_bean);
sandesha2_seq_mgr_update_last_activated_time(env,
rms_internal_sequence_id, seq_prop_mgr);
- epr = axis2_msg_ctx_get_to(first_app_msg, env);
- if(epr)
- addr = (axis2_char_t*)axis2_endpoint_ref_get_address(
- epr, env);
- if(!axis2_msg_ctx_get_server_side(first_app_msg, env) ||
- !sandesha2_utils_is_anon_uri(env, addr))
- {
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
- "[sandesha2] Calling function
sandesha2_utils_start_sender_for_seq()");
- /*sandesha2_utils_start_sender_for_seq(env, conf_ctx,
rms_internal_sequence_id, persistent);*/
- }
- sandesha2_seq_mgr_update_client_side_listener_if_needed(env, first_app_msg,
- anon_uri);
- AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
- "Exit:sandesha2_seq_mgr_setup_new_rms_sequence");
- return AXIS2_SUCCESS;
-}
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-sandesha2_seq_mgr_update_client_side_listener_if_needed(
- const axutil_env_t *env,
- axis2_msg_ctx_t *msg_ctx,
- axis2_char_t *addr_anon_uri)
-{
- axis2_char_t *transport_in_protocol = NULL;
- axis2_ctx_t *ctx = NULL;
- /*axis2_options_t *options = NULL;*/
- axis2_char_t *acks_to = NULL;
- axutil_property_t *property = NULL;
-
- AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
- AXIS2_PARAM_CHECK(env->error, addr_anon_uri, AXIS2_FAILURE);
-
- if(!axis2_msg_ctx_get_server_side(msg_ctx, env))
- return AXIS2_SUCCESS;
-
- ctx = axis2_msg_ctx_get_base(msg_ctx, env);
- /* TODO currently axis2 doesn't expose the *options* at msg ctx level.
- * Once it is finished change to get from there
- */
- /* options = AXIS2_CTX_GET_OPTIONS(ctx, env);
- transport_in_protocol = axis2_options_get_transport_in_protocol(options,
env);*/
- transport_in_protocol = AXIS2_TRANSPORT_HTTP;
- property = axis2_msg_ctx_get_property(msg_ctx, env,
SANDESHA2_CLIENT_ACKS_TO);
- if(property)
- acks_to = axutil_property_get_value(property, env);
-
-
+ AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
"Exit:sandesha2_seq_mgr_setup_new_rms_sequence");
+
return AXIS2_SUCCESS;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]