您的位置:程序门 -> java -> web services / xml



如何在xfire中定义友好的接口参数名,在线等!


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


如何在xfire中定义友好的接口参数名,在线等![已结贴,结贴人:bingobird]
发表于:2007-03-30 14:38:14 楼主
按照xfire官网的xfire-spring例子改了下,生成的wsdl文档中接口参数名极不友好:
    <xsd:element   maxoccurs= "1 "   minoccurs= "1 "   name= "in0 "   nillable= "true "   type= "xsd:string "   />  
    <xsd:element   maxoccurs= "1 "   minoccurs= "1 "   name= "in1 "   nillable= "true "   type= "xsd:string "   />  

竟然自动是in0与in1,而我在接口处是按javadoc注释的:
/**
  *   xxx
  *   @param   mobile
  *                         手机号码
  *   @param   areacode
  *                         区域编号
  *  
  *   @return   处理结果
  */
public   boolean   getpassword(string   mobile,   string   areacode);
不知如何才能在wsdl中显示mobile及areacode?
发表于:2007-03-30 15:52:221楼 得分:80
使用annotation指定参数的名字

具体查查资料

用annotation声明web   service很方便的!
发表于:2007-03-30 16:05:552楼 得分:20
不懂,纯支持!
发表于:2007-03-30 16:21:333楼 得分:0
晕,就是没找到好的中文资料啊
发表于:2007-04-02 09:23:114楼 得分:0
难道用配置的方法就无法指定参数名吗?
发表于:2007-04-04 09:05:505楼 得分:0
当采用标准的xfire构建时可以显示参数名,但采用与spring结合的方式时参数名就变成in0、in1这样极不友好的名称了。
我打开springside的wsdl也是如此:http://demo.springside.org.cn/bookstore/service/bookservice?wsdl


快速检索

最新资讯
热门点击