在asp中使用Jscript调用webservices

2018-09-06 12:45

阅读:425

  需下载msSoapToolkit20.exe
引用:MSSOAP.SoapClient
例程:
<%@ LANGUAGE = JScript %>
<HTML>
<HEAD>
<TITLE>webservice演示</TITLE>
</HEAD>
<BODY>
<%
var WSDL_URL =
var a, b, res
var soapclient
a = 12
b = 13
soapclient = Server.CreateObject(MSSOAP.SoapClient)
soapclient.ClientProperty(ServerHTTPRequest) = true
‘在ASP中运行 需要设置ServerHTTPRequest选项
soapclient.mssoapinit(
res = soapclient.test(2,3)
%>
<h3>webservice 演示</h3>
<B>Result:</B> <%=res%><P><P>
</BODY>
</HTML>


评论


亲,登录后才可以留言!