You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2006/12/15 12:53:11 UTC

svn commit: r487522 - in /webservices/axis2/trunk/c: ./ axiom/src/soap/ include/ modules/core/clientapi/ modules/core/context/ modules/core/deployment/ modules/core/description/ modules/core/engine/ modules/core/transport/http/ modules/core/transport/h...

Author: damitha
Date: Fri Dec 15 03:53:08 2006
New Revision: 487522

URL: http://svn.apache.org/viewvc?view=rev&rev=487522
Log:
Added rand.c new file rand.c. Added shallow cloning function to property.c.

Added:
    webservices/axis2/trunk/c/util/include/axis2_rand.h
    webservices/axis2/trunk/c/util/src/rand.c
Modified:
    webservices/axis2/trunk/c/axiom/src/soap/soap_header.c
    webservices/axis2/trunk/c/build.sh
    webservices/axis2/trunk/c/include/axis2_const.h
    webservices/axis2/trunk/c/include/axis2_msg_ctx.h
    webservices/axis2/trunk/c/include/axis2_op.h
    webservices/axis2/trunk/c/include/axis2_phases_info.h
    webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
    webservices/axis2/trunk/c/modules/core/context/ctx.c
    webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
    webservices/axis2/trunk/c/modules/core/deployment/axis2_desc_builder.h
    webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
    webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/module_builder.c
    webservices/axis2/trunk/c/modules/core/deployment/phases_info.c
    webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c
    webservices/axis2/trunk/c/modules/core/description/msg.c
    webservices/axis2/trunk/c/modules/core/description/op.c
    webservices/axis2/trunk/c/modules/core/description/svc.c
    webservices/axis2/trunk/c/modules/core/engine/conf.c
    webservices/axis2/trunk/c/modules/core/engine/engine.c
    webservices/axis2/trunk/c/modules/core/transport/http/http_out_transport_info.c
    webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c
    webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c
    webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
    webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c
    webservices/axis2/trunk/c/modules/core/util/core_utils.c
    webservices/axis2/trunk/c/util/include/axis2_array_list.h
    webservices/axis2/trunk/c/util/include/axis2_property.h
    webservices/axis2/trunk/c/util/include/axis2_utils.h
    webservices/axis2/trunk/c/util/src/Makefile.am
    webservices/axis2/trunk/c/util/src/property.c
    webservices/axis2/trunk/c/util/src/qname.c

Modified: webservices/axis2/trunk/c/axiom/src/soap/soap_header.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/soap/soap_header.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/soap/soap_header.c (original)
+++ webservices/axis2/trunk/c/axiom/src/soap/soap_header.c Fri Dec 15 03:53:08 2006
@@ -589,7 +589,6 @@
     AXIS2_PARAM_CHECK(env->error, ns_uri, NULL);
 
     header_impl = AXIS2_INTF_TO_IMPL(header);
-
     if (!(header_impl->header_blocks))
         return NULL;
 

Modified: webservices/axis2/trunk/c/build.sh
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/build.sh?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/build.sh (original)
+++ webservices/axis2/trunk/c/build.sh Fri Dec 15 03:53:08 2006
@@ -6,13 +6,13 @@
 
 echo "AXIS2C_HOME = ${AXIS2C_HOME}"
 
-./configure --prefix=${AXIS2C_HOME} 
+./configure --prefix=${AXIS2C_HOME} --with-axis2_util=${AXIS2C_HOME}/include --with-axiom=${AXIS2C_HOME}/include -with-apache2=/usr/local/apache2/include
 make 
 make install
 
 cd samples
 ./autogen.sh
-./configure --prefix=${AXIS2C_HOME} --with-axis2_util=${AXIS2C_HOME}/include --with-axiom=${AXIS2C_HOME}/include
+./configure --prefix=${AXIS2C_HOME} 
 make 
 make install
 								

Modified: webservices/axis2/trunk/c/include/axis2_const.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_const.h?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_const.h (original)
+++ webservices/axis2/trunk/c/include/axis2_const.h Fri Dec 15 03:53:08 2006
@@ -170,7 +170,10 @@
 #define AXIS2_SERVICE_GROUP_MAP "serviceGroupmap"
 
 #define AXIS2_CONFIG_CONTEXT "config_context"
-
+#define AXIS2_ACTION_MAPPING "actionMapping"
+#define AXIS2_OUTPUT_ACTION_MAPPING "outputActionMapping"
+#define AXI2_FAULT_ACTION_MAPPING "faultActionMapping"
+    
 #define AXIS2_SERVICE "service"
 
 #define AXIS2_OPEARTION_MAP "opmap"

Modified: webservices/axis2/trunk/c/include/axis2_msg_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_msg_ctx.h?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg_ctx.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg_ctx.h Fri Dec 15 03:53:08 2006
@@ -1266,7 +1266,7 @@
                     axis2_msg_ctx_t *msg_ctx,
                     const axis2_env_t *env,
                     struct axis2_options *options);
-
+        
         /**
          * Sets the flow to be invoked.
          * @param msg_ctx message context

Modified: webservices/axis2/trunk/c/include/axis2_op.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_op.h?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_op.h (original)
+++ webservices/axis2/trunk/c/include/axis2_op.h Fri Dec 15 03:53:08 2006
@@ -783,9 +783,33 @@
          * AXIS2_TRUE if the operation is from a module, else AXIS2_FALSE
          */
         axis2_bool_t (AXIS2_CALL *
-        is_from_module)(
-            const axis2_op_t *op,
-            const axis2_env_t *env);
+                is_from_module)(
+                    const axis2_op_t *op,
+                    const axis2_env_t *env);
+
+        /**
+         * Set the wsamapping list.
+         * @param op pointer to operation
+         * @param env pointer to environment struct
+         * @param mapping_list list of action mappings
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_status_t (AXIS2_CALL *
+                set_wsamapping_list)(
+                    axis2_op_t *op,
+                    const axis2_env_t *env,
+                    axis2_array_list_t *mapping_list);
+
+        /**
+         * Get the wsamapping list.
+         * @param op pointer to operation
+         * @param env pointer to environment struct
+         * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+         */
+        axis2_array_list_t *(AXIS2_CALL *
+                get_wsamapping_list)(
+                    axis2_op_t *op,
+                    const axis2_env_t *env);
     };
 
     /**
@@ -1110,6 +1134,16 @@
     @sa axis2_op_ops#is_from_module */
 #define AXIS2_OP_IS_FROM_MODULE(op, env) \
         ((op)->ops->is_from_module(op, env))
+
+/** Set wsa mapping list.
+    @sa axis2_op_ops#set_wsamapping_list */
+#define AXIS2_OP_SET_WSAMAPPING_LIST(op, env, mapping_list) \
+        ((op)->ops->set_wsamapping_list(op, env, mapping_list))
+
+/** Get wsa mapping list.
+    @sa axis2_op_ops#get_wsamapping_list */
+#define AXIS2_OP_GET_WSAMAPPING_LIST(op, env) \
+        ((op)->ops->get_wsamapping_list(op, env))
 
 /** @} */
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/include/axis2_phases_info.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_phases_info.h?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_phases_info.h (original)
+++ webservices/axis2/trunk/c/include/axis2_phases_info.h Fri Dec 15 03:53:08 2006
@@ -216,6 +216,10 @@
     axis2_phases_info_create (
         const axis2_env_t *env);
 
+    axis2_array_list_t *AXIS2_CALL
+    axis2_phases_info_copy_flow(
+        const axis2_env_t *env,
+        const axis2_array_list_t *flow_to_copy);
 /**************************** Start of function macros ************************/
 
 /** Frees the phases info.

Modified: webservices/axis2/trunk/c/modules/core/clientapi/op_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/op_client.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/op_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/op_client.c Fri Dec 15 03:53:08 2006
@@ -515,7 +515,7 @@
         if (block)
         {
             axis2_msg_ctx_t *response_mc = NULL;
-            axis2_char_t *address = NULL;
+            /*axis2_char_t *address = NULL;*/
             const axis2_char_t *epr_address = NULL;
             axis2_property_t *property = NULL;
             axis2_endpoint_ref_t *to_epr = NULL;
@@ -531,10 +531,10 @@
             if(!to_epr)
                 to_epr = AXIS2_OPTIONS_GET_TO(op_client_impl->options, env);
             epr_address = AXIS2_ENDPOINT_REF_GET_ADDRESS(to_epr, env);
-            address = AXIS2_STRDUP(epr_address, env);
+            /*address = AXIS2_STRDUP(epr_address, env);*/
             property = axis2_property_create(env);
-            AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
-            AXIS2_PROPERTY_SET_VALUE(property, env, address);
+            AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
+            AXIS2_PROPERTY_SET_VALUE(property, env, (axis2_char_t *) epr_address);
             AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,
                     AXIS2_TRANSPORT_URL, property, AXIS2_FALSE);
             AXIS2_MSG_CTX_SET_SVC_CTX(msg_ctx, env, op_client_impl->svc_ctx);

Modified: webservices/axis2/trunk/c/modules/core/context/ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/ctx.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/ctx.c Fri Dec 15 03:53:08 2006
@@ -175,7 +175,7 @@
 				void *value_value = AXIS2_PROPERTY_GET_VALUE (value, env);
 				if (temp_value_value != value_value)
 				{
-					AXIS2_PROPERTY_FREE(temp_value, env);
+					/*AXIS2_PROPERTY_FREE(temp_value, env);*/
 				}
 			}
         }

Modified: webservices/axis2/trunk/c/modules/core/context/msg_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/context/msg_ctx.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/context/msg_ctx.c (original)
+++ webservices/axis2/trunk/c/modules/core/context/msg_ctx.c Fri Dec 15 03:53:08 2006
@@ -2522,6 +2522,7 @@
     return AXIS2_SUCCESS;
 }
 
+
 axis2_status_t AXIS2_CALL
 axis2_msg_ctx_set_flow(
     axis2_msg_ctx_t *msg_ctx,

Modified: webservices/axis2/trunk/c/modules/core/deployment/axis2_desc_builder.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/axis2_desc_builder.h?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/axis2_desc_builder.h (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/axis2_desc_builder.h Fri Dec 15 03:53:08 2006
@@ -202,6 +202,20 @@
                     const axis2_desc_builder_t *desc_builder,
                     const axis2_env_t *env,
                     axis2_char_t *in);
+        /**
+         * Populate the Axis2 Operation with details from the actionMapping,
+         * outputActionMapping and faultActionMapping elements from the operation
+         * element.
+         *
+         * @param operation
+         * @param op_desc
+         */
+        axis2_status_t (AXIS2_CALL *
+                process_action_mappings)(
+                    axis2_desc_builder_t *desc_builder,
+                    const axis2_env_t *env,
+                    axiom_node_t *op_node,
+                    axis2_op_t *op_desc);
 
     };
 
@@ -309,6 +323,11 @@
     @sa axis2_desc_builder_ops#get_svc */
 #define AXIS2_DESC_BUILDER_GET_VALUE(desc_builder, env, in) \
       ((desc_builder)->ops->get_value (desc_builder, env, in))
+
+/** Process Action Mappings.
+    @sa axis2_desc_builder_ops#process_action_mappings */
+#define AXIS2_DESC_BUILDER_PROCESS_ACTION_MAPPINGS(desc_builder, env, op_node, op_desc) \
+      ((desc_builder)->ops->process_action_mappings (desc_builder, env, op_node, op_desc))
 
 /*************************** End of function macros ***************************/
 

Modified: webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/dep_engine.c Fri Dec 15 03:53:08 2006
@@ -754,6 +754,8 @@
 {
     axis2_dep_engine_impl_t *dep_engine_impl = NULL;
     axis2_status_t status = AXIS2_FAILURE;
+    axis2_array_list_t *out_fault_phases = NULL;
+    axis2_array_list_t *new_out_fault_phases = NULL;
     AXIS2_ENV_CHECK(env, NULL);
     dep_engine_impl = AXIS2_INTF_TO_IMPL(dep_engine);
 
@@ -827,9 +829,10 @@
 
     status = AXIS2_CONF_SET_PHASES_INFO(dep_engine_impl->conf, env,
             dep_engine_impl->phases_info);
-    AXIS2_CONF_SET_OUT_FAULT_PHASES(dep_engine_impl->conf, env,
-            AXIS2_PHASES_INFO_GET_OP_OUT_FAULTPHASES(dep_engine_impl->phases_info,
-                    env));
+    out_fault_phases = AXIS2_PHASES_INFO_GET_OP_OUT_FAULTPHASES(
+        dep_engine_impl->phases_info, env);
+    new_out_fault_phases = axis2_phases_info_copy_flow(env, out_fault_phases); 
+    AXIS2_CONF_SET_OUT_FAULT_PHASES(dep_engine_impl->conf, env, new_out_fault_phases);
     if (AXIS2_SUCCESS != status)
     {
         AXIS2_REPOS_LISTENER_FREE(dep_engine_impl->repos_listener, env);

Modified: webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/desc_builder.c Fri Dec 15 03:53:08 2006
@@ -107,6 +107,21 @@
     const axis2_env_t *env,
     axis2_char_t *in);
 
+/**
+ * Populate the Axis2 Operation with details from the actionMapping,
+ * outputActionMapping and faultActionMapping elements from the operation
+ * element.
+ *
+ * @param operation
+ * @param op_desc
+ */
+axis2_status_t AXIS2_CALL
+axis2_desc_builder_process_action_mappings(
+    axis2_desc_builder_t *desc_builder,
+    const axis2_env_t *env,
+    axiom_node_t *op_node,
+    axis2_op_t *op_desc);
+
 static axis2_status_t
 set_attrs_and_value(
     axis2_param_t *param,
@@ -166,6 +181,8 @@
         axis2_desc_builder_get_file_name_without_prefix;
     desc_builder_impl->desc_builder.ops->get_value =
         axis2_desc_builder_get_value;
+    desc_builder_impl->desc_builder.ops->process_action_mappings =
+    axis2_desc_builder_process_action_mappings;
 
     return &(desc_builder_impl->desc_builder);
 }
@@ -707,6 +724,79 @@
     }
     return AXIS2_SUCCESS;
 }
