You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sandesha-dev@ws.apache.org by da...@apache.org on 2006/07/19 09:22:10 UTC

svn commit: r423392 - in /webservices/sandesha/trunk/c: include/sandesha2/sandesha2_spec_specific_consts.h src/util/msg_creater.c src/util/msg_creator.c

Author: damitha
Date: Wed Jul 19 00:22:09 2006
New Revision: 423392

URL: http://svn.apache.org/viewvc?rev=423392&view=rev
Log:
More work msg_creator

Added:
    webservices/sandesha/trunk/c/src/util/msg_creator.c
      - copied, changed from r423390, webservices/sandesha/trunk/c/src/util/msg_creater.c
Removed:
    webservices/sandesha/trunk/c/src/util/msg_creater.c
Modified:
    webservices/sandesha/trunk/c/include/sandesha2/sandesha2_spec_specific_consts.h

Modified: webservices/sandesha/trunk/c/include/sandesha2/sandesha2_spec_specific_consts.h
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/include/sandesha2/sandesha2_spec_specific_consts.h?rev=423392&r1=423391&r2=423392&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/include/sandesha2/sandesha2_spec_specific_consts.h (original)
+++ webservices/sandesha/trunk/c/include/sandesha2/sandesha2_spec_specific_consts.h Wed Jul 19 00:22:09 2006
@@ -76,7 +76,22 @@
         axis2_char_t *spec_version);
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+sandesha2_spec_specific_consts_get_create_seq_response_action(
+        const axis2_env_t *env,
+        axis2_char_t *spec_version);
+
+axis2_char_t *AXIS2_CALL
+sandesha2_spec_specific_consts_get_create_seq_response_soap_action(
+        const axis2_env_t *env,
+        axis2_char_t *spec_version);
+
+axis2_char_t *AXIS2_CALL
 sandesha2_spec_specific_consts_get_close_seq_action(
+        const axis2_env_t *env,
+        axis2_char_t *spec_version);
+
+axis2_char_t *AXIS2_CALL
+sandesha2_spec_specific_consts_get_close_seq_response_action(
         const axis2_env_t *env,
         axis2_char_t *spec_version);
 	

Copied: webservices/sandesha/trunk/c/src/util/msg_creator.c (from r423390, webservices/sandesha/trunk/c/src/util/msg_creater.c)
URL: http://svn.apache.org/viewvc/webservices/sandesha/trunk/c/src/util/msg_creator.c?p2=webservices/sandesha/trunk/c/src/util/msg_creator.c&p1=webservices/sandesha/trunk/c/src/util/msg_creater.c&r1=423390&r2=423392&rev=423392&view=diff
==============================================================================
--- webservices/sandesha/trunk/c/src/util/msg_creater.c (original)
+++ webservices/sandesha/trunk/c/src/util/msg_creator.c Wed Jul 19 00:22:09 2006
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
  
-#include <sandesha2_msg_creater.h>
+#include <sandesha2_msg_creator.h>
 #include <sandesha2_storage_mgr.h>
 #include <sandesha2_seq_property_mgr.h>
 #include <sandesha2_spec_specific_consts.h>
@@ -23,9 +23,11 @@
 #include <sandesha2_constants.h>
 #include <sandesha2_msg_ctx.h>
 #include <sandesha2_create_seq.h>
+#include <sandesha2_create_seq_res.h>
 #include <sandesha2_acks_to.h>
 #include <sandesha2_address.h>
 #include <sandesha2_seq_offer.h>
+#include <sandesha2_accept.h>
 
 #include <axis2_conf_ctx.h>
 #include <axis2_ctx.h>
@@ -33,6 +35,7 @@
 #include <axis2_property.h>
 #include <axis2_log.h>
 #include <axis2_uuid_gen.h>
+#include <axis2_addr.h>
 
 /**
  * Create a new create_seq_msg
@@ -42,7 +45,7 @@
  * @return
  */
 sandesha2_msg_ctx_t *AXIS2_CALL
