[jboss-svn-commits] JBL Code SVN: r31442 - in labs/jbossesb/branches/JBESB_4_7_CP/product: services/soap/src/main/java/org/jboss/soa/esb/actions/soap and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Feb 5 06:16:38 EST 2010


Author: kevin.conner at jboss.com
Date: 2010-02-05 06:16:37 -0500 (Fri, 05 Feb 2010)
New Revision: 31442

Modified:
   labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java
   labs/jbossesb/branches/JBESB_4_7_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/RemoteWsdlLoader.java
Log:
remove static protocol behaviour and 9999 port reference: JBESB-3168

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java	2010-02-05 10:52:20 UTC (rev 31441)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/rosetta/src/org/jboss/soa/esb/http/configurators/HttpProtocol.java	2010-02-05 11:16:37 UTC (rev 31442)
@@ -63,7 +63,6 @@
  *          SSL.  To authenticate with a self-signed certificate, use the
  *          {@link org.jboss.soa.esb.http.protocol.SelfSignedSSLProtocolSocketFactoryBuilder} (test/demo only) and to perform
  *          full authentication (2way) with CA Signed certs, use the {@link org.jboss.soa.esb.http.protocol.AuthSSLProtocolSocketFactoryBuilder}.</li>
- *      <li><b>protocol-default-port</b>: (Optional).  See {@link Protocol}. Defaults to <code>targetURI.getPort()</code>.</li>
  * </ul>
  * <p/>
  * See <a href="http://jakarta.apache.org/commons/httpclient/sslguide.html">HttpClient HttpProtocol Guide</a>.
@@ -88,36 +87,31 @@
             return;
         }
         
+        final int defaultPort ;
         boolean secure = "https".equals(scheme);
         if (secure) {
             factory = properties.getProperty("protocol-socket-factory", StrictSSLProtocolSocketFactory.class.getName());
             keyMaterial = getKeyMaterial(properties);
-            if (port == -1) {
-            	port = 443;
-            }
+            defaultPort = 443;
         } else {
             factory = properties.getProperty("protocol-socket-factory", DefaultProtocolSocketFactory.class.getName());
-            if (port == -1) {
-            	port = 80;
-            }
+            defaultPort = 80;
         }
+        if (port <= 0) {
+            port = defaultPort ;
+        }
         assertPropertySetAndNotBlank(factory, "protocol-socket-factory");
         socketFactory = createFactoryClass(factory, keyMaterial, properties);
 
-		// JBESB-3092
-        int defaultPort = Integer.valueOf(properties.getProperty("protocol-default-port", String.valueOf(port))).intValue();
-        
         // And finally... configure the host with the protocol....
         protocol = new Protocol(scheme, socketFactory, defaultPort);
-        Protocol.registerProtocol(scheme, protocol);
         // these lines have to happen after registerProtocol, otherwise they pick up the wrong static value
         if (secure) {
         	setHttpsProxyHost(httpClient, properties);
         } else {
         	setHttpProxyHost(httpClient, properties);
         }
-        // JBESB-3021: the registerProtocol map is static (yuck!); we need to make sure to use the right protocol.
-        // See HttpRouter (JBESB-3021 comments) for more information.
+        // Use our own protocol, see JBESB-3021 comments for more information.
         httpClient.getHostConfiguration().setHost(targetURI.getHost(), port, protocol);
     }
     

Modified: labs/jbossesb/branches/JBESB_4_7_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/RemoteWsdlLoader.java
===================================================================
--- labs/jbossesb/branches/JBESB_4_7_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/RemoteWsdlLoader.java	2010-02-05 10:52:20 UTC (rev 31441)
+++ labs/jbossesb/branches/JBESB_4_7_CP/product/services/soap/src/main/java/org/jboss/soa/esb/actions/soap/RemoteWsdlLoader.java	2010-02-05 11:16:37 UTC (rev 31442)
@@ -51,10 +51,6 @@
     private HostConfiguration hostConfig;
 
     public RemoteWsdlLoader(Properties httpClientProps) throws ConfigurationException {
-		// JBESB-3092
-    	if (!httpClientProps.containsKey("protocol-default-port")) {
-    		httpClientProps.setProperty("protocol-default-port", "9999");
-    	}
         httpClient = HttpClientFactory.createHttpClient(httpClientProps);
         hostConfig = httpClient.getHostConfiguration();
         httpClient.setHostConfiguration(new HostConfiguration());



More information about the jboss-svn-commits mailing list