用MyEclipse 5.1.0 写 WebService 服务端程序的一个BUG

前几天用MyEclipse5.1.0的建webservice服务工程功能实现webservice服务端时,通过wsdl文件建立服务在tomcat5.5上部署服务时总是报以下错误

java 代码
  1. ERROR [XFireServlet] Error initializing XFireServlet.    
  2. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.codehaus.xfire.spring.ServiceBean' defined in class path resource [META-INF/xfire/services.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [org.codehaus.xfire.service.ServiceFactory] for property 'serviceFactory'; nested exception is java.lang.IllegalArgumentException: Could not load service factory:    
  3.          org.codehaus.xfire.jaxb2.JaxbServiceFactory    
  4.       . Nested exception is java.lang.ClassNotFoundException:    
  5.          org.codehaus.xfire.jaxb2.JaxbServiceFactory    
  6.       ]    
  7. PropertyAccessExceptionsException (1 errors)    
  8. org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [org.codehaus.xfire.service.ServiceFactory] for property 'serviceFactory'; nested exception is java.lang.IllegalArgumentException: Could not load service factory:    
  9.          org.codehaus.xfire.jaxb2.JaxbServiceFactory    
  10.       . Nested exception is java.lang.ClassNotFoundException:    
  11.          org.codehaus.xfire.jaxb2.JaxbServiceFactory    
  12.           
  13. java.lang.IllegalArgumentException: Could not load service factory:    
  14.          org.codehaus.xfire.jaxb2.JaxbServiceFactory    
  15.       . Nested exception is java.lang.ClassNotFoundException:    
  16.          org.codehaus.xfire.jaxb2.JaxbServiceFactory    

后来在goole上搜了很久才找到解决办法,在Myeclipse的网站上有一个贴子说到这是xfire的一个bug,有可能会在5.1.1的版本中除去。暂时现在的解决办法是:把工程中webservice目录下的services.xml中的

java 代码
  1. <servicefactory></servicefactory>    
  2.     org.codehaus.xfire.jaxb2.JaxbServiceFactory    
  3.   

改成:

java 代码
  1. serviceFactory> org.codehaus.xfire.jaxb2.JaxbServiceFactory  
也就是把三行改成一行。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值