Author: damitha
Date: Sun Nov 1 18:32:59 2009
New Revision: 831719
URL: http://svn.apache.org/viewvc?rev=831719&view=rev
Log:
Get spec version from policy
Modified:
webservices/sandesha/trunk/c/src/core/msg_validator.c
webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c
webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
webservices/sandesha/trunk/c/src/util/seq_mgr.c
Modified: webservices/sandesha/trunk/c/src/core/msg_validator.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/core/msg_validator.c?rev=831719&r1=831718&r2=831719&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/core/msg_validator.c (original)
+++ webservices/sandesha/trunk/c/src/core/msg_validator.c Sun Nov 1 18:32:59
2009
@@ -40,25 +40,23 @@
seq_id = sandesha2_utils_get_seq_id_from_rm_msg_ctx(env, rm_msg_ctx);
if(NULL != seq_id)
{
- axis2_char_t *rm_ver_seq = NULL;
+ axis2_char_t *rm_version = NULL;
axis2_char_t *addr_ns_seq = NULL;
axis2_char_t *rm_ns_msg = NULL;
axis2_char_t *addr_ns_msg = NULL;
axis2_char_t *rm_ns_seq = NULL;
- rm_ver_seq = sandesha2_utils_get_seq_property(env, seq_id,
- SANDESHA2_SEQ_PROP_RM_SPEC_VERSION, seq_prop_mgr);
+ rm_version = sandesha2_utils_get_rm_version(env,
sandesha2_msg_ctx_get_msg_ctx(
+ rm_msg_ctx, env));
addr_ns_seq = sandesha2_utils_get_seq_property(env, seq_id,
SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, seq_prop_mgr);
rm_ns_msg = sandesha2_msg_ctx_get_rm_ns_val(rm_msg_ctx, env);
addr_ns_msg = sandesha2_msg_ctx_get_addr_ns_val(rm_msg_ctx, env);
- if(rm_ver_seq)
+ if(rm_version)
{
rm_ns_seq = sandesha2_spec_specific_consts_get_rm_ns_val(env,
- rm_ver_seq);
- if(rm_ver_seq)
- AXIS2_FREE(env->allocator, rm_ver_seq);
+ rm_version);
}
if(NULL != rm_ns_seq && 0 != axutil_strcmp(rm_ns_seq, rm_ns_msg))
Modified: webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c?rev=831719&r1=831718&r2=831719&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c Sun Nov
1 18:32:59 2009
@@ -171,7 +171,6 @@
if(temp_prop)
{
axis2_char_t *spec_version = NULL;
- axutil_property_t *property = NULL;
axis2_endpoint_ref_t *reply_to = axis2_msg_ctx_get_reply_to(msg_ctx,
env);
if(reply_to)
@@ -179,11 +178,7 @@
axis2_char_t *address = axis2_endpoint_ref_get_address(reply_to,
env);
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "dam_reply_to_address:%s",
address);
}
- property = axis2_msg_ctx_get_property(msg_ctx, env,
SANDESHA2_CLIENT_RM_SPEC_VERSION);
- if(property)
- {
- spec_version = axutil_property_get_value(property, env);
- }
+ spec_version = sandesha2_utils_get_rm_version(env, msg_ctx);
if(!axutil_strcmp(SANDESHA2_SPEC_VERSION_1_1, spec_version))
{
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?rev=831719&r1=831718&r2=831719&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c
(original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Sun Nov
1 18:32:59 2009
@@ -1085,7 +1085,6 @@
sandesha2_seq_property_bean_t *res_highest_msg_bean = NULL;
axis2_char_t msg_number_str[32];
axis2_bool_t send_create_seq = AXIS2_FALSE;
- sandesha2_seq_property_bean_t *spec_ver_bean = NULL;
axis2_char_t *spec_ver = NULL;
axiom_soap_envelope_t *soap_env = NULL;
axis2_endpoint_ref_t *to_epr = NULL;
@@ -1456,52 +1455,16 @@
sandesha2_seq_property_bean_free(rmd_to_bean, env);
}
- spec_ver_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env,
rmd_sequence_id,
- SANDESHA2_SEQ_PROP_RM_SPEC_VERSION);
-
if(req_rm_msg_ctx)
{
sandesha2_msg_ctx_free(req_rm_msg_ctx, env);
}
- if(!spec_ver_bean)
- {
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "[sandesha2] Invalid spec version");
- AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_INVALID_SPEC_VERSION,
- AXIS2_FAILURE);
- if(internal_sequence_id)
- {
- AXIS2_FREE(env->allocator, internal_sequence_id);
- }
- if(seq_prop_mgr)
- {
- sandesha2_seq_property_mgr_free(seq_prop_mgr, env);
- }
- if(create_seq_mgr)
- {
- sandesha2_create_seq_mgr_free(create_seq_mgr, env);
- }
- if(sender_mgr)
- {
- sandesha2_sender_mgr_free(sender_mgr, env);
- }
- if(storage_mgr)
- {
- sandesha2_storage_mgr_free(storage_mgr, env);
- }
- return AXIS2_FAILURE;
- }
-
- spec_ver = sandesha2_seq_property_bean_get_value(spec_ver_bean, env);
+ spec_ver = sandesha2_utils_get_rm_version(env, msg_ctx);
}
else
{
- property = axis2_msg_ctx_get_property(msg_ctx, env,
SANDESHA2_CLIENT_RM_SPEC_VERSION);
- if(property)
- {
- spec_ver = axutil_property_get_value(property, env);
- }
+ spec_ver = sandesha2_utils_get_rm_version(env, msg_ctx);
}
if(!spec_ver)
@@ -1534,11 +1497,6 @@
sandesha2_seq_property_bean_free(rms_sequence_bean, env);
}
- if(spec_ver_bean)
- {
- sandesha2_seq_property_bean_free(spec_ver_bean, env);
- }
-
if(send_create_seq)
{
sandesha2_seq_property_bean_t *create_seq_added = NULL;
@@ -4187,15 +4145,6 @@
axis2_char_t *spec_ver = NULL;
spec_ver = sandesha2_utils_get_rm_version(env, msg_ctx);
- if(!spec_ver)
- {
- axutil_property_t *spec_ver_prop = NULL;
-
- spec_ver_prop = axis2_msg_ctx_get_property(msg_ctx, env,
- SANDESHA2_CLIENT_RM_SPEC_VERSION);
-
- spec_ver = axutil_strdup(env,
axutil_property_get_value(spec_ver_prop, env));
- }
if(sandesha2_spec_specific_consts_is_last_msg_indicator_reqd(env,
spec_ver))
{
last_msg = AXIS2_TRUE;
Modified:
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c?rev=831719&r1=831718&r2=831719&view=diff
==============================================================================
---
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
(original)
+++
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_res_msg_processor.c
Sun Nov 1 18:32:59 2009
@@ -327,7 +327,6 @@
sandesha2_seq_property_bean_t *acks_to_bean = NULL;
sandesha2_next_msg_bean_t *next_bean = NULL;
sandesha2_next_msg_mgr_t *next_msg_mgr = NULL;
- sandesha2_seq_property_bean_t *spec_ver_bean = NULL;
sandesha2_seq_property_bean_t *rcvd_msg_bean = NULL;
sandesha2_seq_property_bean_t *msgs_bean = NULL;
sandesha2_seq_property_bean_t *addr_ver_bean = NULL;
@@ -568,15 +567,6 @@
sandesha2_next_msg_mgr_insert(next_msg_mgr, env, next_bean);
sandesha2_next_msg_bean_free(next_bean, env);
- spec_ver_bean = sandesha2_seq_property_bean_create_with_data(env,
incoming_sequence_id,
- SANDESHA2_SEQ_PROP_RM_SPEC_VERSION, rm_spec_ver);
-
- if(spec_ver_bean)
- {
- sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
spec_ver_bean);
- sandesha2_seq_property_bean_free(spec_ver_bean, env);
- }
-
rcvd_msg_bean = sandesha2_seq_property_bean_create_with_data(env,
incoming_sequence_id,
SANDESHA2_SEQ_PROP_SERVER_COMPLETED_MESSAGES, "");
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?rev=831719&r1=831718&r2=831719&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/seq_mgr.c Sun Nov 1 18:32:59 2009
@@ -67,7 +67,6 @@
sandesha2_seq_property_bean_t *reply_to_bean = NULL;
sandesha2_seq_property_bean_t *acks_to_bean = NULL;
sandesha2_seq_property_bean_t *to_bean = NULL;
- sandesha2_seq_property_bean_t *spec_version_bean = NULL;
sandesha2_next_msg_bean_t *next_msg_bean = NULL;
axis2_char_t *addressing_ns_value = NULL;
axis2_char_t *anonymous_uri = NULL;
@@ -220,17 +219,6 @@
return NULL;
}
- spec_version_bean = sandesha2_seq_property_bean_create(env);
- if(spec_version_bean)
- {
- sandesha2_seq_property_bean_set_seq_id(spec_version_bean, env,
rmd_sequence_id);
- sandesha2_seq_property_bean_set_name(spec_version_bean, env,
SANDESHA2_SEQ_PROP_RM_SPEC_VERSION);
- sandesha2_seq_property_bean_set_value(spec_version_bean, env,
spec_version);
-
- sandesha2_seq_property_mgr_insert(seq_prop_mgr,env, spec_version_bean);
- sandesha2_seq_property_bean_free(spec_version_bean, env);
- }
-
if(spec_version)
{
AXIS2_FREE(env->allocator, spec_version);
@@ -377,7 +365,6 @@
sandesha2_seq_property_bean_t *acks_to_bean = 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_bool_t is_svr_side = AXIS2_FALSE;
@@ -538,14 +525,6 @@
sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
transport_to_bean);
}
- spec_version_bean = sandesha2_seq_property_bean_create_with_data(env,
internal_sequence_id,
- SANDESHA2_SEQ_PROP_RM_SPEC_VERSION, spec_version);
- if(spec_version_bean)
- {
- sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
spec_version_bean);
- sandesha2_seq_property_bean_free(spec_version_bean, env);
- }
-
sandesha2_seq_mgr_update_last_activated_time(env, internal_sequence_id,
seq_prop_mgr);
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,
"Exit:sandesha2_seq_mgr_setup_new_outgoing_sequence");
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]