需求:
使用xfire开发webservice过程中出现生成的wsdl中的参数名称为in0,in1等不友好的参数名称,要求参数有一定的含义
解决办法:
1.XML配置文件
在接口类同一包下面建一个 接口类名称.aegis.xml 的文件,内容如下
<?xml version="1.0" encoding="UTF-8"?>
<mappings>
<mapping>
<method name="receive">
<parameter index="0" mappedName="destnum" />
<parameter index="1" mappedName="srcnum" />
<parameter index="2" mappedName="msg" />
<parameter index="3" mappedName="msgtype" />
</method>
</mapping>
</mappings>
name为接口中方法名称
index为方法中第一个参数
mappedName为替换后的名称
2.JSR181注解配置(也称:annotation方式)
@WebService
public interface SMSstaterepReceive {
@WebMethod
@WebResult(name="result") //返回值的name
public String receive(@WebParam(name="destnum")String destnum,@WebParam(name="srcnum")String srcnum,@WebParam(name="msg")String msg,@WebParam(name="msgtype")int msgtype);//接收接口;@WebParam 参数name
}
services.xml配置文件配置接口
<service>
<!-- 接收上家短信平台的状态报告、上行信息接口 -->
<name>SMSreceiveService</name>
<namespace>http://scommnet.com/service/SMSreceiveService</namespace>
<serviceClass>com.scommnet.sms.extend.scommnet.webservices.service.SMSstaterepReceive</serviceClass>
<implementationClass>com.scommnet.sms.extend.scommnet.webservices.service.impl.SMSstaterepReceiveImpl</implementationClass>
<serviceFactory>jsr181</serviceFactory> <!--这个必须配置,要不还是显示in0-->
分享到:
相关推荐
xfire根据WSDL生成客户端代码.rar
xfire 插件 wsdl生成 工作的地方不能上网更新 xfire 插件 wsdl生成 工作的地方不能上网更新
xfire webservice wsdl 文件中字段名称变化
其他common相关的包请自己从配置; 具体如何使用xfire发布webservice服务以及如何通过xfire调用webservice接口在很多网站都有介绍,这里就不说明了。
WebService经典24篇网文汇总,包含axis2_Xfire搭建_WSDL详解_自动生成客户端和WSDL等,自己找了好久的内容; 都是自己学习过程中网络的知识,找了很久,里边有一些自己的标记,如果发现chm内容是空白,注意看一下,其实是...
org.codehaus.xfire.wsdl11.parser.SchemaInfo org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder org.codehaus.xfire.wsdl11.parser.WSDLServiceConfigurator org.codehaus.xfire.wsdl11.parser....
org.codehaus.xfire.wsdl11.parser.SchemaInfo org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder org.codehaus.xfire.wsdl11.parser.WSDLServiceConfigurator org.codehaus.xfire.wsdl11.parser....
以下四个类调用了XmlSchema-1.1.jar包 因与cxf包xmlschema-core-*.jar 冲突 故重新打包 XmlSchema-1.1.jar 源码修改原类径的方法来重新打包避免冲突 ... org.codehaus.xfire.wsdl11.parser.XmlSchemaURIResolver
org.codehaus.xfire.wsdl11.parser.SchemaInfo org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder org.codehaus.xfire.wsdl11.parser.WSDLServiceConfigurator org.codehaus.xfire.wsdl11.parser....
此程序demo详细描述的从发布接口到调用接口的全部过程,详细描述了Xfire调用webservice参数无法传递的问题。
此程序demo详细描述的从发布接口到调用接口的全部过程,详细描述了Xfire调用webservice参数无法传递的问题。
org.codehaus.xfire.wsdl11.parser.SchemaInfo org.codehaus.xfire.wsdl11.parser.WSDLServiceBuilder org.codehaus.xfire.wsdl11.parser.WSDLServiceConfigurator org.codehaus.xfire.wsdl11.parser....
xfire 使用外部类、返回collection及输入数组参数示例
cxf_axis_xfire客户端调用的几种方法.docx
java webservice AXIS,XFire , CXF介绍,包含简单的CFX例子,对于初步接触、入门有帮助。
手动编写,利用xfire jar自动生成 wsdl,部署到tomcat等应用服务器,进而请求发布webservices
进行WebService开发中所用到的xfire所有相关包如:xfire-jsr181-api-1.0-M1.jar、xfire-jaxws-1.2.6.jar、xfire-java5-1.2.6.jar、xfire-core-1.2.6.jar、xfire-annotations-1.2.6.jar、xfire-aegis-1.2.6.jar、...
XFire中实现WS-SecurityXFire中实现WS-SecurityXFire中实现WS-Security
wsdl4j-1.5.2.jar wstx-asl-3.0.1.jar xfire-aegis-1.2.2.jar xfire-annotations-1.2.2.jar xfire-core-1.2.2.jar xfire-java5-1.2.2.jar xfire-jsr181-api-1.0-M1.jar xfire-spring-1.2.2.jar xfire-xmlbeans-1.2.2...
XFire 安装,用于MyEclipse中安装XFire插件,eclipse中也适用