2 icemankimi2 icemankimi2 于 2014.04.21 16:26 提问

多线程调用Axis客户端异常问题请教

相同版本程序大部分时间可以正常运行(一直为bug不规律出现烦恼,提升并发线程数量不会增加其出现频率,至今出现2次),

偶尔启动运行抛出以下异常(不存在参数个数不匹配问题)。下附异常信息与代码片段:
javax.xml.rpc.JAXRPCException: Number of parameters passed in (1) doesn't match the number of IN/INOUT

parameters (2) from the addParameter() calls
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.client.Call.invoke(Call.java:1828)
at com.ffcs.zteintf.SendRunnable.run(SendRunnable.java:122)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.xml.rpc.JAXRPCException: Number of parameters passed in (1) doesn't match the number of

IN/INOUT parameters (2) from the addParameter() calls
at org.apache.axis.client.Call.getParamList(Call.java:2059)
at org.apache.axis.client.Call.invoke(Call.java:2364)
at org.apache.axis.client.Call.invoke(Call.java:1812)
... 2 more
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: javax.xml.rpc.JAXRPCException: Number of parameters passed in (1) doesn't match the number of

IN/INOUT parameters (2) from the addParameter() calls
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:javax.xml.rpc.JAXRPCException: Number of parameters passed in (1)

doesn't match the number of IN/INOUT parameters (2) from the addParameter() calls
at org.apache.axis.client.Call.getParamList(Call.java:2059)
at org.apache.axis.client.Call.invoke(Call.java:2364)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.ffcs.zteintf.SendRunnable.run(SendRunnable.java:122)
at java.lang.Thread.run(Thread.java:662)

run()方法中部分代码:
call = (Call) soapService.createCall();//soapService为单例,因为不规律报错,无法证实是此原因

call.setTargetEndpointAddress(soapService.getUrl());
call.setOperationName(new QName(soapService.getTargetObjectURI(),soapService.getMethodName()));
call.addParameter(new QName("http://***********/********/exchange", "parameters"), new QName

("http://***********/********/exchange", "parameters"), String.class, ParameterMode.IN);//

    call.setReturnType(XMLType.XSD_STRING);

response = (String) call.invoke(new Object[] { crmReq });

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!