Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
f0c0f000
Commit
f0c0f000
authored
Jun 09, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
3975f8c9
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
27 additions
and
7 deletions
+27
-7
pom.xml
spring-boot-samples/pom.xml
+1
-1
README.adoc
spring-boot-samples/spring-boot-sample-ws/README.adoc
+3
-3
SampleWsApplication.java
...ample-ws/src/main/java/sample/ws/SampleWsApplication.java
+2
-0
WebServiceConfig.java
...t-sample-ws/src/main/java/sample/ws/WebServiceConfig.java
+2
-0
HolidayEndpoint.java
...-ws/src/main/java/sample/ws/endpoint/HolidayEndpoint.java
+2
-0
HumanResourceService.java
...src/main/java/sample/ws/service/HumanResourceService.java
+2
-0
StubHumanResourceService.java
...main/java/sample/ws/service/StubHumanResourceService.java
+2
-0
SampleWsApplicationTests.java
...-ws/src/test/java/sample/ws/SampleWsApplicationTests.java
+11
-1
pom.xml
spring-boot-starters/pom.xml
+1
-1
RunProcess.java
...ava/org/springframework/boot/loader/tools/RunProcess.java
+1
-1
No files found.
spring-boot-samples/pom.xml
View file @
f0c0f000
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<module>
spring-boot-sample-websocket
</module>
<module>
spring-boot-sample-websocket
</module>
<module>
spring-boot-sample-ws
</module>
<module>
spring-boot-sample-ws
</module>
<module>
spring-boot-sample-xml
</module>
<module>
spring-boot-sample-xml
</module>
</modules>
</modules>
<!-- No dependencies - otherwise the samples won't work if you change the
<!-- No dependencies - otherwise the samples won't work if you change the
parent -->
parent -->
<build>
<build>
...
...
spring-boot-samples/spring-boot-sample-ws/README.adoc
View file @
f0c0f000
== Spring Boot - Samples - Web Services
== Spring Boot - Samples - Web Services
This sample project demonstrates how to use http://projects.spring.io/spring-ws/[Spring Web Services]
This sample project demonstrates how to use http://projects.spring.io/spring-ws/[Spring Web Services]
with Spring Boot. It is an implementation of the
with Spring Boot. It is an implementation of the
http://docs.spring.io/spring-ws/site/reference/html/tutorial.html#tutorial.implementing.endpoint[Holiday Request sample]
http://docs.spring.io/spring-ws/site/reference/html/tutorial.html#tutorial.implementing.endpoint[Holiday Request sample]
in the Spring Web Services reference gui
l
de.
in the Spring Web Services reference guide.
The sample uses Maven. It can be built and run from the command line:
The sample uses Maven. It can be built and run from the command line:
...
@@ -11,4 +11,4 @@ The sample uses Maven. It can be built and run from the command line:
...
@@ -11,4 +11,4 @@ The sample uses Maven. It can be built and run from the command line:
$ mvn spring-boot:run
$ mvn spring-boot:run
----
----
http://localhost:8080/services/holidayService/holiday.wsdl will now display the generated WSDL.
http://localhost:8080/services/holidayService/holiday.wsdl will now display the generated WSDL.
\ No newline at end of file
spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/SampleWsApplication.java
View file @
f0c0f000
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
sample
.
ws
;
package
sample
.
ws
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
...
@@ -28,4 +29,5 @@ public class SampleWsApplication {
...
@@ -28,4 +29,5 @@ public class SampleWsApplication {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
SpringApplication
.
run
(
SampleWsApplication
.
class
,
args
);
SpringApplication
.
run
(
SampleWsApplication
.
class
,
args
);
}
}
}
}
spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/WebServiceConfig.java
View file @
f0c0f000
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
sample
.
ws
;
package
sample
.
ws
;
import
org.springframework.boot.context.embedded.ServletRegistrationBean
;
import
org.springframework.boot.context.embedded.ServletRegistrationBean
;
...
@@ -52,4 +53,5 @@ public class WebServiceConfig extends WsConfigurerAdapter {
...
@@ -52,4 +53,5 @@ public class WebServiceConfig extends WsConfigurerAdapter {
public
XsdSchema
countriesSchema
()
{
public
XsdSchema
countriesSchema
()
{
return
new
SimpleXsdSchema
(
new
ClassPathResource
(
"META-INF/schemas/hr.xsd"
));
return
new
SimpleXsdSchema
(
new
ClassPathResource
(
"META-INF/schemas/hr.xsd"
));
}
}
}
}
spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/endpoint/HolidayEndpoint.java
View file @
f0c0f000
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
sample
.
ws
.
endpoint
;
package
sample
.
ws
.
endpoint
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
...
@@ -76,4 +77,5 @@ public class HolidayEndpoint {
...
@@ -76,4 +77,5 @@ public class HolidayEndpoint {
this
.
humanResourceService
.
bookHoliday
(
startDate
,
endDate
,
name
);
this
.
humanResourceService
.
bookHoliday
(
startDate
,
endDate
,
name
);
}
}
}
}
spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/HumanResourceService.java
View file @
f0c0f000
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
sample
.
ws
.
service
;
package
sample
.
ws
.
service
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -20,4 +21,5 @@ import java.util.Date;
...
@@ -20,4 +21,5 @@ import java.util.Date;
public
interface
HumanResourceService
{
public
interface
HumanResourceService
{
void
bookHoliday
(
Date
startDate
,
Date
endDate
,
String
name
);
void
bookHoliday
(
Date
startDate
,
Date
endDate
,
String
name
);
}
}
spring-boot-samples/spring-boot-sample-ws/src/main/java/sample/ws/service/StubHumanResourceService.java
View file @
f0c0f000
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
package
sample
.
ws
.
service
;
package
sample
.
ws
.
service
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -31,4 +32,5 @@ public class StubHumanResourceService implements HumanResourceService {
...
@@ -31,4 +32,5 @@ public class StubHumanResourceService implements HumanResourceService {
this
.
logger
.
info
(
"Booking holiday for [{} - {}] for [{}] "
,
startDate
,
endDate
,
this
.
logger
.
info
(
"Booking holiday for [{} - {}] for [{}] "
,
startDate
,
endDate
,
name
);
name
);
}
}
}
}
spring-boot-samples/spring-boot-sample-ws/src/test/java/sample/ws/SampleWsApplicationTests.java
View file @
f0c0f000
...
@@ -21,21 +21,29 @@ import javax.xml.transform.stream.StreamResult;
...
@@ -21,21 +21,29 @@ import javax.xml.transform.stream.StreamResult;
import
javax.xml.transform.stream.StreamSource
;
import
javax.xml.transform.stream.StreamSource
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.test.IntegrationTest
;
import
org.springframework.boot.test.IntegrationTest
;
import
org.springframework.boot.test.OutputCapture
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.boot.test.SpringApplicationConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.web.WebAppConfiguration
;
import
org.springframework.test.context.web.WebAppConfiguration
;
import
org.springframework.ws.client.core.WebServiceTemplate
;
import
org.springframework.ws.client.core.WebServiceTemplate
;
import
static
org
.
hamcrest
.
Matchers
.
containsString
;
import
static
org
.
junit
.
Assert
.
assertThat
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringApplicationConfiguration
(
classes
=
SampleWsApplication
.
class
)
@SpringApplicationConfiguration
(
classes
=
SampleWsApplication
.
class
)
@WebAppConfiguration
@WebAppConfiguration
@IntegrationTest
@IntegrationTest
public
class
SampleWsApplicationTests
{
public
class
SampleWsApplicationTests
{
@Rule
public
OutputCapture
output
=
new
OutputCapture
();
private
WebServiceTemplate
webServiceTemplate
=
new
WebServiceTemplate
();
private
WebServiceTemplate
webServiceTemplate
=
new
WebServiceTemplate
();
@Value
(
"${local.server.port}"
)
@Value
(
"${local.server.port}"
)
...
@@ -65,5 +73,7 @@ public class SampleWsApplicationTests {
...
@@ -65,5 +73,7 @@ public class SampleWsApplicationTests {
StreamResult
result
=
new
StreamResult
(
System
.
out
);
StreamResult
result
=
new
StreamResult
(
System
.
out
);
this
.
webServiceTemplate
.
sendSourceAndReceiveToResult
(
source
,
result
);
this
.
webServiceTemplate
.
sendSourceAndReceiveToResult
(
source
,
result
);
assertThat
(
this
.
output
.
toString
(),
containsString
(
"Booking holiday for"
));
}
}
}
\ No newline at end of file
}
spring-boot-starters/pom.xml
View file @
f0c0f000
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<module>
spring-boot-starter-velocity
</module>
<module>
spring-boot-starter-velocity
</module>
<module>
spring-boot-starter-web
</module>
<module>
spring-boot-starter-web
</module>
<module>
spring-boot-starter-websocket
</module>
<module>
spring-boot-starter-websocket
</module>
<module>
spring-boot-starter-ws
</module>
<module>
spring-boot-starter-ws
</module>
</modules>
</modules>
<build>
<build>
<plugins>
<plugins>
...
...
spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/RunProcess.java
View file @
f0c0f000
...
@@ -27,7 +27,7 @@ import org.springframework.util.ReflectionUtils;
...
@@ -27,7 +27,7 @@ import org.springframework.util.ReflectionUtils;
/**
/**
* Utility used to run a process.
* Utility used to run a process.
*
*
* @author Phillip Webb
* @author Phillip Webb
* @author Dave Syer
* @author Dave Syer
* @author Andy Wilkinson
* @author Andy Wilkinson
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment