Consume Web service Inside Classic ASP

0
6

Consume Web service Inside Classic ASP: Web services are everywhere , this is the current standard in inter-operatability among apps regardless, Mobile,Desktop and Web apps. Classic ASP. Using this technique Classic ASP can senselessly consume other scripts including PHP , JSP etc.

Suppose we want to Process Result of this sample URL

http://example.com/student.php?stid=101&batch=computerscience

Here is the sample code

<%
Set objXML = Server.CreateObject(“MSXML2.ServerXMLHTTP”)
URL=”http://example.com/student.php?stid=101&batch=computerscience”
objXML.Open “GET”, URL , false
objXML.Send(“”)
Response.write objXML.responseText
%>

This will execute the URL and Print whatever the supplied URL returs on execution , Read more about XMLHTTP from Microsoft KB

LEAVE A REPLY

Please enter your comment!
Please enter your name here