Zugriff auf die Kontoprüfung mit Visual Basic .NET

Das folgende Beispiel zeigt, wie man mit Visual Basic.NET auf die Konto/BLZ-Prüfung zugreift.

Für den Zugriff wird zusätzlich die WSDL-Datei benötigt aus der automatisch die Proxy-Klasse für den Zugriff erzeugt wird.

Beispiel: KontoCheckCS.vb

imports System

Module App
    Sub Main()
	dim token as String  = "IHR-ACCESS-TOKEN"
	dim konto as String = "0306693125"
	dim blz as String  = "30020900"

	Console.WriteLine("Webservice Test")
	Console.WriteLine()

	Try
		dim ws as KontoCheckService = new KontoCheckService()
		dim name as String = ws.bankname(token, blz)
		Console.WriteLine("BLZ " + blz + " ist " + name)
		dim ok as Integer = ws.check(token, konto, blz)
		Console.WriteLine("Konto " + konto + " bei BLZ " + blz + " ist {0}", ok)
		konto = "101813000"
		blz = "20050000"
		ok = ws.check(token, konto, blz)
		Console.WriteLine("Konto " + konto + " bei BLZ " + blz + " ist {0}", ok)
	Catch ex as Exception
		Console.WriteLine("SOAP Error: " + ex.Message)
	End Try
    End Sub
End Module


Erzeugen der Proxy-Klasse und compilieren des Quelltextes:
wsdl /l:vb KontoCheck.wsdl
vbc KontoCheckVB.vb KontoCheckService.vb /r:System.Web.Services.dll /r:System.dll /r:System.xml.dll


Impressum · Datenschutz