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/11/13 06:02:43 UTC

svn commit: r474153 - in /webservices/sandesha/trunk/c: ./ include/ samples/rm_echo/ src/handlers/ src/msgprocessors/ src/util/ src/wsrm/

Author: damitha
Date: Sun Nov 12 21:02:42 2006
New Revision: 474153

URL: http://svn.apache.org/viewvc?view=rev&rev=474153
Log:
More work in removing macros. Working on sequence offer feature

Modified:
    webservices/sandesha/trunk/c/Makefile.am
    webservices/sandesha/trunk/c/include/sandesha2_msg_processor.h
    webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am
    webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.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/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/create_seq_res_msg_processor.c
    webservices/sandesha/trunk/c/src/msgprocessors/msg_processor_creator.c
    webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c
    webservices/sandesha/trunk/c/src/util/msg_creator.c
    webservices/sandesha/trunk/c/src/util/msg_init.c
    webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
    webservices/sandesha/trunk/c/src/util/terminate_mgr.c
    webservices/sandesha/trunk/c/src/wsrm/rm_elements.c

Modified: webservices/sandesha/trunk/c/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/Makefile.am?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/Makefile.am (original)
+++ webservices/sandesha/trunk/c/Makefile.am Sun Nov 12 21:02:42 2006
@@ -1,4 +1,4 @@
 datadir=$(prefix)/sandesha2
 SUBDIRS = src
-data_DATA = LICENSE config/module.xml
+data_DATA = LICENSE config/module.xml src/client/sandesha2_client_constants.h
 

Modified: webservices/sandesha/trunk/c/include/sandesha2_msg_processor.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2_msg_processor.h?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2_msg_processor.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2_msg_processor.h Sun Nov 12 21:02:42 2006
@@ -78,16 +78,26 @@
  */
 sandesha2_msg_processor_t *AXIS2_CALL   
 sandesha2_msg_processor_create_msg_processor(
-        const axis2_env_t *env,
-        sandesha2_msg_ctx_t *rm_msg_ctx);
+    const axis2_env_t *env,
+    sandesha2_msg_ctx_t *rm_msg_ctx);
+                        
+axis2_status_t AXIS2_CALL 
+sandesha2_msg_processor_free (
+    sandesha2_msg_processor_t *msg_processor, 
+    const axis2_env_t *env);
 
-#define SANDESHA2_MSG_PROCESSOR_FREE(proc, env) \
-    ((proc)->ops->free (proc, env))
-#define SANDESHA2_MSG_PROCESSOR_PROCESS_IN_MSG(proc, env, rm_msg_ctx) \
-    ((proc)->ops->process_in_msg(proc, env, rm_msg_ctx))
-#define SANDESHA2_MSG_PROCESSOR_PROCESS_OUT_MSG(proc, env, rm_msg_ctx) \
-    ((proc)->ops->process_out_msg(proc, env, rm_msg_ctx))
+axis2_status_t AXIS2_CALL 
+sandesha2_msg_processor_process_in_msg (
+    sandesha2_msg_processor_t *msg_processor,
+    const axis2_env_t *env,
+    sandesha2_msg_ctx_t *rm_msg_ctx);
     
+axis2_status_t AXIS2_CALL 
+sandesha2_msg_processor_process_out_msg(
+    sandesha2_msg_processor_t *msg_processor,
+    const axis2_env_t *env, 
+    sandesha2_msg_ctx_t *rm_msg_ctx);
+
 /** @} */
 #ifdef __cplusplus
 }

Modified: webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo/Makefile.am Sun Nov 12 21:02:42 2006
@@ -20,5 +20,6 @@
                     $(LIBXML2_LIBS)
 
 INCLUDES = -I$(AXIS2C_HOME)/include \
+			-I$(AXIS2C_HOME)/modules/sandesha2 \
 			@UTILINC@ \
 			@AXIOMINC@

Modified: webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c (original)
+++ webservices/sandesha/trunk/c/samples/rm_echo/rm_echo_client.c Sun Nov 12 21:02:42 2006
@@ -24,6 +24,7 @@
 #include <axis2_listener_manager.h>
 #include <axis2_callback_recv.h>
 #include <axis2_svc_client.h>
+#include <sandesha2_client_constants.h>
 
 /* on_complete callback function */
 axis2_status_t AXIS2_CALL
@@ -58,6 +59,10 @@
     axis2_options_t *options,
     const axiom_node_t *payload);
 
+void 
+usage(
+    axis2_char_t *prog_name);
+
 int main(int argc, char** argv)
 {
     const axis2_env_t *env = NULL;
@@ -73,6 +78,9 @@
     axis2_callback_t *callback3 = NULL;
     axis2_property_t *property = NULL;
     axis2_listener_manager_t *listener_manager = NULL;
+    axis2_char_t *offered_seq_id = NULL;
+    axis2_bool_t offer = AXIS2_FALSE;
+    int c;
    
     /* Set up the environment */
     env = axis2_env_create_all("echo_non_blocking_dual.log", 
@@ -81,11 +89,32 @@
     /* Set end point reference of echo service */
     /*address = "http://127.0.0.1:8888/axis2/services/RMSampleService";*/
     address = "http://127.0.0.1:5555/axis2/services/RMSampleService";
-    if (argc > 1 )
-        address = argv[1];
+    while ((c = AXIS2_GETOPT(argc, argv, ":a:o:")) != -1)
+    {
+
+        switch (c)
+        {
+            case 'a':
+                address = optarg;
+                break;
+            case 'o':
+                offer = AXIS2_ATOI(optarg);
+                break;
+            case ':':
+                fprintf(stderr, "\nOption -%c requires an operand\n", optopt);
+                usage(argv[0]);
+                return -1;
+            case '?':
+                if (isprint(optopt))
+                    fprintf(stderr, "\nUnknown option `-%c'.\n", optopt);
+                usage(argv[0]);
+                return -1;
+        }
+    }
+    printf("offer:%d\n", offer);
     if (AXIS2_STRCMP(address, "-h") == 0)
     {
-        printf("Usage : %s [endpoint_url]\n", argv[0]);
+        printf("Usage : %s [endpoint_url] [offer]\n", argv[0]);
         printf("use -h for help\n");
         return 0;
     }
@@ -145,7 +174,18 @@
     {
         return AXIS2_FAILURE;
     }
-
+    /* Offer sequence */
+    if(offer)
+    {
+        offered_seq_id = axis2_uuid_gen(env);
+        property = axis2_property_create(env);
+        if(property)
+        {
+            AXIS2_PROPERTY_SET_VALUE(property, env, AXIS2_STRDUP(offered_seq_id, env));
+            AXIS2_OPTIONS_SET_PROPERTY(options, env, SANDESHA2_CLIENT_OFFERED_SEQ_ID,
+                property);
+        }
+    }
     payload = build_om_payload_for_echo_svc(env, "echo1", "sequence1");
     callback = axis2_callback_create(env);
     AXIS2_CALLBACK_SET_ON_COMPLETE(callback, rm_echo_callback_on_complete);
@@ -244,8 +284,8 @@
 }
 
 void wait_on_callback(
-        const axis2_env_t *env,
-        axis2_callback_t *callback)
+    const axis2_env_t *env,
+    axis2_callback_t *callback)
 {
     /** Wait till callback is complete. Simply keep the parent thread running
        until our on_complete or on_error is invoked */
@@ -368,4 +408,20 @@
 
     return AXIS2_TRUE;
 }
