XFire默认使用的spring-1.2.6,如果使用spring-2.0就会出现如下错误:
Unrecognized xbean element mapping: beans in namespace http://xfire.codehaus.org/config/1.0
此时我们需要修改一下services.xml文件如下:
<beans>
<service xmlns="http://xfire.codehaus.org/config/1.0">
<name>HelloService</name>
<namespace>http://xfire.xujj.org/HelloService</namespace>
<serviceClass>org.xujj.xfire.demo.Hello</serviceClass>
<implementationClass>
org.xujj.xfire.demo.HelloImp
</implementationClass>
</service>
</beans>
就是将xmlns="http://xfire.codehaus.org/config/1.0"的位置从beans中挪到service中.然后重新启动就不会再出现类似的错误了.
本文介绍了解决XFire与Spring版本不兼容的问题。当使用Spring-2.0时,会出现配置错误提示。通过调整services.xml文件中的命名空间位置,可以避免此问题。
267

被折叠的 条评论
为什么被折叠?



