You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by da...@apache.org on 2006/08/29 13:36:40 UTC

svn commit: r438053 - in /webservices/sandesha/trunk/c: include/ src/core/ src/handlers/ src/msgprocessors/ src/storage/beans/ src/storage/inmemory/ src/util/ src/workers/ src/wsrm/

Author: damitha
Date: Tue Aug 29 04:36:39 2006
New Revision: 438053

URL: http://svn.apache.org/viewvc?rev=438053&view=rev
Log:
In process of RM enabled echo work

Modified:
    webservices/sandesha/trunk/c/include/sandesha2_msg_ctx.h
    webservices/sandesha/trunk/c/src/core/msg_ctx.c
    webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
    webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.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_msg_processor.c
    webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c
    webservices/sandesha/trunk/c/src/storage/inmemory/sender_mgr.c
    webservices/sandesha/trunk/c/src/storage/inmemory/seq_property_mgr.c
    webservices/sandesha/trunk/c/src/util/ack_mgr.c
    webservices/sandesha/trunk/c/src/util/seq_mgr.c
    webservices/sandesha/trunk/c/src/util/utils.c
    webservices/sandesha/trunk/c/src/workers/sender.c
    webservices/sandesha/trunk/c/src/wsrm/rm_elements.c
    webservices/sandesha/trunk/c/src/wsrm/sequence.c

Modified: webservices/sandesha/trunk/c/include/sandesha2_msg_ctx.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_msg_ctx.h?rev=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_msg_ctx.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_msg_ctx.h Tue Aug 29 04:36:39 2006
@@ -302,6 +302,9 @@
     
 #define SANDESHA2_MSG_CTX_GET_REPLY_TO(rm_msg_ctx, env) \
     ((rm_msg_ctx)->ops->get_reply_to(rm_msg_ctx, env))
+    
+#define SANDESHA2_MSG_CTX_SET_REPLY_TO(rm_msg_ctx, env, reply_to) \
+    ((rm_msg_ctx)->ops->set_reply_to(rm_msg_ctx, env, reply_to))
 
 #define SANDESHA2_MSG_CTX_SET_FAULT_TO(rm_msg_ctx, env, fault_to) \
     ((rm_msg_ctx)->ops->set_fault_to(rm_msg_ctx, env, fault_to))

Modified: webservices/sandesha/trunk/c/src/core/msg_ctx.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/core/msg_ctx.c?rev=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/core/msg_ctx.c (original)
+++ webservices/sandesha/trunk/c/src/core/msg_ctx.c Tue Aug 29 04:36:39 2006
@@ -331,8 +331,9 @@
 }
     
 axis2_status_t AXIS2_CALL
-sandesha2_msg_ctx_add_soap_envelope(sandesha2_msg_ctx_t *rm_msg_ctx,
-                        const axis2_env_t *env)
+sandesha2_msg_ctx_add_soap_envelope(
+    sandesha2_msg_ctx_t *rm_msg_ctx,
+    const axis2_env_t *env)
 {
     int soap_ver = AXIOM_SOAP11;
     sandesha2_msg_ctx_impl_t *msg_ctx_impl = NULL;
@@ -405,8 +406,10 @@
 }
             
 sandesha2_iom_rm_part_t *AXIS2_CALL
-sandesha2_msg_ctx_get_msg_part(sandesha2_msg_ctx_t *rm_msg_ctx,
-                        const axis2_env_t *env, int part_id)
+sandesha2_msg_ctx_get_msg_part(
+    sandesha2_msg_ctx_t *rm_msg_ctx,
+    const axis2_env_t *env, 
+    int part_id)
 {
     axis2_char_t part_id_str[32];
     sandesha2_msg_ctx_impl_t *msg_ctx_impl = NULL;
@@ -545,8 +548,10 @@
 }
 
 axis2_status_t AXIS2_CALL
-sandesha2_msg_ctx_set_msg_id(sandesha2_msg_ctx_t *rm_msg_ctx, 
-                        const axis2_env_t *env, axis2_char_t *msg_id)
+sandesha2_msg_ctx_set_msg_id(
+    sandesha2_msg_ctx_t *rm_msg_ctx, 
+    const axis2_env_t *env, 
+    axis2_char_t *msg_id)
 {
     sandesha2_msg_ctx_impl_t *msg_ctx_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -620,8 +625,11 @@
 }
 
 axis2_status_t AXIS2_CALL
-sandesha2_msg_ctx_set_property(sandesha2_msg_ctx_t *rm_msg_ctx,
-                        const axis2_env_t *env, axis2_char_t *key, void *val)
+sandesha2_msg_ctx_set_property(
+    sandesha2_msg_ctx_t *rm_msg_ctx,
+    const axis2_env_t *env, 
+    axis2_char_t *key, 
+    void *val)
 {
     sandesha2_msg_ctx_impl_t *msg_ctx_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);

Modified: webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c?rev=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_global_in_handler.c Tue Aug 29 04:36:39 2006
@@ -208,20 +208,24 @@
         }
     }
     is_rm_global_msg = sandesha2_utils_is_rm_global_msg(env, msg_ctx);
+    printf("is_rm_global_msg:%d\n", is_rm_global_msg);
     if(AXIS2_FALSE == is_rm_global_msg)
+    {
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Not a global RM Message");
         return AXIS2_SUCCESS;
+    }
     rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
-    printf("came\n");
     dropped = sandesha2_global_in_handler_drop_if_duplicate(handler, env, 
                         rm_msg_ctx, storage_mgr);
     if(AXIS2_TRUE == dropped)
     {
         sandesha2_global_in_handler_process_dropped_msg(handler, env, rm_msg_ctx,
                         storage_mgr);
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "msg_ctx dropped");
         return AXIS2_SUCCESS;
     }
     /*Process if global processing possible. - Currently none*/
-    if(AXIS2_TRUE == within_transaction)
+    if(AXIS2_TRUE != within_transaction)
     {
         SANDESHA2_TRANSACTION_COMMIT(transaction, env);
         property = axis2_property_create(env);

Modified: webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c?rev=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c Tue Aug 29 04:36:39 2006
@@ -25,6 +25,7 @@
 #include <sandesha2_transaction.h>
 #include <sandesha2_msg_processor.h>
 #include <sandesha2_msg_init.h>
+#include <sandesha2_seq.h>
 #include <sandesha2_constants.h>
 #include <sandesha2_utils.h>
 
@@ -86,6 +87,9 @@
     sandesha2_transaction_t *transaction = NULL;
     sandesha2_msg_ctx_t *rm_msg_ctx = NULL;
     sandesha2_msg_processor_t *msg_processor = NULL;
+    /* test code */
+    sandesha2_seq_t *seq_part = NULL;
+    /* end test code */
 
     AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
@@ -149,6 +153,26 @@
         return AXIS2_FAILURE;
     }
     rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
+    /* test code */
+
+    seq_part = (sandesha2_seq_t *) SANDESHA2_MSG_CTX_GET_MSG_PART(
+        rm_msg_ctx, env, SANDESHA2_MSG_PART_SEQ);
+    if(seq_part)
+    {
+        axis2_property_t *property = NULL;
+        axis2_op_ctx_t *op_ctx = NULL;
+        axis2_ctx_t *ctx = NULL;
+
+        property = axis2_property_create(env);
+        AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+        AXIS2_PROPERTY_SET_VALUE(property, env, seq_part);
+        op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
+        ctx = AXIS2_OP_CTX_GET_BASE(op_ctx, env);
+        AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WSRM_COMMON_SEQ, property, 
+                AXIS2_FALSE);
+    }
+    /* end of test code */
+
     if(AXIS2_SUCCESS != AXIS2_ERROR_GET_STATUS_CODE(env->error))
     {
         /* Message should not be sent in an exception situation */

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=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c Tue Aug 29 04:36:39 2006
@@ -115,10 +115,12 @@
             SANDESHA2_APPLICATION_PROCESSING_DONE, AXIS2_FALSE);
     if(NULL != temp_prop)
         str_done = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE(temp_prop, env); 
+    printf("str_done:%s\n", str_done);
     if(str_done && 0 == AXIS2_STRCMP(SANDESHA2_VALUE_TRUE, str_done))
     {
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
-                "[sandesha2] Exit: sandesha2_out_handler::invoke, Application Processing Done");
+                "[sandesha2] Exit: sandesha2_out_handler::invoke, Application \
+                    Processing Done");
         return AXIS2_SUCCESS; 
     }
     temp_prop = axis2_property_create(env);
@@ -163,20 +165,35 @@
     printf("msg_type1:%d\n", msg_type);
     if(msg_type == SANDESHA2_MSG_TYPE_UNKNOWN)
     {
-        axis2_msg_ctx_t *req_msg_ctx = NULL;
+        /*axis2_msg_ctx_t *req_msg_ctx = NULL;*/
         axis2_op_ctx_t *op_ctx = NULL;
 
         op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx, env);
-        req_msg_ctx = AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env, 
+        /*req_msg_ctx = AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env, 
                 AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE);
-        if(req_msg_ctx) /* For the server side */
+        if(req_msg_ctx)*/ /* For the server side */
+        /* test code */
+        if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_SERVER_SIDE(msg_ctx, env))
         {
+        /* end test code */
+            /* test code */
+            axis2_property_t *property = NULL;
+            axis2_ctx_t *ctx = NULL;
+            /* end test code */
             sandesha2_msg_ctx_t *req_rm_msg_ctx = NULL;
             sandesha2_seq_t *seq_part = NULL;
-            
-            req_rm_msg_ctx = sandesha2_msg_init_init_msg(env, req_msg_ctx);
+
+            /* test code */
+            ctx = AXIS2_OP_CTX_GET_BASE(op_ctx, env);
+            property = AXIS2_CTX_GET_PROPERTY(ctx, env, 
+                SANDESHA2_WSRM_COMMON_SEQ, AXIS2_FALSE);
+            seq_part = (sandesha2_seq_t *)  AXIS2_PROPERTY_GET_VALUE(property, 
+                    env);
+            /* end test code */
+            /*req_rm_msg_ctx = sandesha2_msg_init_init_msg(env, req_msg_ctx);
             seq_part = (sandesha2_seq_t *) SANDESHA2_MSG_CTX_GET_MSG_PART(
                     req_rm_msg_ctx, env, SANDESHA2_MSG_PART_SEQ);
+            */
             if(seq_part)
             {
                 msg_processor = (sandesha2_msg_processor_t *) 

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=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Tue Aug 29 04:36:39 2006
@@ -436,6 +436,7 @@
         sandesha2_seq_property_bean_t *incoming_seq_list_bean = NULL;
         axis2_array_list_t *incoming_seq_list = NULL;
         axis2_char_t *str_value = NULL;
+        axis2_property_t *property = NULL;
         
         incoming_seq_list_bean = SANDESHA2_SEQ_PROPERTY_MGR_RETRIEVE(
                         seq_prop_mgr, env, SANDESHA2_SEQ_PROP_ALL_SEQS,
@@ -487,10 +488,13 @@
         invoker_bean = sandesha2_invoker_bean_create_with_data(env, str_key,
                         msg_no, str_seq_id, AXIS2_FALSE);
         SANDESHA2_INVOKER_MGR_INSERT(storage_map_mgr, env, invoker_bean);
+        property = axis2_property_create(env);
+        AXIX2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+        AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(
+                    SANDESHA2_VALUE_TRUE, env));
         /* To avoid performing application processing more than once. */
         SANDESHA2_MSG_CTX_SET_PROPERTY(msg_ctx, env, 
-                        SANDESHA2_APPLICATION_PROCESSING_DONE, 
-                        SANDESHA2_VALUE_TRUE);
+                        SANDESHA2_APPLICATION_PROCESSING_DONE, property);
         SANDESHA2_MSG_CTX_SET_PAUSED(msg_ctx, env, AXIS2_TRUE);
         /* Start the invoker if stopped */
         sandesha2_utils_start_invoker_for_seq(env, conf_ctx, str_seq_id);
@@ -562,18 +566,28 @@
     
     if(AXIS2_TRUE == is_svr_side)
     {
-        axis2_msg_ctx_t *req_msg_ctx = NULL;
-        sandesha2_msg_ctx_t *req_rm_msg_ctx = NULL;
+        /*axis2_msg_ctx_t *req_msg_ctx = NULL;
+        sandesha2_msg_ctx_t *req_rm_msg_ctx = NULL;*/
         sandesha2_seq_t *req_seq = NULL;
         long request_msg_no = -1;
         axis2_char_t *req_last_msg_num_str = NULL;
         axis2_char_t *incoming_seq_id = NULL;
-        
-        req_msg_ctx = AXIS2_OP_CTX_GET_MSG_CTX(AXIS2_MSG_CTX_GET_OP_CTX(
-                        msg_ctx1, env), env, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE);
+        axis2_op_ctx_t *op_ctx = NULL;
+        axis2_ctx_t *ctx = NULL;
+        axis2_property_t *property = NULL;
+       
+        op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx1, env);
+        /*req_msg_ctx = AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env, 
+          AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE);
         req_rm_msg_ctx = sandesha2_msg_init_init_msg(env, req_msg_ctx);
         req_seq = (sandesha2_seq_t*)SANDESHA2_MSG_CTX_GET_MSG_PART(
                         req_rm_msg_ctx, env, SANDESHA2_MSG_PART_SEQ);
+        */
+        ctx = AXIS2_OP_CTX_GET_BASE(op_ctx, env);
+        property = AXIS2_CTX_GET_PROPERTY(ctx, env, 
+            SANDESHA2_WSRM_COMMON_SEQ, AXIS2_FALSE);
+        req_seq = (sandesha2_seq_t *)  AXIS2_PROPERTY_GET_VALUE(property, 
+                env);
         if(NULL == req_seq)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Sequence is NULL");
@@ -696,11 +710,14 @@
     {
         axis2_char_t *incoming_seq_id = NULL;
         sandesha2_seq_property_bean_t *incoming_to_bean = NULL;
-        axis2_msg_ctx_t *req_msg_ctx = NULL;
-        sandesha2_msg_ctx_t *req_rm_msg_ctx = NULL;
+        /*axis2_msg_ctx_t *req_msg_ctx = NULL;
+        sandesha2_msg_ctx_t *req_rm_msg_ctx = NULL;*/
         sandesha2_seq_t *seq = NULL;
         axis2_char_t *req_seq_id = NULL;
         sandesha2_seq_property_bean_t *spec_ver_bean = NULL;
+        axis2_op_ctx_t *op_ctx = NULL;
+        axis2_ctx_t *ctx = NULL;
+        axis2_property_t *property = NULL;
 
         incoming_seq_id = sandesha2_utils_get_svr_side_incoming_seq_id(env, 
                         internal_seq_id);
@@ -720,8 +737,15 @@
             AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx1, env, SANDESHA2_SEQ_PROP_TO_EPR, 
                         property, AXIS2_FALSE);
         }
+       
+        op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx1, env);
+        ctx = AXIS2_OP_CTX_GET_BASE(op_ctx, env);
+        property = AXIS2_CTX_GET_PROPERTY(ctx, env, 
+            SANDESHA2_WSRM_COMMON_SEQ, AXIS2_FALSE);
+        seq = (sandesha2_seq_t *)  AXIS2_PROPERTY_GET_VALUE(property, 
+                env);
         
-        req_msg_ctx = AXIS2_OP_CTX_GET_MSG_CTX(AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx1,
+        /*req_msg_ctx = AXIS2_OP_CTX_GET_MSG_CTX(AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx1,
                         env), env, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE);
         if(NULL == req_msg_ctx)
         {
@@ -730,8 +754,9 @@
             return AXIS2_FAILURE;
         }
         req_rm_msg_ctx = sandesha2_msg_init_init_msg(env, req_msg_ctx);
+
         seq = (sandesha2_seq_t*)SANDESHA2_MSG_CTX_GET_MSG_PART(req_rm_msg_ctx, 
-                        env, SANDESHA2_MSG_PART_SEQ);
+                        env, SANDESHA2_MSG_PART_SEQ);*/
         req_seq_id = SANDESHA2_IDENTIFIER_GET_IDENTIFIER(
                         SANDESHA2_SEQ_GET_IDENTIFIER(seq, env), env);
         spec_ver_bean = SANDESHA2_SEQ_PROPERTY_MGR_RETRIEVE(seq_prop_mgr,
@@ -792,7 +817,7 @@
             }
             if(AXIS2_TRUE == is_svr_side)
             {
-                axis2_msg_ctx_t *req_msg_ctx = NULL;
+                /*axis2_msg_ctx_t *req_msg_ctx = NULL;
                 req_msg_ctx = AXIS2_OP_CTX_GET_MSG_CTX(AXIS2_MSG_CTX_GET_OP_CTX(
                         msg_ctx1, env), env, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE);
                 if(NULL == req_msg_ctx)
@@ -802,7 +827,7 @@
                     AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_MSG_CTX,
                         AXIS2_FAILURE);
                     return AXIS2_FAILURE;
-                }
+                }*/
                 acks_to = AXIS2_ENDPOINT_REF_GET_ADDRESS(AXIS2_MSG_CTX_GET_TO(
                         msg_ctx1, env), env);
             }
@@ -853,10 +878,13 @@
         /* let the request end with 202 if a ack has not been
          * written in the incoming thread
          */
-        axis2_msg_ctx_t *req_msg_ctx = NULL;
+        /*axis2_msg_ctx_t *req_msg_ctx = NULL;*/
+        axis2_op_ctx_t *op_ctx = NULL;
+        axis2_ctx_t *ctx = NULL;
         axis2_char_t *written = NULL;
         
-        req_msg_ctx = AXIS2_OP_CTX_GET_MSG_CTX(AXIS2_MSG_CTX_GET_OP_CTX(
+        op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg_ctx1, env);
+        /*req_msg_ctx = AXIS2_OP_CTX_GET_MSG_CTX(AXIS2_MSG_CTX_GET_OP_CTX(
                 msg_ctx1, env), env, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE);
         if(NULL == req_msg_ctx)
         {
@@ -867,7 +895,10 @@
             return AXIS2_FAILURE;
         }
         property = AXIS2_MSG_CTX_GET_PROPERTY(req_msg_ctx, env, 
-                        SANDESHA2_ACK_WRITTEN, AXIS2_FALSE);
+                        SANDESHA2_ACK_WRITTEN, AXIS2_FALSE);*/
+        ctx = AXIS2_OP_CTX_GET_BASE(op_ctx, env);
+        property = AXIS2_CTX_GET_PROPERTY(ctx, env, SANDESHA2_ACK_WRITTEN, 
+                AXIS2_FALSE);
         if(NULL != property)
             written = AXIS2_PROPERTY_GET_VALUE(property, env);
         if(NULL == written || 0 != AXIS2_STRCMP(written, SANDESHA2_VALUE_TRUE))
@@ -884,7 +915,7 @@
                     AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
                     AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP("TRUE", 
                         env));
-                    AXIS2_CTX_SET_PROPERTY(req_msg_ctx, env, 
+                    AXIS2_CTX_SET_PROPERTY(ctx, env, 
                         AXIS2_RESPONSE_WRITTEN, property, AXIS2_FALSE);
                 }
             }
@@ -1192,10 +1223,12 @@
     {
         axis2_endpoint_ref_t *reply_to = NULL;
         
-        req_msg = AXIS2_OP_CTX_GET_MSG_CTX(AXIS2_MSG_CTX_GET_OP_CTX(msg, env), 
+        /*req_msg = AXIS2_OP_CTX_GET_MSG_CTX(AXIS2_MSG_CTX_GET_OP_CTX(msg, env), 
                         env, AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE);
-        reply_to = AXIS2_MSG_CTX_GET_REPLY_TO(req_msg, env);
-        new_to_str = AXIS2_ENDPOINT_REF_GET_ADDRESS(reply_to, env);
+        reply_to = AXIS2_MSG_CTX_GET_REPLY_TO(req_msg, env);*/
+        reply_to = AXIS2_MSG_CTX_GET_REPLY_TO(msg, env);
+        if(reply_to)
+            new_to_str = AXIS2_ENDPOINT_REF_GET_ADDRESS(reply_to, env);
     }
     if(NULL != new_to_str)
         SANDESHA2_MSG_CTX_SET_TO(msg_ctx, env, axis2_endpoint_ref_create(env, 
@@ -1221,19 +1254,29 @@
     
     if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_SERVER_SIDE(msg, env))
     {
-        req_rm_msg = sandesha2_msg_init_init_msg(env, req_msg);
+        axis2_op_ctx_t *op_ctx = NULL;
+        axis2_ctx_t *ctx = NULL;
+        axis2_property_t *property = NULL;
+        /*req_rm_msg = sandesha2_msg_init_init_msg(env, req_msg);
         req_seq = (sandesha2_seq_t*)SANDESHA2_MSG_CTX_GET_MSG_PART(req_rm_msg, 
-                        env, SANDESHA2_MSG_PART_SEQ);
-        if(NULL == seq)
+                        env, SANDESHA2_MSG_PART_SEQ);*/
+        op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(msg, env);
+        ctx = AXIS2_OP_CTX_GET_BASE(op_ctx, env);
+        property = AXIS2_CTX_GET_PROPERTY(ctx, env, SANDESHA2_WSRM_COMMON_SEQ,
+                AXIS2_FALSE);
+        req_seq = (sandesha2_seq_t *) AXIS2_PROPERTY_GET_VALUE(property, env);
+        if(NULL == req_seq)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Sequence not found");
             AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_SEQ, 
                             AXIS2_FAILURE);
             return AXIS2_FAILURE;
         }
-        if(NULL != SANDESHA2_SEQ_GET_LAST_MSG(seq, env))
+        if(NULL != SANDESHA2_SEQ_GET_LAST_MSG(req_seq, env))
+        {
             SANDESHA2_SEQ_SET_LAST_MSG(seq, env, 
                             sandesha2_last_msg_create(env, rm_ns_val));
+        }
     }
     else
     {

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=438053&r1=438052&r2=438053&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 Aug 29 04:36:39 2006
@@ -212,9 +212,9 @@
     AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
     AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(SANDESHA2_VALUE_TRUE, 
                         env));
-    AXIS2_MSG_CTX_SET_PROPERTY(out_msg_ctx, env, 
-                        SANDESHA2_APPLICATION_PROCESSING_DONE, property,
-                        AXIS2_FALSE);
+    /* For making sure that this won't be processed again */
+    SANDESHA2_MSG_CTX_SET_PROPERTY(create_seq_res_msg, env, 
+                        SANDESHA2_APPLICATION_PROCESSING_DONE, property); 
     
     create_seq_res_part = (sandesha2_create_seq_res_t*)
                         SANDESHA2_MSG_CTX_GET_MSG_PART(create_seq_res_msg, 

Modified: webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c?rev=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c (original)
+++ webservices/sandesha/trunk/c/src/storage/beans/seq_property_bean.c Tue Aug 29 04:36:39 2006
@@ -110,10 +110,11 @@
 }
 
 AXIS2_EXTERN sandesha2_seq_property_bean_t* AXIS2_CALL
-        sandesha2_seq_property_bean_create_with_data(const axis2_env_t *env,
-					axis2_char_t *seq_id,
-					axis2_char_t *prop_name,
-					axis2_char_t *value)
+sandesha2_seq_property_bean_create_with_data(
+    const axis2_env_t *env,
+    axis2_char_t *seq_id,
+    axis2_char_t *prop_name,
+    axis2_char_t *value)
 
 {
 	sandesha2_seq_property_bean_impl_t *bean_impl = NULL;

Modified: webservices/sandesha/trunk/c/src/storage/inmemory/sender_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/sender_mgr.c?rev=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/sender_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/sender_mgr.c Tue Aug 29 04:36:39 2006
@@ -584,7 +584,6 @@
             }
         }
     }
-    printf("return NULL from sender_mgr\n");
     return NULL;
 }
 

Modified: webservices/sandesha/trunk/c/src/storage/inmemory/seq_property_mgr.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/storage/inmemory/seq_property_mgr.c?rev=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/storage/inmemory/seq_property_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/storage/inmemory/seq_property_mgr.c Tue Aug 29 04:36:39 2006
@@ -495,9 +495,9 @@
 
 static axis2_char_t *
 sandesha2_seq_property_mgr_get_id(
-        sandesha2_seq_property_mgr_t *seq_property,
-        const axis2_env_t *env,
-        sandesha2_seq_property_bean_t *bean)
+    sandesha2_seq_property_mgr_t *seq_property,
+    const axis2_env_t *env,
+    sandesha2_seq_property_bean_t *bean)
 {
     sandesha2_seq_property_mgr_impl_t *seq_property_impl = NULL;
     axis2_char_t *seq_id = NULL;

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=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/ack_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/ack_mgr.c Tue Aug 29 04:36:39 2006
@@ -135,16 +135,18 @@
     if(0 == AXIS2_STRCMP(acks_to_str, anon_uri))
     {
         axis2_ctx_t *ref_ctx = NULL;
-        if(NULL == AXIS2_MSG_CTX_GET_OP_CTX(ref_msg, env))
+        axis2_op_ctx_t *op_ctx = NULL;
+
+        op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(ref_msg, env);
+        if(NULL == op_ctx)
         {
             axis2_op_t *op = axis2_op_create(env);
-            axis2_op_ctx_t *op_ctx = NULL;
             AXIS2_OP_SET_MSG_EXCHANGE_PATTERN(op, env, AXIS2_MEP_URI_IN_OUT);
             op_ctx = axis2_op_ctx_create(env, op, NULL);
             AXIS2_MSG_CTX_SET_OP(ref_msg, env, op);
             AXIS2_MSG_CTX_SET_OP_CTX(ref_msg, env, op_ctx);            
         }
-        ref_ctx = AXIS2_OP_CTX_GET_BASE(AXIS2_MSG_CTX_GET_OP_CTX(ref_msg, env), env);
+        ref_ctx = AXIS2_OP_CTX_GET_BASE(op_ctx, env);
         property = axis2_property_create(env);
         AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
         AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP("TRUE", env));
@@ -155,8 +157,10 @@
         AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
         AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(
                         SANDESHA2_VALUE_TRUE, env));
-        AXIS2_MSG_CTX_SET_PROPERTY(ref_msg, env, SANDESHA2_ACK_WRITTEN, property,
-                        AXIS2_FALSE);
+        /* AXIS2_MSG_CTX_SET_PROPERTY(ref_msg, env, SANDESHA2_ACK_WRITTEN, property,
+                        AXIS2_FALSE);*/
+        AXIS2_CTX_SET_PROPERTY(ref_ctx, env, SANDESHA2_ACK_WRITTEN, property, 
+                AXIS2_FALSE);
         AXIS2_MSG_CTX_SET_SERVER_SIDE(ack_msg_ctx, env, AXIS2_TRUE);
         return ack_rm_msg;
     }

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=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/seq_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/seq_mgr.c Tue Aug 29 04:36:39 2006
@@ -296,11 +296,12 @@
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
-sandesha2_seq_mgr_setup_new_client_seq(const axis2_env_t *env,
-                        axis2_msg_ctx_t *first_app_msg,
-                        axis2_char_t *int_seq_id,
-                        axis2_char_t *spec_version,
-                        sandesha2_storage_mgr_t *storage_mgr)
+sandesha2_seq_mgr_setup_new_client_seq(
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *first_app_msg,
+        axis2_char_t *int_seq_id,
+        axis2_char_t *spec_version,
+        sandesha2_storage_mgr_t *storage_mgr)
 {
     axis2_conf_ctx_t *conf_ctx = NULL;
     sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
@@ -381,7 +382,7 @@
         axis2_endpoint_ref_t *reply_to_epr = 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, 
+        /*req_msg_ctx = AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env, 
                         AXIS2_WSDL_MESSAGE_LABEL_IN_VALUE);
         if(NULL == req_msg_ctx)
         {
@@ -389,7 +390,8 @@
                         " the request message from the operation context");
             return AXIS2_FAILURE;
         }
-        reply_to_epr = AXIS2_MSG_CTX_GET_TO(req_msg_ctx, env);
+        reply_to_epr = AXIS2_MSG_CTX_GET_TO(req_msg_ctx, env);*/
+        reply_to_epr = AXIS2_MSG_CTX_GET_TO(first_app_msg, env);
         if(NULL != reply_to_epr)
             reply_to_bean = sandesha2_seq_property_bean_create_with_data(env,
                         int_seq_id, SANDESHA2_SEQ_PROP_REPLY_TO_EPR,

Modified: webservices/sandesha/trunk/c/src/util/utils.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/utils.c?rev=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/utils.c (original)
+++ webservices/sandesha/trunk/c/src/util/utils.c Tue Aug 29 04:36:39 2006
@@ -115,9 +115,9 @@
 
 AXIS2_EXTERN axis2_char_t* AXIS2_CALL
 sandesha2_utils_get_rm_version(
-        const axis2_env_t *env,
-        axis2_char_t *key,
-        sandesha2_storage_mgr_t *storage_man)
+    const axis2_env_t *env,
+    axis2_char_t *key,
+    sandesha2_storage_mgr_t *storage_man)
 {
     sandesha2_seq_property_mgr_t *seq_prop_man = NULL;
     sandesha2_seq_property_bean_t *rm_version_bean = NULL;
@@ -137,9 +137,10 @@
 }
 
 AXIS2_EXTERN sandesha2_storage_mgr_t* AXIS2_CALL
-sandesha2_utils_get_storage_mgr(const axis2_env_t *env,
-                        axis2_conf_ctx_t *conf_ctx,
-                        axis2_conf_t *conf)
+sandesha2_utils_get_storage_mgr(
+    const axis2_env_t *env,
+    axis2_conf_ctx_t *conf_ctx,
+    axis2_conf_t *conf)
 {
     axis2_param_t *parameter = NULL;
     axis2_char_t *value = NULL;
@@ -800,6 +801,7 @@
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FALSE);
     
     action =  AXIS2_MSG_CTX_GET_WSA_ACTION(msg_ctx, env);
+    printf("action:%s\n", action);
     soap_env = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
     
     if(NULL == soap_env)
@@ -1007,9 +1009,9 @@
 
 static axis2_array_list_t *
 get_sorted_msg_no_list(
-        const axis2_env_t *env,
-        axis2_char_t *msg_no_str,
-        axis2_char_t *delim)
+    const axis2_env_t *env,
+    axis2_char_t *msg_no_str,
+    axis2_char_t *delim)
 {
     axis2_array_list_t *msg_numbers = NULL;
     axis2_array_list_t *sorted_msg_no_list = NULL;
@@ -1019,10 +1021,10 @@
     temp_str = strtok(msg_no_str, delim);
     while(NULL != temp_str)
     {
-        long long_val = 0;
+        long *long_val = AXIS2_MALLOC(env->allocator, sizeof(long));
 
-        long_val = atol(temp_str);
-        AXIS2_ARRAY_LIST_ADD(msg_numbers, env, &long_val);
+        *long_val = atol(temp_str);
+        AXIS2_ARRAY_LIST_ADD(msg_numbers, env, long_val);
         temp_str = strtok(NULL, delim);
     }
     sorted_msg_no_list = sandesha2_utils_sort(env, msg_numbers);
@@ -1053,15 +1055,15 @@
     }
     for(j = 1; j <= max; j++)
     {
-        long temp = 0;
+        long *temp = AXIS2_MALLOC(env->allocator, sizeof(long));
         axis2_bool_t contains = AXIS2_FALSE;
         
-        temp = j;
+        *temp = j;
         for(i = 0; i < size; i++)
         {
             long *value = NULL;
             value = AXIS2_ARRAY_LIST_GET(list, env, i);
-            if(*value == temp)
+            if(*value == *temp)
             {
                 contains = AXIS2_TRUE;
                 break;
@@ -1069,7 +1071,7 @@
         }
         if(AXIS2_TRUE == contains)
         {
-            AXIS2_ARRAY_LIST_ADD(sorted_list, env, &temp);
+            AXIS2_ARRAY_LIST_ADD(sorted_list, env, temp);
         }
     }
     return sorted_list;    

Modified: webservices/sandesha/trunk/c/src/workers/sender.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/workers/sender.c?rev=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/workers/sender.c (original)
+++ webservices/sandesha/trunk/c/src/workers/sender.c Tue Aug 29 04:36:39 2006
@@ -50,6 +50,7 @@
     axis2_bool_t run_sender;
     axis2_array_list_t *working_seqs;
     axis2_thread_mutex_t *mutex;
+    int counter;
 };
 
 struct sandesha2_sender_args
@@ -133,6 +134,7 @@
     sender_impl->run_sender = AXIS2_FALSE;
     sender_impl->working_seqs = NULL;
     sender_impl->mutex = NULL;
+    sender_impl->counter = 0;
     sender_impl->sender.ops = NULL;
     
     sender_impl->sender.ops = AXIS2_MALLOC(env->allocator,
@@ -287,10 +289,6 @@
     args = AXIS2_MALLOC(env->allocator, sizeof(sandesha2_sender_args_t)); 
     args->impl = sender_impl;
     args->env = (axis2_env_t*)env;
-    /* Assigning like theis cause seg faults when trying to allocate memory
-     * inside worker function. So created new env */
-    /*args->env->allocator = env->allocator;*/
-    args->env = axis2_env_create(env->allocator);
 
     worker_thread = AXIS2_THREAD_POOL_GET_THREAD(env->thread_pool,
                         sandesha2_sender_worker_func, (void*)args);
@@ -375,7 +373,7 @@
         
         engine = axis2_engine_create(env, AXIS2_MSG_CTX_GET_CONF_CTX(msg_ctx, 
                     env));
-        if(AXIS2_FALSE == sandesha2_sender_is_fault_envelope(sender, env, 
+        if(AXIS2_TRUE == sandesha2_sender_is_fault_envelope(sender, env, 
                     res_envelope))
             AXIS2_ENGINE_RECEIVE_FAULT(engine, env, res_msg_ctx);
         else
@@ -448,7 +446,7 @@
     sandesha2_storage_mgr_t *storage_mgr = NULL;
     
     args = (sandesha2_sender_args_t*)data;
-    env = args->env;
+    env = axis2_init_thread_env(args->env);
     sender_impl = args->impl;
     sender = (sandesha2_sender_t*)sender_impl;
     
@@ -591,6 +589,10 @@
             /* Consider building soap envelope */
             AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, msg_ctx);
             successfully_sent = AXIS2_TRUE;
+        sender_impl->counter++;
+        /*printf("**********************counter******************:%d\n", sender_impl->counter);
+        if(2 == sender_impl->counter)
+            sleep(300000);*/
                         
         }
         transaction = SANDESHA2_STORAGE_MGR_GET_TRANSACTION(storage_mgr,

Modified: webservices/sandesha/trunk/c/src/wsrm/rm_elements.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/rm_elements.c?rev=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/rm_elements.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/rm_elements.c Tue Aug 29 04:36:39 2006
@@ -359,7 +359,8 @@
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cannot find the"
                         " addressing version");
-        return AXIS2_FAILURE;
+        /*return AXIS2_FAILURE;*/
+        elements_impl->addr_ns_val = AXIS2_STRDUP(AXIS2_WSA_NAMESPACE ,env);
     }
     soap_header = AXIOM_SOAP_ENVELOPE_GET_HEADER(soap_envelope, env);    
     header_node = AXIOM_SOAP_HEADER_GET_BASE_NODE(soap_header, env);

Modified: webservices/sandesha/trunk/c/src/wsrm/sequence.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/wsrm/sequence.c?rev=438053&r1=438052&r2=438053&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/sequence.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/sequence.c Tue Aug 29 04:36:39 2006
@@ -308,8 +308,9 @@
 
 
 axiom_node_t* AXIS2_CALL 
-sandesha2_seq_to_om_node(sandesha2_iom_rm_element_t *seq,
-                    	const axis2_env_t *env, void *om_node)
+sandesha2_seq_to_om_node(
+        sandesha2_iom_rm_element_t *seq,
+        const axis2_env_t *env, void *om_node)
 {
 	sandesha2_seq_impl_t *seq_impl = NULL;
     axiom_namespace_t *rm_ns = NULL;



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