Skip to content

SAIF.Services.Web.Proxies overview

Documentation context: Packaged Component (NuGet)

SAIF.Services.Web.Proxies is the outbound-integration (anti-corruption) layer used by SAIF.Services and its sibling hosts to reach eleven SOAP/WCF services and one third-party REST API without exposing generated ClientBase<T>/DuplexClientBase<T> wire clients to callers.

Purpose

  • Wrap 8 authored SOAP proxies (ActiveDirectory, Document, Fax, Logging, PDFService, WorkCalendar, DbConnection, SimpleCertifiedMail) behind small, intention-revealing classes that map SAIF.Core contract DTOs to and from each proxy's wire types.
  • Provide one hand-rolled, non-SOAP REST/XML client, GoogleMapsApiServiceProxy, for the Google Distance Matrix API over System.Net.WebRequest.
  • Resolve outbound endpoints either from a caller-supplied serviceUrl (7 wrappers) or from IEnvironmentService.GetConfigSetting (SimpleCertifiedMailServiceProxy, GoogleMapsApiServiceProxy).
  • Consumers include SAIF.Services, SAIF.Services.Common, and SAIF.Services.WCF, which construct these wrappers directly or receive ISimpleCertifiedMailServiceProxy/IGoogleMapsApiServiceProxy through constructor injection*.

Responsibilities

  • Hide the internal generated SOAP/WCF clients (clsADServicesSoapClient, clsGenerateSoapClient, FaxServiceSoapClient, clsWSLoggingSoapClient, PDFServiceClient, SAIFDatesSoapClient, ConnectInfoSoapClient) behind authored wrapper classes.
  • Map between SAIF.Core contract types (Contact, Address, PhoneNumber, PersonName, ApplicationExceptionDetail, CertifiedLabelData, DistanceResults, FaxInfoClass, FaxRecipient, DocumentGenerationConfig, DeferredPrintConfig, PrintConfig) and each proxy's wire-level types.
  • Own the certified-mail label workflow, including credential resolution, page-count-based sizing, and mode selection (production vs. preview).
  • Own the Google Distance Matrix workflow, including request construction, response parsing, and per-element/error handling.
  • Implement IDisposable on every wrapper to close the underlying generated client.

Key components

  • ActiveDirectoryServiceProxy: retrieves AD default printers, cached access checks, and user contact information.
  • DocumentServiceProxy: previews, distributes, and prints documents through the xPression Design document service.
  • FaxServiceProxy: sends a fax with Windows-integrated transport credentials.
  • LoggingServiceProxy: forwards exception details to the remote logging service.
  • PdfServiceProxy: retrieves a cached PDF image with server-managed wait/retry.
  • WorkCalendarServiceProxy: answers work-day calendar queries.
  • Legacy.DbConnectionServiceProxy: resolves Oracle and SQL Server connection strings from the legacy connect-info SOAP service.
  • SimpleCertifiedMailServiceProxy / ISimpleCertifiedMailServiceProxy: produces certified-mail labels from the third-party SimpleCertifiedMail ADS SOAP service.
  • GoogleMapsApiServiceProxy / IGoogleMapsApiServiceProxy: computes driving distances via the Google Distance Matrix REST API.

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/SAIF.Services.Web.Proxies.csproj
  • Services/SAIF.Services.Web.Proxies/ActiveDirectoryServiceProxy.cs
  • Services/SAIF.Services.Web.Proxies/DocumentServiceProxy.cs
  • Services/SAIF.Services.Web.Proxies/FaxServiceProxy.cs
  • Services/SAIF.Services.Web.Proxies/GoogleMapsApiServiceProxy.cs
  • Services/SAIF.Services.Web.Proxies/LoggingServiceProxy.cs
  • Services/SAIF.Services.Web.Proxies/PDFServiceProxy.cs
  • Services/SAIF.Services.Web.Proxies/SimpleCertifiedMailServiceProxy.cs
  • Services/SAIF.Services.Web.Proxies/WorkCalendarServiceProxy.cs
  • Services/SAIF.Services.Web.Proxies/Legacy/DbConnectionsServiceProxy.cs