axis2 和 xfire 接口调用问题排查

背景:
1个运营商厂家开发人员离职,我们为了上线对接接口,迁就对方客户端调用。对方客户端框架用的是xfire.调用方式基本为:
 
Service serviceModel = new ObjectServiceFactory().create(EOMSProcessSheet.class);
XFire xfire = XFireFactory.newInstance().getXFire();
XFireProxyFactory factory = new XFireProxyFactory(xfire);
String serviceUrl = "http://127.0.0.1:8080/EOMS/services/OSSProcessSheet";
EOMSProcessSheet client = null;
try {
//factory.create(service, transport, url);
//factory.create(service, transport, url)
client = (EOMSProcessSheet) factory.create(serviceModel, serviceUrl);
} catch (MalformedURLException e) {
System.out.println("Client call webservice has exception: "+ e.toString());
}
String result1 = client.isAlive("4444", "7777");
 
 
服务器联调的时候会报数组越界:具体错误出现在
DEBUG的时候 发现参数解析有问题,解析代码如下

 

debug的时候修改参数未 <arg0></arg0>就没问题了 。无奈准备改源代码的时候,下了一个比较old的ADB包,部署上去,问题都解决了。
这个接口问题查询给了一个
 
教训是 :即时是有名的开源包,也不是总是向前兼容的。特别是对比较老的技术,新版本jar包不一定能够适配。

 

 

 


 

posted @ 2017-05-26 16:08  滚雪球俱乐部  阅读(734)  评论(0编辑  收藏  举报