1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <beans xmlns =" http://www.springframework.org/schema/beans" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
- xsi : schemaLocation =" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" >
2
+ <beans xmlns =" http://www.springframework.org/schema/beans"
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xmlns : sws =" http://www.springframework.org/schema/web-services"
5
+ xmlns : context =" http://www.springframework.org/schema/context"
6
+ xsi : schemaLocation =" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
7
+ http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd
8
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd" >
4
9
5
10
<description >
6
11
This web application context contains Spring-WS beans. The beans defined in this context are automatically
7
12
detected by Spring-WS, similar to the way Controllers are picked up in Spring Web MVC.
8
13
</description >
9
14
10
- <bean id =" payloadMapping" class =" org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping" >
11
- <description >
12
- This endpoint mapping uses the qualified name of the payload (body contents) to determine the endpoint for
13
- an incoming message. Every message is passed to the default endpoint. Additionally, messages are logged
14
- using the logging interceptor.
15
- </description >
16
- <property name =" interceptors" >
17
- <list >
18
- <ref local =" validatingInterceptor" />
19
- <ref local =" loggingInterceptor" />
20
- </list >
21
- </property >
22
- </bean >
23
-
24
- <bean id =" validatingInterceptor"
25
- class =" org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor" >
26
- <description >
27
- This interceptor validates both incoming and outgoing message contents according to the 'echo.xsd' XML
28
- Schema file.
29
- </description >
30
- <property name =" xsdSchema" ref =" schema" />
31
- <property name =" validateRequest" value =" true" />
32
- <property name =" validateResponse" value =" true" />
33
- </bean >
34
-
35
- <bean class =" org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter" />
36
-
37
- <bean id =" loggingInterceptor" class =" org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor" >
38
- <description >
39
- This interceptor logs the message payload.
40
- </description >
41
- </bean >
42
-
43
- <bean id =" echoEndpoint" class =" org.springframework.ws.samples.echo.ws.EchoEndpoint" >
44
- <description >
45
- This endpoint handles echo requests.
46
- </description >
47
- <constructor-arg ref =" echoService" />
48
- </bean >
49
-
50
- <bean id =" echo" class =" org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition" >
51
- <description >
52
- This bean definition represents a WSDL definition that is generated at runtime. It can be retrieved by
53
- going to /echo/echo.wsdl (i.e. the bean name corresponds to the filename).
54
- </description >
55
- <property name =" schema" ref =" schema" />
56
- <property name =" portTypeName" value =" Echo" />
57
- <property name =" locationUri" value =" http://localhost:8080/echo/services" />
58
- </bean >
59
-
60
- <bean id =" schema" class =" org.springframework.xml.xsd.SimpleXsdSchema" >
61
- <description >
62
- This bean definition contains the XSD schema.
63
- </description >
64
- <property name =" xsd" value =" /WEB-INF/echo.xsd" />
65
- </bean >
66
-
67
- <bean id =" echoService" class =" org.springframework.ws.samples.echo.service.impl.EchoServiceImpl" >
68
- <description >
69
- This bean is our "business" service.
70
- </description >
71
- </bean >
15
+ <context : component-scan base-package =" org.springframework.ws.samples.echo" />
16
+
17
+ <sws : annotation-driven />
18
+
19
+ <sws : interceptors >
20
+ <bean class =" org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor" >
21
+ <description >
22
+ This interceptor validates both incoming and outgoing message contents according to the 'echo.xsd' XML
23
+ Schema file.
24
+ </description >
25
+ <property name =" schema" value =" /WEB-INF/echo.xsd" />
26
+ <property name =" validateRequest" value =" true" />
27
+ <property name =" validateResponse" value =" true" />
28
+ </bean >
29
+ <bean class =" org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor" >
30
+ <description >
31
+ This interceptor logs the message payload.
32
+ </description >
33
+ </bean >
34
+ </sws : interceptors >
35
+
36
+ <sws : dynamic-wsdl id =" echo" portTypeName =" Echo" locationUri =" http://localhost:8080/echo/services" >
37
+ <sws : xsd location =" /WEB-INF/echo.xsd" />
38
+ </sws : dynamic-wsdl >
72
39
73
40
</beans >
0 commit comments