Class EbicsXmlContainerMessage

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

Represents a single SEPA message inside a EbicsXmlContainer.

public class EbicsXmlContainerMessage : EbicsElement
Inheritance
EbicsXmlContainerMessage
Inherited Members

Constructors

EbicsXmlContainerMessage(string, string)

Creates a new XML container element for a particular SEPA pain message type.

public EbicsXmlContainerMessage(string sMessageTag, string sNamespace)

Parameters

sMessageTag string

The XML tag that shall be used by this message inside the XML container. Currently this must be either "MsgPain001", "MsgPain002", or "MsgPain008". The required tag depends on the type of SEPA pain message. Use GetMessageTag(string) in order to determine the correct tag from a SEPA pain identifier.

sNamespace string

The XML namespace URI of the new XML container. Currently this must be either NAMESPACE_CONTAINER_NNN_002_02, NAMESPACE_CONTAINER_NNN_003_02, NAMESPACE_CONTAINER_NNN_001_02, or NAMESPACE_CONTAINER_NNN_001_04. The required namespace depends on the type of SEPA pain messages that shall be contained in the container. Use GetNamespace(string) in order to determine the correct namespace from a SEPA pain identifier.

Exceptions

ArgumentNullException

Either parameter was null.

ArgumentException

Either parameter was an empty string.

Properties

Document

The actual XML content document of this message.

public XmlElement Document { get; set; }

Property Value

XmlElement

Remarks

Usually this is the root element of a SEPA XML document.

See Also

HashAlgorithm

The hash algorithm to be used for the hash value of this message.

public string HashAlgorithm { get; set; }

Property Value

string

Remarks

This defaults to "SHA256" which is the only hash algorithm currently supported. If this is set to null or an empty string, then no hash value will be included when generating the XML for this message.

MessageTag

The XML tag that is used for this message.

public string MessageTag { get; }

Property Value

string

Namespace

The XML namespace that is used for this message.

public string Namespace { get; }

Property Value

string

Methods

BuildXml(XmlDocument, EbicsVersion)

public override XmlElement BuildXml(XmlDocument xmlDocument, EbicsVersion nVersion)

Parameters

xmlDocument XmlDocument
nVersion EbicsVersion

Returns

XmlElement

Remarks

This method does not compute the HashValue, it only inserts a placeholder XML element. In order to update this placeholder with a computed hash value, the method HashXml(XmlElement) must be invoked on the returned XML element. Attention: Due to the rules of canonicalization, a correct hash value can only be computed after the entire XML document has been built!

HashXml(XmlElement)

Computes and updates the hash value of the message element.

public void HashXml(XmlElement xmlMsgRoot)

Parameters

xmlMsgRoot XmlElement

A message element previously built by BuildXml(XmlDocument, EbicsVersion).

ParseXml(XmlElement, EbicsVersion)

public override void ParseXml(XmlElement xmlElement, EbicsVersion nVersion)

Parameters

xmlElement XmlElement
nVersion EbicsVersion