xFire写webservice的时候出现 Cannot create mapping for java.util.List,

本文介绍了一个关于WebService服务端出现的错误:初始化XFireServlet失败,具体原因是返回的List类型不被WSDL识别。文章提供了避免此问题的方法,建议使用数组代替List。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

严重: Error initializing XFireServlet.
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]: Initialization of bean failed; nested exception is org.codehaus.xfire.XFireRuntimeException: Cannot create mapping for java.util.List, unspecified component type for return type of method SelectBook in interface lg.dao.BookDao
org.codehaus.xfire.XFireRuntimeException: Cannot create mapping for java.util.List, unspecified component type for return type of method SelectBook in interface lg.dao.BookDao

 

 今天书webservice服务端的时候,发现提供的服务已经被使用了,但是出现这个错误,主要原因就是返回的response中对象里面有个list,而list对象在wsdl中并不识别,所以出的问题就是不要使用list,可以使用数组代替。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值