+
+void 
+usage(
+    axis2_char_t *prog_name)
+{
+    fprintf(stdout, "\n Usage : %s", prog_name);
+    fprintf(stdout, " [-o ADDRESS]");
+    fprintf(stdout, " [-o OFFER]");
+    fprintf(stdout, " Options :\n");
+    fprintf(stdout, "\t-o OFFER \t seq offer value.. The"
+            " default offer value is 0(false) ../\n");
+    fprintf(stdout, "\t-o ADDRESS \t endpoint address.. The"
+            " default is http://127.0.0.1:5555/axis2/services/RMSampleService ../\n");
+    fprintf(stdout, " Help :\n\t-h \t display this help screen.\n\n");
+}
+
 

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?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_in_handler.c Sun Nov 12 21:02:42 2006
@@ -24,16 +24,20 @@
 #include <sandesha2_msg_ctx.h>
 #include <sandesha2_transaction.h>
 #include <sandesha2_msg_processor.h>
+#include <sandesha2_ack_msg_processor.h>
+#include <sandesha2_ack_req_msg_processor.h>
 #include <sandesha2_msg_init.h>
 #include <sandesha2_seq.h>
 #include <sandesha2_constants.h>
 #include <sandesha2_utils.h>
-/*
-static axis2_qname_t *AXIS2_CALL
+#include <sandesha2_seq_ack.h>
+#include <sandesha2_ack_requested.h>
+
+static const axis2_qname_t *AXIS2_CALL
 sandesha2_in_handler_get_qname(
-    struct axis2_handler *handler, 
+    const struct axis2_handler *handler, 
     const axis2_env_t *env);
-*/
+
 static axis2_status_t AXIS2_CALL
 sandesha2_in_handler_invoke(
     struct axis2_handler *handler, 
@@ -62,6 +66,8 @@
     /* set the base struct's invoke op */
     if (handler->ops) 
         handler->ops->invoke = sandesha2_in_handler_invoke;
+    if (handler->ops) 
+        handler->ops->get_qname = sandesha2_in_handler_get_qname;
 
     return handler;
 }
@@ -87,6 +93,8 @@
     sandesha2_transaction_t *transaction = NULL;
     sandesha2_msg_ctx_t *rm_msg_ctx = NULL;
     sandesha2_msg_processor_t *msg_processor = NULL;
+    sandesha2_seq_ack_t *seq_ack = NULL;
+    sandesha2_ack_requested_t *ack_requested = NULL;
 
     AXIS2_ENV_CHECK( env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, msg_ctx, AXIS2_FAILURE);
@@ -109,7 +117,12 @@
     if(temp_prop)
         str_done = (axis2_char_t *) AXIS2_PROPERTY_GET_VALUE(temp_prop, env); 
     if(str_done && 0 == AXIS2_STRCMP(SANDESHA2_VALUE_TRUE, str_done))
+    {
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, 
+            "[sandesha2] Exit: sandesha2_in_handler::invoke, Application " \
+             "processing done");
         return AXIS2_SUCCESS;
+    }
     temp_prop = AXIS2_CTX_GET_PROPERTY(ctx, env, SANDESHA2_REINJECTED_MESSAGE, 
             AXIS2_FALSE);
     if(temp_prop)
@@ -197,13 +210,31 @@
      * TODO Validate the message
      * SANDESHA2_MSG_VALIDATOR_VALIDATE(env, rm_msg_ctx, storage_mgr);
      */
+    seq_ack = (sandesha2_seq_ack_t*)sandesha2_msg_ctx_get_msg_part(rm_msg_ctx, 
+                        env, SANDESHA2_MSG_PART_SEQ_ACKNOWLEDGEMENT);
+    if(seq_ack)
+    {
+        sandesha2_msg_processor_t *ack_proc = NULL;
+        ack_proc = sandesha2_ack_msg_processor_create(env);
+        sandesha2_msg_processor_process_in_msg(ack_proc, env, rm_msg_ctx);
+    } 
+    ack_requested = (sandesha2_ack_requested_t*)sandesha2_msg_ctx_get_msg_part(
+                        rm_msg_ctx, env, SANDESHA2_MSG_PART_ACK_REQUEST);
+    if(ack_requested)
+    {
+        sandesha2_ack_requested_set_must_understand(ack_requested, env, 
+                        AXIS2_FALSE);
+        sandesha2_msg_ctx_add_soap_envelope(rm_msg_ctx, env);
+    }
     msg_processor = sandesha2_msg_processor_create_msg_processor(env, 
             rm_msg_ctx);
     if(msg_processor)
-        SANDESHA2_MSG_PROCESSOR_PROCESS_IN_MSG(msg_processor, env, rm_msg_ctx);
-    if(!AXIS2_ERROR_GET_STATUS_CODE(env->error))
     {
-        /* Message should not be sent in an exception situation */
+        sandesha2_msg_processor_process_in_msg(msg_processor, env, rm_msg_ctx);
+    }
+    /*if(!AXIS2_ERROR_GET_STATUS_CODE(env->error))
+    {
+        // Message should not be sent in an exception situation
         AXIS2_MSG_CTX_SET_PAUSED(msg_ctx, env, AXIS2_TRUE);
         if(!within_transaction)
         {
@@ -235,7 +266,7 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CANNOT_PROCESS_MSG, 
                 AXIS2_FAILURE);
         return AXIS2_FAILURE;
-    }
+    }*/
     if(!within_transaction && !rolled_back)
     {
         axis2_property_t *prop = NULL;
@@ -251,14 +282,13 @@
     
     return AXIS2_SUCCESS;
 }
-/*
-static axis2_qname_t *AXIS2_CALL
+
+static const axis2_qname_t *AXIS2_CALL
 sandesha2_in_handler_get_qname(
-    struct axis2_handler *handler, 
+    const struct axis2_handler *handler, 
     const axis2_env_t *env)
 {
     return (axis2_qname_t *) axis2_qname_create(env, SANDESHA2_IN_HANDLER_NAME, 
             NULL, NULL);
 }
-*/
 

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?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c (original)
+++ webservices/sandesha/trunk/c/src/handlers/sandesha2_out_handler.c Sun Nov 12 21:02:42 2006
@@ -108,7 +108,6 @@
     svc = AXIS2_MSG_CTX_GET_SVC(msg_ctx, env);
     if(!svc)
     {
-        printf("came1 .........\n");
         AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "[sandesha2] Axis2 Service is NULL");
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_SVC_NULL, AXIS2_FAILURE);
         return AXIS2_FAILURE;
@@ -125,7 +124,6 @@
                     Processing Done");
         return AXIS2_SUCCESS; 
     }
-    printf("came2 .........\n");
     temp_prop = axis2_property_create(env);
     AXIS2_PROPERTY_SET_SCOPE(temp_prop, env, AXIS2_SCOPE_APPLICATION);
     AXIS2_PROPERTY_SET_VALUE(temp_prop, env, AXIS2_STRDUP(SANDESHA2_VALUE_TRUE, 
@@ -155,7 +153,6 @@
         AXIS2_CTX_SET_PROPERTY(ctx, env, SANDESHA2_WITHIN_TRANSACTION, prop, 
                 AXIS2_FALSE);
     }
-    printf("came3 .........\n");
     /* Getting rm message */ 
     rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
     temp_prop = AXIS2_CTX_GET_PROPERTY(ctx, env, SANDESHA2_CLIENT_DUMMY_MESSAGE, 
@@ -204,7 +201,7 @@
     }
     if(msg_processor)
     {
-        SANDESHA2_MSG_PROCESSOR_PROCESS_OUT_MSG(msg_processor, env, rm_msg_ctx);
+        sandesha2_msg_processor_process_out_msg(msg_processor, env, rm_msg_ctx);
     }
     if(AXIS2_SUCCESS != AXIS2_ERROR_GET_STATUS_CODE(env->error))
     {

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?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/ack_msg_processor.c Sun Nov 12 21:02:42 2006
@@ -64,12 +64,6 @@
     const axis2_env_t *env,
     sandesha2_msg_ctx_t *rm_msg_ctx);
     
-static axis2_status_t AXIS2_CALL 
-sandesha2_ack_msg_processor_process_out_msg(
-    sandesha2_msg_processor_t *msg_processor,
-    const axis2_env_t *env, 
-    sandesha2_msg_ctx_t *rm_msg_ctx);
-    
 static sandesha2_sender_bean_t* AXIS2_CALL 
 sandesha2_ack_msg_processor_get_retrans_entry(
     const axis2_env_t *env, 
@@ -117,8 +111,6 @@
     
     msg_proc_impl->msg_processor.ops->process_in_msg = 
                         sandesha2_ack_msg_processor_process_in_msg;
-    msg_proc_impl->msg_processor.ops->process_out_msg = 
-    					sandesha2_ack_msg_processor_process_out_msg;
     msg_proc_impl->msg_processor.ops->free = sandesha2_ack_msg_processor_free;
                         
 	return &(msg_proc_impl->msg_processor);
@@ -157,7 +149,6 @@
     axis2_array_list_t *ack_range_list = NULL;
     axis2_array_list_t *nack_list = NULL;
     axis2_char_t *out_seq_id = NULL;
-    sandesha2_msg_ctx_t *fault_msg_ctx = NULL;
     axis2_char_t *int_seq_id = NULL;
     axis2_property_t *property = NULL;
     sandesha2_sender_bean_t *input_bean = NULL;
@@ -170,6 +161,9 @@
     sandesha2_seq_property_bean_t *completed_bean = NULL;
     axis2_char_t *str_list = NULL;
     axis2_char_t *last_out_msg_no_str = NULL;
+    axis2_bool_t added = AXIS2_FALSE;
+    const axis2_char_t *action = NULL;
+    sandesha2_msg_ctx_t *fault_msg_ctx = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
@@ -209,6 +203,9 @@
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_SEQ, AXIS2_FAILURE);
         return AXIS2_FAILURE;        
     }
+    int_seq_id = sandesha2_utils_get_seq_property(env, out_seq_id, 
+                        SANDESHA2_SEQ_PROP_INTERNAL_SEQ_ID, storage_mgr);
+
     fault_msg_ctx = sandesha2_fault_mgr_check_for_unknown_seq(env,
                         rm_msg_ctx, out_seq_id, storage_mgr);
     if(fault_msg_ctx)
@@ -229,8 +226,6 @@
                         fault_msg_ctx, env));
         AXIS2_MSG_CTX_SET_PAUSED(msg_ctx, env, AXIS2_TRUE);
     }
-    int_seq_id = sandesha2_utils_get_seq_property(env, out_seq_id, 
-                        SANDESHA2_SEQ_PROP_INTERNAL_SEQ_ID, storage_mgr);
     sandesha2_seq_mgr_update_last_activated_time(env, int_seq_id, 
                         storage_mgr);
     property = axis2_property_create(env);
@@ -296,20 +291,22 @@
     sprintf(str_long, "%ld", no_of_msgs_acked);
     if(!no_of_msgs_acked_bean)
     {
+        added = AXIS2_TRUE;
         no_of_msgs_acked_bean = sandesha2_seq_property_bean_create(env);
         sandesha2_seq_property_bean_set_name(no_of_msgs_acked_bean, env,
                         SANDESHA2_SEQ_PROP_NO_OF_OUTGOING_MSGS_ACKED);
         sandesha2_seq_property_bean_set_seq_id(no_of_msgs_acked_bean, env,
                         out_seq_id);
-        sandesha2_seq_property_bean_set_value(no_of_msgs_acked_bean, env, 
-                        str_long);
+    }
+    sandesha2_seq_property_bean_set_value(no_of_msgs_acked_bean, env, 
+        str_long);
+    if(added)
+    {
         sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, 
                         no_of_msgs_acked_bean); 
     }
     else
     {
-        sandesha2_seq_property_bean_set_value(no_of_msgs_acked_bean, env, 
-                        str_long);
         sandesha2_seq_property_mgr_update(seq_prop_mgr, env, 
                         no_of_msgs_acked_bean); 
     }
@@ -345,26 +342,19 @@
                         out_seq_id, int_seq_id, storage_mgr);
         }
     }
-    sandesha2_msg_ctx_set_paused(rm_msg_ctx, env, AXIS2_TRUE);
+    action = AXIS2_MSG_CTX_GET_WSA_ACTION(msg_ctx, env);
+    if(action && 0 == AXIS2_STRCMP(action, 
+        sandesha2_spec_specific_consts_get_ack_req_action(env, 
+            sandesha2_msg_ctx_get_rm_spec_ver(rm_msg_ctx, env))))
+    {
+        sandesha2_msg_ctx_set_paused(rm_msg_ctx, env, AXIS2_TRUE);
+    }
     AXIS2_LOG_INFO(env->log, 
             "[sandesha2] Exit: sandesha2_ack_msg_processor_process_in_msg");
     printf("[sandesha2] Exit: sandesha2_ack_msg_processor_process_in_msg\n");
     return AXIS2_SUCCESS;
 }
     
