http://www.webservicex.net/globalweather.asmx?wsdl(英文的)(天气预报接口)
在生成的webservice客户端定义一个测试类,里面加上main方法
public static void main(String[] args) {
GlobalWeatherSoap soap = new GlobalWeather().getGlobalWeatherSoap();
String weather = soap.getWeather("beijing", "China");
System.out.println(weather);
}
在控制台上就可以看到北京天气生成xml文件的信息
http://www.webxml.com.cn/WebServices/MobileCodeWS.asmx (电话归属地接口)
在生成的webservice客户端定义一个测试类,里面加上main方法
public static void main(String[] args) {
MobileCodeWSSoap soap = new MobileCodeWS().getMobileCodeWSSoap();
String string = soap.getMobileCodeInfo("18888888888", "");
System.out.println(string);
}
在控制台上就可以看到号码归属地
扫描二维码关注公众号,回复:
10695285 查看本文章
18888888888:北京 北京 北京移动全球通卡
希望对你有帮助。喜欢的朋友可以关注我的公众号:从小白到架构师。我会每天更新学习内容的。