Re: [netcdf-java] access opendap site over https

Thanks Brian and John for this suggestion, which works up to a point!  Another 
problem is that calling

 

NetcdfDataset.open(https://...)

 

doesn’t seem to work, because Java-NetCDF seems to try to open the URL as a 
local file.  I think someone raised this issue on this list before, and John 
said that it’s possible to use plain http and have the library handle the 
redirect to https.  However, in this case, the server in question does not 
provide http access, nor does it redirect to https.

 

What should we do – would it be possible for us to hack the Java-NetCDF library 
to allow https URLs in NetcdfDataset.open()?  Or are there some deeper issues 
that I’m missing?

 

Thanks,

Jon

 

From: Brian Schlining [mailto:bschlining@xxxxxxxxx] 
Sent: 23 March 2010 17:23
To: Jonathan Blower
Cc: John Caron; Adit Santokhee; netcdf-java@xxxxxxxxxxxxxxxx
Subject: Re: [netcdf-java] access opendap site over https

 

Jon, John and et al.,

The Netcdf Java libraries use Apache HttpClient 3.x (http://hc.apache.org/). 
You can set the HttpClient object with the following:

 

 

HttpClient httpClient = org.apache.commons.httpclient.HttpClient();



 

 

// Do whatever you need to httpClient, Here I'm setting a proxy

httpClient.getHostConfiguration().setProxy(proxyname, port);



 

 

ucar.nc2.dataset.NetcdfDataset.setHttpClient(httpClient);

 

 

        The problem is that in this case we need to provide a client

        certificate.  If we could get a handle to the HttpClient object (which I
        think is used to make HTTP calls under the hood?) we could probably set
        it up to perform the handshake.

 

 

-- 
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 
Brian Schlining
bschlining@xxxxxxxxx

  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: