---
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 either generated client. This page documents the mechanism and the configuration this repository carries, not a construction path that exists.

## Proxy mechanism

| Aspect | Finding |
| --- | --- |
| Mechanism | Service Reference (svcutil), sourced via WS-MetadataExchange (`http://callrexprod:8002/mex`) |
| Proxy type | `SAIF.Services.Web.Proxies.CallRex.ClientServiceClient` (`public partial class : System.ServiceModel.ClientBase<IClientService>`); `ClientAccessPolicyClient` (`: ClientBase<IClientAccessPolicy>`) |
| Base type | `System.ServiceModel.ClientBase<T>` |
| Contract type | `SAIF.Services.Web.Proxies.CallRex.IClientService`, `IClientAccessPolicy` |
| Constructed in | Not applicable — no repository source constructs either client |
| Binding configured in | `<system.serviceModel><bindings><customBinding>` (`Services/SAIF.Services.Web.Proxies/app.config:34-37`) |
| Address supplied by | `<endpoint address="http://callrexprod:8002/ClientService">` and `<endpoint address="http://callrexprod:8002/ClientServiceBasic">` in `app.config:61,66` (configured but never resolved by any construction) |

## Construction path

No construction path exists in this repository. The diagram below shows the path a hypothetical caller would need to build, since none does.

```mermaid
flowchart TD
    CALLER["No repository caller<br>exists"] -.-> BIND["customBinding<br>CustomBinding_IClientService"]
    BIND -.-> ADDR["EndpointAddress<br>http://callrexprod:8002/ClientService"]
    ADDR -.-> PROXY["ClientServiceClient<br>generated proxy (public)"]
    PROXY -.-> REMOTE["Remote service<br>CallRex ClientService (WCF)"]
```

## Hand-written wrapper

Not applicable — no hand-written type in the repository references the `CallRex` namespace.

## Endpoint resolution

| Environment | Address | Resolved from | Changeable without a rebuild |
| --- | --- | --- | --- |
| Configured (unused) | `http://callrexprod:8002/ClientService` (`CustomBinding_IClientService`) and `http://callrexprod:8002/ClientServiceBasic` (`CustomBinding_IClientService1`) | `Services/SAIF.Services.Web.Proxies/app.config:61-70` | Not applicable — no construction reads this configuration |

Two endpoints share one contract, so a parameterless `new ClientServiceClient()` would throw at construction with an ambiguous-endpoint error*; no caller exists to hit this. `IClientAccessPolicy` has no endpoint configured or declared in the WSDL at all, so `ClientAccessPolicyClient` cannot be constructed from configuration.

## Lifetime and disposal

| Aspect | Finding |
| --- | --- |
| Proxy lifetime | Not applicable — never constructed |
| Disposal | Not applicable |
| Faulted-channel handling | Not applicable |
| Thread safety | Not determined from source |

## Integration points

| System | Type | Purpose |
| --- | --- | --- |
| `ClientService` (CallRex) | WCF service reached via `customBinding` with NTLM transport authentication | Present on the proxy surface; not integrated with anything 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 `*` were inferred from code structure, naming
> conventions, or contextual evidence where direct confirmation was not available
> in source artifacts.

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