-static axis2_status_t AXIS2_CALL 
-sandesha2_ack_msg_processor_process_out_msg(
-    sandesha2_msg_processor_t *msg_processor,
-    const axis2_env_t *env, 
-    sandesha2_msg_ctx_t *rm_msg_ctx)
-{
-    
-    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
-    
-    return AXIS2_SUCCESS;
-}
-
 static sandesha2_sender_bean_t* AXIS2_CALL 
 sandesha2_ack_msg_processor_get_retrans_entry(
     const axis2_env_t *env, 

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=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/app_msg_processor.c Sun Nov 12 21:02:42 2006
@@ -175,8 +175,6 @@
     const axis2_env_t *env,
     sandesha2_msg_ctx_t *rm_msg_ctx)
 {
-    sandesha2_seq_ack_t *seq_ack = NULL;
-    sandesha2_ack_requested_t *ack_requested = NULL;
     axis2_msg_ctx_t *msg_ctx = NULL;
     axis2_char_t *processed = NULL;
     axis2_op_ctx_t *op_ctx = NULL;
@@ -201,6 +199,7 @@
     sandesha2_seq_property_mgr_t *seq_prop_mgr = NULL;
     axis2_char_t *highest_in_msg_no_str = NULL;
     axis2_char_t *highest_in_msg_key_str = NULL;
+    axis2_bool_t msg_no_present_in_list = AXIS2_FALSE; 
     
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, rm_msg_ctx, AXIS2_FAILURE);
@@ -208,24 +207,6 @@
             "[sandesha2] sandesha2_app_msg_processor_process_in_msg .........");
     printf("sandesha2_app_msg_processor_process_in_msg\n");
    
-    seq_ack = (sandesha2_seq_ack_t*)sandesha2_msg_ctx_get_msg_part(rm_msg_ctx, 
-                        env, SANDESHA2_MSG_PART_SEQ_ACKNOWLEDGEMENT);
-    if(seq_ack)
-    {
-        sandesha2_msg_processor_t *ack_proc = NULL;
-        ack_proc = sandesha2_ack_msg_processor_create(env);
-        SANDESHA2_MSG_PROCESSOR_PROCESS_IN_MSG(ack_proc, env, rm_msg_ctx);
-    }
-    
-    ack_requested = (sandesha2_ack_requested_t*)sandesha2_msg_ctx_get_msg_part(
-                        rm_msg_ctx, env, SANDESHA2_MSG_PART_ACK_REQUEST);
-    if(ack_requested)
-    {
-        sandesha2_ack_requested_set_must_understand(ack_requested, env, 
-                        AXIS2_FALSE);
-        sandesha2_msg_ctx_add_soap_envelope(rm_msg_ctx, env);
-    }
-    
     msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
     if(!msg_ctx)
     {
@@ -391,18 +372,23 @@
                         SANDESHA2_SEQ_PROP_SERVER_COMPLETED_MESSAGES);
         sandesha2_seq_property_bean_set_value(msgs_bean, env, msgs_str);
     }
-    if(sandesha2_app_msg_processor_msg_num_is_in_list(env, msgs_str, msg_no) &&
+    msg_no_present_in_list = sandesha2_app_msg_processor_msg_num_is_in_list(env, 
+            msgs_str, msg_no);
+    if(msg_no_present_in_list &&
             0 == AXIS2_STRCMP(SANDESHA2_QOS_DEFAULT_INVOCATION_TYPE, 
             SANDESHA2_QOS_EXACTLY_ONCE))
     {
         sandesha2_msg_ctx_set_paused(rm_msg_ctx, env, AXIS2_TRUE);
     }
-    if(msgs_str && 0 < AXIS2_STRLEN(msgs_str))
-        msgs_str = axis2_strcat(env, msgs_str, ",", msg_num_str, NULL);
-    else
-        msgs_str = AXIS2_STRDUP(msg_num_str, env);
-    sandesha2_seq_property_bean_set_value(msgs_bean, env, msgs_str);
-    sandesha2_seq_property_mgr_update(seq_prop_mgr, env, msgs_bean);
+    if(!msg_no_present_in_list)
+    {
+        if(msgs_str && 0 < AXIS2_STRLEN(msgs_str))
+            msgs_str = axis2_strcat(env, msgs_str, ",", msg_num_str, NULL);
+        else
+            msgs_str = AXIS2_STRDUP(msg_num_str, env);
+        sandesha2_seq_property_bean_set_value(msgs_bean, env, msgs_str);
+        sandesha2_seq_property_mgr_update(seq_prop_mgr, env, msgs_bean);
+    }
     
     next_mgr = sandesha2_storage_mgr_get_next_msg_mgr(storage_mgr,
                         env);
@@ -692,6 +678,7 @@
         sandesha2_seq_property_mgr_insert(seq_prop_mgr, env,
                         res_last_msg_key_bean);
     }
+    printf("internal_seq_id:%s###################################33\n", internal_seq_id);
     out_seq_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, 
                         internal_seq_id, SANDESHA2_SEQ_PROP_OUT_SEQ_ID);
     if(is_svr_side)
@@ -756,6 +743,7 @@
     }
     if(send_create_seq)
     {
+        printf("came1################################################\n");
         sandesha2_seq_property_bean_t *res_create_seq_added = NULL;
         axis2_char_t *addr_ns_uri = NULL;
         axis2_char_t *anon_uri = NULL;
@@ -769,6 +757,7 @@
         anon_uri = sandesha2_spec_specific_consts_get_anon_uri(env, addr_ns_uri);
         if(!res_create_seq_added)
         {
+            printf("came2################################################\n");
             axis2_char_t *acks_to = NULL;
             
             res_create_seq_added = sandesha2_seq_property_bean_create_with_data(
@@ -1151,7 +1140,7 @@
                         internal_seq_id, SANDESHA2_SEQ_PROP_REPLY_TO_EPR);
     out_seq_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, 
                         internal_seq_id, SANDESHA2_SEQ_PROP_OUT_SEQ_ID);
-    if(NULL == to_bean)
+    if(!to_bean)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] To is NULL");
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_TO, AXIS2_FAILURE);
@@ -1159,12 +1148,12 @@
     }
     to_epr = axis2_endpoint_ref_create(env, 
                         sandesha2_seq_property_bean_get_value(to_bean, env));
-    if(NULL != reply_to_bean)
+    if(reply_to_bean)
         reply_to_epr = axis2_endpoint_ref_create(env, 
                         sandesha2_seq_property_bean_get_value(reply_to_bean, 
                         env));
 
-    if(AXIS2_TRUE == AXIS2_MSG_CTX_GET_SERVER_SIDE(app_msg_ctx, env))
+    if(AXIS2_MSG_CTX_GET_SERVER_SIDE(app_msg_ctx, env))
     {
         axis2_endpoint_ref_t *reply_to = NULL;
         
@@ -1253,7 +1242,7 @@
             }
         }
     }
