You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Abdelmonem Sobhy <me...@gmail.com> on 2013/02/14 16:29:07 UTC
org.apache.axis2.AxisFault: Timeout waiting for connection while
using axis2 1.7 and httpclient4
Hi All,
I facing issue while using axis2 1.7 snapshot as client stub.
I configured the httpclient object :
SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("http", 80, PlainSocketFactory
.getSocketFactory()));
schemeRegistry.register(new Scheme("https", 443, SSLSocketFactory
.getSocketFactory()));
PoolingClientConnectionManager cm = new
PoolingClientConnectionManager(
schemeRegistry);
cm.setMaxTotal(40);
cm.setDefaultMaxPerRoute(20);
httpclient = new DefaultHttpClient(cm);
Options options = stub._getServiceClient().getOptions();
options.setProperty(HTTPConstants.SO_TIMEOUT, soTimeout);
options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,
connectionTimeout);
options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, "true");
options.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, "true");
options.setProperty(HTTPConstants.CLEANUP_RESPONSE, "true");
stub._getServiceClient().getServiceContext()
.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, true);
stub._getServiceClient()
.getServiceContext()
.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,httpclient );
while invoke the application by concurrent threads it gives the following
error :
org.apache.axis2.AxisFault: Timeout waiting for connection
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at
org.apache.axis2.transport.http.impl.httpclient4.HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:242)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:234)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:399)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
at
com.microsoft.schemas.sharepoint.soap.ListsStub.getListItems(ListsStub.java:563)
--
Abdelmonem Sobhy