Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Time out in >> org.apache.axis.client.Stub ???

 
madhup narain
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im using a WSDL2java for generating files to access a web service.
Some times i get a timeout exception.

How do i resolve this timeout.

using the org.apache.axis.client.Stub there is a setTimeout(int) property. Can setting this property resolve my problem.
 
stefan bungert
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on the reason why this Timeout occurs.

If the network traffic just needs time, you can adjust the timeout with the setTimeout() method.

If the server is unreachable you can set it to 5 minutes but you will still get a timeout

ok?

stefan
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it the actual WSDL2Java part which is timing out? If so, you can provide a "-T 600" to extend the default timeout, as we have had to do.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you still can't figureout why timeout occurs!!..better download that wsdl and feed it locally to wsdl2java.
 
madhup narain
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by David O'Meara:
Is it the actual WSDL2Java part which is timing out? If so, you can provide a "-T 600" to extend the default timeout, as we have had to do.


Thanks..
Its not the WSDL2java thats timing out but when i access a webservice on a remote server this happens sometimes.
I wanted to know if this is happening because the server has too much traffic on it or is it some other reason.

Will the timeout property help me solve the problem.
Another thing when i invoked the geTimeout() on the application i got 0. what does that mean.

Is there any way to test the timeout property. Because the webservice is a live service i have no was to see if the setTimeout will actually resolve my problem.

thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic