Direct Connection Vs Proxy Server

Dear Support,

In my Java program when I specify direct connection (no proxy) I am able to get data from Flight Aware but when I specify a proxy server I am not able to retrieve data. Is there any difference in making the request in the above mentioned two scenarios.

I use the following two methods for specifying the proxy settings:

Via Source Code:
System.setProperty(“http.proxyHost”, host);
System.setProperty(“http.proxyPort”, port);
System.setProperty(“http.proxySet”, “true”);

Or Via Command Line:
-Dhttp.proxyHost=proxyhostURL
-Dhttp.proxyPort=proxyPortNumber

Can you help me resolving this issue? Currently I am getting Unknown Host Exception when using the proxy settings while the direct connection works.

Thanks,

Please try the methods suggested on wso2.com/library/3346/