This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
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?
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?
Joined: Sep 15, 2013
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?