• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

InputStream from password protected http site

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

So I'm trying to develop a program that will send a snapshot command to an IP camera, and then save the resulting jpeg to a local file. If I navigate to the URL specified in the webPage string with a browser, I am prompted for the username/password and then presented with a page with the snapshot. When I attempt to do the same thing with my program, I get a connection refused error on opening the inputstream. I'm certain there isn't a firewall/port issue since I can get to the page with a browser on the same machine, and it is a http rather than a https address.

Am I on the wrong track with how I am trying to go about doing this?


Code:


Error:
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some possibilities: I notice your server is listening on port 81; did you include that port number when you asked the browser to connect to it? And when the browser connected, did it ask you to authenticate yourself via a dialog box asking for user ID and password?

And even though your server appears to be on the same LAN as your client software, does your browser connect to the server via an HTTP proxy server?
 
Jay Crawf
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also specify the port when connecting thru browser (just copied and pasted the String value from the browser).

There is no HTTP proxy involved on the LAN.

The page prompts authentication via a pop-up menu. Is my method of authenticating not going to work in this case?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic