我正在使用Spring 3.1.3和spring ws-2.1.1开发一个简单的 Web 服务。
我的 web.xml 是——
<servlet>
<servlet-name>spring-ws-service</servlet-name>
<servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
<init-param>
<param-name>transformWsdlLocations</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>spring-ws-service</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
Run Code Online (Sandbox Code Playgroud)
来自 Meta-inf 的 spring-ws-servlet.xml 就像——
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<bean id="stringReversalService">
</bean>
<bean id="stringReversalServiceEndpoint">
<property name="stringReversalService" ref="stringReversalService"/>
</bean>
<bean id="payloadMapping">
<property name="defaultEndpoint" ref="stringReversalServiceEndpoint"/>
</bean>
<bean id="stringReversalSchema">
<property name="xsd" value="/WEB-INF/reversalService.xsd"/>
</bean>
<bean id="stringReversal">
<property name="schema" ref="stringReversalSchema"/>
<property name="portTypeName" value="stringReversal"/>
<property name="locationUri" value="http://localhost:8080/string-reversal/services"/>
</bean>
</beans>
Run Code Online (Sandbox Code Playgroud)
当构建战争并在 JBoss 7.1.1 上部署时,我得到:-
18:20:45,299 INFO [org.jboss.as.server] (HttpManagementService-threads …Run Code Online (Sandbox Code Playgroud)