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/12/12 08:30:11 UTC

svn commit: r603498 - in /webservices/sandesha/trunk/c: config/ samples/rm_echo_1_0/ samples/rm_echo_1_1/ samples/rm_echo_single_1_0/ samples/rm_echo_single_1_1/ src/msgprocessors/ src/util/

Author: damitha
Date: Tue Dec 11 23:30:08 2007
New Revision: 603498

URL: http://svn.apache.org/viewvc?rev=603498&view=rev
Log:
Now echo echo_single ping are working with rm1.0 and rm1.1

Modified:
    webservices/sandesha/trunk/c/config/module.xml
    webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c
    webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c
    webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c
    webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c
    webservices/sandesha/trunk/c/src/msgprocessors/ack_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/msg_init.c
    webservices/sandesha/trunk/c/src/util/sandesha2_utils.c

Modified: webservices/sandesha/trunk/c/config/module.xml
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/config/module.xml?rev=603498&r1=603497&r2=603498&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/config/module.xml (original)
+++ webservices/sandesha/trunk/c/config/module.xml Tue Dec 11 23:30:08 2007
@@ -49,6 +49,7 @@
         <actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200608/SequenceAcknowledgement</actionMapping>
         <actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200608/CreateSequenceResponse</actionMapping>
         <actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200608/AckRequested</actionMapping>
+        
      </operation>
  
      <operation name="RMInOutOperation" mep="http://www.w3.org/2004/08/wsdl/in-out">
@@ -64,6 +65,7 @@
         <actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200608/TerminateSequenceResponse</actionMapping>
         <actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200608/CloseSequenceResponse</actionMapping>
         <actionMapping>http://docs.oasis-open.org/ws-rx/wsrm/200608/MakeConnection</actionMapping>
+        
 
     </operation>
 
@@ -76,7 +78,7 @@
     <parameter name="ExponentialBackoff" locked="false">AXIS2_FALSE</parameter>
     <parameter name="RetransmissionInterval" locked="false">4</parameter><!--In seconds-->
     <parameter name="AcknowledgementInterval" locked="false">4</parameter><!--In seconds-->
-    <parameter name="InactivityTimeout" locked="false">10</parameter><!--In seconds-->
+    <parameter name="InactivityTimeout" locked="false">16</parameter><!--In seconds-->
     <parameter name="StorageManager" locked="false">persistent</parameter>
     <parameter name="InvokeInOrder" locked="false">AXIS2_FALSE</parameter>
     <parameter name="MessageTypesToDrop" locked="false">none</parameter>

Modified: webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c?rev=603498&r1=603497&r2=603498&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_1_0/rm_echo.c Tue Dec 11 23:30:08 2007
@@ -192,7 +192,7 @@
     axis2_svc_client_remove_all_headers(svc_client, env);
     property = axutil_property_create_with_args(env, 0, 0, 0, AXIS2_VALUE_TRUE);
     axis2_options_set_property(options, env, "Sandesha2LastMessage", property);
-    payload = build_om_payload_for_echo_svc(env, "echo3", seq_key);
+    payload = build_om_payload_for_echo_svc(env, "echo1", seq_key);
     callback3 = axis2_callback_create(env);
     axis2_callback_set_on_complete(callback3, rm_echo_callback_on_complete);
     axis2_callback_set_on_error(callback3, rm_echo_callback_on_error);
@@ -202,7 +202,7 @@
     AXIS2_FREE(env->allocator, seq_key);
     if (svc_client)
     {
-        /*axis2_svc_client_free(svc_client, env);*/
+        axis2_svc_client_free(svc_client, env);
         svc_client = NULL;
     }
     

Modified: webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c?rev=603498&r1=603497&r2=603498&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_1_1/rm_echo_1_1.c Tue Dec 11 23:30:08 2007
@@ -69,7 +69,6 @@
     axis2_callback_t *callback = NULL;
     axis2_callback_t *callback2 = NULL;
     axis2_callback_t *callback3 = NULL;
