【发布时间】:2011-02-04 20:01:53
【问题描述】:
我们尝试使用带有 Metro 堆栈的 Spring 来实现 Web 服务。
设置似乎没问题,但我们在 applicationContext.xml 中收到错误
cvc-complex-type.2.4.c:匹配 通配符是严格的,但没有声明 可以找到元素 'wss:绑定'。
我认为已发布的示例已经过时,并且对于 Spring 3,绑定必须以不同的方式定义。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:ws="http://jax-ws.java.net/spring/core"
xmlns:wss="http://jax-ws.java.net/spring/servlet"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
<wss:binding url="/ws">
<wss:service>
<ws:service bean="#webService"/>
</wss:service>
</wss:binding>
<!-- this bean implements web service methods -->
<bean id="webService" class="com.test.TestService"/>
</beans>
我必须如何配置绑定,或者在哪里可以找到描述。
【问题讨论】:
标签: web-services spring jax-ws spring-ws java-metro-framework