1.webService :跨语言的调用数据。java项目可以调用c#的数据库数据。
2.webService服务端:显示客户端所要求的数据访问方法。
3.webService服务端:可以访问webService所暴露的方法。从而访问数据
4.webService 相关的网址分享:http://www.webxml.com.cn/zh_cn/index.aspx
webService的简单运用:
1.http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl
2.用命令运行:wsimport -keep http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl
将生成的文件放入所要运用的位置
3.根据http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl调用
package com.zking.test;
import cn.com.webxml.MobileCodeWS;
import cn.com.webxml.MobileCodeWSSoap;
public class TestMob {
public static void main(String[] args) {
MobileCodeWS mobileCodeWS=new MobileCodeWS();
MobileCodeWSSoap codeWSSoap=mobileCodeWS.getMobileCodeWSSoap();
String str=codeWSSoap.getMobileCodeInfo("18873870231",null);
System.out.println(str);
}
}
报错:
http://ws.webxml.com.cn/WebServices/MobileCodeWS.asmx?wsdl对应的文件保存
哪行报错。删除哪行。