|
SecureXML
Web Service
Client VBScript
Source Code
In order to
run this code, you need to install MS-SOAP
toolkit on your Windows 2000 machine. Both Windows 2000
Professional and Server are supported. The signed XML input is read
from file "TwoSignatures.xml". The response received from
the web service is stored as "RTwoSignatures.xml" file.
You can download a complete client bundle with all input files by
clicking here.
Dim soapclient
Dim fileObject
Dim signedXML
Dim signedXMLFile
Dim res
Const WSDL_URL
= "http://www.securexml.net/SecureXML/SecureXML.asmx?wsdl"
'Create SoapClient
Set soapclient = CreateObject("MSSOAP.SoapClient30")
soapclient.ClientProperty("ServerHTTPRequest") = True
soapclient.mssoapinit WSDL_URL
Set fileObject = CreateObject("Scripting.FileSystemObject")
Set signedXMLFile
= fileObject.OpenTextFile("TwoSignatures.xml")
signedXML = signedXMLFile.ReadAll()
res = soapclient.SecureXMLVerify(signedXML)
Set signedXMLFile = fileObject.CreateTextFile("RTwoSignatures.xml",
true)
signedXMLFile.Write(res)
MsgBox("Done")
|