---
title: Architecture
summary: How the proxy is constructed, configured, invoked, and disposed.
status: draft
owner: SAIF.Core documentation
last_reviewed: 2026-09-24
---

# Architecture

No repository source constructs the generated `clsSAIFMessageSoapClient`, and there is no authored wrapper, so this page documents the mechanism the proxy would use if it were ever constructed, not an active path.

## Proxy mechanism

| Aspect | Finding |
| --- | --- |
| Mechanism | Service Reference (svcutil) |
| Proxy type | `clsSAIFMessageSoapClient` (`internal`) |
| Base type | `System.ServiceModel.ClientBase<T>` |
| Contract type | `internal interface clsSAIFMessageSoap` |
| Constructed in | Not applicable — no repository source constructs this type |
| Binding configured in | `<system.serviceModel><bindings>` — two configured bindings exist (`app.config:9,26-29`), neither referenced by any construction in code |
| Address supplied by | Not applicable — never constructed |

## Architecture diagram

No construction path exists in this repository. The diagram below shows the two configured endpoints that would apply if a caller constructed the proxy by endpoint name; **neither endpoint is used at runtime**.

```mermaid
flowchart TD
    NOCALLER["No caller in this repository"] -.-> ENDPOINT1["Endpoint: clsSAIFMessageSoap<br>basicHttpBinding, SOAP 1.1"]
    NOCALLER -.-> ENDPOINT2["Endpoint: clsSAIFMessageSoap12<br>customBinding, SOAP 1.2"]
    ENDPOINT1 -.-> PROXY["clsSAIFMessageSoapClient<br>generated proxy (internal)"]
    ENDPOINT2 -.-> PROXY
    PROXY -.-> REMOTE["clsSAIFMessage<br>remote ASMX service (QA host)"]
```

A parameterless construction of `clsSAIFMessageSoapClient` would find two endpoints configured for its contract and throw `InvalidOperationException` (ambiguous endpoint); a caller would have to construct it with an explicit endpoint name*.

## Hand-written wrapper

No hand-written wrapper exists for this proxy. This is a structural difference from `PDFService` and `WorkCalendar` in the same library, which each carry a wrapper class even though neither has an in-repository caller.

## Endpoint resolution

| Environment | Address | Resolved from | Changeable without a rebuild |
| --- | --- | --- | --- |
| QA | `http://webqa/sendmail/clsSAIFMessage.asmx` | `Services/SAIF.Services.Web.Proxies/app.config:57-58` | Not applicable — the proxy is never constructed |

`webqa` is the only environment referenced anywhere for this service; no production address exists in this repository for `clsSAIFMessage`.

## Lifetime and disposal

| Aspect | Finding |
| --- | --- |
| Proxy lifetime | Not applicable — no repository source constructs the proxy |
| Disposal | Not applicable |
| Faulted-channel handling | Not applicable |
| Thread safety | Not applicable |

## Integration points

| System | Type | Purpose |
| --- | --- | --- |
| `clsSAIFMessage`† | SOAP service (ASMX) | Send SMTP mail messages, as declared by the contract; not integrated in this repository |

## Related documentation
- [Client index](index.md)
- [Overview](overview.md)
- [Contract](contract.md)
- [Operation map](operation-map.md)
- [Client reference](reference.md)
- [Consumption](consumption.md)
- [Dependencies](dependencies.md)
- [Tech debt](tech-debt.md)

> **Note:** Statements marked with `†` are derived from dependency library
> documentation via the Legends CLI. Statements marked with `*` were inferred
> from code structure or contextual evidence.

## Sources
- `Services/SAIF.Services.Web.Proxies/app.config`
- `Services/SAIF.Services.Web.Proxies/Service References/SMTP/Reference.cs`
- `Services/SAIF.Services.Web.Proxies/Service References/SMTP/Reference.svcmap`
