使用vbscript脚本调用web服务http://www.csdn.net/develop/read_article.asp?id=24518
解决方案 »
- C#用OLEDB 导入数据到excel的模板,当数据长度超过255个字符时出错!
- 一定时间内自动返回
- 200分做一个关于数据库的调查
- 关于从网页脚本调用客户机程序的问题
- 新作的一个小东西,大家PP
- 急救:为什么局域网中不能访问的IIS设置问题?
- 迷惑!!一个 无法在 System.String 和 System.Int32 上执行“=”操作
- 怎么判断DataSet是否为空?
- 请教一个关于datagrid的弱弱的问题
- ASP.net用ViewState缓存页面,同时带来了传输量大的幅面影响
- DataGrid如何在点击"删除"按钮后弹出一个确认框,确认可以删除后,才删除数据,谢谢!
- 请问 Button和LinkButton之间得区别是什么呢
.net 1.1默认不支持post和get的协议, 要支持的话, 请打开machine.config
其中<webServices>的配置改成这样:
<webServices>
<protocols>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="Documentation"/>
</protocols> 然后这样调用:
http://localhost/webapplication4/ser.asmx/HelloWorld?str=jojo
<%Response.Buffer =true%>
<hr>
<%
Set objHTTP = Server.CreateObject("MSXML2.XMLHTTP")
Set xmlDOC =Server.CreateObject("MSXML.DOMDocument")
strWebserviceURL = "http://localhost:8082/SerCom.asmx/GtGuid"
'设置参数及其值
strRequest = ""
objHTTP.Open "POST", strWebserviceURL, False
'设置这个Content-Type很重要
objHTTP.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHTTP.Send(strRequest)
bOK = xmlDOC.load(objHTTP.responseXML)
dim iSID
iSID=""'看看状态值
if objHTTP.Status=200 then
iSID = xmlDOC.xml
Response.Write "source code return :" & xmlStr &"<br>"
else
Response.Write objHTTP.Statu&"<br>"
Response.Write objHTTP.StatusText
end if
%>