xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
This web application context contains Spring-WS beans. The beans
defined in this context are automatically detected by Spring-WS,
similar to the way Controllers are picked up in Spring Web MVC.
class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
Detects @PayloadRoot annotations on @Endpoint bean methods.
The MarshallingAirlineEndpoint has such annotations. It uses
two interceptors: one that logs the message payload, and the
other validates it accoring to the 'airline.xsd' schema
file.
class="org.springframework.ws.wsdl.wsdl11.DynamicWsdl11Definition">
This bean definition represents a WSDL definition that is
generated at runtime, based on the builder defined below. It
can be retrieved by going to /echo/echo.wsdl (i.e. the bean
name corresponds to the filename).
The builder creates a WSDL from the 'echo.xsd' schema.
It detects all elements that ends with 'Request', finds
corresponding 'Response' messages, and creates an
operation based on that. All operations are put in a
portType with name 'Echo', and binding and service are
created.
class="org.springframework.ws.wsdl.wsdl11.builder.XsdBasedSoap11Wsdl4jDefinitionBuilder">
value="http://localhost:8080/echoweb/services" />
This endpoint handles echo requests.
This bean is our "business" service.
class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor">
class="org.springframework.ws.soap.server.endpoint.interceptor.SoapEnvelopeLoggingInterceptor">
class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter">
class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
也就是说用spring开发webservice需要配置一下文件:
1.EndPoint,如果使用标记的话,就可以不用继承任何类
2.EndpointMapping,Detects @PayloadRoot annotations on @Endpoint bean methods.
3.DynamicWsdl11Definition。动态生成WSDL
如果使用JAXB作为Object和XML的映射,那么还需要
4.Marshaller一般为Jaxb2Marshaller
5.如果是使用的标记的话,还需要MarshallingMethodEndpointAdapter,一般现在使用
GenericMarshallingMethodEndpointAdapter
posted on 2007-12-25 17:48 刘铮 阅读(5742) 评论(0) 编辑 收藏 所属分类: WebService