Upgrade http client version to handle https://issues.apache.org/jira/browse/HTTPCLIENT-1138

git-svn-id: https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk@1364844 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/distribution/all/src/main/release/bin/LICENSE b/distribution/all/src/main/release/bin/LICENSE
index 16b6b43..4ee308f 100644
--- a/distribution/all/src/main/release/bin/LICENSE
+++ b/distribution/all/src/main/release/bin/LICENSE
@@ -258,8 +258,8 @@
  groovy-all-1.7.1.jar

  hazelcast-1.9.2.2.jar

  hazelcast-client-1.9.2.2.jar

- httpclient-4.1.3.jar

- httpcore-4.1.4.jar

+ httpclient-4.2.1.jar

+ httpcore-4.2.1.jar

  jackson-core-asl-1.9.4.jar

  jackson-mapper-asl-1.9.4.jar

  jackson-xc-1.9.4.jar

diff --git a/modules/binding-atom-runtime/pom.xml b/modules/binding-atom-runtime/pom.xml
index 3147610..51bf525 100644
--- a/modules/binding-atom-runtime/pom.xml
+++ b/modules/binding-atom-runtime/pom.xml
@@ -93,7 +93,7 @@
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
-            <version>4.1.3</version>
+            <version>4.2.1</version>
         </dependency>
 
         <dependency>
diff --git a/modules/binding-jsonp-runtime/pom.xml b/modules/binding-jsonp-runtime/pom.xml
index 31398c2..28a9f35 100644
--- a/modules/binding-jsonp-runtime/pom.xml
+++ b/modules/binding-jsonp-runtime/pom.xml
@@ -51,7 +51,7 @@
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
-            <version>4.1.3</version>
+            <version>4.2.1</version>
         </dependency>
         
         <dependency>
diff --git a/modules/binding-jsonrpc-runtime/pom.xml b/modules/binding-jsonrpc-runtime/pom.xml
index fd042f5..46dafac 100644
--- a/modules/binding-jsonrpc-runtime/pom.xml
+++ b/modules/binding-jsonrpc-runtime/pom.xml
@@ -81,7 +81,7 @@
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
-            <version>4.1.3</version>
+            <version>4.2.1</version>
         </dependency>
 
         <dependency>
diff --git a/modules/binding-rest-runtime/pom.xml b/modules/binding-rest-runtime/pom.xml
index 1f2528e..b06e2b9 100644
--- a/modules/binding-rest-runtime/pom.xml
+++ b/modules/binding-rest-runtime/pom.xml
@@ -184,7 +184,7 @@
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
-            <version>4.1.3</version>
+            <version>4.2.1</version>
         </dependency>
 
         <dependency>
diff --git a/modules/host-http/pom.xml b/modules/host-http/pom.xml
index 2c1460a..fd92069 100644
--- a/modules/host-http/pom.xml
+++ b/modules/host-http/pom.xml
@@ -46,14 +46,14 @@
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
-            <version>4.1.3</version>
+            <version>4.2.1</version>
             <optional>true</optional>
         </dependency>    
         
         <dependency>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpcore</artifactId>
-            <version>4.1.3</version>
+            <version>4.2.1</version>
             <optional>true</optional>
         </dependency>    
         
diff --git a/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/client/HttpClientFactory.java b/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/client/HttpClientFactory.java
index fe9fd49..8c9b1f3 100644
--- a/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/client/HttpClientFactory.java
+++ b/modules/host-http/src/main/java/org/apache/tuscany/sca/host/http/client/HttpClientFactory.java
@@ -64,9 +64,10 @@
         HttpConnectionParams.setConnectionTimeout(defaultParameters, 60000);
         HttpConnectionParams.setSoTimeout(defaultParameters, 60000);
 
+        // See https://issues.apache.org/jira/browse/HTTPCLIENT-1138
         SchemeRegistry supportedSchemes = new SchemeRegistry();
-        supportedSchemes.register(new Scheme(HttpHost.DEFAULT_SCHEME_NAME, PlainSocketFactory.getSocketFactory(), 80));
-        supportedSchemes.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
+        supportedSchemes.register(new Scheme(HttpHost.DEFAULT_SCHEME_NAME, 80, PlainSocketFactory.getSocketFactory()));
+        supportedSchemes.register(new Scheme("https", 443, SSLSocketFactory.getSocketFactory()));
 
         ClientConnectionManager connectionManager =
             new ThreadSafeClientConnManager(defaultParameters, supportedSchemes);