axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chinth...@apache.org
Subject svn commit: r372811 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2: context/MessageContext.java description/ClientUtils.java description/OutInAxisOperation.java
Date Fri, 27 Jan 2006 10:57:04 GMT
Author: chinthaka
Date: Fri Jan 27 02:56:41 2006
New Revision: 372811

URL: http://svn.apache.org/viewcvs?rev=372811&view=rev
Log:
Fixing the bug where transport in setting were not handled properly with the options. Thanks
Chamikara for pointing this out.

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java?rev=372811&r1=372810&r2=372811&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/MessageContext.java
Fri Jan 27 02:56:41 2006
@@ -185,6 +185,7 @@
     private SessionContext sessionContext;
 
     private transient TransportOutDescription transportOut;
+    private transient TransportInDescription transportIn;
 
     public MessageContext() {
         super(null);
@@ -420,7 +421,7 @@
         if (configurationContext != null) {
             AxisConfiguration baseConfig = configurationContext
                     .getAxisConfiguration();
-            return  baseConfig.getParameter(key);
+            return baseConfig.getParameter(key);
         }
         return null;
     }
@@ -538,7 +539,7 @@
      * @return Returns TransportInDescription.
      */
     public TransportInDescription getTransportIn() {
-        return options.getTransportIn();
+        return transportIn;
     }
 
     /**
@@ -845,10 +846,10 @@
      * @param in
      */
     public void setTransportIn(TransportInDescription in) {
-        options.setTransportIn(in);
+        this.transportIn = in;
 
         if (in != null) {
-            this.options.setTransportInProtocol(in.getName().getLocalPart());
+            this.transportInName = in.getName();
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java?rev=372811&r1=372810&r2=372811&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java
Fri Jan 27 02:56:41 2006
@@ -6,6 +6,7 @@
 import org.apache.axis2.client.ListenerManager;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.util.XMLUtils;
@@ -54,7 +55,7 @@
 
     public static TransportInDescription inferInTransport(AxisConfiguration ac,
                                                           Options options,
-                                                          ServiceContext serviceContext)
throws AxisFault {
+                                                          MessageContext msgCtxt) throws
AxisFault {
         String listenerTransportProtocol = options.getTransportInProtocol();
         TransportInDescription transportIn = null;
         if (options.isUseSeparateListener()) {
@@ -65,14 +66,13 @@
                     throw new AxisFault(Messages.getMessage("unknownTransport",
                             listenerTransportProtocol));
                 }
-                options.setTransportIn(transportIn);
             }
             // if separate transport is used, start the required listeners
             if (!ac.isEngaged(new QName(Constants.MODULE_ADDRESSING))) {
                 throw new AxisFault(Messages.getMessage("2channelNeedAddressing"));
             }
             ListenerManager.makeSureStarted(options.getTransportInProtocol(),
-                    serviceContext.getConfigurationContext());
+                    msgCtxt.getServiceContext().getConfigurationContext());
         }
         return transportIn;
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java?rev=372811&r1=372810&r2=372811&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/OutInAxisOperation.java
Fri Jan 27 02:56:41 2006
@@ -231,15 +231,13 @@
                     .getAxisConfiguration(), toEPR);
         }
         mc.setTransportOut(transportOut);
-        if (mc.getTransportIn() == null) {
-            TransportInDescription transportIn = options.getTransportIn();
-            if (transportIn == null) {
-                mc.setTransportIn(ClientUtils.inferInTransport(cc
-                        .getAxisConfiguration(), options, mc
-                        .getServiceContext()));
-            } else {
-                mc.setTransportIn(transportIn);
-            }
+
+
+        if (options.getTransportIn() == null && mc.getTransportIn() == null) {
+            mc.setTransportIn(ClientUtils.inferInTransport(cc
+                    .getAxisConfiguration(), options, mc));
+        } else if (mc.getTransportIn() == null) {
+            mc.setTransportIn(options.getTransportIn());
         }
 
         if (mc.getSoapAction() == null || "".equals(mc.getSoapAction())) {
@@ -255,7 +253,7 @@
             callbackReceiver.addCallback(mc.getMessageID(), callback);
             EndpointReference replyToFromTransport = ListenerManager
                     .replyToEPR(cc, sc.getAxisService().getName() + "/"
-                            + axisOp.getName().getLocalPart(), options
+                            + axisOp.getName().getLocalPart(), mc
                             .getTransportIn().getName()
                             .getLocalPart());
 
@@ -384,9 +382,9 @@
 
     private EndpointReference getReplyToEPR(OMElement headerElement) {
         EndpointReference epr = new EndpointReference(null);
-        if(headerElement == null)
+        if (headerElement == null)
             return null;
-        
+
         Iterator childElements = headerElement.getChildElements();
         while (childElements.hasNext()) {
             OMElement eprChildElement = (OMElement) childElements.next();



Mime
View raw message