|
|
||
|
|
||
|
|
![]() VB for Microsoft .NET SnippetThis code snippet references the ABAService Web Service only. To reference the ABAExpress Web Service,in the Web References Section of your project, change the Web Reference URL value to https://www.lyonsreg.com/webservices/abaexpress/ABAService.asmx?wsdl.
Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
Dim service As ABAService.ABAService
Try
'Hour Glass.
Me.Cursor = Cursors.WaitCursor
'Create a new service object.
service = New ABAService.ABAService
'Get a logon token - is good for 20 minutes.
Dim token As String = service.Logon(tbCompanyID.Text.Trim, tbUserName.Text.Trim, tbPassword.Text.Trim)
'Get the banks.
Dim xml As String = service.GetBanksXML(token, tbABA.Text.Trim)
If xml.Trim <> "" Then
ProcessXML(xml)
End If
Catch ex As Exception
'Something failed!
MsgBox("No banks found!", MsgBoxStyle.Critical, "Error")
comboBanks.Items.Clear()
Finally
'Restore the cursor.
Me.Cursor = Cursors.Default
End Try
End Sub
Private Sub ProcessXML(ByVal xml As String)
Try
comboBanks.Items.Clear()
Dim xmlDoc As New XmlDocument
xmlDoc.LoadXml(xml)
Dim nodeList As XmlNodeList = xmlDoc.SelectNodes("//InstitutionName")
Dim node As XmlNode
For Each node In nodeList
comboBanks.Items.Add(node.InnerText)
Next
comboBanks.SelectedIndex = 0
comboBanks.Enabled = True
btnClear.Enabled = True
Catch ex As Exception
End Try
End Sub
Sample Application To download a sample VB.NET application project, click the link below: VB.NET ABA Web Service Sample ApplicationOther Sample Code Snippets
Complete source code for the above sample applications and other platform variations is available upon request. Contact us for more information. © 2003-2007 Lyons Commercial Data
Products | Login | Support | Link to Us | Partners | Events | About Lyons | Contact Us |
|