Author: damitha
Date: Thu Sep 18 01:35:39 2008
New Revision: 696598
URL: http://svn.apache.org/viewvc?rev=696598&view=rev
Log:
Working on ref param support for acks_to element
Modified:
webservices/sandesha/trunk/c/include/sandesha2_utils.h
webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c
webservices/sandesha/trunk/c/src/util/ack_mgr.c
webservices/sandesha/trunk/c/src/util/sandesha2_utils.c
Modified: webservices/sandesha/trunk/c/include/sandesha2_utils.h
URL:
http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_utils.h?rev=696598&r1=696597&r2=696598&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_utils.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_utils.h Thu Sep 18 01:35:39
2008
@@ -301,12 +301,12 @@
axis2_svc_t * svc);
axis2_char_t *AXIS2_CALL
-sandesha2_util_storage_mgr_get_node_string_from_node_array(
+sandesha2_util_get_string_from_node_list(
const axutil_env_t *env,
axutil_array_list_t *node_list);
axutil_array_list_t *AXIS2_CALL
-sandesha2_permanent_storage_mgr_get_node_list_from_string(
+sandesha2_util_get_node_list_from_string(
const axutil_env_t *env,
axis2_char_t *node_list_str);
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?rev=696598&r1=696597&r2=696598&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c
(original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c
Thu Sep 18 01:35:39 2008
@@ -456,9 +456,14 @@
ref_param_list = sandesha2_acks_to_get_ref_param_list(acks_to, env);
if(ref_param_list)
{
- ref_param_list_str =
sandesha2_util_storage_mgr_get_node_string_from_node_array(env, ref_param_list);
+ ref_param_list_str = sandesha2_util_get_string_from_node_list(env,
ref_param_list);
acks_to_ref_param_bean =
sandesha2_seq_property_bean_create_with_data(env, rmd_sequence_id,
SANDESHA2_SEQ_PROP_ACKS_TO_REF_PARAM, ref_param_list_str);
+
+ if(ref_param_list_str)
+ {
+ AXIS2_FREE(env->allocator, ref_param_list_str);
+ }
if(acks_to_ref_param_bean)
{
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?rev=696598&r1=696597&r2=696598&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/ack_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/ack_mgr.c Thu Sep 18 01:35:39 2008
@@ -116,21 +116,24 @@
int i = 0, size = 0;
ref_param_str = sandesha2_seq_property_bean_get_value(ref_param_bean,
env);
- ref_param_list =
sandesha2_permanent_storage_mgr_get_node_list_from_string(env,
- ref_param_str);
+ ref_param_list = sandesha2_util_get_node_list_from_string(env,
ref_param_str);
if(ref_param_list)
{
size = axutil_array_list_size(ref_param_list, env);
- }
- for(i = 0; i < size; i++)
- {
- axiom_node_t *node = NULL;
+ for(i = 0; i < size; i++)
+ {
+ axiom_node_t *node = NULL;
- node = axutil_array_list_get(ref_param_list, env, i);
- axis2_endpoint_ref_add_ref_param(to, env, node);
+ node = axutil_array_list_get(ref_param_list, env, i);
+ axis2_endpoint_ref_add_ref_param(to, env, node);
+ }
+
+ axutil_array_list_free(ref_param_list, env);
}
+
+ sandesha2_seq_property_bean_free(ref_param_bean, env);
}
axis2_msg_ctx_set_to(ack_msg_ctx, env, to);
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?rev=696598&r1=696597&r2=696598&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Thu Sep 18 01:35:39
2008
@@ -1448,7 +1448,7 @@
}
axis2_char_t *AXIS2_CALL
-sandesha2_util_storage_mgr_get_node_string_from_node_array(
+sandesha2_util_get_string_from_node_list(
const axutil_env_t *env,
axutil_array_list_t *node_list)
{
@@ -1466,8 +1466,20 @@
node_str = axiom_node_to_string(node, env);
temp_str = node_list_str;
- node_list_str = axutil_strcat(env, temp_str,
+
+ if(i == 0)
+ {
+ node_list_str = axutil_strcat(env, node_str,
SANDESHA2_PERSISTANT_PROPERTY_SEPERATOR, NULL);
+ }
+ else if(i == (--size))
+ {
+ node_list_str = axutil_strcat(env, temp_str, node_str, NULL);
+ }
+ else
+ {
+ node_list_str = axutil_strcat(env, temp_str,
node_str, SANDESHA2_PERSISTANT_PROPERTY_SEPERATOR, NULL);
+ }
if(node_str)
{
@@ -1477,6 +1489,7 @@
if(temp_str && axutil_strlen(temp_str) > 0)
{
AXIS2_FREE(env->allocator, temp_str);
+ temp_str = NULL;
}
}
@@ -1484,7 +1497,7 @@
}
axutil_array_list_t *AXIS2_CALL
-sandesha2_permanent_storage_mgr_get_node_list_from_string(
+sandesha2_util_get_node_list_from_string(
const axutil_env_t *env,
axis2_char_t *node_list_str)
{
@@ -1496,26 +1509,29 @@
if(value_list)
{
size = axutil_array_list_size(value_list, env);
- }
-
- for(i = 0; i < size; i++)
- {
- axiom_stax_builder_t *om_builder = NULL;
- axiom_xml_reader_t *reader = NULL;
- axiom_document_t *document = NULL;
- axis2_char_t *value = NULL;
- axiom_node_t *node = NULL;
-
- value = axutil_array_list_get(value_list, env, i);
- reader = axiom_xml_reader_create_for_memory(env, value,
axutil_strlen(value), NULL,
- AXIS2_XML_PARSER_TYPE_BUFFER);
-
- om_builder = axiom_stax_builder_create(env, reader);
- document = axiom_stax_builder_get_document(om_builder, env);
- axiom_document_build_all(document, env);
- node = axiom_document_get_root_element(document, env);
- axutil_array_list_add(node_list, env, node);
- axiom_stax_builder_free_self(om_builder, env);
+ for(i = 0; i < size; i++)
+ {
+ axiom_stax_builder_t *om_builder = NULL;
+ axiom_xml_reader_t *reader = NULL;
+ axiom_document_t *document = NULL;
+ axis2_char_t *value = NULL;
+ axiom_node_t *node = NULL;
+
+ value = axutil_array_list_get(value_list, env, i);
+ reader = axiom_xml_reader_create_for_memory(env, value,
axutil_strlen(value), NULL,
+ AXIS2_XML_PARSER_TYPE_BUFFER);
+
+ om_builder = axiom_stax_builder_create(env, reader);
+ document = axiom_stax_builder_get_document(om_builder, env);
+ axiom_document_build_all(document, env);
+ node = axiom_document_get_root_element(document, env);
+ axutil_array_list_add(node_list, env, node);
+
+ /* Since we have built the document we can free the builder */
+ axiom_stax_builder_free_self(om_builder, env);
+ }
+
+ axutil_array_list_free(value_list, env);
}
return node_list;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]