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 -->
	<head><title>Lyons Web Services SDK</title></head>
<% 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
	if err.number <> 0 then
		Response.write("<h2>Web Service Call Failed!</h2>")
		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"))
		Response.Write("<table border='1' cellpadding='6' cellspacing='3'>")
		dim nodeList, node, count
		set nodeList = objDoc.selectNodes("//InstitutionName[@type='M']")
		for each node in nodeList
			Response.Write("<tr><td>" & node.text & "</td></tr>")
	end if
<% else %>
	<form name="frmQuery" id="frmQuery" method="get" action="ASPExample.asp">
		<table width="50%" cellpadding="3" cellspacing="3" border="1">
				<td width="30%"><b>User Name</b></td>
				<td><input type="text" id="tbUserName" name="tbUserName" maxlength="50" style="width:100%;"></td>
				<td width="30%"><b>Company ID</b></td>
				<td><input type="text" id="tbCompanyID" name="tbCompanyID" maxlength="50" style="width:100%;"></td>
				<td width="30%"><b>Password</b></td>
				<td><input type="password" id="tbPassword" name="tbPassword" maxlength="50" style="width:100%;"></td>
				<td width="30%"><b>ABA</b></td>
				<td><input type="text" id="tbABA" name="tbABA" maxlength="9" style="width:100%;"></td>

				<td colspan="2" align="center">
					<input type="submit" value="Validate">
		<input type="hidden" name="action" value="postback">
<% end if %>
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.
Home | Developer Area | Contact Us | Privacy | Site Map       © 2015 Lyons Commercial Data, a division of Autoscribe Corporation. All rights reserved.