Author: gnodet
Date: Thu Jul 31 02:39:04 2008
New Revision: 681312

URL: http://svn.apache.org/viewvc?rev=681312&view=rev
Log:
SM-1442: Allow ServiceMix to build using the ibm jdk

Modified:
    servicemix/components/bindings/servicemix-http/trunk/pom.xml
    
servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/SslParameters.java
    
servicemix/components/bindings/servicemix-http/trunk/src/test/java/org/apache/servicemix/http/HttpSpringTest.java
    
servicemix/components/bindings/servicemix-http/trunk/src/test/resources/org/apache/servicemix/http/spring.xml

Modified: servicemix/components/bindings/servicemix-http/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-http/trunk/pom.xml?rev=681312&r1=681311&r2=681312&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-http/trunk/pom.xml (original)
+++ servicemix/components/bindings/servicemix-http/trunk/pom.xml Thu Jul 31 
02:39:04 2008
@@ -198,10 +198,10 @@
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>xstream</groupId>
+      <groupId>com.thoughtworks.xstream</groupId>
       <artifactId>xstream</artifactId>
       <scope>provided</scope>
-      <version>1.1.2</version>
+      <version>1.3</version>
     </dependency>
     <dependency>
       <groupId>aopalliance</groupId>

Modified: 
servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/SslParameters.java
URL: 
http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/SslParameters.java?rev=681312&r1=681311&r2=681312&view=diff
==============================================================================
--- 
servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/SslParameters.java
 (original)
+++ 
servicemix/components/bindings/servicemix-http/trunk/src/main/java/org/apache/servicemix/http/SslParameters.java
 Thu Jul 31 02:39:04 2008
@@ -16,6 +16,8 @@
  */
 package org.apache.servicemix.http;
 
+import java.security.Security;
+
 /**
  * This class contains all parameters needed to create an SSL server or client 
socket.
  * 
@@ -34,12 +36,32 @@
     private String trustStorePassword;
     private String trustStoreType = "JKS";
     private String protocol = "TLS";
-    private String keyManagerFactoryAlgorithm = "SunX509"; // cert algorithm
-    private String trustManagerFactoryAlgorithm = "SunX509"; // cert algorithm
+    private String keyManagerFactoryAlgorithm; // cert algorithm
+    private String trustManagerFactoryAlgorithm; // cert algorithm
     private String provider;
     private boolean wantClientAuth;
     private boolean needClientAuth;
 
+    public SslParameters() {
+        keyManagerFactoryAlgorithm = 
Security.getProperty("ssl.KeyManagerFactory.algorithm");
+        if (keyManagerFactoryAlgorithm == null) {
+            // Default to SunX509 only if we aren't using an ibm jdk
+            if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
+                keyManagerFactoryAlgorithm = "IbmX509";
+            } else {
+                keyManagerFactoryAlgorithm = "SunX509";
+            }
+        }
+        trustManagerFactoryAlgorithm = 
Security.getProperty("ssl.TrustManagerFactory.algorithm");
+        if (trustManagerFactoryAlgorithm == null) {
+            if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
+                trustManagerFactoryAlgorithm = "PKIX";
+            } else {
+                trustManagerFactoryAlgorithm = "SunX509";
+            }
+        }
+    }
+
     /**
      * @return the provider
      */

Modified: 
servicemix/components/bindings/servicemix-http/trunk/src/test/java/org/apache/servicemix/http/HttpSpringTest.java
URL: 
http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-http/trunk/src/test/java/org/apache/servicemix/http/HttpSpringTest.java?rev=681312&r1=681311&r2=681312&view=diff
==============================================================================
--- 
servicemix/components/bindings/servicemix-http/trunk/src/test/java/org/apache/servicemix/http/HttpSpringTest.java
 (original)
+++ 
servicemix/components/bindings/servicemix-http/trunk/src/test/java/org/apache/servicemix/http/HttpSpringTest.java
 Thu Jul 31 02:39:04 2008
@@ -95,7 +95,7 @@
 
     public void testMimeWithHttpClient() throws Exception {
         File f = new File(getClass().getResource("servicemix.jpg").getFile());
-        PostMethod filePost = new PostMethod("http://localhost:8192/Service/";);
+        PostMethod filePost = new 
PostMethod("http://localhost:18192/Service/";);
         Part[] parts = {new StringPart("request", "<dummy/>"), new 
FilePart(f.getName(), f)};
         RequestEntity entity = new MultipartRequestEntity(parts, 
filePost.getParams());
         ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: 
servicemix/components/bindings/servicemix-http/trunk/src/test/resources/org/apache/servicemix/http/spring.xml
URL: 
http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-http/trunk/src/test/resources/org/apache/servicemix/http/spring.xml?rev=681312&r1=681311&r2=681312&view=diff
==============================================================================
--- 
servicemix/components/bindings/servicemix-http/trunk/src/test/resources/org/apache/servicemix/http/spring.xml
 (original)
+++ 
servicemix/components/bindings/servicemix-http/trunk/src/test/resources/org/apache/servicemix/http/spring.xml
 Thu Jul 31 02:39:04 2008
@@ -35,13 +35,13 @@
                  <http:endpoint service="test:MyConsumerService"
                    endpoint="myConsumer"
                    role="consumer" 
-                   locationURI="http://localhost:8192/Service/";
+                   locationURI="http://localhost:18192/Service/";
                    defaultMep="http://www.w3.org/2004/08/wsdl/in-out"; />
                  
                  <http:endpoint service="test:MyProviderService"
                    endpoint="myProvider"
                    role="provider" 
-                   locationURI="http://localhost:8192/Service/"; />
+                   locationURI="http://localhost:18192/Service/"; />
                  
                   <!-- START SNIPPET: ssl -->
                  <http:endpoint service="testSsl:MyConsumerService"


Reply via email to