+
+/**
+ * Populate the Axis2 Operation with details from the actionMapping,
+ * outputActionMapping and faultActionMapping elements from the operation
+ * element.
+ *
+ * @param operation
+ * @param op_desc
+ */
+axis2_status_t AXIS2_CALL
+axis2_desc_builder_process_action_mappings(
+    axis2_desc_builder_t *desc_builder,
+    const axis2_env_t *env,
+    axiom_node_t *op_node,
+    axis2_op_t *op_desc)
+{
+    axiom_element_t *op_element = NULL;
+    axis2_qname_t *qname = NULL;
+    axiom_children_qname_iterator_t *action_mappings = NULL;
+    axis2_array_list_t *mapping_list = axis2_array_list_create(env, 0);
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, op_desc, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, op_desc, AXIS2_FAILURE);
+
+    op_element = AXIOM_NODE_GET_DATA_ELEMENT(op_node, env);
+    qname = axis2_qname_create(env, AXIS2_ACTION_MAPPING, NULL, NULL);
+    if(op_element)
+        action_mappings = AXIOM_ELEMENT_GET_CHILDREN_WITH_QNAME(op_element, env, 
+            qname,op_node);
+    if(!action_mappings)
+        return AXIS2_SUCCESS;
+    while (AXIOM_CHILDREN_QNAME_ITERATOR_HAS_NEXT(action_mappings, env))
+    {
+        axiom_element_t *mapping_element = NULL;
+        axiom_node_t *mapping_node = NULL;
+        axis2_char_t *input_action_string = NULL;
+        axis2_char_t *temp_str = NULL;
+
+        /* This is to check whether some one has locked the parmter at the top
+         * level
+         */
+        mapping_node = (axiom_node_t *)
+                AXIOM_CHILDREN_QNAME_ITERATOR_NEXT(action_mappings, env);
+        mapping_element = AXIOM_NODE_GET_DATA_ELEMENT(mapping_node, env);
+        temp_str = AXIOM_ELEMENT_GET_TEXT(mapping_element, env, 
+            mapping_node);
+        input_action_string = AXIS2_STRTRIM(env, temp_str, NULL);
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Input action mapping found %s", 
+            input_action_string);
+        if(0 != AXIS2_STRCMP("", input_action_string))
+        {
+            AXIS2_ARRAY_LIST_ADD(mapping_list, env, input_action_string);
+        }
+        else
+            AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Zero length " \
+                "input_action_string found. Not added to the mapping list");
+    }
+    AXIS2_OP_SET_WSAMAPPING_LIST(op_desc, env, mapping_list); 
+    /*qname = axis2_qname_create(env, AXIS2_OUTPUT_ACTION_MAPPING, NULL, NULL);
+    child_element = AXIOM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(mapping_element, 
+        env, qname, mapping_node, &child_node);
+    temp_str = AXIOM_ELEMENT_GET_TEXT(child_element, env, child_node);
+    output_action_string = AXIS2_STRTRIM(env, temp_str, NULL);
+    if(child_element && output_action_string)
+    {
+        AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "Output action mapping found %s", 
+            output_action_string);
+    }
+    AXIS2_OP_SET_OUTPUT_ACTION(op_desc, env, mapping_list); */
+        
+    return AXIS2_SUCCESS;
+}
+
 
 axis2_status_t AXIS2_CALL
 axis2_desc_builder_process_params(

Modified: webservices/axis2/trunk/c/modules/core/deployment/module_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/module_builder.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/module_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/module_builder.c Fri Dec 15 03:53:08 2006
@@ -490,6 +490,10 @@
 
         AXIS2_DESC_BUILDER_PROCESS_PARAMS(module_builder->desc_builder, env,
                 params, op_desc->param_container, builder_impl->module_desc->params);
+        /* To process wsamapping */
+        AXIS2_DESC_BUILDER_PROCESS_ACTION_MAPPINGS(module_builder->desc_builder, 
+            env, op_node, op_desc);
+
         /* setting the mep of the operation */
 
         /* loading the message receivers */

Modified: webservices/axis2/trunk/c/modules/core/deployment/phases_info.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/phases_info.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/phases_info.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/phases_info.c Fri Dec 15 03:53:08 2006
@@ -24,14 +24,14 @@
 typedef struct axis2_phases_info_impl
 {
     axis2_phases_info_t phases_info;
-
     axis2_array_list_t *in_phases;
-
     axis2_array_list_t *out_phases;
-
     axis2_array_list_t *in_faultphases;
-
     axis2_array_list_t *out_faultphases;
+    axis2_hash_t *op_in_phases;
+    axis2_hash_t *op_out_phases;
+    axis2_hash_t *op_in_faultphases;
+    axis2_hash_t *op_out_faultphases;
 
 }
 axis2_phases_info_impl_t;
@@ -138,6 +138,10 @@
     phases_info_impl->out_phases = NULL;
     phases_info_impl->in_faultphases = NULL;
     phases_info_impl->out_faultphases = NULL;
+    phases_info_impl->op_in_phases = axis2_hash_make(env);
+    phases_info_impl->op_out_phases = axis2_hash_make(env);
+    phases_info_impl->op_in_faultphases = axis2_hash_make(env);
+    phases_info_impl->op_out_faultphases = axis2_hash_make(env);
 
     phases_info_impl->phases_info.ops = (axis2_phases_info_ops_t *)
             AXIS2_MALLOC(env->allocator, sizeof(axis2_phases_info_ops_t));
@@ -228,7 +232,86 @@
         AXIS2_ARRAY_LIST_FREE(phases_info_impl->out_faultphases, env);
         phases_info_impl->out_faultphases = NULL;
     }
+    if (phases_info_impl->op_in_phases)
+    {
+        axis2_hash_index_t *i = NULL;
+        for (i = axis2_hash_first (phases_info_impl->op_in_phases, env); i; i =
+                axis2_hash_next (env, i))
+        {
+            void *v = NULL;
+            axis2_phase_t *phase = NULL;
+
+            axis2_hash_this (i, NULL, NULL, &v);
+            phase = (axis2_phase_t *) v;
+            if(phase)
+            {
+                AXIS2_PHASE_FREE(phase, env);
+                phase = NULL;
+            }
+        }
+        axis2_hash_free(phases_info_impl->op_in_phases, env);
+        phases_info_impl->op_in_phases = NULL;
+    }
+    if (phases_info_impl->op_out_phases)
+    {
+        axis2_hash_index_t *i = NULL;
+        for (i = axis2_hash_first (phases_info_impl->op_out_phases, env); i; i =
+                axis2_hash_next (env, i))
+        {
+            void *v = NULL;
+            axis2_phase_t *phase = NULL;
+
+            axis2_hash_this (i, NULL, NULL, &v);
+            phase = (axis2_phase_t *) v;
+            if(phase)
+            {
+                AXIS2_PHASE_FREE(phase, env);
+                phase = NULL;
+            }
+        }
+        axis2_hash_free(phases_info_impl->op_out_phases, env);
+        phases_info_impl->op_out_phases = NULL;
+    }
+    if (phases_info_impl->op_in_faultphases)
+    {
+        axis2_hash_index_t *i = NULL;
+        for (i = axis2_hash_first (phases_info_impl->op_in_faultphases, env); 
+            i; i = axis2_hash_next (env, i))
+        {
+            void *v = NULL;
+            axis2_phase_t *phase = NULL;
 
+            axis2_hash_this (i, NULL, NULL, &v);
+            phase = (axis2_phase_t *) v;
+            if(phase)
+            {
+                AXIS2_PHASE_FREE(phase, env);
+                phase = NULL;
+            }
+        }
+        axis2_hash_free(phases_info_impl->op_in_faultphases, env);
+        phases_info_impl->op_in_faultphases = NULL;
+    }
+    if (phases_info_impl->op_out_faultphases)
+    {
+        axis2_hash_index_t *i = NULL;
+        for (i = axis2_hash_first (phases_info_impl->op_out_faultphases, env); 
+            i; i = axis2_hash_next (env, i))
+        {
+            void *v = NULL;
+            axis2_phase_t *phase = NULL;
+
+            axis2_hash_this (i, NULL, NULL, &v);
+            phase = (axis2_phase_t *) v;
+            if(phase)
+            {
+                AXIS2_PHASE_FREE(phase, env);
+                phase = NULL;
+            }
+        }
+        axis2_hash_free(phases_info_impl->op_out_faultphases, env);
+        phases_info_impl->op_out_faultphases = NULL;
+    }
     if (phases_info->ops)
     {
         AXIS2_FREE(env->allocator, phases_info->ops);
@@ -391,7 +474,14 @@
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
+    phase = axis2_hash_get(phases_info_impl->op_in_phases, 
+        AXIS2_PHASE_POLICY_DETERMINATION, AXIS2_HASH_KEY_STRING);
+    if(!phase)
+    {
+        phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
+        axis2_hash_set(phases_info_impl->op_in_phases, 
+            AXIS2_PHASE_POLICY_DETERMINATION, AXIS2_HASH_KEY_STRING, phase);
+    }
 
     status = AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
     if (AXIS2_SUCCESS != status)
@@ -412,19 +502,23 @@
         phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(
                     phases_info_impl->in_phases, env, i);
         if (0 == AXIS2_STRCMP(AXIS2_PHASE_TRANSPORTIN, phase_name) ||
-                0 == AXIS2_STRCMP(AXIS2_PHASE_PRE_DISPATCH, phase_name) ||
-                0 == AXIS2_STRCMP(AXIS2_PHASE_DISPATCH, phase_name) ||
-                0 == AXIS2_STRCMP(AXIS2_PHASE_POST_DISPATCH, phase_name))
+            0 == AXIS2_STRCMP(AXIS2_PHASE_PRE_DISPATCH, phase_name) ||
+            0 == AXIS2_STRCMP(AXIS2_PHASE_DISPATCH, phase_name) ||
+            0 == AXIS2_STRCMP(AXIS2_PHASE_POST_DISPATCH, phase_name))
         {
             /* Do nothing */
         }
         else
         {
-            phase = axis2_phase_create(env, phase_name);
-            if (phase)
+            phase = axis2_hash_get(phases_info_impl->op_in_phases, phase_name, 
+                AXIS2_HASH_KEY_STRING);
+            if(!phase)
             {
-                status = AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
+                phase = axis2_phase_create(env, phase_name);
+                axis2_hash_set(phases_info_impl->op_in_phases, phase_name,
+                    AXIS2_HASH_KEY_STRING, phase);
             }
+            status = AXIS2_ARRAY_LIST_ADD(op_in_phases, env, phase);
             if (AXIS2_SUCCESS != status)
             {
                 int i = 0;
@@ -483,9 +577,15 @@
         }
         else
         {
-            phase = axis2_phase_create(env, phase_name);
-            if (phase)
-                status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
+            phase = axis2_hash_get(phases_info_impl->op_out_phases, phase_name, 
+                AXIS2_HASH_KEY_STRING);
+            if(!phase)
+            {
+                phase = axis2_phase_create(env, phase_name);
+                axis2_hash_set(phases_info_impl->op_out_phases, phase_name,
+                    AXIS2_HASH_KEY_STRING, phase);
+            }
+            status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
             if (AXIS2_SUCCESS != status)
             {
                 int i = 0;
@@ -506,9 +606,15 @@
             }
         }
     }
-    phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
-    if (phase)
-        status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
+    phase = axis2_hash_get(phases_info_impl->op_out_phases, 
+        AXIS2_PHASE_POLICY_DETERMINATION, AXIS2_HASH_KEY_STRING);
+    if(!phase)
+    {
+        phase = axis2_phase_create(env, AXIS2_PHASE_POLICY_DETERMINATION);
+        axis2_hash_set(phases_info_impl->op_out_phases, 
+            AXIS2_PHASE_POLICY_DETERMINATION, AXIS2_HASH_KEY_STRING, phase);
+    }
+    status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
     if (AXIS2_SUCCESS != status)
     {
         int i = 0;
@@ -527,9 +633,15 @@
         op_out_phases = NULL;
         return NULL;
     }
