当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > Script:使用WINDOWS脚本访问WEB SERVICES

ASP.NET
ASP.NET实现数据图表a
ASP.NET实现数据图表1
Kbuilder.cs GIVE ME K
WebForm1.aspx K LINE YISHI GIEVE ME
ASP.NET实现数据图表b
today study 2005.03.03
ActiveX 组件复习笔记.1
Direct3D学习笔记(二)我们这里可以编写一个完全意义上的Direct3D程序了。
HttpContext类包含了个别HTTP请求的所有特定HTTP信息。
实现自定义分页(如:改变传统datagrid的分页显示、通过A-Z的字母来分页等)、选择...
关于Format字符串和Xml文件的解析(粗略)
wrox asp.net 2 beta preview study section 3
整合重复代码,生成自定义的列(组件)整合重复代码,生成自定义的datagrid(组件...
递归法提升密码穷举算法性能
如何用UltraEdit编译C#源程序
添加删除、更新按钮的提示确认信息,以及DATAGRID的添加、插入、更新、删除操作。
WebBrowser应用
My Composite in C#
DBForm的设计来源以及主要构想
.net中交易处理的解决方案

ASP.NET 中的 Script:使用WINDOWS脚本访问WEB SERVICES


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 50 ::
收藏到网摘: n/a


'''''''''''''''''''''''''''''''''''''''''''''''
'Modiay by X
' 2003-12-30
'''''''''''''''''''''''''''''''''''''''''''''''
Const ForReading = 1, ForWriting = 2, ForAppending = 8 '文件操作常量
'''''''''''''''''''''''''''''''''''''''''''''''
WebServiceURL = "http://www.chefbj.net/WEBSERVICES/school.asmx" '调用URL(URI)
WebMethodName = "http://www.chefbj.com/show_school" '调用方法名
'soap请求,需要根据具体WEB SERVICES web方法更改
sentRequest=""_
& "& "xmlns:xsd='http://www.w3.org/2001/XMLSchema' "_
& "xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>"_
& ""_
& ""_
& "
chef
"_
& "
"_
& "
"_
& "
"
responsefile="request.xml" '应答文件
'''''''''''''''''''''''''''''''''''''''''''''''

Set requestHTTP = CreateObject("Microsoft.XMLHTTP")
requestHTTP.open "POST", WebServiceURL, false
requestHTTP.setrequestheader "Content-Type", "text/xml"
requestHTTP.setrequestheader "charset", "utf-8"
requestHTTP.setrequestheader "SOAPAction", WebMethodName
requestHTTP.Send sentRequest
MsgBox("请求已经送出. HTTP request status= " & requestHTTP.status)

'将应答记录入文件
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(responsefile, True,true)objTextFile.Write(requestHTTP.responsexml.xml)objTextFile.Close