-    axis2_callback_t *callback4 = NULL;
     axutil_property_t *property = NULL;
     axis2_listener_manager_t *listener_manager = NULL;
     axis2_char_t *offered_seq_id = NULL;
@@ -193,7 +192,7 @@
             property);
     }
     
-    payload = build_om_payload_for_echo_svc(env, "echo1", "sequence1");
+    payload = build_om_payload_for_echo_svc(env, "echo1", seq_key);
     callback = axis2_callback_create(env);
     axis2_callback_set_on_complete(callback, rm_echo_callback_on_complete);
     axis2_callback_set_on_error(callback, rm_echo_callback_on_error);
@@ -210,18 +209,11 @@
         callback2, payload, listener_manager);
     wait_on_callback(env, callback2);
 
-    payload = build_om_payload_for_echo_svc(env, "echo3", seq_key);
+    AXIS2_SLEEP(SANDESHA2_MAX_COUNT); 
     callback3 = axis2_callback_create(env);
     axis2_callback_set_on_complete(callback3, rm_echo_callback_on_complete);
     axis2_callback_set_on_error(callback3, rm_echo_callback_on_error);
-    sandesha2_client_send_non_blocking(env, svc_client, options, NULL, 
-        callback3, payload, listener_manager);
-    wait_on_callback(env, callback3);
-    AXIS2_SLEEP(SANDESHA2_MAX_COUNT); 
-    callback4 = axis2_callback_create(env);
-    axis2_callback_set_on_complete(callback4, rm_echo_callback_on_complete);
-    axis2_callback_set_on_error(callback4, rm_echo_callback_on_error);
-    sandesha2_client_terminate_seq_with_svc_client(env, svc_client, callback4, 
+    sandesha2_client_terminate_seq_with_svc_client(env, svc_client, callback3, 
         listener_manager);
     AXIS2_SLEEP(2*SANDESHA2_MAX_COUNT); 
     AXIS2_FREE(env->allocator, seq_key);
@@ -307,7 +299,7 @@
             /* We are done with the callback */
             return;
         }
-        AXIS2_SLEEP(1); 
+        AXIS2_SLEEP(1);
     }
     return;
 }

Modified: webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c?rev=603498&r1=603497&r2=603498&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_single_1_0/rm_echo_single.c Tue Dec 11 23:30:08 2007
@@ -252,7 +252,7 @@
     AXIS2_FREE(env->allocator, seq_key);
     if (svc_client)
     {
-        /*axis2_svc_client_free(svc_client, env);*/
+        axis2_svc_client_free(svc_client, env);
         svc_client = NULL;
     }
     

Modified: webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c?rev=603498&r1=603497&r2=603498&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo_single_1_1/rm_echo_single_1_1.c Tue Dec 11 23:30:08 2007
@@ -67,6 +67,7 @@
     axis2_listener_manager_t *listener_manager = NULL;
     axis2_char_t *offered_seq_id = NULL;
     axis2_status_t status = AXIS2_FAILURE;
+    axis2_char_t *seq_key = NULL;
     int c;
    
     /* Set up the environment */
@@ -169,42 +170,27 @@
         axis2_options_set_property(options, env, 
             SANDESHA2_CLIENT_RM_SPEC_VERSION, property);
     }
-    property = axutil_property_create_with_args(env, 3, 0, 0, "sequence1");
+    seq_key = axutil_uuid_gen(env);
+    property = axutil_property_create_with_args(env, 3, 0, 0, seq_key);
     if(property)
     {
         axis2_options_set_property(options, env, SANDESHA2_CLIENT_SEQ_KEY, 
             property);
     }
     
-    payload = build_om_payload_for_echo_svc(env, "echo1", "sequence1");
+    payload = build_om_payload_for_echo_svc(env, "echo1", seq_key);
     status = axis2_svc_client_send_robust(svc_client, env, payload);
     if(status)
         printf("\necho client single channel invoke SUCCESSFUL!\n");
     payload = NULL;
     AXIS2_SLEEP(SANDESHA2_MAX_COUNT); 
 
-    payload = build_om_payload_for_echo_svc(env, "echo2", "sequence1");
-    status = axis2_svc_client_send_robust(svc_client, env, payload);
-    if(status)
-        printf("\necho client single channel invoke SUCCESSFUL!\n");
-    payload = NULL;
-    AXIS2_SLEEP(SANDESHA2_MAX_COUNT); 
-
-    payload = build_om_payload_for_echo_svc(env, "echo3", "sequence1");
-    status = axis2_svc_client_send_robust(svc_client, env, payload);
-    if(status)
-        printf("\necho client single channel invoke SUCCESSFUL!\n");
-    payload = NULL;
-    AXIS2_SLEEP(SANDESHA2_MAX_COUNT);
-
     sandesha2_client_terminate_seq_with_svc_client_and_seq_key(env, svc_client, 
-        "sequence1");
-    /*sandesha2_client_terminate_seq_with_svc_client(env, svc_client, callback4, 
-        listener_manager);*/
-    AXIS2_SLEEP(SANDESHA2_MAX_COUNT);
+        seq_key);
+    AXIS2_SLEEP(2 * SANDESHA2_MAX_COUNT);
     if (svc_client)
     {
-        /*axis2_svc_client_free(svc_client, env);*/
+        axis2_svc_client_free(svc_client, env);
         svc_client = NULL;
     }
     

Modified: webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c?rev=603498&r1=603497&r2=603498&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c Tue Dec 11 23:30:08 2007
@@ -168,7 +168,7 @@
     sandesha2_msg_ctx_t *fault_msg_ctx = NULL;
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Entry:sandesha2_ack_msg_processor_process_in_msg");
+        "[sandesha2]Entry:sandesha2_ack_msg_processor_process_in_msg");
     seq_ack = (sandesha2_seq_ack_t*)sandesha2_msg_ctx_get_msg_part(rm_msg_ctx, 
         env, SANDESHA2_MSG_PART_SEQ_ACKNOWLEDGEMENT);
     if(!seq_ack)
@@ -357,7 +357,7 @@
         sandesha2_msg_ctx_set_paused(rm_msg_ctx, env, AXIS2_TRUE);
     }
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Exit:sandesha2_ack_msg_processor_process_in_msg");
+        "[sandesha2]Exit:sandesha2_ack_msg_processor_process_in_msg");
     return AXIS2_SUCCESS;
 }
     

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=603498&r1=603497&r2=603498&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Tue Dec 11 23:30:08 2007
@@ -225,7 +225,7 @@
    
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Entry:sandesha2_app_msg_processor_process_in_msg");
+        "[sandesha2]Entry:sandesha2_app_msg_processor_process_in_msg");
  
     msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
     if(!msg_ctx)
@@ -297,7 +297,7 @@
 		    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);
+                AXIS2_FAILURE);
             return AXIS2_FAILURE;
         }
         axis2_msg_ctx_set_paused(msg_ctx, env, AXIS2_TRUE);
@@ -387,12 +387,12 @@
         {
             client_seq_key = axutil_property_get_value(property, env);
             AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-                "[sandesha2] Client sequence key:%s found", client_seq_key);
+                "[sandesha2]Client sequence key:%s found", client_seq_key);
         }
         else
         {
             AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-                "[sandesha2] Client sequence key not found");
+                "[sandesha2]Client sequence key not found");
         }
         if(client_seq_key)
         {
@@ -403,7 +403,7 @@
             if(response_envelope)
             {
                 AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-                    "[sandesha2] Client sequence key:%s", client_seq_key);
+                    "[sandesha2]Client sequence key:%s", client_seq_key);
                 sandesha2_storage_mgr_store_response(storage_mgr, env, 
                     client_seq_key, response_envelope, msg_no, soap_version);
             }
@@ -427,7 +427,6 @@
                 highest_msg_id_bean);
         }
     }
-    
     if(msgs_bean)
     {
         msgs_str = sandesha2_seq_property_bean_get_value(msgs_bean, env);
@@ -501,8 +500,8 @@
         wsa_action) || 0 == axutil_strcmp(
         SANDESHA2_SPEC_2005_02_SOAP_ACTION_LAST_MESSAGE, soap_action)) 
     {
-        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Exit: app_msg_processor"\
-            "::process_in_msg, got WSRM 1.0 last message, aborting");
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI,
+            "[sandesha2]Got WSRM 1.0 last message, aborting");
         sandesha2_msg_ctx_set_paused(rm_msg_ctx, env, AXIS2_TRUE);
         return AXIS2_SUCCESS;
     }
@@ -598,7 +597,7 @@
         acks_to_str = sandesha2_seq_property_bean_get_value(acks_to_bean, env); 
     if(!acks_to_str)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] acks_to_str"
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2]acks_to_str"
             " seqeunce property is not set correctly");
         return AXIS2_FAILURE;
     }
@@ -628,7 +627,7 @@
             storage_mgr);
     }
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI,  
-        "[sandesha2] Exit: sandesha2_app_msg_processor_process_in_msg");
+        "[sandesha2]Exit:sandesha2_app_msg_processor_process_in_msg");
 
     return AXIS2_SUCCESS;
     

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=603498&r1=603497&r2=603498&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 Tue Dec 11 23:30:08 2007
@@ -246,20 +246,20 @@
         if(offer_accepted)
         {
             sandesha2_create_seq_bean_t *create_seq_bean = NULL;
-            axis2_char_t *int_seq_id = NULL;
+            axis2_char_t *internal_seq_id = NULL;
             sandesha2_create_seq_mgr_t *create_seq_mgr = NULL;
             sandesha2_seq_property_bean_t *out_seq_bean = NULL;
-            sandesha2_seq_property_bean_t *int_seq_bean = NULL;
+            sandesha2_seq_property_bean_t *internal_seq_bean = NULL;
     
             AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
                 "[sandesha2] Offer Accepted"); 
             create_seq_bean = sandesha2_create_seq_bean_create(env);
             sandesha2_create_seq_bean_set_seq_id(create_seq_bean, env, 
                         offer_seq_id);
-            int_seq_id = sandesha2_utils_get_outgoing_internal_seq_id(env,
+            internal_seq_id = sandesha2_utils_get_outgoing_internal_seq_id(env,
                         new_seq_id);
             sandesha2_create_seq_bean_set_internal_seq_id(create_seq_bean, env,
-                        int_seq_id);
+                        internal_seq_id);
             sandesha2_create_seq_bean_set_create_seq_msg_id(create_seq_bean, env,
                         axutil_uuid_gen(env));
             create_seq_mgr = sandesha2_storage_mgr_get_create_seq_mgr(
@@ -269,21 +269,23 @@
             out_seq_bean = sandesha2_seq_property_bean_create(env);
             sandesha2_seq_property_bean_set_name(out_seq_bean, env, 
                 SANDESHA2_SEQ_PROP_OUT_SEQ_ID);
+            /*sandesha2_seq_property_bean_set_seq_id(out_seq_bean, env, 
+                internal_seq_id);*/
             sandesha2_seq_property_bean_set_seq_id(out_seq_bean, env, 
-                int_seq_id);
+                internal_seq_id);
             sandesha2_seq_property_bean_set_value(out_seq_bean, env, 
                 offer_seq_id);
             sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, 
                 out_seq_bean);
