4.8使用vb6.0调用
需下载mssoaptoolkit20.exe
添加引用:microsoft soap type library
位置:”c:\program files\common files\mssoap\binaries\ mssoap1.dll”
调用方法:
dim cc as new mssoaplib.soapclient
例程:
新建工程标准exe添加3个textbox控件,text1,text2,text3添加一个button控件command1
代码如下:
option explicit
dim cc as new mssoaplib.soapclient
private sub command1_click()
cc.mssoapinit "http://192.168.0.4/yundan/service1.asmx?wsdl"
me.text3.text = cc.test(cint(text1.text), cint(text2.text))
end sub
4.9使用vbscript调用
需下载mssoaptoolkit20.exe
引用:mssoap.soapclient
例程:
option explicit
const wsdl_url = "http://192.168.0.4/yundan/service1.wsdl"
wscript.echo "connecting: " & wsdl_url
dim calc
set calc = createobject("mssoap.soapclient")
calc.mssoapinit wsdl_url
dim answer
answer = calc.test(14,28)
wscript.echo "14+28=" & answer
将其存成domo.vbs文件,直接双击运行。
webservice系列教学(9)-如何调用webservice(vb6.0,vbscript)-.NET教程,Web Service开发
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » webservice系列教学(9)-如何调用webservice(vb6.0,vbscript)-.NET教程,Web Service开发
相关推荐
-      VS2010的aspx文件中的html代码的格式化方法
-      .net 反序题目的详细解答第1/2页
-      asp.net创建html文本文件实例
-      比较完整的 asp.net 学习流程
-      官网 Ext direct包中.NET版的问题
-      C# XML操作 代码大全(读XML,写XML,更新,删除节点,与dataset结合等)第1/2页
-      c# 连接字符串数据库服务器端口号 .net状态服务器端口号
-      asp.net教程:简单的C#图片上传代码或C#文件上传代码
