• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

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

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Proxy?
 
Anupam Bhatt
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic