Zugriff auf die Kontoprüfung mit C#

Das folgende Beispiel zeigt, wie man mit C# und dem Microsoft .NET Framework 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.cs

using System;

class App {
    public static void Main() {
    String token = "IHR-ACCESS-TOKEN";
    String konto = "0306693125";
    String blz = "30020900";

    Console.WriteLine("Webservice Test\n");
    try {
        KontoCheckService ws = new KontoCheckService();
        String name = ws.bankname(token, blz);
        Console.WriteLine("BLZ " + blz + " ist " + name);
        int ok = ws.check(token, konto, blz);
        Console.WriteLine("Konto " + konto + " bei BLZ " + blz + " ist " + ok);
        konto = "101813000";
        blz = "20050000";
        ok = ws.check(token, konto, blz);
        Console.WriteLine("Konto " + konto + " bei BLZ " + blz + " ist " + ok);
    } catch (Exception ex) {
        Console.WriteLine("SOAP Error: " + ex.Message);
    }
    } 
}


Erzeugen der Proxy-Klasse und compilieren des Quelltextes:
wsdl /l:cs KontoCheck.wsdl
csc KontoCheckCS.cs KontoCheckService.cs


Impressum · Datenschutz