Path: redb-route/redb.Route.As4/Messaging/EbmsModel.cs Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.As4/Messaging/EbmsModel.cs ---- using System.Xml; namespace redb.Route.As4.Messaging; /// Namespaces of the ebMS 3.0 header and of the receipt's non-repudiation information. internal static class EbmsNamespaces { /// ebMS 3.0 core header. public const string Eb = "http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/"; /// ebBP signals: ebbp:NonRepudiationInformation inside an AS4 receipt. public const string Ebbp = "http://docs.oasis-open.org/ebxml-bp/ebbp-signals-2.0"; /// SOAP 1.2 envelope. public const string Soap12 = "http://www.w3.org/2003/05/soap-envelope"; /// Default message partition channel (Core §3.4.1). public const string DefaultMpc = "http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/defaultMPC"; } /// The content of one eb:Messaging header: user messages and signals. /// At most one in AS4 (profile §2.1); a list because the header allows more. /// Receipts, errors, pull requests; one header may carry several. internal sealed record EbmsMessaging(IReadOnlyList UserMessages, IReadOnlyList SignalMessages); /// eb:MessageInfo. internal sealed record MessageInfo(DateTimeOffset Timestamp, string MessageId, string? RefToMessageId); /// eb:PartyId and its optional @type. internal sealed record PartyId(string Value, string? Type); /// eb:From or eb:To: the party ids and the role. internal sealed record Party(IReadOnlyList PartyIds, string Role); /// eb:AgreementRef. internal sealed record AgreementRef(string Value, string? Type, string? PMode); /// eb:Service. internal sealed record Service(string Value, string? Type); /// eb:CollaborationInfo. internal sealed record CollaborationInfo(AgreementRef? AgreementRef, Service Service, string Action, string ConversationId); /// eb:Property of message or part properties. internal sealed record Property(string Name, string Value, string? Type); /// eb:PartInfo: a payload reference (cid: for an attachment, none for the SOAP body) and its properties. internal sealed record PartInfo(string? Href, IReadOnlyList Properties) { /// The value of the part property , or null. public string? PropertyValue(string name) => Properties.FirstOrDefault(p => p.Name == name)?.Value; } /// eb:UserMessage. internal sealed record UserMessage( MessageInfo MessageInfo, Party From, Party To, CollaborationInfo CollaborationInfo, IReadOnlyList MessageProperties, IReadOnlyList PayloadInfo, string? Mpc) { /// The value of the message property , or null. public string? PropertyValue(string name) => MessageProperties.FirstOrDefault(p => p.Name == name)?.Value; } /// /// eb:SignalMessage. keeps the child elements of eb:Receipt as they /// arrived (the non-repudiation information is compared element by element against what was signed). /// internal sealed record SignalMessage( MessageInfo MessageInfo, IReadOnlyList? ReceiptContent, IReadOnlyList Errors, string? PullRequestMpc) { /// Whether the signal is a receipt. public bool IsReceipt => ReceiptContent is not null; } /// eb:Error. internal sealed record EbmsError( string ErrorCode, As4ErrorSeverity Severity, string? Category, string? Origin, string? RefToMessageInError, string? ShortDescription, string? Description, string? ErrorDetail);