Path: redb-route/redb.Route.Soap/SoapFaultException.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.Soap/SoapFaultException.cs
----
namespace redb.Route.Soap;
///
/// Thrown when a SOAP call returns a soap:Fault. The fault code/string are also placed on the
/// exchange under redbSoap.faultCode / redbSoap.faultString so OnException handlers
/// (or a route that catches this) can react.
///
public sealed class SoapFaultException : Exception
{
/// SOAP fault code (1.1 faultcode / 1.2 Code/Value).
public string? FaultCode { get; }
/// SOAP fault string (1.1 faultstring / 1.2 Reason/Text).
public string? FaultString { get; }
///
/// Namespace the prefix in stands for, when the code uses one the connector
/// does not already know. A fault code is a QName, so an unbound prefix is not something a strict
/// client can resolve — and the clients that branch on fault codes are the strict ones.
///
public string? FaultCodeNamespace { get; }
/// Creates a SOAP fault exception.
///
/// Optional namespace for the prefix in . The standard prefixes
/// (wst, wsse, wsu, wsa, …) are known and need not be given.
///
public SoapFaultException(string? faultCode, string? faultString, string? faultCodeNamespace = null)
: base($"SOAP fault: {faultCode} — {faultString}")
{
FaultCode = faultCode;
FaultString = faultString;
FaultCodeNamespace = faultCodeNamespace;
}
}