You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/11/06 08:43:45 UTC
svn commit: r1031966 - in /camel/trunk/components: camel-spring-ws/
camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/
camel-test/src/main/java/org/apache/camel/test/
camel-test/src/main/java/org/apache/camel/test/junit4/
Author: davsclaus
Date: Sat Nov 6 07:43:45 2010
New Revision: 1031966
URL: http://svn.apache.org/viewvc?rev=1031966&view=rev
Log:
CAMEL-3105: spring-ws component now tests under JDK 1.5 as well.
Modified:
camel/trunk/components/camel-spring-ws/pom.xml
camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingRouteTest.java
camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
Modified: camel/trunk/components/camel-spring-ws/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-ws/pom.xml?rev=1031966&r1=1031965&r2=1031966&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-ws/pom.xml (original)
+++ camel/trunk/components/camel-spring-ws/pom.xml Sat Nov 6 07:43:45 2010
@@ -37,9 +37,9 @@
<repositories>
<repository>
- <id>spring.maven.release</id>
- <name>Spring Release Maven Repo</name>
- <url>http://repository.springsource.com/maven/bundles/release</url>
+ <id>spring.maven.release</id>
+ <name>Spring Release Maven Repo</name>
+ <url>http://repository.springsource.com/maven/bundles/release</url>
</repository>
</repositories>
@@ -72,6 +72,41 @@
<version>${spring-ws-version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-servlet_2.5_spec</artifactId>
+ <version>1.2</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- these is needed by JDK 1.5 -->
+ <dependency>
+ <groupId>javax.xml.soap</groupId>
+ <artifactId>saaj-api</artifactId>
+ <version>1.3</version>
+ <exclusions>
+ <exclusion>
+ <!-- exclude dependency on javax.activation due to sun binary license
+ restrictions geronimo-activation dependency directly below provides a workaround -->
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <!-- workaround for saaj dependency on javax.activation -->
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-activation_1.1_spec</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.messaging.saaj</groupId>
+ <artifactId>saaj-impl</artifactId>
+ <version>1.3.2</version>
+ <scope>provided</scope>
+ </dependency>
+
<!-- testing -->
<dependency>
<groupId>org.springframework</groupId>
Modified: camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingRouteTest.java?rev=1031966&r1=1031965&r2=1031966&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingRouteTest.java (original)
+++ camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingRouteTest.java Sat Nov 6 07:43:45 2010
@@ -84,6 +84,10 @@ public class ConsumerEndpointMappingRout
@Test(expected = WebServiceIOException.class)
public void testWrongSoapAction() throws Exception {
+ if (isJava15()) {
+ // does not work on JDK 1.5 due net.javacrumbs.spring-ws-test is not JDK 1.5 compatible
+ throw new WebServiceIOException("Forced by JDK 1.5");
+ }
StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
webServiceTemplate.sendSourceAndReceive(source, new SoapActionCallback("http://this-is-a-wrong-soap-action"), NOOP_SOURCE_EXTRACTOR);
resultEndpointSoapAction.assertIsNotSatisfied();
@@ -107,6 +111,10 @@ public class ConsumerEndpointMappingRout
@Test(expected = WebServiceIOException.class)
public void testWrongUri() throws Exception {
+ if (isJava15()) {
+ // does not work on JDK 1.5 due net.javacrumbs.spring-ws-test is not JDK 1.5 compatible
+ throw new WebServiceIOException("Forced by JDK 1.5");
+ }
StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
webServiceTemplate.sendSourceAndReceive("http://localhost/wrong", source, NOOP_SOURCE_EXTRACTOR);
resultEndpointUri.assertIsNotSatisfied();
Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java?rev=1031966&r1=1031965&r2=1031966&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java (original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java Sat Nov 6 07:43:45 2010
@@ -490,6 +490,16 @@ public abstract class TestSupport extend
}
/**
+ * Is this Java 1.5
+ *
+ * @return <tt>true</tt> if its Java 1.5, <tt>false</tt> if its not (for example Java 1.6 or better)
+ */
+ public static boolean isJava15() {
+ String javaVersion = System.getProperty("java.version").toLowerCase(Locale.US);
+ return javaVersion.startsWith("1.5");
+ }
+
+ /**
* Gets the current test method name
*
* @return the method name
Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java?rev=1031966&r1=1031965&r2=1031966&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java (original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java Sat Nov 6 07:43:45 2010
@@ -471,6 +471,16 @@ public abstract class TestSupport extend
}
/**
+ * Is this Java 1.5
+ *
+ * @return <tt>true</tt> if its Java 1.5, <tt>false</tt> if its not (for example Java 1.6 or better)
+ */
+ public static boolean isJava15() {
+ String javaVersion = System.getProperty("java.version").toLowerCase(Locale.US);
+ return javaVersion.startsWith("1.5");
+ }
+
+ /**
* Gets the current test method name
*
* @return the method name