• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to set Timeout for download of wsdl dynamically

 
rakesh kanchalwar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to put connection timeout when wsdl is provided for javax.xml.ws.Service((java.net.URL wsdlDocumentLocation, QName serviceName) to get the ServiceDelegate object.
The requirement is because we are providing the wsdlDocumentLocation dynamically and if the url is wrong or server is not available then the application hangs.

I cant use the option of storing the wsdl locally and use it.


Any help on this topic is welcome.

Thanks in advance.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The URLConnection class in the java.net package provides the setConnectTimeout( int millisec ) method - why not use that?

Bill
 
rakesh kanchalwar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are suggesting a way to download the wsdl with URLConnection and then use it for javax.xml.ws.Service(..... , ....); then can we validate the wsdl fetched with this way and how to validate.
What if the url is wrong pointing to location which is not wsdl location OR it is pointing to a wrong wsdl?

Thanks for your suggestion.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!