2013-10-20 34 views
-1
enter code here 
package org.ameen.syed; 

import net.webservicex.GeoIP; 
import net.webservicex.GeoIPService; 
import net.webservicex.GeoIPServiceSoap; 

public class Iplocation { 

/** 
* @param args 
    */ 
public static void main(String[] args) { 
// TODO Auto-generated method stub 
if(args.length !=1){ 
System.out.println("u need to pass ipaddress "); 
} 

else{ 
String ipAddress = args[0]; 
GeoIPService ipservice = new GeoIPService(); 
GeoIPServiceSoap geoIPServiceSoap = ipservice.getGeoIPServiceSoap(); 
GeoIP geoip = geoIPServiceSoap.getGeoIP(ipAddress); 
System.out.println(geoip.getCountryName()); 
} 
} 
} 

我不知道是什麼..我是新來的web服務的編程..請幫助什麼是錯的問題..無法訪問WSDL:http://www.webservicex.net/geoipservice.asmx?WSDL。它失敗:

謝謝你..

+0

你忘了發佈錯誤信息。 – Henry

回答

0

每一件事情是正確的只有一些像facebook.com一樣的地址,或者一些共享主機的網址-IP地址,如果你ping通IP地址並傳遞值,它將無法正常工作,但如果你ping通google.com並提交地址,它將正常工作