org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 100 ms
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:155)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:125)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
可能是wsdl2java命令没有生成超时的代码,具体需要研究下生成代码的wsdl2java的工作原理,我一般都是手动设置超时时间Service service = new Service()
Call call = (Call) service.createCall()
call.setTimeout(1000*60*15) //设置超时时间 15分钟
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)