在asp中使用Jscript调用webservices
程序员文章站
2022-03-10 18:04:38
需下载mssoaptoolkit20.exe引用:mssoap.soapclient 例程: <%@ language...
需下载mssoaptoolkit20.exe
引用:mssoap.soapclient
例程:
<%@ language = jscript %>
<html>
<head>
<title>webservice演示</title>
</head>
<body>
<%
var wsdl_url = "http://server0/yundan/webservice1.asmx?wsdl"
var a, b, res
var soapclient
a = 12
b = 13
soapclient = server.createobject("mssoap.soapclient")
soapclient.clientproperty("serverhttprequest") = true
‘在asp中运行 需要设置serverhttprequest选项
soapclient.mssoapinit("http://192.168.0.4/yundan/service1.wsdl","service1","service1soap","")
res = soapclient.test(2,3)
%>
<h3>webservice 演示</h3>
<b>result:</b> <%=res%><p><p>
</body>
</html>
引用:mssoap.soapclient
例程:
<%@ language = jscript %>
<html>
<head>
<title>webservice演示</title>
</head>
<body>
<%
var wsdl_url = "http://server0/yundan/webservice1.asmx?wsdl"
var a, b, res
var soapclient
a = 12
b = 13
soapclient = server.createobject("mssoap.soapclient")
soapclient.clientproperty("serverhttprequest") = true
‘在asp中运行 需要设置serverhttprequest选项
soapclient.mssoapinit("http://192.168.0.4/yundan/service1.wsdl","service1","service1soap","")
res = soapclient.test(2,3)
%>
<h3>webservice 演示</h3>
<b>result:</b> <%=res%><p><p>
</body>
</html>
推荐阅读
-
FCKeditor在asp.net中的使用
-
[ASP.NET]如何使用类创建公共函数,在不同ASP.NET页面间重复调用
-
ASP.NET中在一般处理程序中如何使用session
-
在ASP中调用存储过程的几种方法
-
在ASP.NET Core中创建内部使用Scoped服务的Quartz.NET宿主服务
-
jwt-在asp.net core中的使用jwt
-
在asp中使用Jscript调用webservices
-
使用Rotativa在ASP.NET Core MVC中创建PDF
-
访问asp页面出现出现“请求的资源在使用中”的解决办法
-
Asp.Net MVC EF之一:使用Database类在EF框架中执行Sql语句