axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SM <moni_spar...@yahoo.com>
Subject Invoking a webservice method from a client causes Exception in thread "main" org.apache.axis2.AxisFault: Read timed out
Date Tue, 30 Mar 2010 19:21:29 GMT
Hi all:

        I am invoking the simple webservice that Nandana created at http://wso2.org/library/3190 from
the client code and I get Exception in thread "main" org.apache.axis2.AxisFault: Read timed
out error.  The client code is as below:
public class HelloWorldClient {
    public static void main(String[] args) throws Exception {    ConfigurationContext
ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem("C:\\Documents
and Settings\\mxshah\\HelloWorld\\repo", null);
	HelloWorldServiceStub stub = new HelloWorldServiceStub(ctx,"https://localhost:8443/axis2/services/HelloWorldService");
	ServiceClient sc = stub._getServiceClient();
	sc.engageModule("rampart");
	Options options = sc.getOptions();	options.setUserName("apache");	options.setPassword("password");  
     options.setProperty(HTTPConstants.SO_TIMEOUT, 5000);        options.setTimeOutInMilliSeconds(50000);

		int a = 3;		int b = 4;		int result = stub.add(a, b);
		System.out.println(a + " + " + b + " = " + result);    }
}

The exception is:  Exception in thread "main" org.apache.axis2.AxisFault: Read timed out
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:83)
at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)	at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
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)
	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)	at helloworld.HelloWorldServiceStub.add(HelloWorldServiceStub.java:472)
at helloworld.HelloWorldClient.main(HelloWorldClient.java:36)Caused by:
 com.ctc.wstx.exc.WstxIOException: Read timed out	at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:313)
at org.apache.axiom.om.impl.MTOMXMLStreamWriter.flush(MTOMXMLStreamWriter.java:168)	at org.apache.axiom.om.impl.dom.NodeImpl.serializeAndConsume(NodeImpl.java:830)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
... 19 moreCaused by: java.net.SocketTimeoutException: Read timed out	at java.net.SocketInputStream.socketRead0(Native
Method)	at java.net.SocketInputStream.read(SocketInputStream.java:129)	at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:782)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1089)
at
 com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:618)	at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at java.io.FilterOutputStream.flush(FilterOutputStream.java:123)	at org.apache.commons.httpclient.ChunkedOutputStream.flush(ChunkedOutputStream.java:191)
at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:99)	at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:214)
at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:311)	... 22 moreDisconnected
from the target VM, address: '127.0.0.1:1203', transport: 'socket'
Process finished with exit code 1
Any tips or pointers on resolving this will be much appreciated.
Best regards,
Monisha


      
Mime
View raw message