-    if(NULL == out_seq_bean || NULL == sandesha2_seq_property_bean_get_value(
+    if(!out_seq_bean || !sandesha2_seq_property_bean_get_value(
                         out_seq_bean, env))
         str_identifier = SANDESHA2_TEMP_SEQ_ID;
     else
@@ -1276,7 +1265,7 @@
     sandesha2_sender_bean_set_msg_no(app_msg_entry, env, msg_num);
     sandesha2_sender_bean_set_msg_type(app_msg_entry, env, 
                         SANDESHA2_MSG_TYPE_APPLICATION);
-    if(NULL == out_seq_bean || NULL == sandesha2_seq_property_bean_get_value(
+    if(!out_seq_bean || !sandesha2_seq_property_bean_get_value(
                         out_seq_bean, env))
     {
         sandesha2_sender_bean_set_send(app_msg_entry, env, AXIS2_FALSE);

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=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/create_seq_msg_processor.c Sun Nov 12 21:02:42 2006
@@ -178,7 +178,7 @@
     msg_ctx = sandesha2_msg_ctx_get_msg_ctx(rm_msg_ctx, env);
     create_seq_part = (sandesha2_create_seq_t*)sandesha2_msg_ctx_get_msg_part(
                         rm_msg_ctx, env, SANDESHA2_MSG_PART_CREATE_SEQ);
-    if(NULL == create_seq_part)
+    if(!create_seq_part)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2]create_seq_part"
                         " is NULL");
@@ -192,7 +192,7 @@
     
     fault_rm_msg_ctx = sandesha2_fault_mgr_check_for_create_seq_refused(
                         env, msg_ctx, storage_mgr);
-    if(NULL != fault_rm_msg_ctx)
+    if(fault_rm_msg_ctx)
     {
         axis2_engine_t *engine = NULL;
         
@@ -224,16 +224,16 @@
                         env, SANDESHA2_MSG_PART_CREATE_SEQ_RESPONSE);
     seq_offer = sandesha2_create_seq_get_seq_offer(create_seq_part, 
                         env);
-    
-    if(NULL != seq_offer)
+    /* Offer processing */ 
+    if(seq_offer)
     {
         sandesha2_accept_t *accept = NULL;
         axis2_char_t *offer_seq_id = NULL;
         axis2_bool_t offer_accepted = AXIS2_FALSE;
 
-        
-        accept = sandesha2_create_seq_res_get_accept(create_seq_res_part, env);
-        if(NULL == accept)
+        if(create_seq_res_part) 
+            accept = sandesha2_create_seq_res_get_accept(create_seq_res_part, env);
+        if(!accept)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2]Accept part "
                         "has not genereated for a message with offer");
@@ -246,7 +246,7 @@
         offer_accepted = sandesha2_create_seq_msg_processor_offer_accepted(
                         env, offer_seq_id, rm_msg_ctx, 
                         storage_mgr);
-        if(AXIS2_TRUE == offer_accepted)
+        if(offer_accepted)
         {
             sandesha2_create_seq_bean_t *create_seq_bean = NULL;
             axis2_char_t *int_seq_id = NULL;
@@ -269,10 +269,16 @@
             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, 
+            /*sandesha2_seq_property_bean_set_seq_id(out_seq_bean, env, 
                         offer_seq_id);
             sandesha2_seq_property_bean_set_value(out_seq_bean, env, 
+                        int_seq_id);*/
+            sandesha2_seq_property_bean_set_seq_id(out_seq_bean, env, 
                         int_seq_id);
+            sandesha2_seq_property_bean_set_value(out_seq_bean, env, 
+                        offer_seq_id);
+            
+            printf("int_seq_id:%s###################################33\n", int_seq_id);
             sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, 
                         out_seq_bean);
         }
@@ -285,7 +291,7 @@
     acks_to = SANDESHA2_ADDRESS_GET_EPR(sandesha2_acks_to_get_address(
                     sandesha2_create_seq_get_acks_to(create_seq_part, env), 
                     env), env);
-    if(NULL == acks_to || NULL == AXIS2_ENDPOINT_REF_GET_ADDRESS(acks_to, 
+    if(!acks_to || !AXIS2_ENDPOINT_REF_GET_ADDRESS(acks_to, 
                     env))
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2]Acks to is null"
@@ -305,7 +311,7 @@
     AXIS2_ENGINE_SEND(engine, env, out_msg_ctx);
     to_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, 
                     new_seq_id, SANDESHA2_SEQ_PROP_TO_EPR);
-    if(NULL == to_bean)
+    if(!to_bean)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2]wsa:To is not set");
         return AXIS2_FAILURE;

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?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- 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 12 21:02:42 2006
@@ -104,7 +104,7 @@
                         (env->allocator, 
                         sizeof(sandesha2_create_seq_res_msg_processor_impl_t));
 	
-    if(NULL == msg_proc_impl)
+    if(!msg_proc_impl)
 	{
 		AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -112,7 +112,7 @@
     
     msg_proc_impl->msg_processor.ops = AXIS2_MALLOC(env->allocator,
         sizeof(sandesha2_msg_processor_ops_t));
-    if(NULL == msg_proc_impl->msg_processor.ops)
+    if(!msg_proc_impl->msg_processor.ops)
 	{
 		sandesha2_create_seq_res_msg_processor_free((sandesha2_msg_processor_t*)
                          msg_proc_impl, env);
@@ -140,7 +140,7 @@
 	AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     msg_proc_impl = SANDESHA2_INTF_TO_IMPL(msg_processor);
     
-    if(NULL != msg_processor->ops)
+    if(msg_processor->ops)
         AXIS2_FREE(env->allocator, msg_processor->ops);
     
 	AXIS2_FREE(env->allocator, SANDESHA2_INTF_TO_IMPL(msg_processor));
@@ -192,15 +192,15 @@
                         
     seq_ack = (sandesha2_seq_ack_t*)sandesha2_msg_ctx_get_msg_part(rm_msg_ctx, 
                         env, SANDESHA2_MSG_PART_SEQ_ACKNOWLEDGEMENT);
-    if(NULL != seq_ack)
+    if(seq_ack)
     {
         sandesha2_msg_processor_t *ack_processor = NULL;
         ack_processor = sandesha2_ack_msg_processor_create(env);
-        SANDESHA2_MSG_PROCESSOR_PROCESS_IN_MSG(ack_processor, env, rm_msg_ctx);
+        sandesha2_msg_processor_process_in_msg(ack_processor, env, rm_msg_ctx);
     }
     csr_part = (sandesha2_create_seq_res_t*)sandesha2_msg_ctx_get_msg_part(
                         rm_msg_ctx, env, SANDESHA2_MSG_PART_CREATE_SEQ_RESPONSE);
-    if(NULL == csr_part)
+    if(!csr_part)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Create Sequence"
                         " Response part is null");
@@ -211,7 +211,7 @@
     new_out_seq_id = sandesha2_identifier_get_identifier(
                         sandesha2_create_seq_res_get_identifier(csr_part, env),
                         env);
-    if(NULL == new_out_seq_id)
+    if(!new_out_seq_id)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] new sequence id"
                         " is null");
@@ -220,7 +220,7 @@
         return AXIS2_FAILURE;
     }
     relates_to = AXIS2_MSG_CTX_GET_RELATES_TO(msg_ctx, env);
-    if(NULL == relates_to)
+    if(!relates_to)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] invalid create"
                         " sequence message. relates_to part is not available");
@@ -233,7 +233,7 @@
     create_seq_mgr = sandesha2_storage_mgr_get_create_seq_mgr(storage_mgr, env);
     create_seq_bean = SANDESHA2_CREATE_SEQ_MGR_RETRIEVE(create_seq_mgr, env,
                         create_seq_msg_id);
-    if(NULL == create_seq_bean)
+    if(!create_seq_bean)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Create Sequence "
                         "entry is not found");
@@ -241,7 +241,7 @@
     }
     int_seq_id = sandesha2_create_seq_bean_get_internal_seq_id(create_seq_bean,
                         env);
-    if(NULL == int_seq_id)
+    if(!int_seq_id)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] temp_sequence_id"
                         " has is not set");
@@ -254,7 +254,7 @@
     
     create_seq_sender_bean = sandesha2_sender_mgr_retrieve(retrans_mgr,
                         env, create_seq_msg_id);
-    if(NULL == create_seq_sender_bean)
+    if(!create_seq_sender_bean)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Create sequence"
                         " entry is not found");
@@ -277,7 +277,7 @@
     sandesha2_seq_property_mgr_insert(seq_prop_mgr, env, int_seq_bean);
     
     accept = sandesha2_create_seq_res_get_accept(csr_part, env);
-    if(NULL != accept)
+    if(accept)
     {
         sandesha2_seq_property_bean_t *offerd_seq_bean = NULL;
         axis2_char_t *offered_seq_id = NULL;
@@ -294,7 +294,7 @@
         
         offerd_seq_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env,
                         int_seq_id, SANDESHA2_SEQ_PROP_OFFERED_SEQ);
-        if(NULL == offerd_seq_bean)
+        if(!offerd_seq_bean)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] No offered"
                         " sequence entry. But an accept was received");
@@ -369,14 +369,14 @@
         key = sandesha2_sender_bean_get_msg_ctx_ref_key(tmp_bean, env);
         app_msg_ctx = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, env,
                         key, conf_ctx);
-        if(NULL == app_msg_ctx)
+        if(!app_msg_ctx)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Unavailable"
                         " application message");
             return AXIS2_FAILURE;
         }
         rm_ver = sandesha2_utils_get_rm_version(env, int_seq_id, storage_mgr);
-        if(NULL == rm_ver)
+        if(!rm_ver)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cant find the"
                         " rm_ver of the given message");
@@ -387,7 +387,7 @@
         app_rm_msg = sandesha2_msg_init_init_msg(env, app_msg_ctx);
         seq_part = (sandesha2_seq_t*)sandesha2_msg_ctx_get_msg_part(
                         app_rm_msg, env, SANDESHA2_MSG_PART_SEQ);
-        if(NULL == seq_part)
+        if(!seq_part)
         {
             AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Sequence part"
                         " is null");
@@ -399,7 +399,7 @@
         
         ack_req_part = (sandesha2_ack_requested_t*)sandesha2_msg_ctx_get_msg_part(
                         app_rm_msg, env, SANDESHA2_MSG_PART_ACK_REQUEST);
-        if(NULL != ack_req_part)
+        if(ack_req_part)
         {
             sandesha2_identifier_t *ident1 = NULL;
             ident1 = sandesha2_identifier_create(env, assumed_rm_ns);
@@ -421,6 +421,7 @@
     sandesha2_msg_ctx_set_paused(rm_msg_ctx, env, AXIS2_TRUE);
     AXIS2_LOG_INFO(env->log, 
             "[sandesha2] Exit: sandesha2_create_seq_res_msg_processor_process_in_msg");
+    printf("[sandesha2] Exit: sandesha2_create_seq_res_msg_processor_process_in_msg\n");
     return AXIS2_SUCCESS;
     
 }

Modified: webservices/sandesha/trunk/c/src/msgprocessors/msg_processor_creator.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/msgprocessors/msg_processor_creator.c?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/msg_processor_creator.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/msg_processor_creator.c Sun Nov 12 21:02:42 2006
@@ -45,8 +45,8 @@
  */
 sandesha2_msg_processor_t *AXIS2_CALL   
 sandesha2_msg_processor_create_msg_processor(
-        const axis2_env_t *env,
-        sandesha2_msg_ctx_t *rm_msg_ctx)
+    const axis2_env_t *env,
+    sandesha2_msg_ctx_t *rm_msg_ctx)
 {
     int msg_type = -1;
 
@@ -54,24 +54,53 @@
     switch(msg_type)
     {
         case SANDESHA2_MSG_TYPE_CREATE_SEQ:
-            return (sandesha2_msg_processor_t *) sandesha2_create_seq_msg_processor_create(env);
+            return (sandesha2_msg_processor_t *) 
+                sandesha2_create_seq_msg_processor_create(env);
         case SANDESHA2_MSG_TYPE_TERMINATE_SEQ:
-            return (sandesha2_msg_processor_t *) sandesha2_terminate_seq_msg_processor_create(env);
+            return (sandesha2_msg_processor_t *) 
+                sandesha2_terminate_seq_msg_processor_create(env);
         case SANDESHA2_MSG_TYPE_TERMINATE_SEQ_RESPONSE:
-            return (sandesha2_msg_processor_t *) sandesha2_terminate_seq_res_msg_processor_create(env);
+            return (sandesha2_msg_processor_t *) 
+                sandesha2_terminate_seq_res_msg_processor_create(env);
         case SANDESHA2_MSG_TYPE_APPLICATION:
-            return (sandesha2_msg_processor_t *) sandesha2_app_msg_processor_create(env);
+            return (sandesha2_msg_processor_t *) 
+                sandesha2_app_msg_processor_create(env);
         case SANDESHA2_MSG_TYPE_CREATE_SEQ_RESPONSE:
-            return (sandesha2_msg_processor_t *) sandesha2_create_seq_res_msg_processor_create(env);
-        case SANDESHA2_MSG_TYPE_ACK:
-            return (sandesha2_msg_processor_t *) sandesha2_ack_msg_processor_create(env);
+            return (sandesha2_msg_processor_t *) 
+                sandesha2_create_seq_res_msg_processor_create(env);
         case SANDESHA2_MSG_TYPE_CLOSE_SEQ:
-            return (sandesha2_msg_processor_t *) sandesha2_close_seq_msg_processor_create(env);
-        case SANDESHA2_MSG_TYPE_ACK_REQUEST:
-            return (sandesha2_msg_processor_t *) sandesha2_ack_req_msg_processor_create(env);
+            return (sandesha2_msg_processor_t *) 
+                sandesha2_close_seq_msg_processor_create(env);
         default :
             return NULL;
     }
     return NULL;
 }
+                        
+axis2_status_t AXIS2_CALL 
+sandesha2_msg_processor_free (
+    sandesha2_msg_processor_t *msg_processor, 
+    const axis2_env_t *env)
+{
+    return msg_processor->ops->free (msg_processor, env);
+}
+
+axis2_status_t AXIS2_CALL 
+sandesha2_msg_processor_process_in_msg (
+    sandesha2_msg_processor_t *msg_processor,
+    const axis2_env_t *env,
+    sandesha2_msg_ctx_t *rm_msg_ctx)
+{
+    return msg_processor->ops->process_in_msg(msg_processor, env, rm_msg_ctx);
+}
+    
+axis2_status_t AXIS2_CALL 
+sandesha2_msg_processor_process_out_msg(
+    sandesha2_msg_processor_t *msg_processor,
+    const axis2_env_t *env, 
+    sandesha2_msg_ctx_t *rm_msg_ctx)
+{
+    return msg_processor->ops->process_out_msg(msg_processor, env, rm_msg_ctx);
+}
+
 

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=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c (original)
+++ webservices/sandesha/trunk/c/src/msgprocessors/terminate_seq_msg_processor.c Sun Nov 12 21:02:42 2006
@@ -187,7 +187,7 @@
     {
         sandesha2_msg_processor_t *ack_processor = NULL;
         ack_processor = sandesha2_ack_msg_processor_create(env);
-        SANDESHA2_MSG_PROCESSOR_PROCESS_IN_MSG(ack_processor, env, rm_msg_ctx);
+        sandesha2_msg_processor_process_in_msg(ack_processor, env, rm_msg_ctx);
     }
     term_seq = (sandesha2_terminate_seq_t*)sandesha2_msg_ctx_get_msg_part(
                     rm_msg_ctx, env, SANDESHA2_MSG_PART_TERMINATE_SEQ);

Modified: webservices/sandesha/trunk/c/src/util/msg_creator.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_creator.c?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_creator.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_creator.c Sun Nov 12 21:02:42 2006
@@ -109,14 +109,14 @@
     sandesha2_acks_to_t *temp_acks_to = NULL;
 
     application_msg_ctx = sandesha2_msg_ctx_get_msg_ctx(application_rm_msg, env);
-    if(application_msg_ctx == NULL)
+    if(!application_msg_ctx)
     {
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_APPLICATION_MSG_NULL, 
                 AXIS2_FAILURE);
         return NULL;
     }
     ctx = AXIS2_MSG_CTX_GET_CONF_CTX(application_msg_ctx, env);
-    if(ctx == NULL)
+    if(!ctx)
     {
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_CONF_CTX_NULL, AXIS2_FAILURE);
         return NULL;
@@ -166,7 +166,7 @@
     AXIS2_MSG_CTX_SET_REPLY_TO(create_seq_msg_ctx, env, temp_reply_to);
     create_seq_rm_msg = sandesha2_msg_ctx_create(env, create_seq_msg_ctx);
     rm_version = sandesha2_utils_get_rm_version(env, internal_seq_id, storage_mgr);
-    if(rm_version == NULL)
+    if(!rm_version)
     {
         AXIS2_ERROR_SET(env->error, 
                 SANDESHA2_ERROR_CANNOT_FIND_RM_VERSION_OF_GIVEN_MSG, AXIS2_FAILURE);
@@ -188,7 +188,7 @@
         ctx = AXIS2_MSG_CTX_GET_BASE(application_msg_ctx, env);
         property = AXIS2_CTX_GET_PROPERTY(ctx, env, 
                 SANDESHA2_CLIENT_OFFERED_SEQ_ID, AXIS2_FALSE);
-        if(NULL != property)
+        if(property)
             offered_seq = AXIS2_PROPERTY_GET_VALUE(property, env);
         if(offered_seq && 0 != AXIS2_STRCMP("", offered_seq))
         {
@@ -207,7 +207,7 @@
     to_bean = sandesha2_seq_property_mgr_retrieve(seq_prop_mgr, env, 
             internal_seq_id, SANDESHA2_SEQ_PROP_TO_EPR);
     temp_value = sandesha2_seq_property_bean_get_value(to_bean, env);
-    if(to_bean == NULL || NULL == temp_value)
+    if(!to_bean || !temp_value)
     {
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_TO_EPR_NOT_SET, AXIS2_FAILURE);
         return NULL;
@@ -215,7 +215,7 @@
     to_epr = axis2_endpoint_ref_create(env, temp_value);
     anonymous_uri = sandesha2_spec_specific_consts_get_anon_uri(env, 
             addressing_ns_value);
-    if(acks_to == NULL || 0 == AXIS2_STRCMP("", acks_to))
+    if(!acks_to || 0 == AXIS2_STRCMP("", acks_to))
     {
         acks_to = AXIS2_STRDUP(anonymous_uri, env);
     }
@@ -226,7 +226,7 @@
         reply_to_epr = axis2_endpoint_ref_create(env, temp_value);
     }
     temp_to = sandesha2_msg_ctx_get_to(create_seq_rm_msg, env);
-    if(temp_to == NULL)
+    if(!temp_to)
         sandesha2_msg_ctx_set_to(create_seq_rm_msg, env, to_epr);
     /* ReplyTo will be set only if not NULL */
     if(reply_to_epr)
@@ -294,7 +294,7 @@
             create_seq_msg, env, SANDESHA2_MSG_PART_CREATE_SEQ);
     cs = (sandesha2_create_seq_t *) msg_part;
     rm_version = sandesha2_utils_get_rm_version(env, new_seq_id, storage_mgr);
