SSN validation¶
This operation submits a Social Security Number to the vendor's SSNKey web service and returns the vendor's result string unchanged. It is the simplest of the five operations in this library: a single vendor call with no branching or output transformation.
| Field | Value |
|---|---|
| Operation ID | OP-BV-05 |
| Trigger | Caller calls ValidateSSN(inSSN) on a constructed clsValidateBank |
| Inputs | inSSN (Social Security Number string) |
| Outputs | Vendor-supplied result string |
| Primary components | clsValidateBank.ValidateSSN, clsValidateBank.LogonSSN, clsValidateBank.LogoffSSN |
| Entry point | Legacy\BankValidator\clsValidateBank.vb |
Steps¶
- Log on to the SSNKey service.
LogonSSN()incrementsm_LogonAttempts, lazily constructsSSNKeyService.SSNKeyServiceif needed, sets itsUrlfromURLSSNKey, and callsSSNKey.Logon(CompanyId, UserId, Password)to obtain aLogonToken(BR-002). - On failure: the
Catchblock recursively callsLogonSSN()again whilem_LogonAttempts < m_LogonAttemptsMax. - On failure after the retry limit is exhausted: throws
ApplicationException("Unable to logon to SSNKey web service.", ex). - Invoke the vendor validation. Call
SSNKey.ValidateSSN(LogonToken, inSSN)and assign the result toresult. - Not wrapped in
Try/Catch; an exception raised by the vendor call propagates directly to the caller and skips step 3.* - Log off the SSNKey service.
LogoffSSN()callsSSNKey.Logoff(LogonToken), disposes theSSNKeyproxy, and sets it toNothing. - On failure: the exception is silently swallowed (the
Throwline is commented out). - Return the result. The vendor-supplied
resultstring is returned to the caller unchanged.
Process flow¶
The following diagram visualizes the single-path control flow for SSN validation.
flowchart TD
Start([Caller calls ValidateSSN]) --> Logon[LogonSSN:<br>logon with retry up to m_LogonAttemptsMax]
Logon --> LogonOk{Logon succeeded?}
LogonOk -->|No, retries exhausted| Ex([ApplicationException thrown])
LogonOk -->|Yes| Validate[SSNKey.ValidateSSN]
Validate --> Fault{Vendor call throws?}
Fault -->|Yes| Propagate([Exception propagates;<br>LogoffSSN skipped])
Fault -->|No| Logoff[LogoffSSN:<br>release token, dispose proxy]
Logoff --> Done([Return vendor result string])
Failure and edge-case behavior¶
- If the SSNKey logon fails repeatedly, the caller receives an
ApplicationExceptionafterm_LogonAttemptsMaxretries (BR-002); no validation is attempted. - Because the vendor invocation is not wrapped in
Try/Catch, an exception fromSSNKey.ValidateSSNpropagates unhandled to the caller andLogoffSSN()is never reached, leaving the SSNKey proxy and logon token unreleased.* - The method performs no format validation on
inSSNbefore submitting it to the vendor; any interpretation of the result string (e.g., valid/invalid, formatted message) is determined entirely by the vendor service and is not inspected or transformed by this façade.* LogoffSSNfailures are intentionally swallowed and never surface to the caller.*
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Related documentation¶
Sources¶
Legacy\BankValidator\clsValidateBank.vb