Skip to content

Commit f0c0f00

Browse files
author
Phillip Webb
committed
Polish
1 parent 3975f8c commit f0c0f00

File tree

10 files changed

+27
-7
lines changed

10 files changed

+27
-7
lines changed

spring-boot-samples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<module>spring-boot-sample-websocket</module>
5959
<module>spring-boot-sample-ws</module>
6060
<module>spring-boot-sample-xml</module>
61-
</modules>
61+
</modules>
6262
<!-- No dependencies - otherwise the samples won't work if you change the
6363
parent -->
6464
<build>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
== Spring Boot - Samples - Web Services
22

33
This sample project demonstrates how to use http://projects.spring.io/spring-ws/[Spring Web Services]
4-
with Spring Boot. It is an implementation of the
4+
with Spring Boot. It is an implementation of the
55
http://docs.spring.io/spring-ws/site/reference/html/tutorial.html#tutorial.implementing.endpoint[Holiday Request sample]
6-
in the Spring Web Services reference guilde.
6+
in the Spring Web Services reference guide.
77

88
The sample uses Maven. It can be built and run from the command line:
99

1010
----
1111
$ mvn spring-boot:run
1212
----
1313

14-
http://localhost:8080/services/holidayService/holiday.wsdl will now display the generated WSDL.
14+
http://localhost:8080/services/holidayService/holiday.wsdl will now display the generated WSDL.

spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/SampleWsApplication.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package sample.ws;
1718

1819
import org.springframework.boot.SpringApplication;
@@ -28,4 +29,5 @@ public class SampleWsApplication {
2829
public static void main(String[] args) throws Exception {
2930
SpringApplication.run(SampleWsApplication.class, args);
3031
}
32+
3133
}

spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/WebServiceConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package sample.ws;
1718

1819
import org.springframework.boot.context.embedded.ServletRegistrationBean;
@@ -52,4 +53,5 @@ public DefaultWsdl11Definition defaultWsdl11Definition(XsdSchema countriesSchema
5253
public XsdSchema countriesSchema() {
5354
return new SimpleXsdSchema(new ClassPathResource("META-INF/schemas/hr.xsd"));
5455
}
56+
5557
}

spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/endpoint/HolidayEndpoint.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package sample.ws.endpoint;
1718

1819
import java.text.SimpleDateFormat;
@@ -76,4 +77,5 @@ public void handleHolidayRequest(@RequestPayload Element holidayRequest)
7677

7778
this.humanResourceService.bookHoliday(startDate, endDate, name);
7879
}
80+
7981
}

spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/HumanResourceService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package sample.ws.service;
1718

1819
import java.util.Date;
1920

2021
public interface HumanResourceService {
2122

2223
void bookHoliday(Date startDate, Date endDate, String name);
24+
2325
}

spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/StubHumanResourceService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package sample.ws.service;
1718

1819
import java.util.Date;
@@ -31,4 +32,5 @@ public void bookHoliday(Date startDate, Date endDate, String name) {
3132
this.logger.info("Booking holiday for [{} - {}] for [{}] ", startDate, endDate,
3233
name);
3334
}
35+
3436
}

spring-boot-samples/spring-boot-sample-ws/src/test/java/sample/ws/SampleWsApplicationTests.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,29 @@
2121
import javax.xml.transform.stream.StreamSource;
2222

2323
import org.junit.Before;
24+
import org.junit.Rule;
2425
import org.junit.Test;
2526
import org.junit.runner.RunWith;
2627
import org.springframework.beans.factory.annotation.Value;
2728
import org.springframework.boot.test.IntegrationTest;
29+
import org.springframework.boot.test.OutputCapture;
2830
import org.springframework.boot.test.SpringApplicationConfiguration;
2931
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
3032
import org.springframework.test.context.web.WebAppConfiguration;
3133
import org.springframework.ws.client.core.WebServiceTemplate;
3234

35+
import static org.hamcrest.Matchers.containsString;
36+
import static org.junit.Assert.assertThat;
37+
3338
@RunWith(SpringJUnit4ClassRunner.class)
3439
@SpringApplicationConfiguration(classes = SampleWsApplication.class)
3540
@WebAppConfiguration
3641
@IntegrationTest
3742
public class SampleWsApplicationTests {
3843

44+
@Rule
45+
public OutputCapture output = new OutputCapture();
46+
3947
private WebServiceTemplate webServiceTemplate = new WebServiceTemplate();
4048

4149
@Value("${local.server.port}")
@@ -65,5 +73,7 @@ public void testSendingHolidayRequest() {
6573
StreamResult result = new StreamResult(System.out);
6674

6775
this.webServiceTemplate.sendSourceAndReceiveToResult(source, result);
76+
assertThat(this.output.toString(), containsString("Booking holiday for"));
6877
}
69-
}
78+
79+
}

spring-boot-starters/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<module>spring-boot-starter-velocity</module>
5555
<module>spring-boot-starter-web</module>
5656
<module>spring-boot-starter-websocket</module>
57-
<module>spring-boot-starter-ws</module>
57+
<module>spring-boot-starter-ws</module>
5858
</modules>
5959
<build>
6060
<plugins>

spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
/**
2929
* Utility used to run a process.
30-
*
30+
*
3131
* @author Phillip Webb
3232
* @author Dave Syer
3333
* @author Andy Wilkinson

0 commit comments

Comments
 (0)