How opensbr/digipoortwusconnection works
Project type and purpose
• This is a .NET console (or library) client application that uses WCF (“Connected Services”) to talk to the Dutch government’s Digipoort gateway.
• It provides sample code for three SOAP services: Aanleveren (sending messages), Ophalen (retrieving messages), and StatusInformatie (querying statuses).
File structure
• Top-level modules:
• Connected Services (auto-generated WCF proxies for each Digipoort endpoint)
• ServiceReferenceExtensions (partial classes to extend those proxies)
• WusChannel (custom binding, channel factory, certificate & security helpers)
• Helpers (file I/O, media-type constants)
• Program.cs (entry point / orchestration)
• app.config (endpoints, bindings, credentials, certificates)
• No database or UI layers—this is a pure client‐to‐external‐services integration sample.
Key insights from the README
• Purpose: demonstrate how to connect, authenticate, and exchange messages with Digipoort.
• Technologies: .NET WCF, custom bindings, X.509 certificates, SOAP over TLS.
a. Main components:
• Client Application (Program.cs)
• ServiceReference proxies (3 SOAP clients)
• ServiceReferenceExtensions (custom request builders)
• WusChannel module (binding & security)
• Helpers (FileIO, MediaTypeNames)
• Configuration (app.config + certificate file)
• External Digipoort endpoints (Aanleveren, Ophalen, StatusInformatie)
b. Relationships/interactions:
• Program invokes ServiceReferenceExtensions → they decorate messages and invoke ServiceReference proxy classes.
• Those proxies use WusChannelFactory (with WusCustomBinding + certificate loaded from app.config) to open a secure SOAP channel.
• Messages traverse over TLS to the external Digipoort services.
• Responses return along the same path back into Program.
• Helpers are used by both Program and ServiceReferenceExtensions for reading files and setting media types.
c. Architectural patterns/principles:
• Separation of concerns:
• “Core logic” in Program
• “Transport” in WusChannel
• “Service contracts” in Connected Services proxies
• “Extensions” in partial classes
• “Utilities” in Helpers
• Configuration-driven endpoints & credentials (no hard-coding)
• Dependency injection can be layered in later for testability (e.g., inject IWusChannelFactory)
d. Key technologies/frameworks:
• .NET Framework (C#)
• WCF Connected Services (SOAP + WSDL)
• Custom WCF binding (WusCustomBinding)
• X.509 certificate authentication (cs-bedrijven_procesinfrastructuur_nl.crt)
• Partial classes for proxy extension