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 sa...@apache.org on 2007/04/04 17:12:54 UTC

svn commit: r525527 - in /webservices/axis2/branches/java/1_2/modules: integration/project.xml integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java

Author: saminda
Date: Wed Apr  4 08:12:52 2007
New Revision: 525527

URL: http://svn.apache.org/viewvc?view=rev&rev=525527
Log:
Fix for AXIS2-2469. Proxy setting of Axis2. EchoRawRuntimeProxyTest.java test case removed from tests because, the 
test case is semantically incorrect. 

Modified:
    webservices/axis2/branches/java/1_2/modules/integration/project.xml
    webservices/axis2/branches/java/1_2/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java

Modified: webservices/axis2/branches/java/1_2/modules/integration/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/integration/project.xml?view=diff&rev=525527&r1=525526&r2=525527
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/integration/project.xml (original)
+++ webservices/axis2/branches/java/1_2/modules/integration/project.xml Wed Apr  4 08:12:52 2007
@@ -359,6 +359,7 @@
                 <exclude>**/*Util*.class</exclude>
                 <exclude>**/*InteropStubTest.class</exclude>
                 <exclude>**/*EchoRawSwAFileInputTest.class</exclude>
+                <exclude>**/*EchoRawRuntimeProxyTest.class</exclude>
                 <exclude>**org/apache/axis2/mail/*.class</exclude>
 		<exclude>**org/apache/axis2/transport/DualChannelRequestResponseRawXMLTest.class</exclude>
                 <exclude>**org/apache/axis2/soap12testing/soap12testsuite/*.class</exclude>

Modified: webservices/axis2/branches/java/1_2/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java?view=diff&rev=525527&r1=525526&r2=525527
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java (original)
+++ webservices/axis2/branches/java/1_2/modules/integration/test/org/apache/axis2/engine/EchoRawRuntimeProxyTest.java Wed Apr  4 08:12:52 2007
@@ -37,7 +37,7 @@
 
 public class EchoRawRuntimeProxyTest extends UtilServerBasedTestCase {
     public static final EndpointReference targetEPR = new EndpointReference(
-            "http://apache.axis2.host"
+            "http://localhost:5555"
                     + "/axis2/services/EchoXMLService/echoOMElement");
 
     public static final QName serviceName = new QName("EchoXMLService");

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java?view=diff&rev=525527&r1=525526&r2=525527
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java Wed Apr  4 08:12:52 2007
@@ -63,10 +63,10 @@
     protected String httpVersion = HTTPConstants.HEADER_PROTOCOL_11;
     private static final Log log = LogFactory.getLog(AbstractHTTPSender.class);
     int soTimeout = HTTPConstants.DEFAULT_SO_TIMEOUT;
-    
+
     protected static final String PROTOCOL_HTTP = "http";
     protected static final String PROTOCOL_HTTPS = "https";
-    
+
     /**
      * proxydiscription
      */
@@ -110,7 +110,7 @@
     protected void configProxyAuthentication(HttpClient client,
                                              TransportOutDescription proxySetting,
                                              HostConfiguration config,
-                                             MessageContext msgCtx)
+                                             MessageContext msgCtx,String realHost, int realPort)
             throws AxisFault {
         Parameter proxyParam = proxySetting.getParameter(HTTPConstants.PROXY);
         String usrName;
@@ -198,7 +198,7 @@
 
         client.getState().setProxyCredentials(AuthScope.ANY, proxyCred);
         config.setProxy(proxyHostName, proxyPort);
-        config.setHost(proxyHostName);
+        config.setHost(realHost,realPort);
     }
 
     /**
@@ -220,27 +220,27 @@
 
             Object contentType = header.getValue();
             Object charSetEnc = null;
-            
+
             for (int i = 0; i < headers.length; i++) {
                 NameValuePair charsetEnc = headers[i].getParameterByName(
                         HTTPConstants.CHAR_SET_ENCODING);
                 if (charsetEnc != null) {
-                	charSetEnc = charsetEnc.getValue();    
+                	charSetEnc = charsetEnc.getValue();
                 }
             }
-            
+
             if (inMessageContext != null) {
                 inMessageContext
                         .setProperty(Constants.Configuration.CONTENT_TYPE, contentType);
                 inMessageContext
                 	.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charSetEnc);
             } else {
-            	
+
             	//Transport details will be stored in a HashMap so that anybody interested can retriece them
             	HashMap transportInfoMap = new HashMap ();
             	transportInfoMap.put(Constants.Configuration.CONTENT_TYPE, contentType);
             	transportInfoMap.put(Constants.Configuration.CHARACTER_SET_ENCODING, charSetEnc);
-            	
+
             	//the HashMap is stored in the outgoing message.
             	msgContext.setProperty(Constants.Configuration.TRANSPORT_INFO_MAP, transportInfoMap);
             }
@@ -325,9 +325,9 @@
             if (PROTOCOL_HTTP.equals(protocal)) {
                 port = 80;
             } else if (PROTOCOL_HTTPS.equals(protocal)){
-                port = 443;                
+                port = 443;
             }
-            
+
         }
 
         // to see the host is a proxy and in the proxy list - available in axis2.xml
@@ -343,7 +343,7 @@
             config.setHost(targetURL.getHost(), port, targetURL.getProtocol());
         } else {
             this.configProxyAuthentication(client, proxyOutSetting, config,
-                                           msgCtx);
+                                           msgCtx,targetURL.getHost(),port);
         }
 
         return config;



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