-    phase = axis2_phase_create(env, AXIS2_PHASE_MESSAGE_OUT);
-    if (phase)
-        status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
+    phase = axis2_hash_get(phases_info_impl->op_out_phases, 
+        AXIS2_PHASE_MESSAGE_OUT, AXIS2_HASH_KEY_STRING);
+    if(!phase)
+    {
+        phase = axis2_phase_create(env, AXIS2_PHASE_MESSAGE_OUT);
+        axis2_hash_set(phases_info_impl->op_out_phases, 
+            AXIS2_PHASE_MESSAGE_OUT, AXIS2_HASH_KEY_STRING, phase);
+    }
+    status = AXIS2_ARRAY_LIST_ADD(op_out_phases, env, phase);
     if (AXIS2_SUCCESS != status)
     {
         int i = 0;
@@ -587,9 +699,15 @@
     {
         phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(phases_info_impl->
                 in_faultphases, env, i);
-        phase = axis2_phase_create(env, phase_name);
-        if (phase)
-            status = AXIS2_ARRAY_LIST_ADD(op_in_faultphases, env, phase);
+        phase = axis2_hash_get(phases_info_impl->op_in_faultphases, phase_name, 
+            AXIS2_HASH_KEY_STRING);
+        if(!phase)
+        {
+            phase = axis2_phase_create(env, phase_name);
+            axis2_hash_set(phases_info_impl->op_in_faultphases, 
+                phase_name, AXIS2_HASH_KEY_STRING, phase);
+        }
+        status = AXIS2_ARRAY_LIST_ADD(op_in_faultphases, env, phase);
         if (AXIS2_SUCCESS != status)
         {
             int i = 0;
@@ -647,9 +765,15 @@
     {
         phase_name = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(phases_info_impl->
                 out_faultphases, env, i);
-        phase = axis2_phase_create(env, phase_name);
-        if (phase)
-            status = AXIS2_ARRAY_LIST_ADD(op_out_faultphases, env, phase);
+        phase = axis2_hash_get(phases_info_impl->op_out_faultphases, phase_name, 
+            AXIS2_HASH_KEY_STRING);
+        if(!phase)
+        {
+            phase = axis2_phase_create(env, phase_name);
+            axis2_hash_set(phases_info_impl->op_out_faultphases, 
+                phase_name, AXIS2_HASH_KEY_STRING, phase);
+        }
+        status = AXIS2_ARRAY_LIST_ADD(op_out_faultphases, env, phase);
         if (AXIS2_SUCCESS != status)
         {
             int i = 0;
@@ -746,5 +870,32 @@
 	*/
     return status;
 
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_phases_info_copy_flow(
+    const axis2_env_t *env,
+    const axis2_array_list_t *flow_to_copy)
+{
+    int size = 0, i = 0;
+    axis2_array_list_t *new_flow = NULL;
+    if(flow_to_copy)
+        size = AXIS2_ARRAY_LIST_SIZE((axis2_array_list_t *) flow_to_copy, env);
+    if(size > 0)
+    {
+        new_flow = axis2_array_list_create(env, 0);
+        if(!new_flow)
+        {
+            AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+            return AXIS2_FAILURE;
+        }
+    }
+    for(i = 0; i < size; i++)
+    {
+        void *item = AXIS2_ARRAY_LIST_GET((axis2_array_list_t *) flow_to_copy,
+            env, i);
+        AXIS2_ARRAY_LIST_ADD(new_flow, env, item);
+    }
+    return new_flow;
 }
 

Modified: webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c (original)
+++ webservices/axis2/trunk/c/modules/core/deployment/svc_builder.c Fri Dec 15 03:53:08 2006
@@ -612,8 +612,11 @@
         status = AXIS2_DESC_BUILDER_PROCESS_PARAMS(svc_builder->desc_builder,
                 env, params_itr, op_desc->param_container, builder_impl->svc->
                 param_container);
-        /* loading the message receivers */
+        /* To process wsamapping */
+        AXIS2_DESC_BUILDER_PROCESS_ACTION_MAPPINGS(svc_builder->desc_builder, 
+            env, op_node, op_desc);
 
+        /* loading the message receivers */
         qmsgrecv = axis2_qname_create(env, AXIS2_MESSAGERECEIVER, NULL, NULL);
         recv_element = AXIOM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(op_element,
                 env, qmsgrecv, op_node, &recv_node);

Modified: webservices/axis2/trunk/c/modules/core/description/msg.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/msg.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/msg.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/msg.c Fri Dec 15 03:53:08 2006
@@ -206,21 +206,6 @@
 
     if (msg_impl->flow)
     {
-        int i = 0;
-        int size = 0;
-        size = AXIS2_ARRAY_LIST_SIZE(msg_impl->flow, env);
-        for (i = 0; i < size; i++)
-        {
-            axis2_phase_t *phase = NULL;
-            phase = (axis2_phase_t *)(AXIS2_ARRAY_LIST_GET(msg_impl->flow, env, 
-                i));
-            if (phase)
-            {
-                AXIS2_PHASE_FREE(phase, env);
-                phase = NULL;
-            }
-
-        }
         AXIS2_ARRAY_LIST_FREE(msg_impl->flow, env);
         msg_impl->flow = NULL;
     }

Modified: webservices/axis2/trunk/c/modules/core/description/op.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/op.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/op.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/op.c Fri Dec 15 03:53:08 2006
@@ -35,6 +35,7 @@
     /* to store deploy time module QNames */
     axis2_array_list_t *module_qnames;
     axis2_array_list_t *engaged_module_list;
+    axis2_array_list_t *wsamapping_list;
     axis2_bool_t from_module;
 }
 axis2_op_impl_t;
@@ -358,6 +359,17 @@
     const axis2_op_t *op,
     const axis2_env_t *env);
  
+axis2_status_t AXIS2_CALL
+axis2_op_set_wsamapping_list(
+    axis2_op_t *op,
+    const axis2_env_t *env,
+    axis2_array_list_t *mapping_list);
+
+axis2_array_list_t *AXIS2_CALL
+axis2_op_get_wsamapping_list(
+    axis2_op_t *op,
+    const axis2_env_t *env);
+
 AXIS2_EXTERN axis2_op_t *AXIS2_CALL
 axis2_op_create(
     const axis2_env_t *env)
@@ -390,6 +402,7 @@
     op_impl->engaged_module_list = NULL;
     op_impl->op.ops = NULL;
     op_impl->from_module = AXIS2_FALSE;
+    op_impl->wsamapping_list = NULL;
 
     op_impl->op.param_container = (axis2_param_container_t *)
             axis2_param_container_create(env);
@@ -569,6 +582,8 @@
     op_impl->op.ops->get_msg = axis2_op_get_msg;
     op_impl->op.ops->add_msg = axis2_op_add_msg;
     op_impl->op.ops->is_from_module = axis2_op_is_from_module;
+    op_impl->op.ops->set_wsamapping_list = axis2_op_set_wsamapping_list;
+    op_impl->op.ops->get_wsamapping_list = axis2_op_get_wsamapping_list;
 
     return &(op_impl->op);
 }
@@ -667,7 +682,6 @@
         AXIS2_DESC_FREE(op_impl->base, env);
         op_impl->base = NULL;
     }
-
     if (op->param_container)
     {
         AXIS2_PARAM_CONTAINER_FREE(op->param_container, env);
@@ -681,7 +695,6 @@
         AXIS2_MSG_RECV_FREE(op_impl->msg_recv, env);
         op_impl->msg_recv = NULL;
     }
-
     if (op_impl->module_qnames)
     {
         int i = 0;
@@ -699,26 +712,26 @@
         AXIS2_ARRAY_LIST_FREE(op_impl->module_qnames, env);
         op_impl->module_qnames = NULL;
     }
-
     if (op_impl->engaged_module_list)
     {
         AXIS2_ARRAY_LIST_FREE(op_impl->engaged_module_list, env);
         op_impl->engaged_module_list = NULL;
     }
-
-
+    if (op_impl->wsamapping_list)
+    {
+        AXIS2_ARRAY_LIST_FREE(op_impl->wsamapping_list, env);
+        op_impl->wsamapping_list = NULL;
+    }
     if (op_impl->wsdl_op)
     {
         AXIS2_WSDL_OP_FREE(op_impl->wsdl_op, env);
         op_impl->wsdl_op = NULL;
     }
-
     if (op_impl->op.base.ops)
     {
         AXIS2_FREE(env->allocator, op_impl->op.base.ops);
         op_impl->op.base.ops = NULL;
     }
-
     if (op_impl->op.ops)
     {
         AXIS2_FREE(env->allocator, op_impl->op.ops);
@@ -1959,5 +1972,30 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     return AXIS2_INTF_TO_IMPL(op)->from_module;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_op_set_wsamapping_list(
+    axis2_op_t *op,
+    const axis2_env_t *env,
+    axis2_array_list_t *mapping_list)
+{
+    axis2_op_impl_t *op_impl = NULL;
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, mapping_list, AXIS2_FAILURE);
+    op_impl = AXIS2_INTF_TO_IMPL(op);
+    
+    op_impl->wsamapping_list = mapping_list;
+    return AXIS2_SUCCESS;
+}
+
+axis2_array_list_t *AXIS2_CALL
+axis2_op_get_wsamapping_list(
+    axis2_op_t *op,
+    const axis2_env_t *env)
+{
+    axis2_op_impl_t *op_impl = NULL;
+    op_impl = AXIS2_INTF_TO_IMPL(op);
+    return op_impl->wsamapping_list;
 }
 

Modified: webservices/axis2/trunk/c/modules/core/description/svc.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/description/svc.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/svc.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/svc.c Fri Dec 15 03:53:08 2006
@@ -1370,8 +1370,6 @@
     axis2_hash_index_t *index = NULL;
     axis2_phase_resolver_t *pr = NULL;
     axis2_op_t *op_desc = NULL;
-    axis2_array_list_t *params = NULL;
-    axis2_param_t *param = NULL;
     axis2_status_t status = AXIS2_FAILURE;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -1389,14 +1387,15 @@
     for (index = axis2_hash_first(map, env); index; index =
                 axis2_hash_next(env, index))
     {
+        axis2_array_list_t *mappings_list = NULL;
         int size = 0;
         int j = 0;
         void *v = NULL;
         axis2_hash_this(index, NULL, NULL, &v);
         op_desc = (axis2_op_t *) v;
-        params = AXIS2_OP_GET_ALL_PARAMS(op_desc, env);
+        mappings_list = AXIS2_OP_GET_WSAMAPPING_LIST(op_desc, env);
         /* adding WSA mapping into service */
-        size = AXIS2_ARRAY_LIST_SIZE(params, env);
+        size = AXIS2_ARRAY_LIST_SIZE(mappings_list, env);
 
         if (AXIS2_SUCCESS != AXIS2_ERROR_GET_STATUS_CODE(env->error))
         {
@@ -1409,26 +1408,19 @@
         }
         for (j = 0; j < size; j++)
         {
-            axis2_char_t *key = NULL;
+            axis2_char_t *mapping = NULL;
 
-            param = (axis2_param_t *) AXIS2_ARRAY_LIST_GET(params, env, j);
-            if (0 == AXIS2_STRCMP(AXIS2_PARAM_GET_NAME(param, env),
-                    AXIS2_WSA_MAPPING))
+            mapping = (axis2_char_t *) AXIS2_ARRAY_LIST_GET(mappings_list, env, j);
+            status = axis2_svc_add_mapping(svc, env, mapping, op_desc);
+            if (AXIS2_SUCCESS != status)
             {
-                key = (axis2_char_t *) AXIS2_PARAM_GET_VALUE(param, env);
-                status = axis2_svc_add_mapping(svc, env, key, op_desc);
-                if (AXIS2_SUCCESS != status)
+                if (pr)
                 {
-                    if (pr)
-                    {
-                        AXIS2_PHASE_RESOLVER_FREE(pr, env);
-                        pr = NULL;
-                    }
-                    return status;
+                    AXIS2_PHASE_RESOLVER_FREE(pr, env);
+                    pr = NULL;
                 }
-                break;
+                return status;
             }
-
         }
 
         status = AXIS2_PHASE_RESOLVER_BUILD_MODULE_OP(pr, env, op_desc);

Modified: webservices/axis2/trunk/c/modules/core/engine/conf.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/engine/conf.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/conf.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/conf.c Fri Dec 15 03:53:08 2006
@@ -836,7 +836,10 @@
 
     if (config_impl->out_fault_phases)
     {
-        int i = 0;
+        /* No need of the following commented lines. Phases are freed in 
+         * phase_info 
+         */
+        /*int i = 0;
         for (i = 0; i < AXIS2_ARRAY_LIST_SIZE(config_impl->out_fault_phases, env); i++)
         {
             axis2_phase_t *phase = NULL;
@@ -848,7 +851,7 @@
 
             phase = NULL;
 
-        }
+        }*/
         AXIS2_ARRAY_LIST_FREE(config_impl->out_fault_phases, env);
         config_impl->out_fault_phases = NULL;
     }

Modified: webservices/axis2/trunk/c/modules/core/engine/engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/engine/engine.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/engine.c Fri Dec 15 03:53:08 2006
@@ -665,7 +665,7 @@
     if (property)
     {
         AXIS2_MSG_CTX_SET_PROPERTY(fault_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO,
-                property , AXIS2_FALSE);
+            AXIS2_PROPERTY_CLONE(property, env) , AXIS2_FALSE);
         property = NULL;
     }
 
@@ -700,8 +700,10 @@
     }
 
     AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(fault_ctx, env, envelope);
+    property = AXIS2_MSG_CTX_GET_PROPERTY(processing_context, env, 
+        AXIS2_HTTP_OUT_TRANSPORT_INFO, AXIS2_FALSE);
     AXIS2_MSG_CTX_SET_PROPERTY(fault_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO,
-            AXIS2_MSG_CTX_GET_PROPERTY(processing_context, env, AXIS2_HTTP_OUT_TRANSPORT_INFO, AXIS2_FALSE), AXIS2_FALSE);
+        AXIS2_PROPERTY_CLONE(property, env), AXIS2_FALSE);
     return fault_ctx;
 }
 

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_out_transport_info.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_out_transport_info.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_out_transport_info.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_out_transport_info.c Fri Dec 15 03:53:08 2006
@@ -104,7 +104,11 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     info_impl = AXIS2_INTF_TO_IMPL(info);
 
-    info_impl->response = NULL; /* response doesn't belong to info */
+    if(info_impl->response)
+    {
+        AXIS2_HTTP_SIMPLE_RESPONSE_FREE(info_impl->response, env);
+        info_impl->response = NULL;
+    }
     if (info_impl->encoding)
     {
         AXIS2_FREE(env->allocator, info_impl->encoding);
@@ -166,7 +170,8 @@
     }
     else
     {
-        AXIS2_HTTP_SIMPLE_RESPONSE_SET_HEADER(info_impl->response, env,
+        if(info_impl->response)
+            AXIS2_HTTP_SIMPLE_RESPONSE_SET_HEADER(info_impl->response, env,
                 axis2_http_header_create(env, AXIS2_HTTP_HEADER_CONTENT_TYPE,
                         content_type));
     }

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_transport_utils.c Fri Dec 15 03:53:08 2006
@@ -538,7 +538,7 @@
             request_uri));
 
     property = axis2_property_create(env);
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env, axis2_stream_free_void_arg);
     AXIS2_PROPERTY_SET_VALUE(property, env, out_stream);
     AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env,

Modified: webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/http_worker.c Fri Dec 15 03:53:08 2006
@@ -264,7 +264,7 @@
 
 	url_external_form = AXIS2_URL_TO_EXTERNAL_FORM(request_url, env);
     property = axis2_property_create(env);
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env, axis2_stream_free_void_arg);
     AXIS2_PROPERTY_SET_VALUE(property, env, out_stream);
     AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_OUT, property,
@@ -287,7 +287,7 @@
     }
 
     property = axis2_property_create(env);
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env,
             axis2_http_out_transport_info_free_void_arg);
     http_out_transport_info = axis2_http_out_transport_info_create(env, response);
@@ -462,8 +462,6 @@
     msg_ctx = NULL;
     AXIS2_URL_FREE(request_url, env);
     request_url = NULL;
-    AXIS2_HTTP_SIMPLE_RESPONSE_FREE(response, env);
-    response = NULL;
     return status;
 }
 

