Consume WebServices in classic ASP using Microsoft SOAP ToolKit.
Consume WebServices in classic ASP using Microsoft SOAP ToolKit.
Microsoft SOAP Toolkit allows you to make this interaction possible.
It provides simple mechanisms to consume a .Net Web service.
The object used for this purpose is the MSSOAP.SOAPClient.
Below is a code sample showing the usage of the SOAPClient to consume a webservice that is developed in .Net.
<%@ Language=VBScript %>
<%
'Declare a MSSOAP.SoapClient
Dim oSoapClient
'Initialize the MSSOAP.SoapClient
Set mySoapClient = Server.CreateObject("MSSOAP.SoapClient")
mySoapClient.ClientProperty("ServerHTTPRequest") = True
'Associate the WebService with the SoapClient
'The SoapClient object association neds the path of the WSDL file, and the Webservice's name
mySoapClient.mssoapinit "http://webservername/virtualdirectoryname/pagetobeServed.asmx?WSDL",
"ServiceName"
%>
<html>
<head>
</head>
<body>
<%
Response.WriteoSoapClient.HelloWorld()
%>
</body>
</html>
<%
Set mySoapClient = Nothing
%>
By [)ia6l0 iii Popularity (4228 Views)