---
title: CleanAddressSvc overview
summary: Which service this proxy calls, who consumes it, and what it is used for.
status: draft
owner: SAIF.Core documentation
last_reviewed: 2026-09-24
---

# CleanAddressSvc overview

`CleanAddressSvc` is a wsdl.exe-generated proxy onto the external `clsCAServices` address-cleansing service, carried inside `SAIF.Services` and packaged into the `SAIF.SAIFCode.Core` NuGet package; three authored adapters wrap four of its five operations, but no production code in this repository constructs those adapters.

## Purpose
- Clean, normalize, and validate US mailing addresses (`CleanAddress`), convert free-text strings to proper case (`ConvertToProperCase`), resolve city/state/county information from a ZIP code (`FindCityStateInfoByZip`), and trigger a batch address-cleansing run (`RunCleanAddressBatch`) — all delegated to a vendor address-cleansing product reached over an ASMX endpoint*.

## Business context

| Attribute | Value |
| --- | --- |
| Business capability | Address cleansing/validation and ZIP-to-location lookup for claim and policy correspondence |
| Owning team of the called service | Not determined from source |
| Criticality to the consumer | Not determined from source |
| Fallback when unavailable | None — the calling operation fails, except `CleanAddressService.CleanAddress`, whose single catch-all swallows every failure and returns return code `-999` ("unmatched") instead of surfacing the error |

## Consumers

| Consumer | Call site | Operations used | Notes |
| --- | --- | --- | --- |
| `SAIF.Services.Utilities.CleanAddress.CleanAddressService.ConvertToProperCase` | `Services/SAIF.Services/Utilities/CleanAddress/CleanAddressService.cs:23` | [`ConvertToProperCase`](reference.md#converttopropercase) | Trims and returns the result |
| `SAIF.Services.Utilities.CleanAddress.CleanAddressService.CleanAddress` | `Services/SAIF.Services/Utilities/CleanAddress/CleanAddressService.cs:57-60` | [`CleanAddress`](reference.md#cleanaddress) | Builds an `ICleanedAddress`; swallows every exception |
| `SAIF.Services.Utilities.CleanAddress.AddressSearchService.FindCityStateByZip` | `Services/SAIF.Services/Utilities/CleanAddress/AddressSearchService.cs:21` | [`FindCityStateInfoByZip`](reference.md#findcitystateinfobyzip) | Parses a fixed-width result string |
| `SAIF.Services.Utilities.CleanAddress.CleanAddressBatchService.RunCleanAddressBatch` | `Services/SAIF.Services/Utilities/CleanAddress/CleanAddressBatchService.cs:20` | [`RunCleanAddressBatch`](reference.md#runcleanaddressbatch) | Marked "Unsuppoted - converted over from VB code and only refactored for future reference" by its own author |

None of these adapter types is constructed anywhere in this repository's production source. They are exercised only by live-network tests: `Tests/SAIF.Services.Tests/Utilities/WhenCleansingAddress.cs:27,40` and `Tests/SAIF.Services.Tests/Utilities/WhenSearchingAddress.cs:15`. `CleanAddressService` and `CleanAddressBatchService` are `public` and implement public interfaces, so consumers of the `SAIF.SAIFCode.Core` package can reach them*.

## Capability summary

| Capability | Operations | Description |
| --- | --- | --- |
| Address cleansing | [`CleanAddress`](reference.md#cleanaddress) | Sends a US address to the vendor engine and classifies the result as clean, unmatched, or multiple-match |
| Text normalization | [`ConvertToProperCase`](reference.md#converttopropercase) | Converts a free-text string to proper case |
| ZIP lookup | [`FindCityStateInfoByZip`](reference.md#findcitystateinfobyzip) | Resolves city/state/county records for a ZIP code |
| Batch processing | [`RunCleanAddressBatch`](reference.md#runcleanaddressbatch) | Triggers a batch address-cleansing run against a file path; unsupported per its own author's comment |

## Generation provenance

| Aspect | Finding |
| --- | --- |
| Generated by | `wsdl.exe` (Web Reference) |
| Generated from | `Services/SAIF.Services/Web References/CleanAddressSvc/clsCAServices.wsdl` |
| Discovery document | `Services/SAIF.Services/Web References/CleanAddressSvc/clsCAServices.disco` |
| Generated namespace | `SAIF.Services.CleanAddressSvc` |
| Namespace matches the consuming project | Yes — the generated namespace is rooted in `SAIF.Services`, which is the project that carries the file |
| Regeneration risk | A per-environment override, if any exists in a consuming host's own configuration, is not visible from this repository and could be discarded by an unaware "Update Web Reference" |

## Non-documented artifacts

- `Services/SAIF.Services/Web References/CleanAddressSvc/Reference.cs` is `wsdl.exe` tool output (a partial class, serialization attributes, and the event-based asynchronous scaffolding it generates per operation — for example `HelloWorldAsync`, `HelloWorldOperationCompleted`, and `HelloWorldCompleted`); this document set describes the contract from the `.wsdl` and the call sites instead, per the generated-code doctrine.

## Related documentation
- [Client index](index.md)
- [Architecture](architecture.md)
- [Contract](contract.md)
- [Operation map](operation-map.md)
- [Client reference](reference.md)
- [Consumption](consumption.md)
- [Dependencies](dependencies.md)
- [Business rules](business-rules.md)
- [Tech debt](tech-debt.md)

> **Note:** Statements marked with `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

## Sources
- `Services/SAIF.Services/Utilities/CleanAddress/CleanAddressService.cs`
- `Services/SAIF.Services/Utilities/CleanAddress/AddressSearchService.cs`
- `Services/SAIF.Services/Utilities/CleanAddress/CleanAddressBatchService.cs`
- `Services/SAIF.Services/Utilities/CleanAddress/CleanAddressServiceBase.cs`
- `Tests/SAIF.Services.Tests/Utilities/WhenCleansingAddress.cs`
- `Tests/SAIF.Services.Tests/Utilities/WhenSearchingAddress.cs`
- `Services/SAIF.Services/Web References/CleanAddressSvc/clsCAServices.wsdl`
- `Services/SAIF.Services/Web References/CleanAddressSvc/clsCAServices.disco`
