xfire webservice如何返回数组

jcl860 2006-08-30 11:03:33
用xfire返回数组,怎么在?wsdl服务时报错.如何返回数组呢,请高人指点
...全文
735 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yigemaserwy 2006-10-08
  • 打赏
  • 举报
回复
对于collection你需要配置一个xml文件,因为无法识别的原因
The file's name must be <className>.aegis.xml, where className is the unqualified class name of your service.

The format of this file is best illustrated through examples. The service we would like to expose has the following interface:

public interface MyService1
{
String getFoo();
Collection getCollection();
void setList(int id, java.util.List);
}
Since the collections in the source code are not typed, we are required to create an xml file to specify the required types. The file's location must be the same package as MyService1.class, and it must be called MyService1.aegis.xml

A minimal mapping file for this interface would be:

<mappings>
<mapping>
<method name="getCollection">
<return-type componentType="java.lang.String"/>
</method>
<method name="setList">
<parameter index="1" componentType="java.lang.String"/>
</method>
</mapping>
</mappings>
你找找xfire-1.1.2\manual\Mapping collections.html
0xTonyWang 2006-09-04
  • 打赏
  • 举报
回复
狂顶

67,516

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