-            int_seq_bean = sandesha2_seq_property_bean_create(env);
-            sandesha2_seq_property_bean_set_name(int_seq_bean, env, 
+            internal_seq_bean = sandesha2_seq_property_bean_create(env);
+            sandesha2_seq_property_bean_set_name(internal_seq_bean, env, 
                 SANDESHA2_SEQ_PROP_INTERNAL_SEQ_ID);
-            sandesha2_seq_property_bean_set_seq_id(int_seq_bean, env, 
+            sandesha2_seq_property_bean_set_seq_id(internal_seq_bean, env, 
                 offer_seq_id);
-            sandesha2_seq_property_bean_set_value(int_seq_bean, env, 
-                int_seq_id);
+            sandesha2_seq_property_bean_set_value(internal_seq_bean, env, 
+                internal_seq_id);
             sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, 
-                int_seq_bean);
+                internal_seq_bean);
         }
         else
         {

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?rev=603498&r1=603497&r2=603498&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c Tue Dec 11 23:30:08 2007
@@ -259,23 +259,25 @@
     axis2_char_t *highest_in_msg_id = NULL;
     long highest_in_msg_num = 0;
     long highest_out_msg_num = 0;
-    axis2_char_t *res_side_int_seq_id = NULL;
-    axis2_bool_t add_res_side_term = AXIS2_FALSE;
+    axis2_char_t *rec_side_int_seq_id = NULL;
+    axis2_bool_t add_rec_side_term = AXIS2_FALSE;
     axis2_char_t *out_seq_id = NULL;
     
+    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2]Entry:sandesha2_"\
+        "terminate_seq_msg_processor_setup_highest_msg_nums");
     AXIS2_PARAM_CHECK(env->error, conf_ctx, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, seq_id, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
     
-    AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2]Entry:sandesha2_"\
-        "terminate_seq_msg_processor_setup_highest_msg_nums");
     seq_prop_mgr = sandesha2_storage_mgr_get_seq_property_mgr(storage_mgr, env);
     
     highest_in_msg_num_str = sandesha2_utils_get_seq_property(env, seq_id,
         SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_NUMBER, storage_mgr);
     highest_in_msg_id = sandesha2_utils_get_seq_property(env, seq_id,
         SANDESHA2_SEQ_PROP_HIGHEST_IN_MSG_ID, storage_mgr);
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]highest_in_msg_num_str:%s",
+        highest_in_msg_num_str);
     if(highest_in_msg_num_str)
     {
         if(!highest_in_msg_id)
@@ -286,10 +288,12 @@
         }
         highest_in_msg_num = atol(highest_in_msg_num_str);
     }
-    res_side_int_seq_id = sandesha2_utils_get_outgoing_internal_seq_id(env,
+    rec_side_int_seq_id = sandesha2_utils_get_outgoing_internal_seq_id(env,
         seq_id);
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]rec_side_int_seq_id:%s", 
+        rec_side_int_seq_id);
     if(0 == highest_in_msg_num)
-        add_res_side_term = AXIS2_FALSE;
+        add_rec_side_term = AXIS2_FALSE;
     else
     {
         /* Mark up the highest inbound message as if it had the last message 
@@ -307,31 +311,38 @@
          * we can terminate right away.
          */
         highest_out_relates_to = sandesha2_utils_get_seq_property(env, 
-            res_side_int_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_OUT_RELATES_TO, 
+            rec_side_int_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_OUT_RELATES_TO, 
             storage_mgr);
         if(highest_out_relates_to && 0 == axutil_strcmp(highest_out_relates_to, 
             in_msg_id))
         {
             axis2_char_t *highest_out_msg_num_str = NULL;
             highest_out_msg_num_str = sandesha2_utils_get_seq_property(env, 
-                res_side_int_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_NUMBER, 
+                rec_side_int_seq_id, SANDESHA2_SEQ_PROP_HIGHEST_OUT_MSG_NUMBER, 
                 storage_mgr);
             highest_out_msg_num = atol(highest_out_msg_num_str);
-            add_res_side_term = AXIS2_TRUE;
+            add_rec_side_term = AXIS2_TRUE;
         }
     }
-    out_seq_id = sandesha2_utils_get_seq_property(env, res_side_int_seq_id,
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]add_rec_side_term:%d",
+        add_rec_side_term);
+    out_seq_id = sandesha2_utils_get_seq_property(env, rec_side_int_seq_id,
         SANDESHA2_SEQ_PROP_OUT_SEQ_ID, storage_mgr);