Modified: webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/sender/http_transport_sender.c Fri Dec 15 03:53:08 2006
@@ -304,7 +304,7 @@
             {
 
                 out_info = (axis2_http_out_transport_info_t *)
-                        AXIS2_PROPERTY_GET_VALUE(property, env);
+                    AXIS2_PROPERTY_GET_VALUE(property, env);
                 property = NULL;
             }
 

Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/apache2/apache2_worker.c Fri Dec 15 03:53:08 2006
@@ -214,7 +214,7 @@
     AXIS2_MSG_CTX_SET_SERVER_SIDE(msg_ctx, env, AXIS2_TRUE);
 
     property = axis2_property_create(env);
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env, axis2_stream_free_void_arg);
     AXIS2_PROPERTY_SET_VALUE(property, env, out_stream);
     AXIS2_MSG_CTX_SET_PROPERTY(msg_ctx, env, AXIS2_TRANSPORT_OUT, property,
@@ -228,7 +228,7 @@
     AXIS2_FREE(env->allocator, ctx_uuid);
 
     property = axis2_property_create(env);
-    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_REQUEST);
+    AXIS2_PROPERTY_SET_SCOPE(property, env, AXIS2_SCOPE_APPLICATION);
     AXIS2_PROPERTY_SET_FREE_FUNC(property, env,
             axis2_apache2_out_transport_info_free_void_arg);
     apache2_out_transport_info = axis2_apache2_out_transport_info_create(env,

Modified: webservices/axis2/trunk/c/modules/core/util/core_utils.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/util/core_utils.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/modules/core/util/core_utils.c (original)
+++ webservices/axis2/trunk/c/modules/core/util/core_utils.c Fri Dec 15 03:53:08 2006
@@ -135,7 +135,7 @@
     if (property)
     {
         AXIS2_MSG_CTX_SET_PROPERTY(new_msg_ctx, env, AXIS2_HTTP_OUT_TRANSPORT_INFO,
-                property, AXIS2_FALSE);
+            AXIS2_PROPERTY_CLONE(property, env), AXIS2_FALSE);
         property = NULL;
     }
 

Modified: webservices/axis2/trunk/c/util/include/axis2_array_list.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_array_list.h?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_array_list.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_array_list.h Fri Dec 15 03:53:08 2006
@@ -237,7 +237,7 @@
                     const axis2_env_t *env,
                     int index);
 
-        /**
+   /**
     * @param array_list pointer to array list
     * @param env pointer to environment struct
     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
@@ -269,7 +269,7 @@
      */
     AXIS2_EXTERN axis2_array_list_t* AXIS2_CALL axis2_array_list_create(
         const axis2_env_t *env, 
-   int capacity);
+        int capacity);
 
     /**
      * Free array passed as void pointer.
@@ -280,7 +280,6 @@
     axis2_array_list_free_void_arg(
         void *array_list,
         const axis2_env_t *env);
-
 
 /** Frees the axis2 array list.
     @sa axis2_array_list_ops#free */

Modified: webservices/axis2/trunk/c/util/include/axis2_property.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_property.h?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_property.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_property.h Fri Dec 15 03:53:08 2006
@@ -70,6 +70,11 @@
     get_value) (axis2_property_t *property,
                             const axis2_env_t *env);
 
+    axis2_property_t* (AXIS2_CALL *
+            clone)(
+                axis2_property_t *property,
+                const axis2_env_t *env);
+
 };
     
      
@@ -86,13 +91,27 @@
  * @return property newly created property
  */
 AXIS2_EXTERN axis2_property_t * AXIS2_CALL
-axis2_property_create(const axis2_env_t *env);
+axis2_property_create(
+    const axis2_env_t *env);
 
-AXIS2_EXTERN axis2_property_t *AXIS2_CALL
-axis2_property_create_with_args(
-    const axis2_env_t *env,
-    axis2_scope_t scope,
-    AXIS2_FREE_VOID_ARG free_func,
+/**
+ * create new property
+ * @param env axis2 environment
+ * @param scope scope can be one of following
+ *              AXIS2_SCOPE_REQUEST
+ *              AXIS2_SCOPE_SESSION
+ *              AXIS2_SCOPE_APPLICATION
+ *              pass 0 to use default scope of AXIS2_SCOPE_REQUEST
+ * @param free_func free function for the value freeing. Pass 0 if
+ *              param value is a string
+ * @param value value of the property
+ * @return property newly created property
+ */
+AXIS2_EXTERN axis2_property_t * AXIS2_CALL
+axis2_property_create_with_args(
+    const axis2_env_t *env,
+    axis2_scope_t scope,
+    AXIS2_FREE_VOID_ARG free_func,
     void *value);
 
 /*************************** Function macros **********************************/
@@ -111,7 +130,10 @@
 
 #define AXIS2_PROPERTY_GET_VALUE(property, env) \
         ((property)->ops->get_value(property, env))
-                                        
+
+#define AXIS2_PROPERTY_CLONE(property, env) \
+        ((property)->ops->clone(property, env))
+
 /*************************** End of function macros ***************************/
 
 

Added: webservices/axis2/trunk/c/util/include/axis2_rand.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_rand.h?view=auto&rev=487522
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_rand.h (added)
+++ webservices/axis2/trunk/c/util/include/axis2_rand.h Fri Dec 15 03:53:08 2006
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef AXIS2_RAND_H
+#define AXIS2_RAND_H
+
+#include <axis2_error.h>
+#include <axis2_env.h>
+#include <axis2_date_time.h>
+#include <axis2_base64_binary.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**
+ * @defgroup axis2_rand rand
+ * @ingroup axis2_util
+ * @{
+ */
+
+/**
+ * @file axis2_rand.h
+ * @brief A simple thread safe and reentrant random number generator
+ */
+
+/**
+ * This is reentrant and thread safe simple random number generator
+ * function. it is passed an pointer to an unsigned int state value 
+ * which is used inside the function and changed in each call.
+ * @param seedp pointer to an unsigned int used as the internal state
+ * @return int <code>int<code>
+ */
+AXIS2_EXTERN int AXIS2_CALL
+axis2_rand(
+    unsigned int *seedp);
+
+/**
+ * This is reentrant and thread safe simple random number generator
+ * function. it is passed an pointer to an unsigned int state value 
+ * which is used inside the function and changed in each call. Also 
+ * it is passed a range in which the random number is selected
+ * @param seedp pointer to an unsigned int used as the internal state
+ * @param start start of the range
+ * @param end end of the range
+ * @return int If invalid range is entered -1 is returned <code>int<code>
+ */
+AXIS2_EXTERN int AXIS2_CALL
+axis2_rand_with_range(
+    unsigned int *seedp,
+    int start,
+    int end);
+
+/**
+ * A random seed value generated based on the time
+ */
+AXIS2_EXTERN unsigned int AXIS2_CALL
+axis2_rand_get_seed_value_based_on_time(
+    const axis2_env_t *env);
+
+/** @} */
+    
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* AXIS2_RAND_H */

Modified: webservices/axis2/trunk/c/util/include/axis2_utils.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_utils.h?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_utils.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_utils.h Fri Dec 15 03:53:08 2006
@@ -120,12 +120,12 @@
     */
     enum axis2_scopes
     {
-        /** Application scope */
-        AXIS2_SCOPE_APPLICATION = 0,
+        /** Request scope */
+        AXIS2_SCOPE_REQUEST = 0,
         /** Session scope */
         AXIS2_SCOPE_SESSION,
-        /** Request scope */
-        AXIS2_SCOPE_REQUEST
+        /** Application scope */
+        AXIS2_SCOPE_APPLICATION
     };
 
 

Modified: webservices/axis2/trunk/c/util/src/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/Makefile.am?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/util/src/Makefile.am (original)
+++ webservices/axis2/trunk/c/util/src/Makefile.am Fri Dec 15 03:53:08 2006
@@ -32,6 +32,7 @@
                         date_time.c \
                         base64_binary.c \
                         properties.c \
+						rand.c \
 						date_time_util.c
                         
 libaxis2_util_la_LIBADD =	$(top_builddir)/src/platforms/unix/libaxis2_unix.la \

Modified: webservices/axis2/trunk/c/util/src/property.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/property.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/util/src/property.c (original)
+++ webservices/axis2/trunk/c/util/src/property.c Fri Dec 15 03:53:08 2006
@@ -45,14 +45,20 @@
         AXIS2_FREE_VOID_ARG free_func);
 
 axis2_status_t AXIS2_CALL
-axis2_property_set_value(axis2_property_t *property,
-        const axis2_env_t *env,
-        void *value);
+axis2_property_set_value(
+    axis2_property_t *property,
+    const axis2_env_t *env,
+    void *value);
 
 void *AXIS2_CALL
 axis2_property_get_value(axis2_property_t *property,
         const axis2_env_t *env);
 
+axis2_property_t* AXIS2_CALL
+axis2_property_clone(
+    axis2_property_t *property,
+    const axis2_env_t *env);
+
 /************************** End of function prototypes ************************/
 
 axis2_property_t *AXIS2_CALL
@@ -88,33 +94,35 @@
     property_impl->property.ops->set_scope = axis2_property_set_scope;
     property_impl->property.ops->set_value = axis2_property_set_value;
     property_impl->property.ops->get_value = axis2_property_get_value;
+    property_impl->property.ops->clone = axis2_property_clone;
     return &(property_impl->property);
 }
 /*****************************************************************************/
