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 sa...@apache.org on 2005/12/28 08:44:31 UTC

svn commit: r359431 - in /webservices/axis2/trunk/c: include/axis2_conf.h modules/core/engine/src/conf.c modules/core/engine/src/engine.c

Author: samisa
Date: Tue Dec 27 23:44:21 2005
New Revision: 359431

URL: http://svn.apache.org/viewcvs?rev=359431&view=rev
Log:
More SOAP envelope exposing to resolve the dependancies

Modified:
    webservices/axis2/trunk/c/include/axis2_conf.h
    webservices/axis2/trunk/c/modules/core/engine/src/conf.c
    webservices/axis2/trunk/c/modules/core/engine/src/engine.c

Modified: webservices/axis2/trunk/c/include/axis2_conf.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_conf.h?rev=359431&r1=359430&r2=359431&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_conf.h (original)
+++ webservices/axis2/trunk/c/include/axis2_conf.h Tue Dec 27 23:44:21 2005
@@ -235,6 +235,8 @@
     set_out_phases) (axis2_conf_t *conf,
                                         axis2_env_t **env,
                                         axis2_array_list_t *out_phases);
+    axis2_array_list_t* (AXIS2_CALL *
+    get_out_phases) (axis2_conf_t *conf, axis2_env_t **env);
     
         /**
      * @param list
@@ -389,6 +391,9 @@
 
 #define AXIS2_CONF_SET_OUT_PHASES(conf, env, out_phases) \
         (conf->ops->set_out_phases(conf , env, out_phases)) 
+
+#define AXIS2_CONF_GET_OUT_PHASES(conf, env) \
+        (conf->ops->get_out_phases(conf , env)) 
 
 #define AXIS2_CONF_SET_IN_FAULTPHASES(conf, env, list) \
         (conf->ops->set_in_faultphases(conf , env, list)) 

Modified: webservices/axis2/trunk/c/modules/core/engine/src/conf.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/src/conf.c?rev=359431&r1=359430&r2=359431&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/src/conf.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/src/conf.c Tue Dec 27 23:44:21 2005
@@ -218,6 +218,9 @@
                                     axis2_env_t **env,
                                     axis2_array_list_t *out_phases);
 
+axis2_array_list_t* AXIS2_CALL
+axis2_conf_get_out_phases(axis2_conf_t *conf,
+                                    axis2_env_t **env);
     /**
  * @param list
  */
@@ -508,6 +511,9 @@
     config_impl->conf.ops->set_out_phases =
             axis2_conf_set_out_phases;
     
+    config_impl->conf.ops->get_out_phases =
+            axis2_conf_get_out_phases;
+            
     config_impl->conf.ops->set_in_faultphases =
             axis2_conf_set_in_faultphases;
     
@@ -1370,6 +1376,14 @@
     return AXIS2_SUCCESS;
 }
 
+axis2_array_list_t* AXIS2_CALL
+axis2_conf_get_out_phases(axis2_conf_t *conf,
+                                    axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(conf, env, NULL);
+    return AXIS2_INTF_TO_IMPL(conf)->out_phases;
+}
+    
     /**
  * @param list
  */

Modified: webservices/axis2/trunk/c/modules/core/engine/src/engine.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/src/engine.c?rev=359431&r1=359430&r2=359431&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/src/engine.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/src/engine.c Tue Dec 27 23:44:21 2005
@@ -17,6 +17,9 @@
 #include <axis2_engine.h>
 #include <axis2.h>
 #include <axis2_hash.h>
+#include <axis2_soap.h>
+#include <axis2_transport_sender.h>
+#include <axis2_http_transport.h>
 
 /**
  * There is only one engine for the Server and the Client. the send() and receive()
@@ -183,8 +186,8 @@
             conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
             if (conf)
             {
-                /*TODO global_out_phase = AXIS2_CONF_GET_GLOBAL_OUT_PASES(conf, env);
-                axis2_engine_invoke_phases(engine, env, global_out_phase, msg_ctx); */
+                axis2_array_list_t *global_out_phase = AXIS2_CONF_GET_OUT_PHASES(conf, env);
+                axis2_engine_invoke_phases(engine, env, global_out_phase, msg_ctx);
             }
         }
     } 
@@ -198,8 +201,8 @@
             conf = AXIS2_CONF_CTX_GET_CONF(conf_ctx, env);
             if (conf)
             {
-                /*global_out_phase = AXIS2_CONF_GET_GLOBAL_OUT_PHASES(conf, env);
-                axis2_engine_invoke_phases(engine, env, global_out_phase, msg_ctx);*/
+                axis2_array_list_t *global_out_phase = AXIS2_CONF_GET_OUT_PHASES(conf, env);
+                axis2_engine_invoke_phases(engine, env, global_out_phase, msg_ctx);
             }
         }
     }
@@ -207,9 +210,9 @@
     if (!(AXIS2_MSG_CTX_IS_PAUSED(msg_ctx, env)))
     {
         /* write the message to the wire */
-        /*TODO axis2_transport_out_desc_t *transport_out = AXIS2_MSG_CTX_GET_TRANSPORT_OUT_DESC(msg_ctx, env);
-        axis2_tranport_sender_t *transport_sender = AXIS2_TRANSPORT_OUT_DESC_GET_SENDER(transport_out, env);
-        AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, msg_ctx);*/
+        axis2_transport_out_desc_t *transport_out = AXIS2_MSG_CTX_GET_TRANSPORT_OUT_DESC(msg_ctx, env);
+        axis2_transport_sender_t *transport_sender = AXIS2_TRANSPORT_OUT_DESC_GET_SENDER(transport_out, env);
+        AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, msg_ctx);
     }
     
     return AXIS2_SUCCESS;
@@ -338,9 +341,9 @@
     if (!(AXIS2_MSG_CTX_IS_PAUSED(msg_ctx, env))) 
     {
         /* actually send the SOAP Fault*/
-        /* TODO axis2_transport_out_desc_t *transport_out = AXIS2_MSG_CTX_GET_TRANSPORT_OUT_DESC(msg_ctx, env);
-        axis2_tranport_sender_t *transport_sender = AXIS2_TRANSPORT_OUT_DESC_GET_SENDER(transport_out, env);
-        AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, msg_ctx);*/
+        axis2_transport_out_desc_t *transport_out = AXIS2_MSG_CTX_GET_TRANSPORT_OUT_DESC(msg_ctx, env);
+        axis2_transport_sender_t *transport_sender = AXIS2_TRANSPORT_OUT_DESC_GET_SENDER(transport_out, env);
+        AXIS2_TRANSPORT_SENDER_INVOKE(transport_sender, env, msg_ctx);
     }
     return AXIS2_SUCCESS;
 }
@@ -446,29 +449,29 @@
     }
     else
     {
-        /** TODO void *writer = AXIS2_MSG_CTX_GET_PROPERTY(processing_context, env, AXIS2_TRANSPORT_OUT, AXIS2_TRUE);
+        void *writer = AXIS2_MSG_CTX_GET_PROPERTY(processing_context, env, AXIS2_TRANSPORT_OUT, AXIS2_TRUE);
         if (writer) 
         {
-            AXIS2_MSG_CTX_SET_PROPERTY(fault_ctx, env, AXIS2_TRANSPORT_OUT, writer); 
+            AXIS2_MSG_CTX_SET_PROPERTY(fault_ctx, env, AXIS2_TRANSPORT_OUT, writer, AXIS2_TRUE); 
         } 
         else 
         {
             AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NOWHERE_TO_SEND_FAULT, AXIS2_FAILURE);
             return NULL;
-        }*/
+        }
     }
 
     AXIS2_MSG_CTX_SET_OP_CTX(fault_ctx, env, AXIS2_MSG_CTX_GET_OP_CTX(processing_context, env));
     AXIS2_MSG_CTX_SET_PROCESS_FAULT(fault_ctx, env, AXIS2_TRUE);
     AXIS2_MSG_CTX_SET_SERVER_SIDE(fault_ctx, env, AXIS2_TRUE);
-    /*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_TRUE) );*/
+    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_TRUE), AXIS2_TRUE );
 
-    /** TODO
-    axis2_soap_envelope_t *envelope = NULL;
+    
+    /*axis2_soap_envelope_t *envelope = NULL;
     if (AXIS2_MSG_CTX_GET_IS_SOAP_11(processing_context, env)) 
     {
-        envelope = axis2_create_default_fault_soap_envilope(env, AXIS2_SOAP_11);
+        envelope = axis2_create_default_fault_soap_envelope(env, AXIS2_SOAP_11);
         
     } 
     else 
@@ -697,9 +700,9 @@
     AXIS2_FUNC_PARAM_CHECK(engine, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, soap_namespace, AXIS2_FAILURE);
     
-    /*if (AXIS2_STRCMP(AXIS2_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI, soap_namespace))
+    if (AXIS2_STRCMP(AXIS2_SOAP12_SOAP_ENVELOPE_NAMESPACE_URI, soap_namespace))
         return AXIS2_SOAP12_FAULT_CODE_RECEIVER;
     else
-        return AXIS2_SOAP11_FAULT_CODE_RECEIVER;*/
+        return AXIS2_SOAP11_FAULT_CODE_RECEIVER;
     return NULL;
 }