如何在各种开发语言中调用web service[2]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 goodym 的 blog

h.open "post", "http://localhost/testwebservice/service1.asmx", false
h.setrequestheader "content-type", "text/xml"
h.send (strxml)
while h.readystate <> 4
wend
'显示返回的xml信息
text1.text = h.responsetext
'将返回的xml信息解析并且显示返回值
set x = new msxml2.domdocument40
x.loadxml text1.text
text1.text = x.childnodes(1).text


1,首先添加web引用,地址为:http://www.ydcom.net/service/s_comm.asmx

2,定义:dim scom as new net.ydcom.www.s_comm

3,调用:dim strczid as string = scomm.getczid("313")

实例:如何使用vb.net调用服务产生18位关键值 vb.net源文件代码


soapconnection conn
test_wsservice1soap scom
long rval
//string str_endpoint
//str_endpoint = "http://www.ydcom.net/service/s_comm.asmx?wsdl"
conn = create soapconnection
rval = conn.createinstance(scom, "test_wsservice1soap")
sle_1.text = scom.getczid("313"))
destroy conn

本文关键:如何在各种开发语言中调用web service
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top