[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Default namespace for CAMT.053.
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Default namespace for CAMT.053. |
Date: |
Thu, 05 Mar 2020 16:36:32 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new 5413a5f Default namespace for CAMT.053.
5413a5f is described below
commit 5413a5f64cd06ac5b420e4c9be07de241fe886a6
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Mar 5 16:35:49 2020 +0100
Default namespace for CAMT.053.
---
.../tech/libeufin/sandbox/EbicsProtocolBackend.kt | 23 +++++++++++-----------
util/src/main/kotlin/XmlCombinators.kt | 3 +++
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index 04c7f50..586b6d3 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -263,19 +263,20 @@ private fun balance(base: XmlElementBuilder) {
*/
private fun constructCamtResponse(type: Int, customerId: Int, header:
EbicsRequest.Header): String {
val camt = constructXml(indent = true) {
- namespace("foo", "bar") // FIXME: set right namespace!
- root("foo:BkToCstmrAcctRpt") {
- element("GrpHdr") {
- element("MsgId") {
- // unique identifier for a message
- text("id under group header")
+ root("Document") {
+ attribute("xmlns",
"urn:iso:std:iso:20022:tech:xsd:camt.053.001.08")
+ element("BkToCstmrAcctRpt") {
+ element("GrpHdr") {
+ element("MsgId") {
+ // unique identifier for a message
+ text("id under group header")
+ }
}
- }
+ element(if (type == 52) "Rpt" else "Stmt") {
- element(if (type == 52) "Rpt" else "Stmt") {
-
- balance(this)
- iterHistory(customerId, header, this)
+ balance(this)
+ iterHistory(customerId, header, this)
+ }
}
}
}
diff --git a/util/src/main/kotlin/XmlCombinators.kt
b/util/src/main/kotlin/XmlCombinators.kt
index 9b1607c..d1cb592 100644
--- a/util/src/main/kotlin/XmlCombinators.kt
+++ b/util/src/main/kotlin/XmlCombinators.kt
@@ -46,6 +46,9 @@ class XmlDocumentBuilder {
maybeWriter = w
}
+ fun namespace(uri: String) {
+ writer.setDefaultNamespace(uri)
+ }
fun namespace(prefix: String, uri: String) {
writer.setPrefix(prefix, uri)
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Default namespace for CAMT.053.,
gnunet <=