SAIF.Services.Printing architecture¶
SAIF.Services.Printing is a service-facade library that wraps two external document-related SOAP services — xPression Design ("xPresso") for document generation/printing/distribution, and SQL Server Reporting Services (SSRS) for report execution — and exposes a higher-level "letter"/report abstraction built on top of the xPression facade. It contains no UI and no BOF business-object types of its own.
Responsibilities¶
- Wrap the xPression Design "xPresso" SOAP service (
clsGenerate) to preview, print, publish, and distribute documents, viaclsPrint. - Wrap the SSRS
ReportExecutionServiceSOAP service to load, parameterize, and render reports, viaclsRSPrint, independently of the xPression facade. - Provide a template-method "letter"/report abstraction (
Reporting.IReport/Reporting.ReportBase) that concrete report subclasses use to build an xPression-flavored XML document and then render/print/distribute/save it through an internally ownedclsPrintinstance. - Provide a bespoke XML-to-xPression-markup serializer (
Reporting.XDesignXDocument/Reporting.XDesignXElement) with primary/foreign "key" propagation, specific to the shape expected by xPression Design templates. - Support asynchronous document distribution via MSMQ (
documentMSMQPath), including MSMQ transaction lifecycle management (StartMQTransaction/EndMQTransaction), as an alternative to synchronous SOAP distribution.
Component boundaries¶
clsPrint: Stateful wrapper around thexpresso.clsGenerateSOAP proxy. Owns preview/print/publish/distribute operations and the MSMQ async-distribution path. Depends onSAIF.Services.Imaging.Import.clsImageImportfor theImportInfopayload serialized into distribution requests.Reporting.ReportBase/Reporting.IReport: Template-method base for concrete report/letter types; orchestratesCreate → Render → Print/Distribute/Saveusing an internally ownedclsPrintinstance. No confirmed production consumer was found in the scanned repository; the only concrete subclass is the test-onlyMyReport.**Reporting.XDesignXDocument/Reporting.XDesignXElement: XML document/element wrappers (inheritingSAIFXDocument/SAIFXElementfrom the SAIF framework) that render into xPression's proprietary markup format viaToXpression().clsRSPrint: Separate, unrelated facade over SSRSReportExecutionService, used for reports rendered directly from an SSRS report path rather than through xPression. Shares no code path withclsPrint/Reporting.*other than residing in the same assembly.xpresso.clsGenerateandSharepointReporting.ReportExecutionService: Auto-generated SOAP client proxies (Web References) for the external xPression Design and SSRS services, respectively. Not hand-written business logic.
Interaction model¶
Legal(the ASP.NET WebForms front end) and its page models (clsLegalAncestor,clsLegalModel,frmPrintPreview.aspx.vb) instantiateclsPrintdirectly and call operations such aspreviewDocument.SAIF.Application.Claim.Legalholds a project reference and namespace import to this library, but no direct call site toclsPrint/clsRSPrint/Reporting.*was confirmed in that library's scanned source; the dependency may be indirect or unused.**clsPrint,clsRSPrint, andReportBaseeach obtain configuration and environment context (service URLs,IsProduction,IsWeb) throughEnvironmentServiceBase, defaulting toAppGlobal.EnvironmentServicewhen no instance is injected — enabling test/DI substitution.*- Distribution requests route either synchronously (direct SOAP call to
xpresso.clsGenerate) or asynchronously (serializedCompositeRequestClasssent to an MSMQ queue atdocumentMSMQPath, optionally under an explicit MSMQ transaction). clsRSPrintinteracts only with the SSRSReportExecutionServiceproxy and has no interaction withclsPrint/Reporting.*or MSMQ.
Design constraints¶
- No direct database access, no BOF
IBusinessCriteria/business-object pattern, and no ASP.NET page/UI code exist in this library itself. - The four Environment API configuration keys consumed (
documentGeneratorServiceUrl,documentMSMQPath,idmFilePath,sqlReportingServiceUrl) have no static fallback in this repository'sWeb.config/app.config; their runtime values are unknown and presumed resolved by a centralized SAIF environment-configuration service outside this library's scope.** - Two
ApplicationSettingsBase(My.Settings) design-time Web Reference URLs exist inapp.configbut are never read by consuming code — both proxies always have their.Urloverwritten fromGetConfigSettingat construction time, superseding the design-time defaults.* - The
oracle.manageddataaccess.clientconfiguration section andDbProviderFactoriesregistration exist only as a transitive artifact of referencingOracle.ManagedDataAccess(viaSAIF.BOF.Framework); no Oracle connection/command code exists in this library.*
Architecture diagram¶
The following diagram shows the two independent facades (clsPrint/Reporting.* for xPression, clsRSPrint for SSRS) and how requests reach their respective external services synchronously or via MSMQ.
flowchart LR
Legal["Legal web app<br>(clsLegalAncestor, frmPrintPreview)"] --> ClsPrint["clsPrint"]
ReportSubclass["Concrete report/letter<br>(test-only MyReport)"] --> ReportBase["Reporting.ReportBase"]
ReportBase --> ClsPrint
ReportBase --> XDesign["XDesignXDocument /<br>XDesignXElement"]
ClsPrint -->|sync| XpressoProxy["xpresso.clsGenerate<br>(SOAP proxy)"]
ClsPrint -->|async distribute| MSMQ["MSMQ queue<br>documentMSMQPath"]
XpressoProxy --> XpressionServer["External xPression<br>Design server"]
ClsRSPrint["clsRSPrint"] --> RSProxy["SharepointReporting.<br>ReportExecutionService (SOAP proxy)"]
RSProxy --> SSRSServer["External SSRS<br>report server"]
ClsPrint -.uses.-> ImageImport["SAIF.Services.Imaging.Import<br>clsImageImport"]
Sequence diagram¶
The following diagram shows the primary preview/print request flow through clsPrint to the external xPression service.
sequenceDiagram
participant Client as Legal web app
participant ClsPrint as clsPrint
participant XpressoProxy as xpresso.clsGenerate (SOAP proxy)
participant XpressionServer as External xPression server
Client->>ClsPrint: previewDocument(package, xml)
ClsPrint->>XpressoProxy: previewDocument(Package, XML, OutputProfile, Application)
XpressoProxy->>XpressionServer: SOAP call
XpressionServer-->>XpressoProxy: rendered document bytes
XpressoProxy-->>ClsPrint: Byte() result
ClsPrint-->>Client: PDF bytes
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Related documentation¶
Sources¶
SAIF.Services.Printing\clsPrint.vbSAIF.Services.Printing\clsRSPrint.vbSAIF.Services.Printing\Reporting\ReportBase.vbSAIF.Services.Printing\Reporting\XDesignXDocument.vbSAIF.Services.Printing\Reporting\XDesignXElement.vbSAIF.Services.Printing\Web References\xpresso\Reference.vbSAIF.Services.Printing\Web References\SharepointReporting\Reference.vbSAIF.Services.Printing\SAIF.Services.Printing.vbproj