axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r413785 - in /webservices/axis2/trunk/c: include/axis2_desc.h include/axis2_msg.h include/axis2_op.h modules/core/description/msg.c modules/core/description/op.c modules/core/phaseresolver/phase_resolver.c
Date Tue, 13 Jun 2006 02:03:02 GMT
Author: samisa
Date: Mon Jun 12 19:03:01 2006
New Revision: 413785

URL: http://svn.apache.org/viewvc?rev=413785&view=rev
Log:
Updated op to make use of msg.
Tests passed hence it is working

Modified:
    webservices/axis2/trunk/c/include/axis2_desc.h
    webservices/axis2/trunk/c/include/axis2_msg.h
    webservices/axis2/trunk/c/include/axis2_op.h
    webservices/axis2/trunk/c/modules/core/description/msg.c
    webservices/axis2/trunk/c/modules/core/description/op.c
    webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c

Modified: webservices/axis2/trunk/c/include/axis2_desc.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_desc.h?rev=413785&r1=413784&r2=413785&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_desc.h (original)
+++ webservices/axis2/trunk/c/include/axis2_desc.h Mon Jun 12 19:03:01 2006
@@ -18,8 +18,8 @@
 #define AXIS2_DESC_H
 
 /**
-  * @file axis2_msg.h
-  * @brief axis2 msg interface
+  * @file axis2_desc.h
+  * @brief axis2 desc interface
   */
 
 #include <axis2_param_container.h>
@@ -41,7 +41,7 @@
     
 /** 
  * @brief message ops struct
- * Encapsulator struct for ops of axis2_msg
+ * Encapsulator struct for ops of axis2_desc
  */    
 AXIS2_DECLARE_DATA struct axis2_desc_ops
 {
@@ -116,46 +116,46 @@
 };
 
 /** 
- * Creates msg struct
- * @return pointer to newly created msg
+ * Creates desc struct
+ * @return pointer to newly created desc
  */
 AXIS2_EXTERN axis2_desc_t *AXIS2_CALL
 axis2_desc_create (const axis2_env_t *env);
 
 /************************** Start of function macros **************************/
 
-#define AXIS2_DESC_FREE(msg, env) \
-        ((msg)->ops->free (msg, env))
+#define AXIS2_DESC_FREE(desc, env) \
+        ((desc)->ops->free (desc, env))
 
-#define AXIS2_DESC_ADD_PARAM(msg, env, param) \
-      ((msg)->ops->add_param (msg, env, param))
+#define AXIS2_DESC_ADD_PARAM(desc, env, param) \
+      ((desc)->ops->add_param (desc, env, param))
 
-#define AXIS2_DESC_GET_PARAM(msg, env, key) \
-      ((msg)->ops->get_param (msg, env, key))
+#define AXIS2_DESC_GET_PARAM(desc, env, key) \
+      ((desc)->ops->get_param (desc, env, key))
 
-#define AXIS2_DESC_GET_ALL_PARAMS(msg, env) \
-      ((msg)->ops->get_all_params (msg, env))
+#define AXIS2_DESC_GET_ALL_PARAMS(desc, env) \
+      ((desc)->ops->get_all_params (desc, env))
 
-#define AXIS2_DESC_IS_PARAM_LOCKED(msg, env, param_name) \
-        ((msg)->ops->is_param_locked(msg, env, param_name))
+#define AXIS2_DESC_IS_PARAM_LOCKED(desc, env, param_name) \
+        ((desc)->ops->is_param_locked(desc, env, param_name))
 
 #define AXIS2_DESC_SET_POLICY_INCLUDE(desc, env, policy_container) \
-    ((msg)->ops->set_policy_include(desc, env, policy_container))
+    ((desc)->ops->set_policy_include(desc, env, policy_container))
 
 #define AXIS2_DESC_GET_POLICY_INCLUDE(desc, env) \
-    ((msg)->ops->get_policy_container(desc, env))
+    ((desc)->ops->get_policy_container(desc, env))
     
 #define AXIS2_DESC_ADD_CHILD(desc, env, key, child) \
-    ((msg)->ops->add_child(desc, env, key, child))
+    ((desc)->ops->add_child(desc, env, key, child))
     
 #define AXIS2_DESC_GET_ALL_CHILDREN(desc, env) \
