通过java类生成wsdl,返回值带list类型的问题

本文探讨了在使用JAX-RPC 1.1规范时遇到的问题,即当尝试将List作为参数传递时,由于规范中未明确指定List对象与XML之间的映射关系,可能导致服务部署或功能不正确。文章提供了替代方案,建议使用String[]或特定复杂类型的数组来代替List。

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

The service class "com.gdt.imp.UserMessageImp" does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly.

答案:

0down voteaccepted

this could be because you are trying to pass a List as parameter and the JAX-RPC spec does not specify a clear mapping between the java.util.List object and XML.The good news is you have other options. For your example, you could declare the type of 'actors' in the parameter itself. For example, use a String[] or Actors[] (where Actors is a complex type).

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值