VBScript for ASP Classic Snippet
This code snippet references the ABAService Web Service only. To reference the ABAExpress Web Service,
change the sPath value (WSDL location for the SOAPClient) to https://www.lyonsreg.com/webservices/abaexpress/ABAService.asmx?wsdl.
<!-- ASP Lyons Web Services Example -->
<html>
<head><title>Lyons Web Services SDK</title></head>
<body>
<% if Request.Item("action") = "postback" then %>
<%
'Incase web service throws an exception.
'on error resume next
dim objDoc, objSOAPClient
set objDoc = Server.CreateObject("Msxml2.DomDocument.4.0")
set objSOAPClient = Server.CreateObject("MSSOAP.SoapClient30")
sPath = "http://www.lyonsreg.com/webservices/aba/ABAService.asmx?wsdl"
objSOAPClient.ClientProperty("ServerHTTPRequest") = true
objSOAPClient.MSSoapInit(sPath)
if err.number <> 0 then
Response.write("<h2>Web Service Call Failed!</h2>")
else
dim token, xml
'Get the token
token = objSOAPClient.Logon(Request.Item("tbCompanyID"), Request.Item("tbUserName"), Request.Item("tbPassword"))
'Get the XML.
xml = objSOAPClient.GetBanksXML(token, Request.Item("tbABA"))
'Display
Response.Write("<table border='1' cellpadding='6' cellspacing='3'>")
objDoc.loadXML(xml)
dim nodeList, node, count
set nodeList = objDoc.selectNodes("//InstitutionName[@type='M']")
for each node in nodeList
Response.Write("<tr><td>" & node.text & "</td></tr>")
next
Response.Write("</table>")
end if
%>
<% else %>
<form name="frmQuery" id="frmQuery" method="get" action="ASPExample.asp">
<table width="50%" cellpadding="3" cellspacing="3" border="1">
<tr>
<td width="30%"><b>User Name</b></td>
<td><input type="text" id="tbUserName" name="tbUserName" maxlength="50" style="width:100%;"></td>
</tr>
<tr>
<td width="30%"><b>Company ID</b></td>
<td><input type="text" id="tbCompanyID" name="tbCompanyID" maxlength="50" style="width:100%;"></td>
</tr>
<tr>
<td width="30%"><b>Password</b></td>
<td><input type="password" id="tbPassword" name="tbPassword" maxlength="50" style="width:100%;"></td>
</tr>
<tr>
<td width="30%"><b>ABA</b></td>
<td><input type="text" id="tbABA" name="tbABA" maxlength="9" style="width:100%;"></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Validate">
</td>
</tr>
</table>
<input type="hidden" name="action" value="postback">
</form>
<% end if %>
</body>
</html>
Other Sample Code Snippets
Complete source code for the above sample applications and other platform variations is available upon request.
Contact us for more information.