-    ((msg)->ops->get_all_children(desc, env))
+    ((desc)->ops->get_all_children(desc, env))
     
 #define AXIS2_DESC_GET_CHILD(desc, env, key) \
-    ((msg)->ops->get_child(desc, env, key))
+    ((desc)->ops->get_child(desc, env, key))
     
 #define AXIS2_DESC_REMOVE_CHILD(desc, env, key) \
-    ((msg)->ops->remove_child(desc, env, key))
+    ((desc)->ops->remove_child(desc, env, key))
 
 /** @} */
 #ifdef __cplusplus

Modified: webservices/axis2/trunk/c/include/axis2_msg.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_msg.h?rev=413785&r1=413784&r2=413785&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_msg.h (original)
+++ webservices/axis2/trunk/c/include/axis2_msg.h Mon Jun 12 19:03:01 2006
@@ -28,6 +28,12 @@
 #include <axis2_description.h>
 #include <axis2_phase_meta.h>
 
+#define AXIS2_MSG_IN            "InMessage"
+#define AXIS2_MSG_OUT           "OutMessage"
+#define AXIS2_MSG_IN_FAULT      "InFaultMessage"
+#define AXIS2_MSG_OUT_FAULT     "OutFaultMessage"
+
+
 #ifdef __cplusplus
 extern "C"
 {
@@ -38,20 +44,6 @@
   * @{
   */
 
-struct axis2_wsdl_op;    
-struct axis2_svc;
-struct axis2_msg_recv;
-struct axis2_param_container;
-struct axis2_module_desc; 
-struct axis2_op;
-struct axis2_wsdl_feature;
-struct axis2_wsdl_property; 
-struct axis2_wsdl_fault_ref;  
-struct axis2_relates_to;
-struct axis2_msg_ctx;
-struct axis2_svc_ctx;    
-struct axis2_msg_ctx; 
-struct axis2_conf_ctx;    
 typedef struct axis2_msg_ops axis2_msg_ops_t;    
 typedef struct axis2_msg axis2_msg_t;    
     
@@ -120,7 +112,7 @@
     set_direction)(
         axis2_msg_t *msg, 
         const axis2_env_t *env,
-        axis2_char_t *direction);
+        const axis2_char_t *direction);
     
     axis2_qname_t *(AXIS2_CALL *
     get_element_qname)(

Modified: webservices/axis2/trunk/c/include/axis2_op.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/include/axis2_op.h?rev=413785&r1=413784&r2=413785&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_op.h (original)
+++ webservices/axis2/trunk/c/include/axis2_op.h Mon Jun 12 19:03:01 2006
@@ -61,6 +61,7 @@
 struct axis2_svc_ctx;    
 struct axis2_msg_ctx; 
 struct axis2_conf_ctx;    
+struct axis2_msg;
 typedef struct axis2_op_ops axis2_op_ops_t;    
 typedef struct axis2_op axis2_op_t;    
     
@@ -385,6 +386,20 @@
                  const axis2_env_t *env,
                  struct axis2_msg_ctx *msg_ctx,
                  struct axis2_op_ctx *op_ctx);                                    
