1.选择一个WebService接口作测试
假设 WebService url 为 http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx(查询手机归属地)
通过网页看到接口有两个,也可看到参数以及返回值
该接口来源于 http://.webservice.MobileCodeWSSoap;public class Test { public Test() { // TODO Auto-generated constructor stub } public static void main(String[] args) { // TODO Auto-generated method stub MobileCodeWS mobileCodeWS = new MobileCodeWS(); MobileCodeWSSoap mobileCodeWSSoap = mobileCodeWS.getMobileCodeWSSoap(); ArrayOfString arrayOfString = mobileCodeWSSoap.getDatabaseInfo(); System.out.println(arrayOfString); String string = mobileCodeWSSoap.getMobileCodeInfo("151XXXXXXXX", ""); System.out.println(string); }}
运行
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。