---
title: clsCleanAddress
summary: API reference for clsCleanAddress.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-07-24
library: SAIF.Services.CleanAddress
reference_type: package
---

# clsCleanAddress

`clsCleanAddress` is the library's public service facade. It hides the generated CorrectAddress SOAP proxy behind a small .NET API and performs local result-mapping logic after each vendor call.

## Purpose
- Provide the single public entry point for address-related service operations.

## Context
- Namespace: `SAIF.Services.CleanAddress`
- Assembly/package: `SAIF.Services.CleanAddress`

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `HelloWorld` | `Public Function HelloWorld() As String` | Calls the vendor service health-check method and returns its response string. |
| `RunCleanAddressBatch` | `Public Function RunCleanAddressBatch(ByVal inPath As String) As clsBatchReturnInfo` | Executes a batch cleanse request and returns both the raw and normalized batch outcome. |
| `ConvertToProperCase` | `Public Function ConvertToProperCase(ByVal inString As String) As String` | Sends a string to the vendor proper-case operation and returns the trimmed result. |
| `FindCityStateInfoByZip` | `Public Function FindCityStateInfoByZip(ByVal inZIP As String) As List(Of clsCityStateCountyInfo)` | Retrieves ZIP lookup results and parses them into a list of typed rows. |
| `CleanAddress` | `Public Function CleanAddress(ByVal inLine1 As String, ByVal inLine2 As String, ByVal inCity As String, ByVal inState As String, ByVal inZip As String, ByVal inZip4 As String, ByVal inMixedCase As Boolean) As clsCleanAddressInfo` | Calls the vendor address-cleanse operation, classifies the result, and returns a populated `clsCleanAddressInfo`. |

## Behavioral notes
- Every public method creates a new `CleanAddressSvc.clsCAServices` instance and sets `AllowAutoRedirect = True` and `UseDefaultCredentials = True` before calling the service.
- `RunCleanAddressBatch` applies the mapping defined by [BR-004](../../business-rules.md#br-004-batch-return-code-mapping).
- `CleanAddress` applies the classification logic defined by [BR-001](../../business-rules.md#br-001-cleaned-address-classification), [BR-002](../../business-rules.md#br-002-unmatched-versus-multiple-match-classification), and [BR-005](../../business-rules.md#br-005-postnet-barcode-derivation).
- `CleanAddress` converts service-call exceptions into return code `-999` as defined by [BR-003](../../business-rules.md#br-003-vendor-exception-fallback).

## Constraints and usage notes
- The wrapper depends on the generated proxy and endpoint settings configured for the library.
- `FindCityStateInfoByZip` expects the vendor service to return fixed-width 55-character rows.
- `CleanAddress` returns classification flags rather than throwing vendor exceptions for the handled failure path.

## Sources
- `Services\SAIF.Services.CleanAddress\clsCleanAddress.vb`
- `Services\SAIF.Services.CleanAddress\app.config`
- `Services\SAIF.Services.CleanAddress\Web References\CleanAddressSvc\Reference.vb`
