ASP调用WEBSERVICE文档
----INDEX----
1. soap请求方式
2. post请求方式
3. SHOWALLNODE函数(关于节点各属性和数据显示)
---------------------
一.SOAP请求示例
下面是一个 SOAP 请求示例。所显示的占位符需要由实际值替换。
POST /WebService1/UserSignOn.asmx HTTP/1.1
Host: 192.100.100.81
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/LoginByAccount"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<LoginByAccount xmlns="http://tempuri.org/">
<username>string</username>
<password>string</password>
</LoginByAccount>
</soap:Body>
</soap:Envelope>
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/clchun4352/archive/2006/03/29/642477.aspx
为了与WEBSERVICE交互,需要构造一个与上完全相同的SOAP请求:
<%
url = "http://192.100.100.81/WebService1/UserSignOn.asmx"
SoapRequest="<?xml version="&CHR(34)&"1.0"&CHR(34)&" encoding="&CHR(34)&"utf-8"&CHR(34)&"?>"& _
"<soap:Envelope xmlns:xsi="&CHR(34)&"http://www.w3.org/2001/XMLSchema-instance"&CHR(34)&" "& _
"xmlns:xsd="&CHR(34)&"http://www.w3.org/2001/XMLSchema"&CHR(34)&" "& _
"xmlns:soap="&CHR(34)&"http://schemas.xmlsoap.org/soap/envelope/"&CHR(34)&">"& _
"<soap:Body>"& _
"<LoginByAccount xmlns="&CHR(34)&"http://tempuri.org/"&CHR(34)&">"& _
"<username>"&username&"</username>"& _
"<password>"&password&"</password>"& _
"</LoginByAccount>"& _
"</soap:Body>"& _
"</soap:Envelope>"
Set xmlhttp = server.CreateObject("Msxml2.XMLHTTP")
xmlhttp.Open "POST",url,false
xmlhttp.setRequestHeader "Content-Type
相关文档:
本文链接:http://www.oversteper.com/wprogram/asp/826.html
ASP 定义常量的方法
常量:用一种名称代替数字和字符串,且其值保持一直不变。
在 VBscript 中,可以用 const 语句来定义常量。
常量分数字型和字符串型。
表示日期的常量写在两个 # 之间。
示例:
以下为引用内容:
<%@LANGUAGE="VBSCRIPT" CODEPAG ......
<%
'==================================================
'函数名:GetHttpPage
'作 用:获取网页源码
'参 数:HttpUrl ------网页地址
'==================================================
Function GetHttpPage(HttpUrl)
If IsNull(HttpUrl)=True or Len(HttpUrl)<18 or HttpUrl="$False$" Then
GetHttp ......
<%
'1、创建EXCEL对像
set objExcelApp = CreateObject("Excel.Application")
objExcelApp.DisplayAlerts = false '不显示警告
objExcelApp.Application.Visible = false '不显示界面
'2、 新建Excel文件
objExcelApp.WorkBooks.add
set objExcelBook = ob ......
服务器端组件
首先,服务器端的组件要有别于客户端的组件.客户端的组件是通过网络传输,依*HTML来起作用.而且只能在IE上有用.但是服 务器端的组件是运行在服务器端,它在服务器上执行各种操作.因此,所有的浏览器都能享用,它依*的是服务器而不是浏览器.
当IIS被请求执行一个ASP程序,它首先会在ASP文件中找到〈%%>标签之间 ......
如id="a/b/c/asdf.html" 参数为动态
怎么把后面的asdf.html过滤?使id="a/b/c/"?
如果id的格式一定为 "????/????/??????/xxxx.xxx"
即最后所要过滤掉的一定是最后一个"/"之后的内容
可以用如下方法:
<%
URL="a/b/c/asdf.html"
PartOfURL=split(URL,"/") '将字符串以"/"分割
UnNeed=spli ......