+
+    struct axis2_msg *(AXIS2_CALL *
+    get_msg)(
+        const axis2_op_t *op, 
+        const axis2_env_t *env, 
+        const axis2_char_t *label);
+    
+    axis2_status_t (AXIS2_CALL *
+    add_msg)(
+        const axis2_op_t *op, 
+        const axis2_env_t *env, 
+        const axis2_char_t *label, 
+        const struct axis2_msg *msg);
+
 };
 
 /** 
@@ -581,7 +596,13 @@
 
 #define AXIS2_OP_REGISTER_OP_CTX(op, env, msg_ctx, wsdl_op) \
       ((op)->ops->register_op_ctx (op, env, msg_ctx, wsdl_op))
-   
+
+#define AXIS2_OP_GET_MSG(op, env, label) \
+      ((op)->ops->get_msg(op, env, label))
+
+#define AXIS2_OP_ADD_MSG(op, env, label, msg) \
+      ((op)->ops->add_msg(op, env, label, msg))
+
 
 /************************** End of function macros ****************************/
 

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?rev=413785&r1=413784&r2=413785&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/msg.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/msg.c Mon Jun 12 19:03:01 2006
@@ -90,7 +90,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_msg_set_direction(axis2_msg_t *msg, 
     const axis2_env_t *env,
-    axis2_char_t *direction);
+    const axis2_char_t *direction);
 
 axis2_qname_t *AXIS2_CALL 
 axis2_msg_get_element_qname(axis2_msg_t *msg, 
@@ -410,7 +410,7 @@
 axis2_status_t AXIS2_CALL 
 axis2_msg_set_direction(axis2_msg_t *msg, 
     const axis2_env_t *env,
-    axis2_char_t *direction) 
+    const axis2_char_t *direction) 
 {
     axis2_msg_impl_t *msg_impl = 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?rev=413785&r1=413784&r2=413785&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/description/op.c (original)
+++ webservices/axis2/trunk/c/modules/core/description/op.c Mon Jun 12 19:03:01 2006
@@ -17,6 +17,7 @@
 #include <axis2_op.h>
 #include <axis2_property.h>
 #include <axis2_msg.h>
+#include <axis2_desc.h>
 
 /** 
  * @brief Operaton struct impl
@@ -24,16 +25,18 @@
  */ 
 typedef struct axis2_op_impl
 {
-   axis2_op_t op;
+    axis2_op_t op;
     
-   axis2_svc_t *parent;
-   axis2_msg_recv_t *msg_recv;
+    axis2_svc_t *parent;
+    axis2_desc_t *base;
+    axis2_msg_recv_t *msg_recv;
     axis2_wsdl_op_t *wsdl_op;
         
-    axis2_array_list_t *remaining_phases_inflow;
+/*    axis2_array_list_t *remaining_phases_inflow;
     axis2_array_list_t *phases_outflow;
     axis2_array_list_t *phases_in_fault_flow;
-    axis2_array_list_t *phases_out_fault_flow;
+    axis2_array_list_t *phases_out_fault_flow;*/
+    
     int mep;
     /*To store deploytime module refs */
     axis2_array_list_t *modulerefs;
@@ -328,7 +331,19 @@
 axis2_op_add_msg_ctx_out_in(axis2_op_t *op,
                                 const axis2_env_t *env,
                                 axis2_msg_ctx_t *msg_ctx,
-                                axis2_op_ctx_t *op_ctx);                            
+                                axis2_op_ctx_t *op_ctx);        
+
+axis2_msg_t * AXIS2_CALL
+axis2_op_get_msg(const axis2_op_t *op, 
+    const axis2_env_t *env, 
+    const axis2_char_t *label);
+    
+axis2_status_t AXIS2_CALL
+axis2_op_add_msg(const axis2_op_t *op, 
+    const axis2_env_t *env, 
+    const axis2_char_t *label, 
+    const axis2_msg_t *msg);
+
                                 
 /************************* End of function headers ****************************/   
 
@@ -343,6 +358,7 @@
     axis2_phase_t *message_processing = NULL;
     axis2_phase_t *message_out = NULL;
     axis2_property_t *property = NULL;
+    axis2_msg_t *msg = NULL;
  
     AXIS2_ENV_CHECK(env, NULL);
    
@@ -356,14 +372,15 @@
    }
     
     op_impl->parent = NULL;
-   op_impl->msg_recv = NULL;
+    op_impl->base = NULL;
+    op_impl->msg_recv = NULL;
     op_impl->mep = AXIS2_MEP_CONSTANT_INVALID;
     op_impl->op.param_container = NULL;
     op_impl->wsdl_op = NULL;
-    op_impl->remaining_phases_inflow = NULL;
+    /*op_impl->remaining_phases_inflow = NULL;
     op_impl->phases_outflow = NULL;
     op_impl->phases_in_fault_flow = NULL;
-    op_impl->phases_out_fault_flow = NULL;
+    op_impl->phases_out_fault_flow = NULL;*/
     op_impl->modulerefs = NULL;
     op_impl->op.ops = NULL;
     
@@ -375,6 +392,59 @@
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);   
         return NULL;        
    }
