Re: Any real solution to Client side SocketTimeout problem?

2007-01-11 Thread Thilina Gunarathne

Please try options.setTimeOutInMilliSeconds(xxx); [1]
It was working for me..

Thilina
[1]http://ws.apache.org/axis2/1_1/api/org/apache/axis2/client/Options.html#setTimeOutInMilliSeconds(long)

On 1/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hi,
I have just spent last two days searching over internet fo some solution to 
SocketTimeou exception. I have simple WS (based on Axis2/Tomcat 5.5). Client 
application uploads files to Server (so InOnly). When I send larger files (like 
5MB and more) I get  an exception:

org.apache.axis2.AxisFault: Read timed out; nested exception is:
java.net.SocketTimeoutException: Read timed out; nested exception is:
org.apache.axis2.AxisFault: Read timed out; nested exception is:
java.net.SocketTimeoutException: Read timed out
at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
at 
org.apache.axis2.description.RobustOutOnlyAxisOperation$RobustOperationClient.send(RobustOutOnlyAxisOperation.java:72)
at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:295)
at org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:453)
at org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:380)
at 
org.apache.axis2.rpc.client.RPCServiceClient.invokeRobust(RPCServiceClient.java:131)
at cz.cca.test.ws.client.Client.main(Client.java:175)
Caused by: org.apache.axis2.AxisFault: Read timed out; nested exception is:
java.net.SocketTimeoutException: Read timed out
at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:340)
at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:205)
... 7 more

Problem is, that data were successfully sent to server, where they are stored 
into database, but the client doesn´t receive any response in time. I tried to 
set

   300
   100
   100
   100
   true

In both xml files (one for the client and second one for the server). I even 
tried to change all possible timeouts in server.xml ( for Tomcat). But even if 
I lower or raise  the values, it takes no effect.

There is main part of my Client:

ConfigurationContext configContext = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(".", 
System.getProperty("user.dir") + File.separator + "axis2_my.xml");
   RPCServiceClient serviceClient = new RPCServiceClient(configContext, 
null);

   Options options = serviceClient.getOptions();

//options.setProperty(HTTPConstants.SO_TIMEOUT,new Integer(15));

   EndpointReference targetEPR = new 
EndpointReference("http://localhost:8080/myProject/MyWSService";);
   options.setTo(targetEPR);


   QName opGetStock = new QName("http://MyService.ws.epo.ccc.cz";, "upload");

   . some code 

  // logger.debug("SO_TIMEOUT "+options.getProperty("SO_TIMEOUT"));



   Osoba podatel = createPodatel( params);
   InfoObject infoObject = createInfoObject(params);

   Object[] opSetStockArgs = new Object[] { souborText,  podatel, 
infoObject };
   System.out.println("Sending...");
   serviceClient.invokeRobust(opGetStock, opSetStockArgs);
   System.out.println("End");

   }

Can anybody help?

thanks, frogg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Thilina Gunarathne
WSO2, Inc.; http://www.wso2.com/
Home page: http://webservices.apache.org/~thilina/
Blog: http://thilinag.blogspot.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Any real solution to Client side SocketTimeout problem?

2007-01-11 Thread frogg
Hi,
I have just spent last two days searching over internet fo some solution to 
SocketTimeou exception. I have simple WS (based on Axis2/Tomcat 5.5). Client 
application uploads files to Server (so InOnly). When I send larger files (like 
5MB and more) I get  an exception:

org.apache.axis2.AxisFault: Read timed out; nested exception is:
java.net.SocketTimeoutException: Read timed out; nested exception is:
org.apache.axis2.AxisFault: Read timed out; nested exception is:
java.net.SocketTimeoutException: Read timed out
at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
at 
org.apache.axis2.description.RobustOutOnlyAxisOperation$RobustOperationClient.send(RobustOutOnlyAxisOperation.java:72)
at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:295)
at org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:453)
at org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:380)
at 
org.apache.axis2.rpc.client.RPCServiceClient.invokeRobust(RPCServiceClient.java:131)
at cz.cca.test.ws.client.Client.main(Client.java:175)
Caused by: org.apache.axis2.AxisFault: Read timed out; nested exception is:
java.net.SocketTimeoutException: Read timed out
at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:340)
at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:205)
... 7 more

Problem is, that data were successfully sent to server, where they are stored 
into database, but the client doesn´t receive any response in time. I tried to 
set

   300
   100
   100
   100  
   true  


In both xml files (one for the client and second one for the server). I even 
tried to change all possible timeouts in server.xml ( for Tomcat). But even if 
I lower or raise  the values, it takes no effect.

There is main part of my Client:

ConfigurationContext configContext = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(".", 
System.getProperty("user.dir") + File.separator + "axis2_my.xml");
   RPCServiceClient serviceClient = new RPCServiceClient(configContext, 
null);
   
   Options options = serviceClient.getOptions();

//options.setProperty(HTTPConstants.SO_TIMEOUT,new Integer(15));
   
   EndpointReference targetEPR = new 
EndpointReference("http://localhost:8080/myProject/MyWSService";);
   options.setTo(targetEPR);
 

   QName opGetStock = new QName("http://MyService.ws.epo.ccc.cz";, "upload");
   
   . some code 

  // logger.debug("SO_TIMEOUT "+options.getProperty("SO_TIMEOUT"));
   
 
   
   Osoba podatel = createPodatel( params);
   InfoObject infoObject = createInfoObject(params);
   
   Object[] opSetStockArgs = new Object[] { souborText,  podatel, 
infoObject };
   System.out.println("Sending...");
   serviceClient.invokeRobust(opGetStock, opSetStockArgs);
   System.out.println("End");
   
   }

Can anybody help?

thanks, frogg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]