GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Probleme beim connecten zum WebService  XML
Forum Index -> Forum in Deutsch
Author Message
markesJ



Joined: 08/05/2012 09:07:04
Messages: 3
Offline

Hallo zusammen,

habe ein Problem, da ich von zu Hause auf den WebService connecten kann, jedoch nicht vom geschäft (Bosch) nicht. Kann es sein das der Port geblockt wird? Jedoch komme ich auf die Homepage oder kann es noch an was anderem liegen?

Mein Programm:

public class main {

public static void main(String[] args) throws Exception {
System.out.println("Anwendung wird gestartet ...");

WebService.setGeoNamesServerFailover(null);
WebService.setUserName("demo"); // add your username here

ToponymSearchCriteria searchCriteria = new ToponymSearchCriteria();
searchCriteria.setNameEquals("bern");
searchCriteria.setLanguage("de");
searchCriteria.setStyle(Style.FULL);
ToponymSearchResult searchResult = WebService
.search(searchCriteria);

System.out.println(searchResult.getToponyms().get(0).getCountryName());
}


}

Fehlermeldung:

08.05.2012 08:59:00 org.geonames.WebService tryFailoverServer
WARNUNG: problems connecting to geonames server http://api.geonames.org
java.net.UnknownHostException: api.geonames.org
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at org.geonames.WebService.connect(Unknown Source)
at org.geonames.WebService.connectAndParse(Unknown Source)
at org.geonames.WebService.search(Unknown Source)
at geo.main.main(main.java:30)
Exception in thread "main" java.net.UnknownHostException: api.geonames.org
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at org.geonames.WebService.connect(Unknown Source)
at org.geonames.WebService.connectAndParse(Unknown Source)
at org.geonames.WebService.search(Unknown Source)
at geo.main.main(main.java:30)



Viele Grüße und vielen Dank!

Markus
marc



Joined: 08/12/2005 07:39:47
Messages: 3993
Offline

Hallo Markus

Das ist sicher die Firewall in der Firma die direkte Verbindungen abblockt. Beim Surfen verwendets du wahrscheinlich ein Proxy.

Gruss

Marc

[WWW]
 
Forum Index -> Forum in Deutsch
Go to:   
Powered by JForum 2.1.5 © JForum Team