您好我正在使用Apache Axis 1.4处理Web服务客户端。下面是我的存根代码:
SOAPEnvelope soapRequest = new SOAPEnvelope();
Service service = new Service();
org.apache.axis.client.Call _call = createCall();
CommonsHTTPSender reqHandler = new CommonsHTTPSender();
CommonsHTTPSender respHandler = new CommonsHTTPSender();
_call.setOperation(_operations[0]);
_call.setClientHandlers(reqHandler, respHandler);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("");
_call.setEncodingStyle(null);
_call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
_call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
_call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call.invoke(soapRequest);
在调用invoke方法时,它发送请求3次。
如果我删除了setClientHndler函数,它只会发送一次。但我的代码中需要该函数。
请建议一种发送单次时间的方法。