With so much push towards SOA architectures, you might have lot of your common code encapsulated in Webservices. Calling a webservice from .Net is a piece of cake. But how about calling a webservice from ASP or VBscript ?? That sounds like a practical requirement to me.
Well the two solutions I can suggest are :
1. Use SOAP toolkit – You will have to install the SOAP toolkit on your system
usingsoaphtml.txt (Right click –> save target –> and then open in Notepad)
2. Use XMLHTTP – Real simple and you don’t have to install anything on your machine.
usingxmlhttphtml.txt (Right click –> save target –> and then open in Notepad)
Filed under: ASP, VBScript /VB6
I agree with the thrust of this. Web-services are kind of taking over the world. Using the xmlhttp makes it really easy to access web services from VBScript or JScript. I have written up quite bit on this at http://www.nerds-central.com, including some stuff on loading Excel from a web service.
jhvjhv
Saludos Jayson
‘ http://techrepublic.com.com/html/tr/sidebars/1050036-1.html
‘ call a web service from windows script
Const HOST = “http://localhost/stuff/ws/”
Const URL = “servicename.asmx”
‘ Create the HTTP object
Set xmlhttp = CreateObject(“Microsoft.XMLHTTP”)
xmlhttp.open “POST”, _
HOST & URL & “/escalate” , _
false
‘Set the Content-Type header to the specified value
xmlhttp.setRequestHeader “Content-Type”, _
“application/x-www-form-urlencoded”
‘ Send the request synchronously
xmlhttp.send
MsgBox xmlhttp.responseText
‘Msgbox HOST