Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why does "connnection timed out" appear when trying to read remote xml file.

 
Anupam Bhatt
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am facing this problem:
"when i try to read a remote xml file into a input stream [to be read and processed further] it says "connection timed out" . Alhough the same url works fine when i give it in the browser address bar.



The statement marked with ">>>" throws this error.

Any help will be appreciated.

Thanks,
Anupam Bhatt
 
Harald Kirsch
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Proxy?
 
Anupam Bhatt
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Harald Kirsch:
Proxy?


yeah behind a proxy but i have run small programs and tested that my programs get through the proxy easily.
So itz ruled out if there is a proxy blocking the data coming to inputstream.

Thanks for the reply Harald
 
Anupam Bhatt
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does inputstream connect at some particular port or in the default http port[80]?
Any help in this regard will be appreciated.

Thanks,
Anupam Bhatt
 
Ashu Shinde
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi anupam,

Did you try setting the Proxy Ip and the port explicitly using either the System property in the code or the -D option?

System.setProperty( "proxySet", "true" );
System.setProperty( "http.proxyHost", proxyHostName );
System.setProperty( "http.proxyPort", Integer.toString( proxyHostPort ) );

-- Ashutosh
 
Anupam Bhatt
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ashu Shinde:
Hi anupam,

Did you try setting the Proxy Ip and the port explicitly using either the System property in the code or the -D option?

System.setProperty( "proxySet", "true" );
System.setProperty( "http.proxyHost", proxyHostName );
System.setProperty( "http.proxyPort", Integer.toString( proxyHostPort ) );

-- Ashutosh


Hi Ashutosh,

Thanks for your reply. It has been helpfull for sure.
but still i get "server redirected too many times" error now.
Is there a method to authenticate from the code to the proxy ?

As always any help will be appreciated.

Thanks,
Anupam Bhatt
 
Anupam Bhatt
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Guyz,
I was finally able to authenticate to the proxy and get the inputstream for the xml smoothly.

Thanks for the help
Anupam Bhatt
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic