This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

WSAD Stock Quote Web service tutorial: Proxy problem

 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am attempting to do the Stock Quote Web service tutorial that comes with WSAD 5.1. I am getting the a java.net.ConnectException when attempting to connect to the Yahoo! Finance site to get the IBM stock quote. The problem persists even after my adding the suggested system properties to the server's environment tab:

proxySet true
proxyHost <proxy_server>
proxyPort <proxy_port>

Actually, if I copy-paste the URL
(http://finance.yahoo.com/d/quotes.csv?f=sl1d1t1c1ohgv&e=.csv&s=IBM)
to an Internet Explorer session I get a response back.

"IBM",86.40,"8/3/2004","10:22am",-0.29,86.70,86.80,86.35,487800

This makes me think the problem is WSAD-specific.

Has anyone encountered this is the past? Any clues?

Thx in advance!
Panagiotis.

==================================================================

java.net.ConnectException: Operation timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:345)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:157)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:144)
at java.net.Socket.<init>(Socket.java:294)
at java.net.Socket.<init>(Socket.java:121)
at sun.net.NetworkClient.doConnect(NetworkClient.java:65)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:361)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:548)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:296)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:318)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:476)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:572)
at java.net.URL.openStream(URL.java:827)
at stockquote.StockQuoteService.getQuote(StockQuoteService.java:39)
at stockquote.StockQuoteService.main(StockQuoteService.java:17)
 
Panagiotis Varlagas
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems I've overcome this particular problem.

It is true that one cannot specify the proxy authentication credentials (userid, password) in a declarative manner from within WSAD. You can do it programmatically though: create a subclass of java.net.Authenticator with userid and password the ones you use for proxy authenntication purposes, and set default authenticator to that class.

Currently, I am getting a different error (a 404 -- see new posting).

Panagiotis.
[ August 04, 2004: Message edited by: Panagiotis Varlagas ]
 
Mo-om! You're embarassing me! Can you just read a tiny ad like a normal person?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic