Title: Message
Hi,
 
 
I have a web service that I am testing out.  I can see that the web service is deployed  and starts up OK.  However, when I call one of its methods, getAvnData() in a client program, I am seeing  a read timed out error (after 60 secs) as below.  The getAvnData() method  of the Mm5Avn web service simply calls a shell script which triggers an ftp.  The file it is getting is quite large, 26MB , so the socket read failure is caused by the ftp not being completed.   
 
 Is there an easy way around this read timeout problem, such as a  way to up the  timeout time  (of 60s) so the ftp can finish before another read occurs on that socket? 
 
Alternatively,  in looking at FAQ's I found the setTimeout() method but I haven't succeeded in getting past the 60 sec (this appears to be the default) timeout.  Since I used "call" for the setTimeout(), I probably need to use "call" to invoke the service also but I don't know how to use it to get a handle to the service method, "getAvnData()".  Maybe someone can enlighten me.
 
Below I list the source code and then the error output.
 
Thanks .
 
Best Regards, 
              Steve
 
 
Client Program Source:
========================================================================================
package mm5avn;
 
import java.net.*;
import java.io.*;
import org.apache.axis.client.Call;
public class Mm5AvnTester{
  public static void main(String []args) throws Exception{
 
//make a service
  mm5avn.ws.Mm5AvnService service=
   new mm5avn.ws.Mm5AvnServiceLocator();
 
Integer i = Integer.valueOf("9000000");
Call call = (Call) service.createCall();
call.setTimeout(i);
 
//get a stub to the service
  mm5avn.ws.Mm5Avn inst = service.getmm5avn();
 
 //call getAvnData to kick off the ftp 
  inst.getAvnData();  //make the call
 
  }
}
 
Error output:
====================================================================================       
Exception in thread "main" AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.net.SocketTimeoutException: Read timed out
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
        at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:506)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:127)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at mm5avn.ws.Mm5AvnSoapBindingStub.getAvnData(Mm5AvnSoapBindingStub.java:110)
        at mm5avn.Mm5AvnTester.main(Mm5AvnTester.java:12)
 

java.net.SocketTimeoutException: Read timed out
        at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:131)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2564)
        at org.apache.axis.client.Call.invoke(Call.java:2553)
        at org.apache.axis.client.Call.invoke(Call.java:2248)
        at org.apache.axis.client.Call.invoke(Call.java:2171)
        at org.apache.axis.client.Call.invoke(Call.java:1691)
        at mm5avn.ws.Mm5AvnSoapBindingStub.getAvnData(Mm5AvnSoapBindingStub.java:110)
        at mm5avn.Mm5AvnTester.main(Mm5AvnTester.java:12)
Caused by: java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
        at org.apache.axis.transport.http.HTTPSender.readHeadersFromSocket(HTTPSender.java:506)
        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:127)
        ... 11 more

Reply via email to