0

我已经构建了一个简单的 Spring WS (1.5.9),我正在尝试将它部署到 Glassfish v3。不幸的是,由于上述原因,部署失败。我自己一直在努力解决这个问题,但它显然无法解决“bean”元素。

这是我spring-ws-servlet.xml(bean定义):

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

...bean definitions

</beans>

我也用schemaLocationset tospring-beans-3.0.xsd进行了尝试,结果相同。

我的 WAR 只有一个依赖项,那就是 Spring-WS。

4

2 回答 2

1

您没有提供模式位置的标准集合,尤其是 bean 模式所需的模式位置。

这是我的一个:

<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:gate="http://gate.ac.uk/ns/spring"
  xsi:schemaLocation="
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    http://gate.ac.uk/ns/spring http://gate.ac.uk/ns/spring.xsd
    ">
</beans>
于 2010-10-07T22:19:15.413 回答
0

当我从互联网上的另一个文件中复制 beans 标签时,同样的失败发生在我身上,你必须确保你在 html 句子之间输入了一个空格。

    <beans xmlns="http://www.springframework.org/schema/beans"(space)xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"(space)
        xmlns:context="http://www.springframework.org/schema/context"(space)   
      ....
     ">
        </beans>
于 2011-04-27T22:16:07.293 回答