Class EbicsMessage
Represents an EBICS request or response message.
public abstract class EbicsMessage : EbicsElement
- Inheritance
-
EbicsMessage
- Derived
- Inherited Members
Remarks
This EbicsElement implementation does not deal with authentication signatures. It only builds messages without authentication signatures and ignores authentication signatures during parsing. In order to create a message with authentication signature, the method BuildMessage(EbicsVersion, IEbicsSecurityOperations, EbicsSecurityCode) must be used. In order to parse a message and also to verify its authentication signature, the methods ParseMessage(XmlDocument) and VerifyAuthSignature(EbicsPubKeyInfo) must be used.
Constructors
EbicsMessage(string, bool)
protected EbicsMessage(string sRootTag, bool fAuthSignature)
Parameters
Properties
AuthSignature
Indicates whether this message requires an authentication signature.
public bool AuthSignature { get; }
Property Value
DataTransfer
The data transfer element.
public EbicsDataTransfer DataTransfer { get; set; }
Property Value
LastSegment
Indicates the value of the lastSegment
attribute included in the
SegmentNumber
of this message.
public bool LastSegment { get; set; }
Property Value
Remarks
If no SegmentNumber is included in the message, then this property is fully ignored.
NumSegments
The NumSegments
value included in the static header of this message.
public int NumSegments { get; set; }
Property Value
- int
The value -1 indicates that no
NumSegments
value was present/shall be included.
RootTag
The root tag of this message as it was given to its ctor.
public string RootTag { get; }
Property Value
SegmentNumber
The SegmentNumber
value included in the mutable header of this message.
public int SegmentNumber { get; set; }
Property Value
- int
The value -1 indicates that no
SegmentNumber
value was present/shall be included.
TransactionPhase
public EbicsTransactionPhase TransactionPhase { get; set; }
Property Value
Version
The EBICS version used by this message.
public EbicsVersion Version { get; }
Property Value
Methods
BuildBody(XmlElement, EbicsVersion)
protected virtual void BuildBody(XmlElement xmlBody, EbicsVersion nVersion)
Parameters
xmlBody
XmlElementnVersion
EbicsVersion
Remarks
The base class just adds a DataTransfer element to the body.
BuildHeaderMutable(XmlElement, EbicsVersion)
protected abstract void BuildHeaderMutable(XmlElement xmlMutable, EbicsVersion nVersion)
Parameters
xmlMutable
XmlElementnVersion
EbicsVersion
BuildHeaderStatic(XmlElement, EbicsVersion)
protected abstract void BuildHeaderStatic(XmlElement xmlStatic, EbicsVersion nVersion)
Parameters
xmlStatic
XmlElementnVersion
EbicsVersion
BuildMessage(EbicsVersion, IEbicsSecurityOperations, EbicsSecurityCode)
public XmlDocument BuildMessage(EbicsVersion nEbicsVersion, IEbicsSecurityOperations aSecurity, EbicsSecurityCode nAuthSecurityCode)
Parameters
nEbicsVersion
EbicsVersionaSecurity
IEbicsSecurityOperationsnAuthSecurityCode
EbicsSecurityCode
Returns
BuildXml(XmlDocument, EbicsVersion)
public override XmlElement BuildXml(XmlDocument xmlDocument, EbicsVersion nVersion)
Parameters
xmlDocument
XmlDocumentnVersion
EbicsVersion
Returns
CreateMessage(string)
Creates an appropriately derived EbicsMessage from the given root tag.
public static EbicsMessage CreateMessage(string sRootTag)
Parameters
sRootTag
string
Returns
CreateMessage(XmlDocument)
public static EbicsMessage CreateMessage(XmlDocument xmlDocument)
Parameters
xmlDocument
XmlDocument
Returns
ParseBody(XmlElement, EbicsVersion)
protected virtual void ParseBody(XmlElement xmlBody, EbicsVersion nVersion)
Parameters
xmlBody
XmlElementnVersion
EbicsVersion
ParseHeaderMutable(XmlElement, EbicsVersion)
protected abstract void ParseHeaderMutable(XmlElement xmlMutable, EbicsVersion nVersion)
Parameters
xmlMutable
XmlElementnVersion
EbicsVersion
ParseHeaderStatic(XmlElement, EbicsVersion)
protected abstract void ParseHeaderStatic(XmlElement xmlStatic, EbicsVersion nVersion)
Parameters
xmlStatic
XmlElementnVersion
EbicsVersion
ParseMessage(XmlDocument)
public void ParseMessage(XmlDocument xmlDocument)
Parameters
xmlDocument
XmlDocument
ParseXml(XmlElement, EbicsVersion)
public override void ParseXml(XmlElement xmlElement, EbicsVersion nVersion)
Parameters
xmlElement
XmlElementThe root element of the message.
nVersion
EbicsVersionThe EBICS version of the message. This must have been extracted from the root element's Version attribute.
VerifyAuthSignature(EbicsPubKeyInfo)
public bool VerifyAuthSignature(EbicsPubKeyInfo aAuthPubKey)
Parameters
aAuthPubKey
EbicsPubKeyInfoAuthentication public key of the sender.
Returns
- bool
If there was a valid authentication signature, then
true
is returned. If the message does not contain an authentication signature, thenfalse
is returned. If the message contains an invalid authentication signature, then a EbicsException is thrown.
Exceptions
- EbicsException
A contained authentication signature was invalid.