축 관리 클라이언트 인 org.apache.axis2.client.ServiceClient 이 org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry()와 을 실행하는 것으로 보입니다. 재시도는 기본적으로 3 번과 같습니다. 재 시도를하지 않도록 설정할 수있는 방법이 있습니까?AXIS2 연결 재 시도를 설정하는 방법은 무엇입니까?
내 코드 :
는 ServiceClient client = new ServiceClient();
Options opts = new Options();
opts.setTo(new EndpointReference(strWebServiceUrl));
opts.setAction(strNameOfMethodToInvoke);
opts.setTimeOutInMilliSeconds(timeOut);
client.setOptions(opts);
OMElement res = client.sendReceive(createRequest());
return (res.toString());
코드는 지금
ServiceClient client = new ServiceClient();
Options opts = new Options();
opts.setTo(new EndpointReference(strWebServiceUrl));
opts.setAction("urn:" + strNameOfMethodToInvoke);
opts.setTimeOutInMilliSeconds(timeOut);
HttpMethodParams methodParams = new HttpMethodParams();
DefaultHttpMethodRetryHandler retryHandler = new DefaultHttpMethodRetryHandler(0, false);
methodParams.setParameter(HttpMethodParams.RETRY_HANDLER, retryHandler);
opts.setProperty(HTTPConstants.HTTP_METHOD_PARAMS, methodParams);
client.setOptions(opts);
OMElement res = client.sendReceive(createRequest());
return (res.toString());
StackOverflow는 포럼이 아닙니다. 자세한 내용을 추가해야하는 경우 [질문 수정] (http://stackoverflow.com/posts/2211578/edit)을 클릭하십시오. 답변은 해당 질문에 대한 추가 정보가 아닌 답변이어야합니다. – Will