axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chamik...@apache.org
Subject svn commit: r464909 - in /webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2: Constants.java description/OutInAxisOperation.java
Date Tue, 17 Oct 2006 11:59:27 GMT
Author: chamikara
Date: Tue Oct 17 04:59:24 2006
New Revision: 464909

URL: http://svn.apache.org/viewvc?view=rev&rev=464909
Log:
This introduced the feature that was decided to be added in the discussion 
http://marc.theaimsgroup.com/?t=115917676300001&r=1&w=2.

Basically if this optional property is set in the Options object, Axis2 will
not replace the replyTo value in OutIn invocations and it will not start its
internal listener.

Modified:
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/Constants.java
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java

Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/Constants.java?view=diff&rev=464909&r1=464908&r2=464909
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/Constants.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/Constants.java
Tue Oct 17 04:59:24 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/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?view=diff&rev=464909&r1=464908&r2=464909
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
Tue Oct 17 04:59:24 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,29 @@
             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()==false) {
+
+                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


Mime
View raw message