Class EbicsMessage

Namespace
Subsembly.EBICS
Assembly
Subsembly.EBICS.Core.dll

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

sRootTag string
fAuthSignature bool

Properties

AuthSignature

Indicates whether this message requires an authentication signature.

public bool AuthSignature { get; }

Property Value

bool

DataTransfer

The data transfer element.

public EbicsDataTransfer DataTransfer { get; set; }

Property Value

EbicsDataTransfer

LastSegment

Indicates the value of the lastSegment attribute included in the SegmentNumber of this message.

public bool LastSegment { get; set; }

Property Value

bool

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

string

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

EbicsTransactionPhase

Version

The EBICS version used by this message.

public EbicsVersion Version { get; }

Property Value

EbicsVersion

Methods

BuildBody(XmlElement, EbicsVersion)

protected virtual void BuildBody(XmlElement xmlBody, EbicsVersion nVersion)

Parameters

xmlBody XmlElement
nVersion 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 XmlElement
nVersion EbicsVersion

BuildHeaderStatic(XmlElement, EbicsVersion)

protected abstract void BuildHeaderStatic(XmlElement xmlStatic, EbicsVersion nVersion)

Parameters

xmlStatic XmlElement
nVersion EbicsVersion

BuildMessage(EbicsVersion, IEbicsSecurityOperations, EbicsSecurityCode)

public XmlDocument BuildMessage(EbicsVersion nEbicsVersion, IEbicsSecurityOperations aSecurity, EbicsSecurityCode nAuthSecurityCode)

Parameters

nEbicsVersion EbicsVersion
aSecurity IEbicsSecurityOperations
nAuthSecurityCode EbicsSecurityCode

Returns

XmlDocument

BuildXml(XmlDocument, EbicsVersion)

public override XmlElement BuildXml(XmlDocument xmlDocument, EbicsVersion nVersion)

Parameters

xmlDocument XmlDocument
nVersion EbicsVersion

Returns

XmlElement

CreateMessage(string)

Creates an appropriately derived EbicsMessage from the given root tag.

public static EbicsMessage CreateMessage(string sRootTag)

Parameters

sRootTag string

Returns

EbicsMessage

CreateMessage(XmlDocument)

public static EbicsMessage CreateMessage(XmlDocument xmlDocument)

Parameters

xmlDocument XmlDocument

Returns

EbicsMessage

ParseBody(XmlElement, EbicsVersion)

protected virtual void ParseBody(XmlElement xmlBody, EbicsVersion nVersion)

Parameters

xmlBody XmlElement
nVersion EbicsVersion

ParseHeaderMutable(XmlElement, EbicsVersion)

protected abstract void ParseHeaderMutable(XmlElement xmlMutable, EbicsVersion nVersion)

Parameters

xmlMutable XmlElement
nVersion EbicsVersion

ParseHeaderStatic(XmlElement, EbicsVersion)

protected abstract void ParseHeaderStatic(XmlElement xmlStatic, EbicsVersion nVersion)

Parameters

xmlStatic XmlElement
nVersion EbicsVersion

ParseMessage(XmlDocument)

public void ParseMessage(XmlDocument xmlDocument)

Parameters

xmlDocument XmlDocument

ParseXml(XmlElement, EbicsVersion)

public override void ParseXml(XmlElement xmlElement, EbicsVersion nVersion)

Parameters

xmlElement XmlElement

The root element of the message.

nVersion EbicsVersion

The 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 EbicsPubKeyInfo

Authentication 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, then false is returned. If the message contains an invalid authentication signature, then a EbicsException is thrown.

Exceptions

EbicsException

A contained authentication signature was invalid.