Re: [netcdf-java] Setting proxy host and port in matlab when using MexCDF

Hi FavioM,

I'm not sure about matlab, but have some instructions here from a loooooooooooong time ago:

http://ngportal.sf.utas.edu.au/gridsphere/gridsphere?cid=opendap_proxy

Not sure if it still work with the latest versions of matlab.

As far as I know, those settings in Java, you will need to set them on the command line - i.e., when you run the java command.

So you might need something like:

java -Dhttp.proxyHost=proxy.blah.com -Dhttp.proxyPort=8080 -jar someJarFile.jar

But... are you running the java tool directly? I'm not sure how the java environment starts up in your matlab settings...

Actually, looking at the sourceforge page, it looks like ncstools is based on the C API rather than the Java API, so the above Java stuff probably isn't relevant.

I would think the ./dodsrc solution (in the link above) might be a better way to go.

Hope that helps :)

Cheers,

-Pauline.



On 31/08/10 5:29 AM, Favio Medrano wrote:
Hello all

I have a problem working with my opendap server, when working inside the
proxy server, it simply doesnt work, I read already the thread:

Re: setting proxy host and port in matlab/java
That discusses this:

Hi all:

According to nick.bower@xxxxxxxxxxxxxxxxxxxxx, setting the following
System properties (eg on the java command line) will allow a proxy to
work:

String proxyHost = System.getProperty("http.proxyHost");
String proxyPort = System.getProperty("http.proxyPort");
if ((proxyHost != null)&&  (proxyPort != null)) {
_client.getHostConfiguration().setProxy(proxyHost,
Integer.parseInt(proxyPort));

the above lines of code are in ucar.nc2.util.net.HttpClientManager
which
is our interface to org.apache.commons.httpclient, used by the
DConnect2
opendap client.

I havent made this work myself, although nick said it worked for him.
Since you are having trouble with those settings, I am cc'ing him in
case he can help.


My question is, where can i put this commands in order to make my
proxyhost to work with the snctools?

I tried putting this commands in the file nc_info_java.m of the snctools
with my proxy host and port, but still it didn't work.

this is the error that i get:

??? Error using ==>  nc_info_java at 36
Could not open
'http://my.server.mx:8080/thredds/dodsC/opanatl3_full/opanatl3_full__1965--2006'
 as
either a local file, a regular URL, or as a DODS URL.

Any work arounds for this, i would really apreciate it!.

Thank you!
FavioM


_______________________________________________
netcdf-java mailing list
netcdf-java@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: 
http://www.unidata.ucar.edu/mailing_lists/


--
Pauline Mak
Programmer/Webmaster

AODN Development Office
University of Tasmania
Private Bag 21
HOBART TAS 7001

Ph:  (03) 6226 8586
Fax: (03) 6226 8575
pauline.mak@xxxxxxxxxxx



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