You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by da...@apache.org on 2007/05/02 08:38:13 UTC
svn commit: r534332 - in /webservices/sandesha/trunk/c: include/
src/msgprocessors/ src/util/
Author: damitha
Date: Tue May 1 23:38:12 2007
New Revision: 534332
URL: http://svn.apache.org/viewvc?view=rev&rev=534332
Log:
Now sandesha2c interop with the sandesha2 java single channel client.
Modified:
webservices/sandesha/trunk/c/include/sandesha2_constants.h
webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
webservices/sandesha/trunk/c/src/util/ack_mgr.c
webservices/sandesha/trunk/c/src/util/fault_mgr.c
webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
webservices/sandesha/trunk/c/src/util/seq_mgr.c
webservices/sandesha/trunk/c/src/util/terminate_mgr.c
Modified: webservices/sandesha/trunk/c/include/sandesha2_constants.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_constants.h?view=diff&rev=534332&r1=534331&r2=534332
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_constants.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_constants.h Tue May 1 23:38:12 2007
@@ -489,6 +489,8 @@
#define SANDESHA2_MODULE_CLASS_LOADER "Sandesha2ModuleClassLoader"
#define SANDESHA2_WSRM_ANON_URI_PREFIX "http://docs.oasis-open.org/ws-rx/wsrm/200608/anonymous"
+
+ #define AXIS2_WS_RM_ANONYMOUS_URL "http://docs.oasis-open.org/ws-rx/wsmc/200702/anonymous?id="
/**
* Message context values
Modified: webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c?view=diff&rev=534332&r1=534331&r2=534332
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_req_msg_processor.c Tue May 1 23:38:12 2007
@@ -158,7 +158,6 @@
axiom_soap_envelope_t *envelope = NULL;
axis2_char_t *wsa_version = NULL;
axis2_char_t *addr_ns_val = NULL;
- axis2_char_t *anon_uri = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
@@ -245,8 +244,7 @@
addr_ns_val = sandesha2_utils_get_seq_property(env, seq_id,
SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, storage_mgr);
- anon_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addr_ns_val);
- if(0 == axutil_strcmp(anon_uri, acks_to_str))
+ if(sandesha2_utils_is_anon_uri(env, acks_to_str))
{
axis2_engine_t *engine = NULL;
axis2_op_ctx_t *op_ctx = NULL;
Modified: webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c?view=diff&rev=534332&r1=534331&r2=534332
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Tue May 1 23:38:12 2007
@@ -231,6 +231,8 @@
msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
if(!msg_ctx)
{
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2]Message context is not set");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_MSG_CTX,
AXIS2_FAILURE);
return AXIS2_FAILURE;
@@ -244,6 +246,8 @@
}
if(processed && 0 == axutil_strcmp(processed, "true"))
{
+ AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ "[sandesha2]Message already processed. So returning here");
return AXIS2_SUCCESS;
}
@@ -259,11 +263,14 @@
{
axis2_engine_t *engine = axis2_engine_create(env, conf_ctx);
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "sandesha2_app_msg_processor_process_in_msg send Fault");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2]sandesha2_app_msg_processor_process_in_msg send Fault");
if(!axis2_engine_send_fault(engine, env,
sandesha2_msg_ctx_get_msg_ctx(fault_ctx, env)))
{
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2]An error occured while sending the fault");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SENDING_FAULT,
AXIS2_FAILURE);
return AXIS2_FAILURE;
@@ -283,9 +290,13 @@
if(fault_ctx)
{
axis2_engine_t *engine = axis2_engine_create(env, conf_ctx);
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2]sandesha2_app_msg_processor_process_in_msg send Fault");
if(!axis2_engine_send_fault(engine, env,
sandesha2_msg_ctx_get_msg_ctx(fault_ctx, env)))
{
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2]An error occured while sending the fault");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SENDING_FAULT,
AXIS2_FAILURE);
return AXIS2_FAILURE;
@@ -300,9 +311,13 @@
if(fault_ctx)
{
axis2_engine_t *engine = axis2_engine_create(env, conf_ctx);
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2]sandesha2_app_msg_processor_process_in_msg send Fault");
if(!axis2_engine_send_fault(engine, env,
sandesha2_msg_ctx_get_msg_ctx(fault_ctx, env)))
{
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2]An error occured while sending the fault");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SENDING_FAULT,
AXIS2_FAILURE);
return AXIS2_FAILURE;
@@ -319,6 +334,8 @@
seq, env), env);
if(0 == msg_no)
{
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2]Invalid message number");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_INVALID_MSG_NUM,
AXIS2_FAILURE);
return AXIS2_FAILURE;
@@ -437,6 +454,8 @@
str_seq_id);
if(!next_msg_bean)
{
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2]Sequence does not exist");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SEQ_NOT_EXIST,
AXIS2_FAILURE);
return AXIS2_FAILURE;
@@ -511,7 +530,11 @@
{
axis2_status_t status = AXIS2_ERROR_GET_STATUS_CODE(env->error);
if(AXIS2_SUCCESS != status)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2]Incoming sequence list empty");
return status;
+ }
}
/* Adding current seq to the incoming seq List */
if(!sandesha2_utils_array_list_contains(env,
@@ -546,7 +569,8 @@
rm_version = sandesha2_utils_get_rm_version(env, str_seq_id, storage_mgr);
if(!rm_version)
{
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Unable to find RM spec version");
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
+ "[sandesha2]Unable to find RM spec version");
return AXIS2_FAILURE;
}
reply_to_epr = axis2_msg_ctx_get_reply_to(msg_ctx, env);
@@ -579,8 +603,10 @@
reply_to_addr = sandesha2_seq_property_bean_get_value(to_bean, env);
}
if(back_channel_free)
+ {
sandesha2_app_msg_processor_send_ack_if_reqd(env, rm_msg_ctx, msgs_str,
storage_mgr);
+ }
else if(sandesha2_utils_is_single_channel(env, rm_version, acks_to_str))
{
/* Do nothing */
@@ -1075,7 +1101,7 @@
env), env);
if(!conf_ctx)
{
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
"[sandesha2] cont_ctx is NULL");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CONF_CTX_NULL, AXIS2_FAILURE);
return AXIS2_FAILURE;
@@ -1095,7 +1121,7 @@
sent = axis2_engine_send(engine, env, msg_ctx);
if(!sent)
{
- AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
"[Sandesha2]Engine Send failed");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SENDING_ACK, AXIS2_FAILURE);
return AXIS2_FAILURE;
Modified: webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c?view=diff&rev=534332&r1=534331&r2=534332
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c Tue May 1 23:38:12 2007
@@ -333,11 +333,15 @@
anon_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addr_ns_uri);
op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
- if(0 == axutil_strcmp(anon_uri, axis2_endpoint_ref_get_address(to_epr,
- env)))
+ if(sandesha2_utils_is_anon_uri(env, axis2_endpoint_ref_get_address(to_epr,
+ env)))
+ {
axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_TRUE);
+ }
else
+ {
axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_FALSE);
+ }
sandesha2_msg_ctx_set_paused(rm_msg_ctx, env, AXIS2_TRUE);
AXIS2_LOG_INFO(env->log,
Modified: webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c?view=diff&rev=534332&r1=534331&r2=534332
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c Tue May 1 23:38:12 2007
@@ -354,7 +354,6 @@
axutil_property_t *property = NULL;
axis2_engine_t *engine = NULL;
axis2_char_t *addr_ns_uri = NULL;
- axis2_char_t *anon_uri = NULL;
axis2_endpoint_ref_t *to_epr = NULL;
axis2_op_ctx_t *op_ctx = NULL;
axis2_transport_out_desc_t *orig_trans_out = NULL;
@@ -429,11 +428,11 @@
addr_ns_uri = sandesha2_utils_get_seq_property(env, seq_id,
SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, storage_mgr);
- anon_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addr_ns_uri);
to_epr = axis2_msg_ctx_get_to(msg_ctx, env);
op_ctx = axis2_msg_ctx_get_op_ctx(msg_ctx, env);
- if(0 == axutil_strcmp(anon_uri, axis2_endpoint_ref_get_address(to_epr, env)))
+ if(sandesha2_utils_is_anon_uri(env, axis2_endpoint_ref_get_address(to_epr,
+ env)))
{
axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_TRUE);
}
Modified: webservices/sandesha/trunk/c/src/util/ack_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/ack_mgr.c?view=diff&rev=534332&r1=534331&r2=534332
==============================================================================
--- webservices/sandesha/trunk/c/src/util/ack_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/ack_mgr.c Tue May 1 23:38:12 2007
@@ -52,7 +52,6 @@
axis2_op_t *ref_op = NULL;
axis2_msg_ctx_t *ack_msg_ctx = NULL;
axis2_char_t *addr_ns_uri = NULL;
- axis2_char_t *anon_uri = NULL;
axutil_property_t *property = NULL;
sandesha2_msg_ctx_t *ack_rm_msg = NULL;
axiom_soap_envelope_t *soap_env = NULL;
@@ -75,6 +74,7 @@
acks_to_str = (axis2_char_t*)axis2_endpoint_ref_get_address(acks_to, env);
if(!acks_to_str)
{
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Invalid epr");
AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_INVALID_EPR, AXIS2_FAILURE);
return NULL;
}
@@ -136,8 +136,7 @@
axis2_msg_ctx_set_property(ack_msg_ctx, env, AXIS2_WSA_VERSION, property);
}
}
- anon_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addr_ns_uri);
- if(0 == axutil_strcmp(acks_to_str, anon_uri))
+ if(sandesha2_utils_is_anon_uri(env, acks_to_str))
{
axis2_op_ctx_t *op_ctx = NULL;
Modified: webservices/sandesha/trunk/c/src/util/fault_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/fault_mgr.c?view=diff&rev=534332&r1=534331&r2=534332
==============================================================================
--- webservices/sandesha/trunk/c/src/util/fault_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/fault_mgr.c Tue May 1 23:38:12 2007
@@ -401,7 +401,6 @@
axis2_op_t *op = NULL;
axis2_op_ctx_t *op_ctx = NULL;
axis2_char_t *acks_to_str = NULL;
- axis2_char_t *anon_uri = NULL;
axutil_string_t *grp_ctx_id = NULL;
int soap_ver = -1;
sandesha2_msg_ctx_t *fault_rm_msg = NULL;
@@ -464,8 +463,7 @@
acks_to_str = sandesha2_seq_property_bean_get_value(acks_to_bean,
env);
}
- anon_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addr_ns_uri);
- if(NULL!= acks_to_str && 0 != axutil_strcmp(acks_to_str, anon_uri))
+ if(!sandesha2_utils_is_anon_uri(env, acks_to_str))
axis2_msg_ctx_set_to(fault_msg_ctx, env, axis2_endpoint_ref_create(env,
acks_to_str));
soap_ver = sandesha2_utils_get_soap_version(env,
Modified: webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/sandesha2_utils.c?view=diff&rev=534332&r1=534331&r2=534332
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Tue May 1 23:38:12 2007
@@ -46,7 +46,6 @@
#include <stdlib.h>
#include <sys/timeb.h>
-#define AXIS2_WS_RM_ANONYMOUS_URL "http://docs.oasis-open.org/ws-rx/wsmc/200702/anonymous?id="
static axutil_array_list_t *
get_sorted_msg_no_list(
Modified: webservices/sandesha/trunk/c/src/util/seq_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/seq_mgr.c?view=diff&rev=534332&r1=534331&r2=534332
==============================================================================
--- webservices/sandesha/trunk/c/src/util/seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/seq_mgr.c Tue May 1 23:38:12 2007
@@ -447,8 +447,8 @@
acks_to_bean = sandesha2_seq_property_bean_create_with_data(env,
int_seq_id, SANDESHA2_SEQ_PROP_ACKS_TO_EPR,
acks_to_str);
- if(!axis2_msg_ctx_get_server_side(first_app_msg, env) &&
- 0 != axutil_strcmp(acks_to_str, anon_uri))
+ 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.
Modified: webservices/sandesha/trunk/c/src/util/terminate_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/terminate_mgr.c?view=diff&rev=534332&r1=534331&r2=534332
==============================================================================
--- webservices/sandesha/trunk/c/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/terminate_mgr.c Tue May 1 23:38:12 2007
@@ -506,7 +506,6 @@
{
sandesha2_seq_property_bean_t *acks_to_bean = NULL;
axis2_char_t *addr_ns_uri = NULL;
- axis2_char_t *anon_uri = NULL;
axis2_bool_t stop_listner_for_async = AXIS2_FALSE;
acks_to_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env,
@@ -514,12 +513,11 @@
addr_ns_uri = sandesha2_utils_get_seq_property(env, seq_id,
SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE,
storage_mgr);
- anon_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addr_ns_uri);
if(acks_to_bean)
{
axis2_char_t *acks_to = NULL;
acks_to = sandesha2_seq_property_bean_get_value(acks_to_bean, env);
- if(acks_to && 0 == axutil_strcmp(acks_to, anon_uri))
+ if(sandesha2_utils_is_anon_uri(env, acks_to))
stop_listner_for_async = AXIS2_TRUE;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org