t: +44 (0)191 305 5035 e: info@unifiedsoftware.co.uk
- Home
- Products
- Developers
- Demo
- Free trial
- Site map
- About us
- Testimonials
- Contact us
This example shows how all of BankVal UK's methods can be accessed from a .NET application. To use BankVal International, please see the notes at the end of this example.
This example also shows how to incorporate the backup services for seamless continuity of service.
1 Add a web reference to your project. To do this, go to Project -> Add Web Reference. Key in the WSDL file name (http://www.unifiedsoftware.co.uk/BankValukall2.wsdl) as shown below and click 'Go'.

2 You will see that 1 service has been found - BankValukall2 - and all of its methods have been listed. Click 'Add Reference'. A reference to the service will appear in the Solution Explorer pane:

3 Now, repeat steps 1 and 2, this time using the WSDL file for the BankVal UK services on the backup server. (http://www.unifiedservices.co.uk/BankValukall2.wsdl)

As you can see, the service name and method names are identical to those deployed on the primary server. Click 'Add Reference' and you will end up with a second web reference in the Solution Explorer pane:

4 Now you need to access these services from your code. At the appropriate point in your project, insert the following:
Dim paramstring As String
paramstring = userid.Text & "|" & pin.Text & "|" & sortcode.Text & _
"|" & account.Text
Dim bv1 As New uk.co.unifiedsoftware.www.BankValSOAP
result.Text = bv1.bankvalidate(paramstring)
If Err.Number <> 0 Then
Dim bv2 As New uk.co.unifiedservices.www.BankValSOAP
result.Text = bv2.bankvalidate(paramstring)
End If
Where userid.Text, pin.Text, sortcode.Text and account.Text are taken from the input form in this example.
If you wish to use any of BankVal UK's other methods, it is simply a matter of changing the method name in the code shown at step 4. Bear in mind, however, that the parameter string for getbranchdetails and cardvalidate differs slightly from this example. In the case of getbranchdetails, the parameter string is 'userid|PIN|sortcode' and for cardvalidate, the string is 'userid|PIN|cardnumber'. Please see Technical details for further information if required.
To access BankVal International, follow the procedure described in steps 1 to 4, using the WSDL files www.unifiedsoftware.co.uk/BankValinternationalall.wsdl as the primary service and www.unifiedservices.co.uk/BankValinternationalall.wsdl as the backup.
Note that for BankVal International's swiftvalidate and ibanvalidate methods the parameter strings are 'userid|PIN|swiftbic' and 'userid|PIN|iban' respectively. For further information please see Technical details.