03.手机归属地的查询【客户端代码】

src目录下 执行dos命令:wsimport -p com.exp.mobile.ws -s http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl

注意: -p指令是生成指定文件夹目录

 

import com.exp.mobile.ws.MobileCodeWS;
import com.exp.mobile.ws.MobileCodeWSSoap;

public class Main {

    public static void main(String[] args) {
       //1.获取服务
        MobileCodeWS ws = new MobileCodeWS();

        //2.通过服务获取端口
        MobileCodeWSSoap soap = ws.getPort(MobileCodeWSSoap.class);

        //3.调用方法
        String res = soap.getMobileCodeInfo("133120**157","");
        System.out.println(res);

    }
}

 

 

 

 

 

 

 

 

 

 

posted @ 2019-05-02 14:53  expworld  阅读(130)  评论(0)    收藏  举报