webservice超时设置
我在调用服务端的webservice的时候(我的是用axis2调用服务端的webservice服务的)如何设置超时?
我这样设置的但是不起作用呢:
call.setTimeout(180 * 1000);// 3分钟
还有服务端能不能设置客户端访问时候的超时时间?如果能那我客户端访问的时候是按照哪个超时时间设置访问超时的?
请各位大虾们帮帮忙?
注意是好几个问题哈。。
调用服务端的webservice的时候,如何设置超时?
我这样设置为什么不起作用:
call.setTimeout(180 * 1000);// 3分钟
服务端能不能设置客户端访问时候的超时时间?
如果能那我客户端访问的时候是按照哪个超时时间设置访问超时的?
这是代码:
call = (Call) new org.apache.axis.client.Service().createCall();
call.setTimeout(180 * 1000);// 3分钟
String servicesURL = SdGoldBankUtil.getValue("sd.goldurl");
call.setTargetEndpointAddress(servicesURL);
call.setOperationName(new QName(SdGoldBankUtil.getValue("sd.targetNamespace"), SdGoldBankUtil.getValue("isenabledgoldbank.method")));
call.addParameter("reqMsg", Constants.XSD_STRING,ParameterMode.IN);
call.setReturnType(Constants.XSD_STRING);
call.setEncodingStyle("UTF-8");
response = call.invoke(new Object[] { request.toString() });
logger.debug("getTreasuryStatus response---------->"+response);