xfire-spring-1.2.6(最新版-已经停止维护了-后续建议使用cxf,xfire是cxf前世)
进入正题(主要修改的东西有二步):
1、异常:Configuration problem: Old 1.x 'singleton' attribute in use - upgrade to 'scope
原因:spring-4.*不支持singleton=false写法了。
处理:找到下面配置文件
org/codehaus/xfire/spring/xfire.xml
org/codehaus/xfire/spring/xfireXmlBeans.xml
就在xfire-spring-1.2.6.jar架包里面,你直接用压缩包打开,找到这两个xml 进行修改保存就可以。
singleton="false" 修改为 scope="prototype"
singleton="true" 修改为 scope="singleton"
我当时把singleton="true"修改成scope="prototype",部署的时候不报错,但是访问不到接口,一定要注意。
2、异常:cannot convert value of type 'org.codehaus.xfire.spring.editors.ServiceFactoryEditor' to .....
原因:spring-4.*的customEditors获取类型直接指定为Class,而配置默认还是缺省的。
处理:找到下面配置文件
org/codehaus/xfire/spring