-sandesha2_msg_creater_create_create_seq_msg(
+sandesha2_msg_creator_create_create_seq_msg(
         const axis2_env_t *env,
         sandesha2_msg_ctx_t *application_rm_msg, 
         axis2_char_t *internal_seq_id,
@@ -98,7 +101,7 @@
     create_seq_op = axis2_op_create(env);
     create_seq_msg_ctx = sandesha2_utils_create_new_related_msg_ctx(env, 
             application_rm_msg, create_seq_op);
-    sandesha2_msg_creater_init_creation(env, application_msg_ctx, 
+    sandesha2_msg_creator_init_creation(env, application_msg_ctx, 
             create_seq_msg_ctx);
     create_seq_op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(create_seq_msg_ctx, env);
     create_seq_msg_id = sandesha2_uuid_gen(env);
@@ -214,4 +217,388 @@
             create_seq_msg_ctx);
     return create_seq_rm_msg;
 }
-    
+
+/**
+ * Create a new create_seq_response message.
+ * @param create_seq_msg
+ * @param out_msg
+ * @param new_seq_id
+ * @return
+ */
+sandesha2_msg_ctx_t *
+sandesha2_msg_creator_create_create_seq_response_msg(
+        const axis2_env_t *env,
+        sandesha2_msg_ctx_t *create_seq_msg,
+        axis2_msg_ctx_t *out_msg,
+        axis2_char_t *new_seq_id,
+        axis2_storage_mgr_t *storage_mgr)
+{
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    axis2_ctx_t *ctx = NULL;
+    axis2_msg_ctx_t *temp_msg_ctx = NULL;
+    axis2_property_t *prop = NULL;
+    sandesha2_iom_rm_element_t *msg_part = NULL;
+    sandesha2_create_seq_t *cs = NULL;
+    axis2_char_t *rm_version = NULL;
+    axis2_char_t *rm_ns_value = NULL;
+    axis2_char_t *addressing_ns_value = NULL;
+    axis2_char_t *temp_action = NULL;
+    sandesha2_create_seq_res_t *response = NULL;
+    sandesha2_identifier_t *identifier = NULL;
+    sandesha2_seq_offer_t *offer = NULL;
+    axiom_soap_envelope_t *envelope = NULL;
+    axiom_soap_envelope_t *temp_envelope = NULL;
+    axiom_soap_body_t *temp_soap_body = NULL;
+    axiom_node_t *temp_om_node = NULL;
+    axis2_char_t *new_msg_id = NULL;
+    sandesha2_msg_ctx_t *create_seq_response = NULL;
+    axis2_msg_ctx_t *temp_msg_ctx = NULL;
+    int soap_version = -1;
+
+    temp_msg_ctx = SANDESHA2_MSG_CTX_GET_MSG_CTX(create_seq_msg, env);
+    conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(temp_msg_ctx, env);
+    msg_part = SANDESHA2_MSG_CTX_GET_MSG_PART(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)
+    {
+        AXIS2_ERROR_SET(env->error, 
+                SANDESHA2_ERROR_CANNOT_FIND_RM_VERSION_OF_GIVEN_MSG, 
+                AXIS2_FAILURE);
+        return NULL;
+    }
+    rm_ns_value = sandesha2_spec_specific_consts_get_rm_ns_val(env, rm_version);
+    addressing_ns_value = sandesha2_utils_get_seq_property(env, new_seq_id, 
+            SANDESHA2_SEQ_PROP_ADDRESSING_NAMESPACE_VALUE, storage_mgr);
+    response = sandesha2_create_seq_res(env, rm_ns_value, addressing_ns_value);
+    identifier = sandesha2_identifier_create(env, rm_ns_value);
+    SANDESHA2_IDENTIFIER_SET_IDENTIFIER(identifier, env, new_seq_id);
+    SANDESHA2_CREATE_SEQ_RES_SET_IDENTIFIER(response, env, identifier);
+    offer = SANDESHA2_CREATE_SEQ_GET_SEQ_OFFER(cs, env);
+    if(offer)
+    {
+        axis2_char_t *out_seq_id = NULL;
+        sandesha2_identifier_t *temp_identifier = NULL;
+        
+        temp_identifier = SANDESHA2_SEQ_OFFER_GET_IDENTIFIER(offer, env);
+        out_seq_id = SANDESHA2_IDENTIFIER_GET_IDENTIFIER(temp_identifier, env);
+        if(out_seq_id && 0 != AXIS2_STRCMP("", out_seq_id))
+        {
+            sandesha2_accept_t *accept = NULL;
+            axis2_endpoint_ref_t *acks_to_epr = NULL;
+            sandesha2_acks_to = NULL;
+            sandesha2_address_t *address = NULL;
+
+            accept = sandesha2_accept_create(env, rm_ns_value, addressing_ns_value);
+            acks_to_epr = SANDESHA2_MSG_CTX_GET_TO(create_seq_msg, env);
+            acks_to = sandesha2_acks_to_create(env, rm_ns_value, addressing_ns_value);
+            address = sandesha2_address_create(env, addressing_ns_value);
+            SANDESHA2_ADDRESS_SET_EPR(address, env, acks_to_epr);
+            SANDESHA2_ACKS2_TO_SET_ADDRESS(acks_to, env, address);
+            SANDESHA2_ACCEPT_SET_ACKS_TO(accept, env, acks_to);
+            SANDESHA2_CREATE_SEQ_RES_SET_ACCEPT(response, env, accept);
+        }
+    }
+    temp_envelope = SANDESHA2_MSG_CTX_GET_SOAP_ENVELOPE(create_seq_msg, env); 
+    soap_version = sandesha2_utils_get_soap_version(env, temp_envelope);
+    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_IMO_RM_ELEMENT_TO_OM_NODE((sandesha2_iom_rm_element_t *) response, 
+            env, temp_om_node);
+    temp_action = sandesha2_spec_specific_consts_get_create_seq_response_action(
+            env, rm_version);
+    AXIS2_MSG_CTX_SET_WSA_ACTION(out_msg, env, temp_action);
+    temp_action = 
+        sandesha2_spec_specific_consts_get_create_seq_response_soap_action(env, 
+                rm_version);
+    AXIS2_MSG_CTX_SET_SOAP_ACTION(out_msg, env, temp_action);
+    ctx = AXIS2_MSG_CTX_GET_BASE(out_msg, env);
+    prop = axis2_property_create(env);
+    AXIS2_PROPERTY_SET_SCOPE(prop, env, AXIS2_SCOPE_APPLICATION);
+    AXIS2_PROPERTY_SET_VALUE(prop, env, addressing_ns_value);
+    AXIS2_CTX_SET_PROPERTY(ctx, env, AXIS2_WSA_VERSION, prop, AXIS2_FALSE);
+    new_msg_id = axis2_uuid_gen(env);
+    AXIS2_MSG_CTX_SET_MSG_ID(out_msg, env, new_msg_id);
+    AXIS2_MSG_CTX_SET_ENVELOPE(out_msg, env, envelope);
+    temp_msg_ctx = SANDESHA2_MSG_CTX_GET_MSG_CTX(create_seq_msg, env);
+    sandesha2_msg_creator_init_creation(env, temp_msg_ctx,out_msg);
+    create_seq_response = sandesha2_msg_initializer_init_msg(env, out_msg);
+    SANDESHA2_MSG_CTX_SET_MSG_PART(create_seq_response, env, 
+            SANDESHA2_MSG_PART_CREATE_SEQ_RESPONSE, response);
+    temp_msg_ctx = SANDESHA2_MSG_CTX_GET_MSG_CTX(create_seq_msg, env);
+    sandesha2_msg_creator_finalize_creation(env, temp_msg_ctx, out_msg);
+    AXIS2_MSG_CTX_SET_SERVER_SIDE(temp_msg_ctx, env, AXIS2_TRUE);
+    return create_seq_response;
+}
+ 
+/**
+ * Create a new close_seq_response message.
+ * @param close_seq_msg
+ * @param out_msg
+ * @param storage_mgr
+ * @return
+ */
+sandesha2_msg_ctx_t *
+sandesha2_msg_creator_create_close_seq_response_msg(
+        const axis2_env_t *env,
+        sandesha2_msg_ctx_t *close_seq_msg,
+        axis2_msg_ctx_t *out_msg,
+        axis2_storage_mgr_t *storage_mgr)
+{
+    axis2_conf_ctx_t *conf_ctx = NULL;
+    axis2_ctx_t *ctx = NULL;
+    axis2_msg_ctx_t *temp_msg_ctx = NULL;
+    axis2_property_t *prop = NULL;
+    axis2_char_t *rm_version = NULL;
+    axis2_char_t *ns = NULL;
+    axis2_char_t *addressing_ns_value = NULL;
+    axis2_char_t *temp_action = NULL;
+    axis2_char_t *new_msg_id = NULL;
+    axis2_char_t *seq_id = NULL;
+    axiom_soap_envelope_t *envelope = NULL;
+    axiom_soap_envelope_t *temp_envelope = NULL;
+    axiom_soap_body_t *temp_soap_body = NULL;
+    axiom_node_t *temp_om_node = NULL;
+    sandesha2_iom_rm_element_t *msg_part = NULL;
+    sandesha2_close_seq_t *cs = NULL;
+    sandesha2_msg_ctx_t *close_seq_response = NULL;
+    sandesha2_close_seq_res_t *response = NULL;
+    sandesha2_identifier_t *identifier = NULL;
+    int soap_version = -1;
+
+    close_seq_response = sandesha2_msg_ctx_create(env, out_msg);
+    temp_msg_ctx = SANDESHA2_MSG_CTX_GET_MSG_CTX(close_seq_msg, env);
+    conf_ctx = AXIS2_MSG_CTX_GET_CONF_CTX(temp_msg_ctx, env);
+    msg_part = SANDESHA2_MSG_CTX_GET_MSG_PART(close_seq_msg, env, 
+            SANDESHA2_MSG_PART_CLOSE_SEQ);
+    cs = (sandesha2_close_seq_t *) msg_part;
+    temp_identifier = SANDESHA2_CLOSE_SEQ_GET_IDENTIFIER(offer, env);
+    seq_id = SANDESHA2_IDENTIFIER_GET_IDENTIFIER(temp_identifier, env);
+    ns = SANDESHA2_MSG_CTX_GET_RM_NS_VAL(close_seq_msg, env);
+    SANDESHA2_MSG_CTX_SET_RM_NS_VAL(close_seq_response, env, ns);
+    response = sandesha2_close_seq_res(env, ns);
+    identifier = sandesha2_identifier_create(env, ns);
+    SANDESHA2_IDENTIFIER_SET_IDENTIFIER(identifier, env, seq_id);
+    SANDESHA2_CLOSE_SEQ_RES_SET_IDENTIFIER(response, env, identifier);
+    temp_envelope = SANDESHA2_MSG_CTX_GET_SOAP_ENVELOPE(close_seq_msg, env); 
+    soap_version = sandesha2_utils_get_soap_version(env, temp_envelope);
+    envelope = axiom_soap_envelope_create_default_soap_envelope(env, soap_version);
+    SANDESHA2_MSG_CTX_SET_ENVELOPE(close_seq_response, env, envelope);
+    SANDESHA2_MSG_CTX_SET_SET_MSG_PART(close_seq_response, env, 
+            SANDESHA2_MSG_PART_CLOSE_SEQ_RESPONSE, response);
+    rm_version = sandesha2_utils_get_rm_version(env, seq_id, storage_mgr);
+    temp_action = sandesha2_spec_specific_consts_get_close_seq_response_action(
+            env, rm_version);
+    AXIS2_MSG_CTX_SET_WSA_ACTION(out_msg, env, temp_action);
+    temp_action = 
+        sandesha2_spec_specific_consts_get_close_seq_response_action(env, 
+                rm_version);
+    AXIS2_MSG_CTX_SET_SOAP_ACTION(out_msg, env, temp_action);
+
+
+    temp_msg_ctx = SANDESHA2_MSG_CTX_GET_MSG_CTX(close_seq_msg, env);
+    sandesha2_msg_creator_init_creation(env, temp_msg_ctx,out_msg);
+    SANDESHA2_MSG_CTX_ADD_SOAP_ENVELOPE(close_seq_response, env);
+    sandesha2_msg_creator_finalize_creation(env, temp_msg_ctx, out_msg);
+    AXIS2_MSG_CTX_SET_SERVER_SIDE(temp_msg_ctx, env, AXIS2_TRUE);
+    return close_seq_response;
+}
+  
+static axis2_status_t
+sandesha2_msg_creator_finalize_creation(
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *related_msg,
+        axis2_msg_ctx_t *new_msg)
+{
+    axis2_op_t *old_op = NULL;
+    axis2_op_ctx_t *old_op_ctx = NULL;
+    axis2_options_t *relates_msg_options = NULL;
+    axis2_bool_t temp_bool = AXIS2_FALSE;
+
+    temp_bool = AXIS2_MSG_CTX_IS_SERVER_SIDE(related_msg, env);
+    AXIS2_MSG_CTX_SET_SERVER_SIDE(new_msg, env, temp_bool);
+    /* Adding all parameters from old message to the new one */
+    old_op = AXIS2_MSG_CTX_GET_OP(related_msg, env);
+    if(old_op)
+    {
+        axis2_array_list_t *op_params = NULL;
+
+        op_params = AXIS2_OP_GET_PARAMS(old_axis_op, env);
+        if(op_params)
+        {
+            axis2_op_t *new_op = NULL;
+            int i = 0, size = 0;
+
+            new_op = AXIS2_MSG_CTX_GET_OP(new_msg, env);
+            size = AXIS2_ARRAY_LIST_SIZE(op_params, env);
+            for(i = 0; i < size; i++)
+            {
+                axis2_param_t *next_param = NULL;
+                axis2_param_t *new_param = NULL;
+                axis2_char_t *temp_name = NULL;
+                void *temp_value = NULL;
+
+                next_param = (axis2_param_t *) AXIS2_ARRAY_LIST_GET(op_params, 
+                        env, i);
+                new_param = axis2_param_create(env);
+                temp_name = AXIS2_PARAM_GET_NAME(next_param, env);
+                AXIS2_PARAM_SET_NAME(new_param, env, temp_name);
+                temp_value = AXIS2_PARAM_GET_VALUE(next_param, env);
+                AXIS2_PARAM_SET_VALUE(new_param, env, temp_value);
+                new_param->op->value_free = next_param->op->value_free;
+                AXIS2_OP_SET_PARAM(new_op, env, new_param); 
+            }
+        }
+    }
+    /* Operation context properties */
+    old_op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(related_msg, env);
+    if(old_op_ctx)
+    {
+        axis2_hash_t *old_op_ctx_props = NULL;
+
+        old_op_ctx_props = AXIS2_OP_CTX_GET_PROPERTIES(old_op_ctx, env);
+        if(old_op_ctx_props)
+        {
+            axis2_op_ctx_t *new_op_ctx = NULL;
+            axis2_hash_index_t *i = NULL;
+
+            new_op_ctx = AXIS2_MSG_CTX_GET_OP_CTX(new_msg, env);
+            for (i = axis2_hash_first (old_op_ctx_props, env); i; i = 
+                    axis2_hash_next (env, i))
+            {
+                void *v = NULL;
+                void *k = NULL;
+                axis2_char_t *key = NULL;
+                axis2_property_t *prop = NULL;
+                axis2_ctx_t *ctx = NULL;
+
+                axis2_hash_this (i, &k, NULL, &v);
+                key = (axis2_char_t *) k;
+                prop = (axis2_property_t *) v;
+                ctx = AXIS2_OP_CTX_GET_BASE(new_op_ctx, env);
+                AXIS2_CTX_SET_PROPERTY(ctx, env, key, prop, AXIS2_FALSE);
+            }
+        }
+    }
+    /* Message Context properties */
+    if(related_msg && new_msg)
+    {
+        axis2_hash_t *old_msg_ctx_props = NULL;
+
+        old_msg_ctx_props = AXIS2_MSG_CTX_GET_PROPERTIES(related_msg, env);
+        if(old_msg_ctx_props)
+        {
+            axis2_hash_index_t *i = NULL;
+
+            for (i = axis2_hash_first (old_msg_ctx_props, env); i; i = 
+                    axis2_hash_next (env, i))
+            {
+                void *v = NULL;
+                void *k = NULL;
+                axis2_char_t *key = NULL;
+                axis2_property_t *prop = NULL;
+                axis2_ctx_t *ctx = NULL;
+
+                axis2_hash_this (i, &k, NULL, &v);
+                key = (axis2_char_t *) k;
+                prop = (axis2_property_t *) v;
+                ctx = AXIS2_MSG_CTX_GET_BASE(new_msg, env);
+                AXIS2_CTX_SET_PROPERTY(ctx, env, key, prop, AXIS2_FALSE);
+            }
+        }
+    }
+    /* Setting options with properties copied from the old one */
+    related_msg_options = AXIS2_MSG_CTX_GET_OPTIONS(related_msg, env);
+    if(related_msg_options)
+    {
+        axis2_options_t *new_msg_options = NULL;
+        axis2_hash_t *related_msg_props = NULL;
+        axis2_options_t *related_msg_parent_options = NULL;
+
+        new_msg_options = AXIS2_MSG_CTX_GET_OPTIONS(new_msg, env);
+        if(new_msg_options == NULL)
+        {
+            new_msg_options = axis2_options_create(env);
+            AXIS2_MSG_CTX_SET_OPTIONS(new_msg, env, new_msg_options);
+        }
+        related_msg_props = AXIS2_OPTIONS_GET_PROPERTIES(related_msg_options, env);
+        if(related_msg_props)
+        {
+            axis2_hash_index_t *i = NULL;
+
+            for (i = axis2_hash_first (related_msg_props, env); i; i = 
+                    axis2_hash_next (env, i))
+            {
+                void *v = NULL;
+                void *k = NULL;
+                axis2_char_t *key = NULL;
+                axis2_property_t *prop = NULL;
+                axis2_ctx_t *ctx = NULL;
+
+                axis2_hash_this (i, &k, NULL, &v);
+                key = (axis2_char_t *) k;
+                prop = (axis2_property_t *) v;
+                AXIS2_OPTIONS_SET_PROPERTY(new_msg_options, env, key, prop, AXIS2_FALSE);
+            }
+        }
+        related_msg_parent_options = AXIS2_OPTIONS_GET_PARENT(related_msg_options, env);
+        if(related_msg_parent_options)
+        {
+            axis2_hash_t *related_msg_parent_properties = NULL;
+
+            related_msg_parent_properties = AXIS2_OPTIONS_GET_PROPERTIES(
+                    related_msg_parent_options, env);
+            if(related_msg_parent_properties)
+            {
+                axis2_hash_index_t *i = NULL;
+
+                for (i = axis2_hash_first (related_msg_parent_properties, env); i; i = 
+                        axis2_hash_next (env, i))
+                {
+                    void *v = NULL;
+                    void *k = NULL;
+                    axis2_char_t *key = NULL;
+                    axis2_property_t *prop = NULL;
+                    axis2_ctx_t *ctx = NULL;
+
+                    axis2_hash_this (i, &k, NULL, &v);
+                    key = (axis2_char_t *) k;
+                    prop = (axis2_property_t *) v;
+                    AXIS2_OPTIONS_SET_PROPERTY(new_msg_options, env, key, prop, AXIS2_FALSE);
+                }
+            }
+        }
+    }
+    return AXIS2_SUCCESS;
+}
+ 
+static axis2_status_t
+sandesha2_msg_creator_init_creation(
+        const axis2_env_t *env,
+        axis2_msg_ctx_t *related_msg,
+        axis2_msg_ctx_t *new_msg)
+{
+    axis2_svc_t related_svc = NULL;
+    axis2_svc_t *new_svc = NULL;
+
+    related_svc = AXIS2_MSG_CTX_GET_SVC(related_msg, env);
+    new_svc = AXIS2_MSG_CTX_GET_SVC(new_msg, env);
+    if(related_svc && new_svc && related_svc != new_svc)
+    {
+        axis2_param_t *ref_policy_param = NULL;
+
+        ref_policy_param = AXIS2_SVC_GET_PARAM(related_svc, env, SANDESHA2_SANDESHA_PROPERTY_BEAN);
+        if(ref_policy_param)
+        {
+            void *value = NULL;
+            axis2_param_t *new_policy_param = axis2_param_create(env);
+            AXIS2_PARAM_SET_NAME(new_policy_param, env, SANDESHA2_SANDESHA_PROPERTY_BEAN);
+            value = SANDESHA2_PARAM_GET_VALUE(ref_policy_param, env);
+            AXIS2_PARAM_SET_VALUE(new_policy_param, env, value);
+        }
+        
+    }
+}
+



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