1

In my console application I added a service reference to http://www.ibanbic.be/IBANBIC.asmx . The operations in it I need to use.

Now, this is my little piece of code, and from what I saw in tutorials, this should be enough to connect to it and get a value. But the only value I get is "String is Empty".

using (BANBICSoapClient WebService = new BANBICSoapClient())
{
string bban = "*****";
   try
   {
      string resultIban = WebService.BBANtoIBAN(bban);
      if (resultIban != string.Empty)
      {
         Console.WriteLine(resultIban);
      }
      else
      {
         Console.WriteLine("String is empty.");
      }
   }
   catch(Exception msg)
   {
      Console.WriteLine(msg);
   }
}
Console.ReadLine(); 

Can anyone give me some more information about what is wrong?

ChrisF
  • 134,786
  • 31
  • 255
  • 325
Matheno
  • 4,112
  • 6
  • 36
  • 53

1 Answers1

2

Are you passing a valid BBAN or just the string of asterixes? Do you have a sample of valid data?

Calling the web service with data I just mocked up, e.g. (12345, *) looks to return an empty string, so that's what it might return in the event of invalid data.

Jazzy J
  • 302
  • 1
  • 15