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
NumSegmentsvalue 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
SegmentNumbervalue 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
xmlBodyXmlElementnVersionEbicsVersion
Remarks
The base class just adds a DataTransfer element to the body.
BuildHeaderMutable(XmlElement, EbicsVersion)
protected abstract void BuildHeaderMutable(XmlElement xmlMutable, EbicsVersion nVersion)
Parameters
xmlMutableXmlElementnVersionEbicsVersion
BuildHeaderStatic(XmlElement, EbicsVersion)
protected abstract void BuildHeaderStatic(XmlElement xmlStatic, EbicsVersion nVersion)
Parameters
xmlStaticXmlElementnVersionEbicsVersion
BuildMessage(EbicsVersion, IEbicsSecurityOperations, EbicsSecurityCode)
public XmlDocument BuildMessage(EbicsVersion nEbicsVersion, IEbicsSecurityOperations aSecurity, EbicsSecurityCode nAuthSecurityCode)
Parameters
nEbicsVersionEbicsVersionaSecurityIEbicsSecurityOperationsnAuthSecurityCodeEbicsSecurityCode
Returns
BuildXml(XmlDocument, EbicsVersion)
public override XmlElement BuildXml(XmlDocument xmlDocument, EbicsVersion nVersion)
Parameters
xmlDocumentXmlDocumentnVersionEbicsVersion
Returns
CreateMessage(string)
Creates an appropriately derived EbicsMessage from the given root tag.
public static EbicsMessage CreateMessage(string sRootTag)
Parameters
sRootTagstring
Returns
CreateMessage(XmlDocument)
public static EbicsMessage CreateMessage(XmlDocument xmlDocument)
Parameters
xmlDocumentXmlDocument
Returns
ParseBody(XmlElement, EbicsVersion)
protected virtual void ParseBody(XmlElement xmlBody, EbicsVersion nVersion)
Parameters
xmlBodyXmlElementnVersionEbicsVersion
ParseHeaderMutable(XmlElement, EbicsVersion)
protected abstract void ParseHeaderMutable(XmlElement xmlMutable, EbicsVersion nVersion)
Parameters
xmlMutableXmlElementnVersionEbicsVersion
ParseHeaderStatic(XmlElement, EbicsVersion)
protected abstract void ParseHeaderStatic(XmlElement xmlStatic, EbicsVersion nVersion)
Parameters
xmlStaticXmlElementnVersionEbicsVersion
ParseMessage(XmlDocument)
public void ParseMessage(XmlDocument xmlDocument)
Parameters
xmlDocumentXmlDocument
ParseXml(XmlElement, EbicsVersion)
public override void ParseXml(XmlElement xmlElement, EbicsVersion nVersion)
Parameters
xmlElementXmlElementThe root element of the message.
nVersionEbicsVersionThe 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
aAuthPubKeyEbicsPubKeyInfoAuthentication public key of the sender.
Returns
- bool
If there was a valid authentication signature, then
trueis returned. If the message does not contain an authentication signature, thenfalseis returned. If the message contains an invalid authentication signature, then a EbicsException is thrown.
Exceptions
- EbicsException
A contained authentication signature was invalid.