This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Services and the fly likes WebServices-Apache Axis2-Rampart - Read Time out exception. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "WebServices-Apache Axis2-Rampart - Read Time out exception." Watch "WebServices-Apache Axis2-Rampart - Read Time out exception." New topic
Author

WebServices-Apache Axis2-Rampart - Read Time out exception.

UdayK Kumar
Greenhorn

Joined: Aug 05, 2009
Posts: 26

Hi friends,

I am using axis2 1.4.1 and rampart 1.4 for web service security. For authentication I am using handlers. when I place database connection code in handler method I got the below exception. If I didn't put database connection it works fine.

Exception I am getting is:


[java] id = bob
[java] Exception in thread "main" org.apache.axis2.AxisFault: Read timed out
[java] at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
[java] at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
[java] at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
[java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommon
s(CommonsHTTPTransportSender.java:371)
[java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTran
sportSender.java:209)
[java] at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
[java] at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.jav
a:401)
[java] at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperat
ion.java:228)
[java] at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
[java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
[java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
[java] at com.tm.webservices.client.Client.main(Unknown Source)
[java] Caused by: java.net.SocketTimeoutException: Read timed out
[java] at java.net.SocketInputStream.socketRead0(Native Method)
[java] at java.net.SocketInputStream.read(SocketInputStream.java:129)
[java] at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
[java] at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
[java] at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
[java] at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
[java] at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)
[java] at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAd
apter.readLine(MultiThreadedHttpConnectionManager.java:1413)
[java] at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1
973)
[java] at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:173
5)
[java] at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)
[java] at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirec
tor.java:398)
[java] at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector
.java:171)
[java] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
[java] at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
[java] at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSend
er.java:542)
[java] at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
[java] ... 10 more
[java] Java Result: 1


Please help me to resolve the above error.

uday
uday.gdv@gmail.com
UdayK Kumar
Greenhorn

Joined: Aug 05, 2009
Posts: 26


I have resolved the Read time out problem.

unfortunately I have mentioned wrong port number in hte URL.

http://localhost:8080/sampleWebservice

insted 8080, i have given 8081. Thats Y I got the above error
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WebServices-Apache Axis2-Rampart - Read Time out exception.