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 ch...@apache.org on 2006/10/27 09:40:45 UTC

svn commit: r468303 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: Constants.java description/OutInAxisOperation.java

Author: chamikara
Date: Fri Oct 27 00:40:43 2006
New Revision: 468303

URL: http://svn.apache.org/viewvc?view=rev&rev=468303
Log:
Adding the following commit that was done to the 1.1 branch.
http://svn.apache.org/viewvc?view=rev&revision=464909

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java?view=diff&rev=468303&r1=468302&r2=468303
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java Fri Oct 27 00:40:43 2006
@@ -268,5 +268,13 @@
          * Field CHARACTER_SET_ENCODING
          */
         public static final String CHARACTER_SET_ENCODING = "CHARACTER_SET_ENCODING";
+
+        /**
+         * If this is set to a Boolean 'true' value, the replyTo value will not be replaced in
+         * an OutIn invocation. This is useful for modules that hope to get the reply message in 
+         * its own manner.
+         */
+        public static final String USE_CUSTOM_LISTENER = "UseCustomListener";
+
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?view=diff&rev=468303&r1=468302&r2=468303
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java Fri Oct 27 00:40:43 2006
@@ -20,6 +20,7 @@
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.OperationClient;
 import org.apache.axis2.client.Options;
@@ -260,16 +261,27 @@
             CallbackReceiver callbackReceiver = (CallbackReceiver) axisOp
                     .getMessageReceiver();
             callbackReceiver.addCallback(mc.getMessageID(), callback);
-            EndpointReference replyToFromTransport = mc.getConfigurationContext().getListenerManager().
-                    getEPRforService(sc.getAxisService().getName(), axisOp.getName().getLocalPart(), mc
-                            .getTransportIn().getName()
-                            .getLocalPart());
-
-            if (mc.getReplyTo() == null) {
-                mc.setReplyTo(replyToFromTransport);
-            } else {
-                mc.getReplyTo().setAddress(replyToFromTransport.getAddress());
+
+            /**
+             * If USE_CUSTOM_LISTENER is set to 'true' the replyTo value will not be replaced and Axis2 will not
+             * start its internal listner. Some other enntity (e.g. a module) should take care of obtaining the 
+             * response message.
+             */
+            Boolean useCustomListener = (Boolean) options.getProperty(Constants.Configuration.USE_CUSTOM_LISTENER);
+            if (useCustomListener==null || !useCustomListener.booleanValue()) {
+
+                EndpointReference replyToFromTransport = mc.getConfigurationContext().getListenerManager().
+                getEPRforService(sc.getAxisService().getName(), axisOp.getName().getLocalPart(), mc
+                        .getTransportIn().getName()
+                        .getLocalPart());
+                
+                if (mc.getReplyTo() == null) {
+                    mc.setReplyTo(replyToFromTransport);
+                } else {
+                    mc.getReplyTo().setAddress(replyToFromTransport.getAddress());
+                }
             }
+
             //if we don't do this , this guy will wait till it gets HTTP 202 in the HTTP case
             mc.setProperty(MessageContext.TRANSPORT_NON_BLOCKING, Boolean.TRUE);
             AxisEngine engine = new AxisEngine(cc);



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