axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r354494 - /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/InOutMEPClient.java
Date Tue, 06 Dec 2005 18:48:43 GMT
Author: dims
Date: Tue Dec  6 10:48:41 2005
New Revision: 354494

URL: http://svn.apache.org/viewcvs?rev=354494&view=rev
Log:
force a listener transport only if it is needed.


Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/InOutMEPClient.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/InOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/InOutMEPClient.java?rev=354494&r1=354493&r2=354494&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/InOutMEPClient.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/InOutMEPClient.java
Tue Dec  6 10:48:41 2005
@@ -257,12 +257,14 @@
         AxisConfiguration axisConfig = this.serviceContext.getConfigurationContext().getAxisConfiguration();
         String listenerTransportProtocol = clientOptions.getListenerTransportProtocol();
         if (axisConfig != null) {
-            if (listenerTransportProtocol != null && !"".equals(listenerTransportProtocol))
{
-                TransportInDescription transportIn = axisConfig.getTransportIn(new QName(listenerTransportProtocol));
-                if (transportIn == null) {
-                    throw new AxisFault(Messages.getMessage("unknownTransport", listenerTransportProtocol));
+            if (clientOptions.isUseSeparateListener()) {
+                if (listenerTransportProtocol != null && !"".equals(listenerTransportProtocol))
{
+                    TransportInDescription transportIn = axisConfig.getTransportIn(new QName(listenerTransportProtocol));
+                    if (transportIn == null) {
+                        throw new AxisFault(Messages.getMessage("unknownTransport", listenerTransportProtocol));
+                    }
+                    clientOptions.setListenerTransport(transportIn);
                 }
-                clientOptions.setListenerTransport(transportIn);
             }
 
             inferTransportOutDescription(msgCtx);
@@ -292,12 +294,14 @@
         if (clientOptions.getSenderTransport() == null) {
             clientOptions.setSenderTransport(inferTransport(msgctx.getTo()));
         }
-        if (clientOptions.getListenerTransport() == null) {
-            clientOptions.setListenerTransport(serviceContext.getConfigurationContext()
-                    .getAxisConfiguration()
-                    .getTransportIn(clientOptions.getSenderTransport().getName()));
+        if (clientOptions.isUseSeparateListener()) {
+            if (clientOptions.getListenerTransport() == null) {
+                clientOptions.setListenerTransport(serviceContext.getConfigurationContext()
+                        .getAxisConfiguration()
+                        .getTransportIn(clientOptions.getSenderTransport().getName()));
+            }
         }
-
+            
         if (msgctx.getTransportIn() == null) {
             msgctx.setTransportIn(clientOptions.getListenerTransport());
         }
@@ -328,7 +332,9 @@
      * requests sent, the call should be closed only when all are are done.
      */
     public void close() throws AxisFault {
-        ListenerManager.stop(serviceContext.getConfigurationContext(), clientOptions.getListenerTransport().getName().getLocalPart());
+        if(clientOptions.isUseSeparateListener()) {
+            ListenerManager.stop(serviceContext.getConfigurationContext(), clientOptions.getListenerTransport().getName().getLocalPart());
+        }
     }
 
     /**



Mime
View raw message