+   
+   op_impl->base = axis2_desc_create(env);
+   if(NULL == op_impl->base)
+   {
+        axis2_op_free(&(op_impl->op), env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);   
+        return NULL;        
+   }
+   
+   /* create and set up child messages */
+   msg = axis2_msg_create(env);
+   if (!msg)
+   {
+        axis2_op_free(&(op_impl->op), env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);   
+        return NULL;        
+   }
+   AXIS2_MSG_SET_DIRECTION(msg, env, AXIS2_WSDL_MESSAGE_DIRECTION_IN);
+   AXIS2_MSG_SET_PARENT(msg, env, &(op_impl->op));
+   axis2_op_add_msg(&(op_impl->op), env, AXIS2_MSG_IN, msg);
+   
+   msg = axis2_msg_create(env);
+   if (!msg)
+   {
+        axis2_op_free(&(op_impl->op), env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);   
+        return NULL;        
+   }
+   AXIS2_MSG_SET_DIRECTION(msg, env, AXIS2_WSDL_MESSAGE_DIRECTION_OUT);
+   AXIS2_MSG_SET_PARENT(msg, env, &(op_impl->op));
+   axis2_op_add_msg(&(op_impl->op), env, AXIS2_MSG_OUT, msg);
+   
+   msg = axis2_msg_create(env);
+   if (!msg)
+   {
+        axis2_op_free(&(op_impl->op), env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);   
+        return NULL;        
+   }   
+   AXIS2_MSG_SET_PARENT(msg, env, &(op_impl->op));
+   AXIS2_MSG_SET_FLOW(msg, env, NULL);
+   axis2_op_add_msg(&(op_impl->op), env, AXIS2_MSG_IN_FAULT, msg);
+   
+   msg = axis2_msg_create(env);
+   if (!msg)
+   {
+        axis2_op_free(&(op_impl->op), env);
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);   
+        return NULL;        
+   }   
+   AXIS2_MSG_SET_PARENT(msg, env, &(op_impl->op));
+   AXIS2_MSG_SET_FLOW(msg, env, NULL);
+   axis2_op_add_msg(&(op_impl->op), env, AXIS2_MSG_OUT_FAULT, msg);
 
    op_impl->wsdl_op = (axis2_wsdl_op_t *) axis2_wsdl_op_create(env);      
    if(NULL == op_impl->wsdl_op)
@@ -389,13 +459,13 @@
     op_impl->op.base.ops->free_void_arg = axis2_op_free_void_arg;
     op_impl->op.base.ops->get_qname = axis2_op_get_qname;
 
-    op_impl->remaining_phases_inflow = axis2_array_list_create(env, 0);
+    /*op_impl->remaining_phases_inflow = axis2_array_list_create(env, 0);
     if(NULL == op_impl->remaining_phases_inflow)
     {
         axis2_op_free(&(op_impl->op), env);
         return NULL;
-    }
-    policy_determination = axis2_phase_create(env, 
+    }*/
+    /*policy_determination = axis2_phase_create(env, 
         AXIS2_PHASE_POLICY_DETERMINATION);
     status = AXIS2_ARRAY_LIST_ADD(op_impl->remaining_phases_inflow, env, 
         policy_determination);
@@ -405,18 +475,35 @@
         policy_determination = NULL;
         return NULL;
     }
-    policy_determination = NULL;
+    policy_determination = NULL;*/
     message_processing = axis2_phase_create(env, AXIS2_PHASE_MESSAGE_PROCESSING);
     /* TODO
      * Add soap processing model checker handler to this when the handler once
      * handler is written
      */
 
-    status = AXIS2_ARRAY_LIST_ADD(op_impl->remaining_phases_inflow, env,
-        message_processing);
+    if (op_impl->base)
+    {
+        axis2_msg_t *msg = NULL;
+        msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_IN);
+        if (msg)
+        {
+            axis2_array_list_t *list = AXIS2_MSG_GET_FLOW(msg, env);
+            if (list)
+            {
+                status = AXIS2_ARRAY_LIST_ADD(list, env,
+                    message_processing);
+            }
+            else
+            {
+                status = AXIS2_FAILURE;
+            }
+        }
+    }
+    
     if(AXIS2_SUCCESS != status)
     {
-        AXIS2_PHASE_FREE(policy_determination, env);
+        /*AXIS2_PHASE_FREE(policy_determination, env);*/
         AXIS2_PHASE_FREE(message_processing, env);
         policy_determination = NULL;
         message_processing = NULL;
@@ -425,16 +512,16 @@
     message_processing = NULL;
     
     
-    op_impl->phases_outflow = axis2_array_list_create(env, 0);
+    /*op_impl->phases_outflow = axis2_array_list_create(env, 0);
     if(NULL == op_impl->phases_outflow)
     {
         axis2_op_free(&(op_impl->op), env);
         return NULL;
-    }
+    }*/
    
     policy_determination = axis2_phase_create(env, 
         AXIS2_PHASE_POLICY_DETERMINATION);
-    status = AXIS2_ARRAY_LIST_ADD(op_impl->phases_outflow, env, 
+    /*status = AXIS2_ARRAY_LIST_ADD(op_impl->phases_outflow, env, 
         policy_determination);
     if(AXIS2_SUCCESS != status)
     {
@@ -442,13 +529,33 @@
         policy_determination = NULL;
         return NULL;
     }
-    policy_determination = NULL;
+    policy_determination = NULL;*/
     
     message_out = axis2_phase_create(env, AXIS2_PHASE_MESSAGE_OUT);
-    status = AXIS2_ARRAY_LIST_ADD(op_impl->phases_outflow, env, message_out);
+    if (op_impl->base)
+    {
+        axis2_msg_t *msg = NULL;
+        msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_OUT);
+        if (msg)
+        {
+            axis2_array_list_t *list = AXIS2_MSG_GET_FLOW(msg, env);
+            if (list)
+            {
+                status = AXIS2_ARRAY_LIST_ADD(list, env,
+                    policy_determination);
+                status = AXIS2_ARRAY_LIST_ADD(list, env,
+                    message_out);
+            }
+            else
+            {
+                status = AXIS2_FAILURE;
+            }
+        }
+    }
+    /*status = AXIS2_ARRAY_LIST_ADD(op_impl->phases_outflow, env, message_out);*/
     if(AXIS2_SUCCESS != status)
     {
-        AXIS2_PHASE_FREE(policy_determination, env);
+        /*AXIS2_PHASE_FREE(policy_determination, env);*/
         AXIS2_PHASE_FREE(message_out, env);
         policy_determination = NULL;
         message_out = NULL;
@@ -550,11 +657,13 @@
     op_impl->op.ops->add_property = axis2_op_add_property;
     op_impl->op.ops->get_Properties = axis2_op_get_Properties;
     op_impl->op.ops->set_wsdl_op = axis2_op_set_wsdl_op;
-   op_impl->op.ops->find_op_ctx = axis2_op_find_op_ctx;   
+    op_impl->op.ops->find_op_ctx = axis2_op_find_op_ctx;   
     op_impl->op.ops->find_for_existing_op_ctx = axis2_op_find_for_existing_op_ctx;
     op_impl->op.ops->register_op_ctx = axis2_op_register_op_ctx;
+    op_impl->op.ops->get_msg = axis2_op_get_msg;
+    op_impl->op.ops->add_msg = axis2_op_add_msg;
     
-   return &(op_impl->op);
+    return &(op_impl->op);
 }
 
 axis2_op_t * AXIS2_CALL
@@ -628,8 +737,14 @@
     axis2_op_impl_t *op_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     op_impl = AXIS2_INTF_TO_IMPL(op);
+    
+    if (op_impl->base)
+    {
+        AXIS2_DESC_FREE(op_impl->base, env);
+        op_impl->base = NULL;
+    }
 
-    if(op_impl->remaining_phases_inflow)
+    /*if(op_impl->remaining_phases_inflow)
     {
         int i = 0;
         int size = 0;
@@ -649,9 +764,9 @@
    
         AXIS2_ARRAY_LIST_FREE(op_impl->remaining_phases_inflow, env);
         op_impl->remaining_phases_inflow = NULL;
-    }
+    }*/
     
-    if(NULL != op_impl->phases_outflow)
+    /*if(NULL != op_impl->phases_outflow)
     {
         int i = 0;
         int size = 0;
@@ -669,8 +784,8 @@
         }
         AXIS2_ARRAY_LIST_FREE(op_impl->phases_outflow, env);
         op_impl->phases_outflow = NULL;
-    }
-    
+    }*/
+    /*
     if(NULL != op_impl->phases_in_fault_flow)
     {
         int i = 0;
@@ -689,9 +804,9 @@
         }
         AXIS2_ARRAY_LIST_FREE(op_impl->phases_in_fault_flow, env);
         op_impl->phases_in_fault_flow = NULL;
-    }
+    }*/
     
-    if(NULL != op_impl->phases_out_fault_flow)
+    /*if(NULL != op_impl->phases_out_fault_flow)
     {
         int i = 0;
         int size = 0;
@@ -709,7 +824,7 @@
         }
         AXIS2_ARRAY_LIST_FREE(op_impl->phases_out_fault_flow, env);
         op_impl->phases_out_fault_flow = NULL;
-    }
+    }*/
 
     if(NULL != op->param_container)
     {
@@ -1230,8 +1345,19 @@
 axis2_op_get_phases_in_fault_flow(axis2_op_t *op,
                                             const axis2_env_t *env) 
 {
+    axis2_op_impl_t *op_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(op)->phases_in_fault_flow;
+    op_impl = AXIS2_INTF_TO_IMPL(op);
+    if (op_impl->base)
+    {
+        axis2_msg_t *msg = NULL;
+        msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_IN_FAULT);
+        if (msg)
+        {
+            return AXIS2_MSG_GET_FLOW(msg, env);
+        }
+    }
+    return NULL;
 }
 
 
@@ -1239,8 +1365,19 @@
 axis2_op_get_phases_out_fault_flow(axis2_op_t *op,
                                             const axis2_env_t *env) 
 {
+    axis2_op_impl_t *op_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(op)->phases_out_fault_flow;
+    op_impl = AXIS2_INTF_TO_IMPL(op);
+    if (op_impl->base)
+    {
+        axis2_msg_t *msg = NULL;
+        msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_OUT_FAULT);
+        if (msg)
+        {
+            return AXIS2_MSG_GET_FLOW(msg, env);
+        }
+    }
+    return NULL;
 }
 
 