-AXIS2_EXTERN axis2_property_t *AXIS2_CALL
-axis2_property_create_with_args(
-    const axis2_env_t *env,
-    axis2_scope_t scope,
-    AXIS2_FREE_VOID_ARG free_func,
-    void *value)
-{
-    axis2_property_impl_t *property_impl = NULL;
-
-    AXIS2_ENV_CHECK(env, NULL);
-
-    property_impl = (axis2_property_impl_t *) axis2_property_create(env);
-
-    if (NULL == property_impl)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        return NULL;
-    }
-    property_impl->value = value;
-    property_impl->scope = scope;
-    property_impl->free_func = free_func;
-
-    return &(property_impl->property);
+axis2_property_t *AXIS2_CALL
+axis2_property_create_with_args(
+    const axis2_env_t *env,
+    axis2_scope_t scope,
+    AXIS2_FREE_VOID_ARG free_func,
+    void *value) 
+{
+    axis2_property_impl_t *property_impl = NULL;
+
+    AXIS2_ENV_CHECK(env, NULL);
+
+    property_impl = (axis2_property_impl_t *) axis2_property_create(env);
+
+    if (NULL == property_impl)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+    property_impl->value = value;
+    property_impl->scope = scope;
+    property_impl->free_func = free_func;
+
+    return &(property_impl->property);
 }
+
 /***************************Function implementation****************************/
 
 axis2_status_t AXIS2_CALL
@@ -184,16 +192,17 @@
 }
 
 axis2_status_t AXIS2_CALL
-axis2_property_set_value(axis2_property_t *property,
-        const axis2_env_t *env,
-        void *value)
+axis2_property_set_value(
+    axis2_property_t *property,
+    const axis2_env_t *env,
+    void *value)
 {
     axis2_property_impl_t *property_impl = NULL;
 
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     property_impl = AXIS2_INTF_TO_IMPL(property);
 
-    if (property_impl->value)
+    /*if (property_impl->value)
     {
         if (property_impl->scope != AXIS2_SCOPE_APPLICATION)
         {
@@ -207,7 +216,7 @@
             }
             property_impl->value = NULL;
         }
-    }
+    }*/
 
     property_impl->value = value;
     return AXIS2_SUCCESS;
@@ -224,3 +233,22 @@
 
     return property_impl->value;
 }
+
+
+axis2_property_t* AXIS2_CALL
+axis2_property_clone(
+    axis2_property_t *property,
+    const axis2_env_t *env)
+{
+    axis2_property_impl_t *property_impl = NULL;
+    axis2_property_t *new_property = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    property_impl = AXIS2_INTF_TO_IMPL(property);
+    new_property = axis2_property_create(env);
+    axis2_property_set_free_func(new_property, env, property_impl->free_func);
+    axis2_property_set_scope(new_property, env, property_impl->scope);
+    axis2_property_set_value(new_property, env, property_impl->value);
+    return new_property; 
+}
+
+

Modified: webservices/axis2/trunk/c/util/src/qname.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/qname.c?view=diff&rev=487522&r1=487521&r2=487522
==============================================================================
--- webservices/axis2/trunk/c/util/src/qname.c (original)
+++ webservices/axis2/trunk/c/util/src/qname.c Fri Dec 15 03:53:08 2006
@@ -96,8 +96,8 @@
     /* localpart can't be null */
     if (!localpart)
     {
-        AXIS2_ERROR_SET_ERROR_NUMBER(env->error, AXIS2_ERROR_INVALID_NULL_PARAM);
-        AXIS2_ERROR_SET_STATUS_CODE(env->error, AXIS2_FAILURE);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_NULL_PARAM, 
+            AXIS2_FAILURE);
         return NULL;
     }
 

Added: webservices/axis2/trunk/c/util/src/rand.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/rand.c?view=auto&rev=487522
==============================================================================
--- webservices/axis2/trunk/c/util/src/rand.c (added)
+++ webservices/axis2/trunk/c/util/src/rand.c Fri Dec 15 03:53:08 2006
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <axis2_rand.h>
+#include <axis2_string.h>
+#include <platforms/axis2_platform_auto_sense.h>
+
+#define AXIS2_RAND_MAX 32768
+
+AXIS2_EXTERN int AXIS2_CALL
+axis2_rand(
+    unsigned int *seedp)
+{
+    *seedp = *seedp * 1103515245 + 12345;
+    return((unsigned)(*seedp/(2 * AXIS2_RAND_MAX)) % AXIS2_RAND_MAX);
+}
+
+AXIS2_EXTERN int AXIS2_CALL
+axis2_rand_with_range(
+    unsigned int *seedp,
+    int start,
+    int end)
+{
+    int rand = -1;
+    float range = 0.0;
+    if(start < 0 || end <= 0) return -1;
+    if(start >= AXIS2_RAND_MAX || end > AXIS2_RAND_MAX) return -1;
+    if(end <= start) return -1;
+  
+    range = end - start;
+    rand = axis2_rand(seedp);
+    rand = 1+(int) (range * rand / (AXIS2_RAND_MAX + 1.0));
+    return rand;
+}
+
+AXIS2_EXTERN unsigned int AXIS2_CALL
+axis2_rand_get_seed_value_based_on_time(
+    const axis2_env_t *env)
+{
+    axis2_date_time_t *date = axis2_date_time_create(env);
+    unsigned int rand_var = AXIS2_DATE_TIME_GET_YEAR(date, env);
+    rand_var += AXIS2_DATE_TIME_GET_MONTH(date, env);
+    rand_var += AXIS2_DATE_TIME_GET_DATE(date, env);
+    rand_var += AXIS2_DATE_TIME_GET_HOUR(date, env);
+    rand_var += AXIS2_DATE_TIME_GET_MINUTE(date, env);
+    rand_var += AXIS2_DATE_TIME_GET_SECOND(date, env);
+    return rand_var;
+}
+



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