-    if(rm_version == NULL)
+    if(!rm_version)
     {
         AXIS2_ERROR_SET(env->error, 
                 SANDESHA2_ERROR_CANNOT_FIND_RM_VERSION_OF_GIVEN_MSG, 
@@ -339,8 +339,8 @@
     envelope = axiom_soap_envelope_create_default_soap_envelope(env, soap_version);
     temp_soap_body = AXIOM_SOAP_ENVELOPE_GET_BODY(envelope, env);
     temp_om_node = AXIOM_SOAP_BODY_GET_BASE_NODE(temp_soap_body, env);
-    sandesha2_iom_rm_element_to_om_node((sandesha2_iom_rm_element_t *)(sandesha2_iom_rm_element_t *) response, 
-            env, temp_om_node);
+    sandesha2_iom_rm_element_to_om_node((sandesha2_iom_rm_element_t *)(
+                sandesha2_iom_rm_element_t *) response, env, temp_om_node);
     temp_action = sandesha2_spec_specific_consts_get_create_seq_res_action(
             env, rm_version);
     AXIS2_MSG_CTX_SET_WSA_ACTION(out_msg, env, temp_action);
@@ -469,6 +469,7 @@
     sandesha2_identifier_t *identifier = NULL;
 
     ref_msg_ctx = sandesha2_msg_ctx_get_msg_ctx(ref_rm_msg, env);
+    AXIS2_MSG_CTX_SET_KEEP_ALIVE(ref_msg_ctx, env, AXIS2_TRUE);
     if(!ref_msg_ctx)
     {
         AXIS2_ERROR_SET(env->error, SANDESHA2_ERROR_NULL_MSG_CTX,

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?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_init.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_init.c Sun Nov 12 21:02:42 2006
@@ -137,7 +137,10 @@
     {
         addressing_ns = AXIS2_STRDUP(AXIS2_WSA_NAMESPACE, env);
     }
-    elements = sandesha2_rm_elements_create(env, addressing_ns);
+    if(addressing_ns)
+        elements = sandesha2_rm_elements_create(env, addressing_ns);
+    if(!elements)
+        return AXIS2_FAILURE;
     envelope = AXIS2_MSG_CTX_GET_SOAP_ENVELOPE(msg_ctx, env);
     action = (axis2_char_t*)AXIS2_MSG_CTX_GET_WSA_ACTION(msg_ctx, env);
     SANDESHA2_RM_ELEMENTS_FROM_SOAP_ENVELOPE(elements, env, envelope, action);

Modified: webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_retrans_adjuster.c Sun Nov 12 21:02:42 2006
@@ -68,7 +68,7 @@
     AXIS2_PARAM_CHECK(env->error, storage_mgr, AXIS2_FALSE);
     
     stored_key = sandesha2_sender_bean_get_msg_ctx_ref_key(retrans_bean, env);
-    if(NULL == stored_key)
+    if(!stored_key)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Stored Key not"
                         " present in the retransmittable message");
@@ -76,7 +76,8 @@
     }
     msg_ctx = sandesha2_storage_mgr_retrieve_msg_ctx(storage_mgr, env, 
                         stored_key, conf_ctx);
-    rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
+    if(msg_ctx)
+        rm_msg_ctx = sandesha2_msg_init_init_msg(env, msg_ctx);
     int_seq_id = sandesha2_sender_bean_get_internal_seq_id(retrans_bean, env);
     seq_id = sandesha2_sender_bean_get_seq_id(retrans_bean, env);
     
@@ -93,13 +94,14 @@
     if(max_attempts > 0 && sandesha2_sender_bean_get_sent_count(retrans_bean, 
                         env) > max_attempts)
         timeout_seq = AXIS2_TRUE;
-    seq_timed_out = sandesha2_seq_mgr_has_seq_timedout(env, int_seq_id, 
+    if(rm_msg_ctx)
+        seq_timed_out = sandesha2_seq_mgr_has_seq_timedout(env, int_seq_id, 
                         rm_msg_ctx, storage_mgr);
     
     if(AXIS2_TRUE == seq_timed_out)
         timeout_seq = AXIS2_TRUE;
         
-    if(AXIS2_TRUE == timeout_seq)
+    if(timeout_seq)
     {
         sandesha2_sender_bean_set_send(retrans_bean, env, AXIS2_FALSE);
         sandesha2_msg_retrans_adjuster_finalize_timedout_seq(env, int_seq_id,

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=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/util/terminate_mgr.c (original)
+++ webservices/sandesha/trunk/c/src/util/terminate_mgr.c Sun Nov 12 21:02:42 2006
@@ -514,7 +514,7 @@
                         "invalid value");
         return AXIS2_FAILURE;
     }
-    sandesha2_msg_ctx_set_to(rm_msg_ctx, env, to_epr);
+    /*sandesha2_msg_ctx_set_to(rm_msg_ctx, env, to_epr);*/
     sandesha2_msg_ctx_set_to(terminate_rm_msg, env, to_epr);
     rm_ver = sandesha2_utils_get_rm_version(env, int_seq_id, storage_man);
     if(!rm_ver)

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?view=diff&rev=474153&r1=474152&r2=474153
==============================================================================
--- webservices/sandesha/trunk/c/src/wsrm/rm_elements.c (original)
+++ webservices/sandesha/trunk/c/src/wsrm/rm_elements.c Sun Nov 12 21:02:42 2006
@@ -278,8 +278,9 @@
 
 
 axis2_status_t AXIS2_CALL 
-sandesha2_rm_elements_free(sandesha2_rm_elements_t *elements, 
-                        const axis2_env_t *env)
+sandesha2_rm_elements_free(
+    sandesha2_rm_elements_t *elements, 
+    const axis2_env_t *env)
 {
     sandesha2_rm_elements_impl_t *elements_impl = NULL;
     
@@ -302,11 +303,11 @@
 }
 
 axis2_status_t AXIS2_CALL 
-sandesha2_rm_elements_from_soap_envelope
-            (sandesha2_rm_elements_t *rm_elements,
-            const axis2_env_t *env,
-            axiom_soap_envelope_t *soap_envelope,
-            axis2_char_t *action)
+sandesha2_rm_elements_from_soap_envelope(
+    sandesha2_rm_elements_t *rm_elements,
+    const axis2_env_t *env,
+    axiom_soap_envelope_t *soap_envelope,
+    axis2_char_t *action)
 {
     int soap_version = -1;
     sandesha2_rm_elements_impl_t *elements_impl = NULL;
@@ -349,18 +350,17 @@
     elements_impl->rm_ns_val = sandesha2_rm_elements_get_rm_ns_val(rm_elements,
                         env, soap_envelope, action);
                         
-    if(NULL == elements_impl->rm_ns_val)
+    if(!elements_impl->rm_ns_val)
         return AXIS2_SUCCESS;
         
     elements_impl->addr_ns_val =  
             sandesha2_rm_elements_get_addr_ns_val_from_env(
                         rm_elements, env, soap_envelope, action);
-    if(NULL == elements_impl->addr_ns_val)
+    if(!elements_impl->addr_ns_val)
     {
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[sandesha2] Cannot find the"
                         " addressing version");
-        /*return AXIS2_FAILURE;*/
-        elements_impl->addr_ns_val = AXIS2_STRDUP(AXIS2_WSA_NAMESPACE ,env);
+        return AXIS2_FAILURE;
     }
     soap_header = AXIOM_SOAP_ENVELOPE_GET_HEADER(soap_envelope, env);    
     header_node = AXIOM_SOAP_HEADER_GET_BASE_NODE(soap_header, env);
@@ -376,11 +376,11 @@
     qname = axis2_qname_create(env, SANDESHA2_WSRM_COMMON_SEQ, rm_ns_val, NULL);
     seq_element = AXIOM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(header_element, env,
                         qname, header_node, &seq_node);
-    if(NULL != seq_node)
+    if(seq_node)
     {
         elements_impl->seq = sandesha2_seq_create(env, rm_ns_val);
-        sandesha2_iom_rm_element_from_om_node((sandesha2_iom_rm_element_t *)elements_impl->seq, env, 
-                        header_node);
+        sandesha2_iom_rm_element_from_om_node((sandesha2_iom_rm_element_t *)
+                elements_impl->seq, env, header_node);
     }
     qname = axis2_qname_create(env, SANDESHA2_WSRM_COMMON_SEQ_ACK, rm_ns_val, 
                         NULL);



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