@@ -1248,8 +1385,19 @@
 axis2_op_get_phases_outflow(axis2_op_t *op,
                                         const axis2_env_t *env) 
 {
+    axis2_op_impl_t *op_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
-    return AXIS2_INTF_TO_IMPL(op)->phases_outflow;
+    op_impl = AXIS2_INTF_TO_IMPL(op);
+    if (op_impl->base)
+    {
+        axis2_msg_t *msg = NULL;
+        msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_OUT);
+        if (msg)
+        {
+            return AXIS2_MSG_GET_FLOW(msg, env);
+        }
+    }
+    return NULL;
 }
 
 
@@ -1257,9 +1405,19 @@
 axis2_op_get_remaining_phases_inflow(axis2_op_t *op,
                                                 const axis2_env_t *env) 
 {
+    axis2_op_impl_t *op_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
- 
-    return AXIS2_INTF_TO_IMPL(op)->remaining_phases_inflow;
+    op_impl = AXIS2_INTF_TO_IMPL(op);
+    if (op_impl->base)
+    {
+        axis2_msg_t *msg = NULL;
+        msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_IN);
+        if (msg)
+        {
+            return AXIS2_MSG_GET_FLOW(msg, env);
+        }
+    }
+    return NULL;
 }
 
 axis2_status_t AXIS2_CALL
@@ -1274,6 +1432,16 @@
     
     op_impl = AXIS2_INTF_TO_IMPL(op);
     
+    if (op_impl->base)
+    {
+        axis2_msg_t *msg = NULL;
+        msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_IN_FAULT);
+        if (msg)
+        {
+            return AXIS2_MSG_SET_FLOW(msg, env, list);
+        }
+    }
+    /*
     if(op_impl->phases_in_fault_flow)
     {
         int i = 0;
@@ -1296,8 +1464,8 @@
         op_impl->phases_in_fault_flow = NULL;
     }
     
-    op_impl->phases_in_fault_flow = list;
-    return AXIS2_SUCCESS;
+    op_impl->phases_in_fault_flow = list;*/
+    return AXIS2_FAILURE;
 }
 
 axis2_status_t AXIS2_CALL
@@ -1311,6 +1479,16 @@
     AXIS2_PARAM_CHECK(env->error, list, AXIS2_FAILURE);
     op_impl = AXIS2_INTF_TO_IMPL(op);
     
+    if (op_impl->base)
+    {
+        axis2_msg_t *msg = NULL;
+        msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_OUT_FAULT);
+        if (msg)
+        {
+            return AXIS2_MSG_SET_FLOW(msg, env, list);
+        }
+    }
+    /*
     if(op_impl->phases_out_fault_flow)
     {
         int i = 0;
@@ -1330,8 +1508,8 @@
         op_impl->phases_out_fault_flow = NULL;
     }
     
-    op_impl->phases_out_fault_flow = list;
-    return AXIS2_SUCCESS;
+    op_impl->phases_out_fault_flow = list;*/
+    return AXIS2_FAILURE;
 }
 
 axis2_status_t AXIS2_CALL
@@ -1345,7 +1523,17 @@
     AXIS2_PARAM_CHECK(env->error, list, AXIS2_FAILURE);
     op_impl = AXIS2_INTF_TO_IMPL(op);
     
-    if(op_impl->phases_outflow)
+    if (op_impl->base)
+    {
+        axis2_msg_t *msg = NULL;
+        msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_OUT);
+        if (msg)
+        {
+            return AXIS2_MSG_SET_FLOW(msg, env, list);
+        }
+    }
+    
+    /*if(op_impl->phases_outflow)
     {
         int i = 0;
         int size = 0;
@@ -1364,8 +1552,8 @@
         op_impl->phases_outflow = NULL;
     }
     
-    op_impl->phases_outflow = list;
-    return AXIS2_SUCCESS;
+    op_impl->phases_outflow = list;*/
+    return AXIS2_FAILURE;
 }
 
 axis2_status_t AXIS2_CALL
@@ -1378,7 +1566,17 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, list, AXIS2_FAILURE);
     op_impl = AXIS2_INTF_TO_IMPL(op);
-    if(op_impl->remaining_phases_inflow)
+    
+    if (op_impl->base)
+    {
+        axis2_msg_t *msg = NULL;
+        msg = AXIS2_DESC_GET_CHILD(op_impl->base, env, AXIS2_MSG_IN);
+        if (msg)
+        {
+            return AXIS2_MSG_SET_FLOW(msg, env, list);
+        }
+    }
+    /*if(op_impl->remaining_phases_inflow)
     {
         int i = 0;
         int size = 0;
@@ -1398,8 +1596,8 @@
         AXIS2_ARRAY_LIST_FREE(op_impl->remaining_phases_inflow, env);
         op_impl->remaining_phases_inflow = NULL;
     }
-    op_impl->remaining_phases_inflow = list;
-    return AXIS2_SUCCESS;
+    op_impl->remaining_phases_inflow = list;*/
+    return AXIS2_FAILURE;
 }
 
 axis2_status_t AXIS2_CALL
@@ -1952,4 +2150,35 @@
         AXIS2_OP_CTX_SET_IS_COMPLETE(op_ctx, env, AXIS2_TRUE);        
     }
     return AXIS2_SUCCESS;
+}
+
+axis2_msg_t * AXIS2_CALL
+axis2_op_get_msg(const axis2_op_t *op, 
+    const axis2_env_t *env, 
+    const axis2_char_t *label)
+{
+    axis2_op_impl_t *op_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, NULL);
+    AXIS2_PARAM_CHECK(env->error, label, NULL);
+
+    op_impl = AXIS2_INTF_TO_IMPL(op);
+    
+    return (axis2_msg_t *)AXIS2_DESC_GET_CHILD(op_impl->base, env, label);
+}
+    
+axis2_status_t AXIS2_CALL
+axis2_op_add_msg(const axis2_op_t *op, 
+    const axis2_env_t *env, 
+    const axis2_char_t *label, 
+    const axis2_msg_t *msg)
+{
+    axis2_op_impl_t *op_impl = NULL;
+    
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, label, AXIS2_FAILURE);
+
+    op_impl = AXIS2_INTF_TO_IMPL(op);
+    
+    return AXIS2_DESC_ADD_CHILD(op_impl->base, env, label, msg);
 }

Modified: webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c?rev=413785&r1=413784&r2=413785&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c (original)
+++ webservices/axis2/trunk/c/modules/core/phaseresolver/phase_resolver.c Mon Jun 12 19:03:01
2006
@@ -303,7 +303,6 @@
         {
             status = axis2_phase_resolver_build_execution_chains(phase_resolver,
                 env, j, op );
-            
         }
     }
 



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


Mime
View raw message