Author: damitha
Date: Mon Jun 16 03:19:21 2008
New Revision: 668100

URL: http://svn.apache.org/viewvc?rev=668100&view=rev
Log:
Supporting Security with RM.

Modified:
    
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/ack_mgr.c
    
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/sandesha2_utils.c

Modified: 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/ack_mgr.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/ack_mgr.c?rev=668100&r1=668099&r2=668100&view=diff
==============================================================================
--- 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/ack_mgr.c
 (original)
+++ 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/ack_mgr.c
 Mon Jun 16 03:19:21 2008
@@ -47,7 +47,7 @@
     axis2_conf_ctx_t *conf_ctx = NULL;
 
     axis2_endpoint_ref_t *to = NULL;
-    axis2_op_t *ack_op = NULL;
+    /*axis2_op_t *ack_op = NULL;*/
     axis2_op_t *ref_op = NULL;
     axis2_msg_ctx_t *ack_msg_ctx = NULL;
     axutil_property_t *property = NULL;
@@ -77,10 +77,10 @@
         }
     }
 
-    ack_op = axis2_op_create(env);
-    axis2_op_set_msg_exchange_pattern(ack_op, env, AXIS2_MEP_URI_OUT_ONLY);
+    /*ack_op = axis2_op_create(env);
+    axis2_op_set_msg_exchange_pattern(ack_op, env, AXIS2_MEP_URI_OUT_ONLY);*/
     ref_op = axis2_msg_ctx_get_op(ref_msg, env);
-    if(ref_op)
+    /*if(ref_op)
     {
         axutil_array_list_t *out_flow = NULL;
         axutil_array_list_t *out_fault_flow = NULL;
@@ -94,9 +94,8 @@
             axis2_op_set_out_flow(ack_op, env, new_out_flow);
         if(new_out_fault_flow)
             axis2_op_set_fault_out_flow(ack_op, env, new_out_fault_flow);
-    }
-    ack_msg_ctx = sandesha2_utils_create_new_related_msg_ctx(env, ref_rm_msg,
-        ack_op);
+    }*/
+    ack_msg_ctx = sandesha2_utils_create_new_related_msg_ctx(env, ref_rm_msg, 
ref_op);
     property = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 
         AXIS2_FALSE, 0, AXIS2_VALUE_TRUE);
     if(property)
@@ -118,15 +117,16 @@
     /* Adding the sequence acknowledgement part */
     sandesha2_msg_creator_add_ack_msg(env, ack_rm_msg, seq_id, seq_prop_mgr);
     axis2_msg_ctx_set_property(ack_msg_ctx, env, AXIS2_TRANSPORT_IN, NULL);
-    op_ctx = axis2_msg_ctx_get_op_ctx(ref_msg, env);
-    if(!op_ctx)
+    /*if(!op_ctx)
     {
         axis2_op_t *op = axis2_op_create(env);
         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);            
-    }
+    }*/
+    
+    op_ctx = axis2_msg_ctx_get_op_ctx(ref_msg, env);
     axis2_op_ctx_set_response_written(op_ctx, env, AXIS2_TRUE);
     
     property = axutil_property_create_with_args(env, AXIS2_SCOPE_REQUEST, 

Modified: 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/sandesha2_utils.c
URL: 
http://svn.apache.org/viewvc/webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/sandesha2_utils.c?rev=668100&r1=668099&r2=668100&view=diff
==============================================================================
--- 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/sandesha2_utils.c
 (original)
+++ 
webservices/sandesha/tags/sandesha2/c/worker_thread_removed-23may2008/src/util/sandesha2_utils.c
 Mon Jun 16 03:19:21 2008
@@ -510,6 +510,7 @@
     sandesha2_msg_ctx_t *ref_rm_msg,
     axis2_op_t *create_seq_op)
 {
+    axis2_ctx_t *ctx = NULL;
     axis2_msg_ctx_t *ref_msg = NULL;
     axis2_msg_ctx_t *new_msg = NULL;
     axis2_conf_ctx_t *conf_ctx = NULL;
@@ -607,10 +608,38 @@
         svc_ctx = axis2_svc_ctx_create(env, axis_svc, svc_grp_ctx);
     }
 
-    create_seq_op_ctx = axis2_op_ctx_create(env, create_seq_op, 
axis2_msg_ctx_get_svc_ctx(new_msg, 
-                env));
+    create_seq_op_ctx = axis2_msg_ctx_get_op_ctx(ref_msg, env);
+    axis2_op_ctx_increment_ref(create_seq_op_ctx, env);
     axis2_msg_ctx_set_op_ctx(new_msg, env, create_seq_op_ctx);
-    
+
+    ctx = axis2_msg_ctx_get_base(ref_msg, env);
+    if (ctx)
+    {
+        axis2_ctx_t *new_ctx = axis2_msg_ctx_get_base(new_msg, env);
+        if (new_ctx)
+        {
+            axutil_hash_index_t *hi = NULL;
+            axutil_hash_t *ht = NULL;
+            axutil_hash_t *ht2 = NULL;
+            void *val = NULL;
+            const void *val2 = NULL;
+            axutil_property_t *prop = NULL;
+            axutil_property_t *prop_clone = NULL;
+            axis2_char_t *prop_name = NULL;
+
+            ht = axis2_ctx_get_property_map(ctx, env);
+            ht2 = axis2_ctx_get_property_map(new_ctx, env);
+            for (hi = axutil_hash_first(ht, env); hi; hi = 
axutil_hash_next(env, hi)) {
+                axutil_hash_this(hi, &val2, NULL, &val);
+                prop = (axutil_property_t*)val;
+                prop_name = (axis2_char_t*)val2;
+                prop_clone = axutil_property_clone(prop, env);
+                axis2_ctx_set_property(new_ctx, env, prop_name, prop_clone);
+                axutil_property_set_free_func(prop, env, 
sandesha2_util_dummy_prop_free);
+            }
+        }
+    }
+
     soap_env = axiom_soap_envelope_create_default_soap_envelope(env, 
             sandesha2_utils_get_soap_version(env, 
axis2_msg_ctx_get_soap_envelope(ref_msg, env)));
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to