在asp中使用Jscript调用webservices
来源:网络 责任编辑:栏目编辑 发表时间:2013-07-01 10:23 点击:次
需下载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>
相关新闻>>
最新推荐更多>>>
- 发表评论
-
- 最新评论 更多>>