views:

28

answers:

2

I am looking for a way to configure the freebase java api to connect to freebase through a proxy. I have set up sytem properties

System.setProperty("http.proxyHost", "proxy"); 
System.setProperty("http.proxyPort", "8080");
System.setProperty("http.proxySet", "true"); 

but it doesn't have any effect. Could anybody help?

+1  A: 

It could be that an authentication is required, in this case please add

System.setProperty( "http.proxyUser", "user" );
System.setProperty( "http.proxyPassword", "password" );

or the hostname (proxy) isn't resolve this could be checked by ping hostname, you could add the IP-address instead. For further anaysis you should add the stacktrace of your exception.

HttpURLConnection has a method isUsingProxy() which could be useful for diagnostic log messages.

Further details you might find here

stacker
Nop, it does not work. I do not need to do authentication. I have found another solution. I have modified the freebase client -- the source code is freely available. The freebase client uses HttpClient4 , so you need to create HttpProxy, and provide it to HttpClient.
Skarab
A: 

Nop, it does not work. I do not need to do authentication. I have found another solution. I have modified the freebase client -- the source code is freely available. The freebase client uses HttpClient4 , so you need to create HttpProxy object (and set your proxy details), and provide it to HttpClient.

Skarab