You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2007/03/07 12:11:14 UTC

svn commit: r515532 - in /webservices/axis2/trunk/c: include/axis2_const.h modules/core/clientapi/mep_client.c

Author: damitha
Date: Wed Mar  7 03:11:10 2007
New Revision: 515532

URL: http://svn.apache.org/viewvc?view=rev&rev=515532
Log:
Fixed AXIS2C-545 by checking for a proprety called AXIS2_HANDLER_ALREADY_VISITED


Modified:
    webservices/axis2/trunk/c/include/axis2_const.h
    webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c

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=515532&r1=515531&r2=515532
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_const.h (original)
+++ webservices/axis2/trunk/c/include/axis2_const.h Wed Mar  7 03:11:10 2007
@@ -344,6 +344,7 @@
 
 
 #define AXIS2_RESPONSE_SOAP_ENVELOPE "Axis2ResponseEnvelope"    
+#define AXIS2_HANDLER_ALREADY_VISITED "handler_already_visited"
 
 #ifdef __cplusplus
 }

Modified: webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c?view=diff&rev=515532&r1=515531&r2=515532
==============================================================================
--- webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c (original)
+++ webservices/axis2/trunk/c/modules/core/clientapi/mep_client.c Wed Mar  7 03:11:10 2007
@@ -318,7 +318,7 @@
         }
     }
 
-    AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(msg_ctx, env, envelope);
+    axis2_msg_ctx_set_soap_envelope(msg_ctx, env, envelope);
 
     return msg_ctx;
 }
@@ -706,7 +706,7 @@
  	response_envelope = AXIS2_MSG_CTX_GET_RESPONSE_SOAP_ENVELOPE (msg_ctx, env);
     if(response_envelope)
     {
-        AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(response, env, response_envelope);
+        axis2_msg_ctx_set_soap_envelope(response, env, response_envelope);
         engine = axis2_engine_create(env, conf_ctx);
         if (engine)
         {
@@ -730,7 +730,21 @@
            else it is a one way message */
         if (response_envelope)
         {
-            AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(response, env, response_envelope);
+            axis2_msg_ctx_set_soap_envelope(response, env, response_envelope);
+            /* There could be a scenaria where the message has already passed
+             * through the incoming phases. eg. Reliable Messaging 1.0 two
+             * way single channel
+             */
+            property = axis2_msg_ctx_get_property(msg_ctx, env, 
+                AXIS2_HANDLER_ALREADY_VISITED, AXIS2_FALSE);
+            if(property)
+            {
+                axis2_char_t *value = axis2_property_get_value(property, env);
+                if(0 == axis2_strcmp(AXIS2_VALUE_TRUE, value))
+                {
+                    return response;
+                }
+            }
             engine = axis2_engine_create(env, conf_ctx);
             if (engine)
             {
@@ -813,7 +827,7 @@
  	response_envelope = AXIS2_MSG_CTX_GET_RESPONSE_SOAP_ENVELOPE (msg_ctx, env);
     if (response_envelope)
     {
-        AXIS2_MSG_CTX_SET_SOAP_ENVELOPE(response, env, response_envelope);
+        axis2_msg_ctx_set_soap_envelope(response, env, response_envelope);
         if (engine)
         {
             AXIS2_ENGINE_FREE(engine, env);



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