Skip to content

Consumption

A consumer must construct ActiveDirectoryServiceProxy with a service URL of its own choosing; the wrapper builds its own BasicHttpBinding and bypasses the two <client><endpoint> entries this repository's app.config declares. ActiveDirectoryServiceProxy is compiled into SAIF.Services.Web.Proxies, which is consumed as a project reference by SAIF.Services, SAIF.Services.Common, SAIF.Services.WCF, and SAIF.Services.Tests — see SAIF.Services.Web.Proxies overview — though none of those four projects uses this particular proxy.

Reference style

Field Value
Mechanism Service Reference (svcutil)
Declared in Services/SAIF.Services.Web.Proxies/SAIF.Services.Web.Proxies.csproj
Generated artifacts Services/SAIF.Services.Web.Proxies/Service References/ActiveDirectory/Reference.cs, Reference.svcmap, configuration.svcinfo, configuration91.svcinfo, clsADServices.wsdl, clsADServices.disco
Target framework .NET Framework 4.6.2
Regeneration command Visual Studio "Update Service Reference"

Construction

// ActiveDirectoryServiceProxy.cs:18-21
public ActiveDirectoryServiceProxy(string serviceUrl)
{
    Enforce.ArgumentNotNullOrEmpty(serviceUrl, nameof(serviceUrl));
    webService = new clsADServicesSoapClient(new BasicHttpBinding(), new EndpointAddress(serviceUrl));
}
Step Requirement
Endpoint address serviceUrl, a constructor parameter whose own origin is unresolved within this repository**
Binding new BasicHttpBinding(), constructed in code with framework defaults
Credentials None set — BasicHttpSecurityMode.None*
Initialization Single-constructor

Endpoint configuration

Setting Value Source Changeable without a rebuild
Endpoint address Caller-supplied serviceUrl; design-time (unused) configured value http://webqa/WebServices/ADWebService/clsADServices.asmx Services/SAIF.Services.Web.Proxies/ActiveDirectoryServiceProxy.cs:14-16; app.config:52 (unused) Yes for the caller who constructs the wrapper — but this repository does not show who that is
Binding configuration Constructed in code, not read from app.config ActiveDirectoryServiceProxy.cs:19 No — the two <client><endpoint> entries in app.config:52-53 are dead configuration
Security mode BasicHttpSecurityMode.None* ActiveDirectoryServiceProxy.cs:19 No — hard-coded via the default binding

Resilience

Concern Finding Configurable by consumer Source Tech debt
Timeout None configured — binding defaults apply (1 min send/open/close, 10 min receive)* No ActiveDirectoryServiceProxy.cs:19 Yes
Retry None configured No — Yes
Circuit breaking None configured No — No
Thread safety Not determined from source — — No
Cancellation Not supported — no cancellation on any call site (GenerateAsynchronousMethods=false) — Reference.svcmap Yes
Message size limits 65,536 bytes (BasicHttpBinding default, not overridden)* No ActiveDirectoryServiceProxy.cs:19 No

None of the three resilience gaps is mitigated anywhere in this repository, because nothing in this repository calls the wrapper; an external consumer inherits all of them. See Tech debt findings TD-AD-01 and TD-AD-03.

Disposal

Aspect Finding
Disposal performed Dispose() calls webService.Close()
Faulted channel handled No — a faulted channel throws CommunicationObjectFaultedException from Dispose, masking the original failure
Wrapper responsibility ActiveDirectoryServiceProxy disposes the generated client
Source Services/SAIF.Services.Web.Proxies/ActiveDirectoryServiceProxy.cs:75-83
// ActiveDirectoryServiceProxy.cs:75-83
public void Dispose()
{
    webService.Close();
}

Error handling for consumers

Failure Surfaces as Consumer action
Service unreachable CommunicationException† Not handled at any call site
SOAP fault returned FaultException† Not handled at any call site
Timeout exceeded TimeoutException† Not handled at any call site
Response larger than the message size limit CommunicationException† Not handled at any call site
Empty or absent output message NullReferenceException on userInfo.Address in GetContact* Not handled

Usage examples

No usage example exists in this repository: nothing constructs ActiveDirectoryServiceProxy. A hypothetical caller supplies a URL and calls one of the four exposed methods:

using (var proxy = new ActiveDirectoryServiceProxy(serviceUrl))
{
    var printer = proxy.GetDefaultPrinter(userId);
}
Scenario Operations used Notes
Not evidenced in this repository — No call site exists

Lifecycle guidance

Question Answer
Construct once or per call Not determined from source
Disposable Yes (IDisposable)
Safe to share across threads Not determined from source

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. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • Services/SAIF.Services.Web.Proxies/ActiveDirectoryServiceProxy.cs
  • Services/SAIF.Services.Web.Proxies/app.config
  • Services/SAIF.Services.Web.Proxies/Service References/ActiveDirectory/Reference.svcmap