Hello,
I am having a problem connecting to a proxy server in order to return an RSS feed. I am using GoDaddy as my hosting service, they require connecting to a proxy server before making any outgoing requests. The Tomcat version is 5.0.27. They have a PHP script that uses CURL to do this, I have tested that and it works fine.
http://help.godaddy.com/article.php?article_id=288&topic_id=&&
Here is my code and the error:
SocketAddress addr = new InetSocketAddress("64.202.165.130", 3128);
Proxy proxy = new Proxy(Proxy.Type.HTTP, addr);
try {
URL url = new URL(fileSpec);
URLConnection conn = url.openConnection(proxy);
conn.connect();
conn.setConnectTimeout(120);
InputStream xmlStr = conn.getInputStream();
} catch (MalformedURLException mue) {
....
} catch (IOException ioe) {
...
}
ERROR:
Failed to read news "http://newsrss.bbc.co.uk/rss/newsonline_world_edition/latest_published_stories/rss.xml" : Error parsing RSS feed : access denied (java.net.SocketPermission newsrss.bbc.co.uk:80 connect,resolve)
Any help would be appreciated.
Message was edited by:
carli1
Message was edited by:
carli1