Skip to content

DbConnectionServiceProxy

Legacy.DbConnectionServiceProxy hides the internal generated ConnectInfoSoapClient behind two connection-string resolution methods, delegating Oracle and SQL Server connection-string construction entirely to the remote legacy connect-info service and returning strings that contain database credentials. It is constructed by Services/SAIF.Services.Common/DbConnectionService.cs. The source file name (DbConnectionsServiceProxy.cs) has an extra "s" relative to the class name*.

Purpose

  • Resolve an Oracle connection string, tagging the request with the process OS user and decoding the ZSPECIALCHAR token in the response (OP-WP-07, WP-BR-012, WP-BR-013).
  • Resolve a SQL Server connection string with the same request shape, plus an explicit server name.

Context

  • Namespace: SAIF.Services.Web.Proxies.Legacy
  • Assembly/package: SAIF.Services.Web.Proxies (packaged in SAIF.SAIFCode.Core)

Public members

Member Signature Purpose
Constructor DbConnectionServiceProxy(string serviceUrl) Guards serviceUrl, then builds a default BasicHttpBinding client with no explicit transport security (WP-BR-001)
GetOracleConnectionString string GetOracleConnectionString(string instance, string userName) Builds a ConnectRequestInfo (Code = userName, Database = instance, OSUserid = Environment.UserName), calls wire GetODPConnectString, and decodes the ZSPECIALCHAR token to (char)7 in the result (WP-BR-012, WP-BR-013)
GetSqlServerConnectionString string GetSqlServerConnectionString(string server, string instance, string userName) Builds the same request plus Server = server, calls wire GetSQLConnectString, and returns the result unchanged
Dispose void Dispose() Closes the underlying generated ConnectInfoSoapClient by calling Close(), without an Abort() fallback on a faulted channel*

Behavioral notes

  • userName is a SAIF pool code passed as Code, not an Oracle schema or SQL login; the actual database user/schema is resolved server-side.
  • The returned connection string contains credentials; this library does not log or cache it.

Constraints and usage notes

  • The generated client uses a default, unsecured BasicHttpBinding; whether the transport is HTTPS depends only on the URL scheme the caller supplies, which matters because the response carries credentials — see Architecture.

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/Legacy/DbConnectionsServiceProxy.cs