You use the IBAN translation service to validate the supplied IBAN and decompose it into its BBAN components. For example, for a United Kingdom IBAN, this service returns the sort code, account number and bank code.
This example code calls the IBAN translation service and then displays a message to show whether the call was successful, and for successful calls, displays all the conditions returned.
/* Call the IBAN translation service IBANTranslationRequest IBANRequest = new IBANTranslationRequest(clientInformation, "GB34EIGB01001112345679", null); IBANTranslationResponse IBANResponse = port.IBANTranslateRequest(IBANRequest); if (IBANResponse != null) { /* If the call was successful, display successful message */ System.out.println("IBANResponse Data retrieved"); /* Prints the returned conditions */ Conditions cond = IBANResponse.getConditions(); printConditions(cond); } else { /* If the call was not successful, display an error message */ System.out.println("NO IBANResponse Data retrieved"); } |
<soapenv:Body>
<IBANTranslationRequest xmlns="urn:experian/BANKWIZARD/soapservice/types">
<ClientInformation>
<UserID>Client1</UserID>
<WSDLVersion>1.0</WSDLVersion>
</ClientInformation>
<IBAN>GB34 EIGB 0100 1112 3456 79</IBAN>
</IBANTranslationRequest>
</soapenv:Body>
<soapenv:Body>
<IBANTranslationResponse xmlns="urn:experian/BANKWIZARD/soapservice/types">
<BBAN>010011</BBAN>
<BBAN>12345679</BBAN>
<BBAN>EIGB</BBAN>
</IBANTranslationResponse>
</soapenv:Body>
This response message is an example of a failure. Because the IBAN failed the modulus check, one condition is returned instead of the BBAN information.
<soapenv:Body>
<IBANTranslationResponse xmlns="urn:experian/BANKWIZARD/soapservice/types">
<conditions>
<Error>
<fieldname>17</fieldname>
<fieldvalue>IBAN modulus check has failed</fieldvalue>
</Error>
</conditions>
</IBANTranslationResponse>
</soapenv:Body>