-    if(add_res_side_term && highest_out_msg_num > 0 &&
-        res_side_int_seq_id && out_seq_id)
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2]out_seq_id:%s",
+        out_seq_id);
+    if(add_rec_side_term && highest_out_msg_num > 0 &&
+        rec_side_int_seq_id && out_seq_id)
     {
         axis2_bool_t all_acked = AXIS2_FALSE;
         all_acked = sandesha2_utils_is_all_msgs_acked_upto(env, 
-            highest_out_msg_num, res_side_int_seq_id, storage_mgr);
+            highest_out_msg_num, rec_side_int_seq_id, storage_mgr);
+        if(!all_acked)
+        all_acked = sandesha2_utils_is_all_msgs_acked_upto(env, 
+            highest_out_msg_num, out_seq_id, storage_mgr);
         if(all_acked)
         {
             sandesha2_terminate_mgr_add_terminate_seq_msg(env, rm_msg_ctx,
-                out_seq_id, res_side_int_seq_id, storage_mgr);
+                out_seq_id, rec_side_int_seq_id, storage_mgr);
         }
     }        
     AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[sandesha2]Exit:sandesha2_"\

Modified: webservices/sandesha/trunk/c/src/util/msg_init.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_init.c?rev=603498&r1=603497&r2=603498&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_init.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_init.c Tue Dec 11 23:30:08 2007
@@ -183,7 +183,7 @@
                 (sandesha2_iom_rm_part_t *) seq_ack);
         rm_ns = sandesha2_iom_rm_element_get_namespace_value(
                 (sandesha2_iom_rm_element_t *) seq_ack, env);
-        /*add_op_if_null(env, msg_ctx);*/
+        add_op_if_null(env, msg_ctx);
     }
     terminate_seq = sandesha2_rm_elements_get_terminate_seq(rm_elements, env);
     if(terminate_seq)
@@ -214,7 +214,6 @@
                 (sandesha2_iom_rm_part_t *) ack_request);
         rm_ns = sandesha2_iom_rm_element_get_namespace_value(
                 (sandesha2_iom_rm_element_t *) ack_request, env);
-        /*add_op_if_null(env, msg_ctx);*/
     }
     close_seq = sandesha2_rm_elements_get_close_seq(rm_elements, env);
     if(close_seq)
@@ -464,11 +463,15 @@
     return AXIS2_TRUE; 
 }
 
+/**
+ * When a response comes back in MakeConnection back channel it may need an
+ * operation added to the message context.
+ */
 static void add_op_if_null(
     const axutil_env_t *env,
     axis2_msg_ctx_t *msg_ctx)
 {
-    /*axis2_op_t *op = NULL;
+    axis2_op_t *op = NULL;
         
     op = axis2_msg_ctx_get_op(msg_ctx, env);
     if(!op)
@@ -485,7 +488,8 @@
             return;
         }
         svc = axis2_msg_ctx_get_svc(msg_ctx, env);
-        op = axis2_svc_get_op_with_qname(svc, env, tmp_qname);
+        if(svc)
+            op = axis2_svc_get_op_with_qname(svc, env, tmp_qname);
         if(!op)
         {
             axis2_status_t status = AXIS2_FAILURE;
@@ -517,7 +521,7 @@
         }
         axutil_qname_free(tmp_qname, env);
         axis2_msg_ctx_set_op(msg_ctx, env, op);
-    }*/
+    }
 }
 
 

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=603498&r1=603497&r2=603498&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/sandesha2_utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/sandesha2_utils.c Tue Dec 11 23:30:08 2007
@@ -1182,6 +1182,8 @@
     client_completed_msgs = sandesha2_utils_get_seq_property(env, 
         internal_seq_id, SANDESHA2_SEQ_PROP_CLIENT_COMPLETED_MESSAGES, 
         storage_mgr);
+    AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
+        "[sandesha2]client_completed_msgs:%s", client_completed_msgs);
     acked_msgs_list = sandesha2_utils_get_array_list_from_string(env, 
         client_completed_msgs);
     for(temp_msg_no = smallest_msg_no; temp_msg_no <= highest_in_msg_no; 



---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org