Skip to content

Commit 40e0fef

Browse files
committed
Upgraded samples for JDK 1.6
1 parent 5754efd commit 40e0fef

File tree

5 files changed

+90
-49
lines changed

5 files changed

+90
-49
lines changed

samples/airline/client/spring-ws/src/org/springframework/ws/samples/airline/client/sws/GetFrequentFlyerMileage.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import javax.xml.transform.Result;
2020
import javax.xml.transform.Source;
21+
import javax.xml.transform.stream.StreamResult;
2122

2223
import org.springframework.context.ApplicationContext;
2324
import org.springframework.context.support.ClassPathXmlApplicationContext;
@@ -36,11 +37,8 @@ public void getFrequentFlyerMileage() {
3637
Source source = new StringSource(
3738
"<GetFrequentFlyerMileageRequest xmlns=\"http://www.springframework.org/spring-ws/samples/airline/schemas/messages\" />");
3839

39-
Result result = new StringResult();
40+
getWebServiceTemplate().sendSourceAndReceiveToResult(source, new StreamResult(System.out));
4041

41-
getWebServiceTemplate().sendSourceAndReceiveToResult(source, result);
42-
43-
System.out.println("result = " + result);
4442
}
4543

4644
public static void main(String[] args) {

samples/airline/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@
3838
<version>2.1.5</version>
3939
<scope>runtime</scope>
4040
</dependency>
41+
<dependency>
42+
<groupId>javax.xml.soap</groupId>
43+
<artifactId>saaj-api</artifactId>
44+
<scope>runtime</scope>
45+
</dependency>
46+
<dependency>
47+
<groupId>com.sun.xml.messaging.saaj</groupId>
48+
<artifactId>saaj-impl</artifactId>
49+
<scope>runtime</scope>
50+
</dependency>
4151
<dependency>
4252
<groupId>javax.activation</groupId>
4353
<artifactId>activation</artifactId>

samples/airline/readme.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Multiple clients are available, showing interoperability with Axis 1, SAAJ, C#,
1212

1313
2. INSTALLATION
1414

15-
The Airline sample is a normal web application that connects to a HSQLDB database.
15+
The Airline sample is a normal web application that connects to an embedded
16+
HSQLDB database. It requires JDK 1.5 to run; JDK 1.6 works as well, except for
17+
the WS-Security endpoints.
1618

1719
To execute the sample, run "mvn jetty:run" to run the sample in the Jetty6 Web container.
1820

@@ -21,4 +23,4 @@ To create a war file instead of running in Jetty, use "mvn package".
2123
3. THE CLIENTS
2224

2325
The client directory contains a number of sample clients. More instructions are provided in the readme files in the
24-
directories.
26+
directories.

samples/mtom/pom.xml

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,43 @@
2828
</plugin>
2929
</plugins>
3030
</reporting>
31+
<profiles>
32+
<profile>
33+
<id>jdk14-jdk15</id>
34+
<activation>
35+
<jdk>!1.6</jdk>
36+
</activation>
37+
<dependencies>
38+
<dependency>
39+
<groupId>javax.xml.bind</groupId>
40+
<artifactId>jaxb-api</artifactId>
41+
<scope>provided</scope>
42+
<optional>true</optional>
43+
<version>2.1</version>
44+
<exclusions>
45+
<exclusion>
46+
<groupId>javax.xml.stream</groupId>
47+
<artifactId>stax-api</artifactId>
48+
</exclusion>
49+
<exclusion>
50+
<groupId>javax.activation</groupId>
51+
<artifactId>activation</artifactId>
52+
</exclusion>
53+
</exclusions>
54+
</dependency>
55+
<dependency>
56+
<groupId>com.sun.xml.bind</groupId>
57+
<artifactId>jaxb-impl</artifactId>
58+
<version>2.1.5</version>
59+
<scope>provided</scope>
60+
</dependency>
61+
<dependency>
62+
<groupId>javax.activation</groupId>
63+
<artifactId>activation</artifactId>
64+
</dependency>
65+
</dependencies>
66+
</profile>
67+
</profiles>
3168
<build>
3269
<plugins>
3370
<plugin>
@@ -67,26 +104,5 @@
67104
<artifactId>spring-oxm-tiger</artifactId>
68105
<scope>runtime</scope>
69106
</dependency>
70-
<!-- JEE Mapping dependencies -->
71-
<dependency>
72-
<groupId>javax.activation</groupId>
73-
<artifactId>activation</artifactId>
74-
</dependency>
75-
<dependency>
76-
<groupId>javax.xml.bind</groupId>
77-
<artifactId>jaxb-api</artifactId>
78-
<version>2.1</version>
79-
</dependency>
80-
<dependency>
81-
<groupId>com.sun.xml.bind</groupId>
82-
<artifactId>jaxb-impl</artifactId>
83-
<version>2.1.5</version>
84-
<scope>runtime</scope>
85-
</dependency>
86-
<dependency>
87-
<groupId>stax</groupId>
88-
<artifactId>stax-api</artifactId>
89-
<scope>runtime</scope>
90-
</dependency>
91107
</dependencies>
92108
</project>

samples/pom.xml

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,43 @@
2222
<url>http://s3.amazonaws.com/maven.springframework.org/milestone</url>
2323
</repository>
2424
</repositories>
25+
<profiles>
26+
<profile>
27+
<id>jdk14-jdk15</id>
28+
<activation>
29+
<jdk>!1.6</jdk>
30+
</activation>
31+
<dependencies>
32+
<dependency>
33+
<groupId>javax.xml.bind</groupId>
34+
<artifactId>jaxb-api</artifactId>
35+
<scope>provided</scope>
36+
<optional>true</optional>
37+
<version>2.1</version>
38+
<exclusions>
39+
<exclusion>
40+
<groupId>javax.xml.stream</groupId>
41+
<artifactId>stax-api</artifactId>
42+
</exclusion>
43+
<exclusion>
44+
<groupId>javax.activation</groupId>
45+
<artifactId>activation</artifactId>
46+
</exclusion>
47+
</exclusions>
48+
</dependency>
49+
<dependency>
50+
<groupId>com.sun.xml.bind</groupId>
51+
<artifactId>jaxb-impl</artifactId>
52+
<version>2.1.5</version>
53+
<scope>provided</scope>
54+
</dependency>
55+
<dependency>
56+
<groupId>javax.activation</groupId>
57+
<artifactId>activation</artifactId>
58+
</dependency>
59+
</dependencies>
60+
</profile>
61+
</profiles>
2562
<build>
2663
<plugins>
2764
<plugin>
@@ -44,27 +81,5 @@
4481
<artifactId>log4j</artifactId>
4582
<scope>runtime</scope>
4683
</dependency>
47-
<!-- The following JEE dependencies can be changed from 'runtime' to 'provided' if you're running the samples on a full-fledged J2EE application
48-
server. They are required for running the samples on a Web container such as Tomcat -->
49-
<dependency>
50-
<groupId>javax.xml.soap</groupId>
51-
<artifactId>saaj-api</artifactId>
52-
<scope>runtime</scope>
53-
</dependency>
54-
<dependency>
55-
<groupId>javax.mail</groupId>
56-
<artifactId>mail</artifactId>
57-
<scope>runtime</scope>
58-
</dependency>
59-
<dependency>
60-
<groupId>javax.activation</groupId>
61-
<artifactId>activation</artifactId>
62-
<scope>runtime</scope>
63-
</dependency>
64-
<dependency>
65-
<groupId>com.sun.xml.messaging.saaj</groupId>
66-
<artifactId>saaj-impl</artifactId>
67-
<scope>runtime</scope>
68-
</dependency>
6984
</dependencies>
7085
</project>

0 commit comments

Comments
 (0)