Bingo! Looks like I've answered my own question, I found the method:
public static void
*setHttpClient*(org.apache.commons.httpclient.HttpClient client)
in NetcdfDataset.
Cheers
On Sun, Feb 7, 2010 at 13:39, Brian Schlining <bschlining@xxxxxxxxx> wrote:
> Hi All,
>
> I'd like to configure netcdf-java to use a proxy for fetching data from
> remote opendap datasets. I saw this thread at
> http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg03242.htmlwhich
> basically says to set the system properties like so:
>
> System.setProperty("http.proxyHost", "myproxyhost.com");
> System.setProperty("http.proxyPort", "8080");
>
>
> But this dosn't jibe with the docs for Apace commons-httpclient, which I *
> think* opendap-java is using under the hood, which says to do the
> following:
>
> // Read/get proxyhost, port from wherever. If you want to use the
> // System properties then you have to read them, they are NOT the
> // defaults for the client.
> HttpClient client = new HttpClient();
> client.getHostConfiguration().setProxy(proxyHost, port);
>
>
> Can someone shine a light on this... Is there a supported way to configure
> proxies for opendap datasets when using netcdf-java? If there's no supported
> mechanism, does anyone know of a workaround? Has anyone tried to use proxies
> and had any luck?
>
> Thanks in advance!
>
> p.s. See http://code.google.com/p/nctoolbox/issues/detail?id=4 for more
> details
>
> --
> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
> Brian Schlining
> bschlining@xxxxxxxxx
>
--
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
Brian Schlining
bschlining@xxxxxxxxx