• 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

WSAD Stock Quote Web service tutorial: Proxy problem

 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Did you miss me? Did you miss this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic