I'm pretty new with the webservices/web reference idea, so I'm probably going to explain some of this wrong. Nevertheless...here goes:
I would like to create a simple VBScript which will run as a scheduled task on a computer. When the script sees that there is no E drive present, it should send me an email using an ASMX web service. I beleive SOAP would be the method by which I would "invoke" the web service. Of course that's where I'm pretty much lost (did quite a bit of Googling too). I believe I need to use the SOAPclient here (seems reasonable), but using the mssoapinit method of the soapclient requires a WSDL file. Don't know what that is, but my file is a straight ASMX file.
When the webservice is created, I should be able to call a web method from the service which will create the email message and pass it along (all via the web service). This does work fine in several VB.Net applications when calling the web service, but of course I was hoping for a simpler VBSCript idea here. Here's some basic code I have so far:
Hoping this would be somewhat easy, but not so far.
Any help is greatly appreciated.
Thanks!
I would like to create a simple VBScript which will run as a scheduled task on a computer. When the script sees that there is no E drive present, it should send me an email using an ASMX web service. I beleive SOAP would be the method by which I would "invoke" the web service. Of course that's where I'm pretty much lost (did quite a bit of Googling too). I believe I need to use the SOAPclient here (seems reasonable), but using the mssoapinit method of the soapclient requires a WSDL file. Don't know what that is, but my file is a straight ASMX file.
When the webservice is created, I should be able to call a web method from the service which will create the email message and pass it along (all via the web service). This does work fine in several VB.Net applications when calling the web service, but of course I was hoping for a simpler VBSCript idea here. Here's some basic code I have so far:
Code:
' Drive specifications
Dim Drv, DrvType, DrvName, DrvReady, FSO, oSoap, MyMessage
' First creat an FSO objectSet
FSO = CreateObject("Scripting.FileSystemObject")
DrvName = "E"
Drv = FSO.GetDrive(DrvName)
If Drv.IsReady Then
DrvReady = "Ready"
Else
DrvReady = "Not Ready"
End If
If DrvReady = "Not Ready" Then
'create a soap client here and pass the web services url
Set oSoap = CreateObject("MSSOAP.soapclient")
' use mssoapinit to connect to web service?
oSoap.mssoapinit("[URL unfurl="true"]http://sapableiis.supreme.pacourts.us:8080/EELS_WS/EELS_WS/message.asmx")[/URL]
' Use the web method here
oSoap.createmessage(variable, variable,MessageText)
End If
Hoping this would be somewhat easy, but not so far.
Any help is greatly appreciated.
Thanks!