diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2020-01-29 10:14:54 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2020-01-29 10:14:54 +0100 |
commit | 9d4859c76ca787678f7f2388aba1e51cd47d94a0 (patch) | |
tree | 609d23a8884999ab07ce260e4aff6b00c75411a8 /sandbox | |
parent | 7ce7b83e2dbbaff530e74b4b5006b742471d59f8 (diff) | |
download | libeufin-9d4859c76ca787678f7f2388aba1e51cd47d94a0.tar.gz libeufin-9d4859c76ca787678f7f2388aba1e51cd47d94a0.tar.bz2 libeufin-9d4859c76ca787678f7f2388aba1e51cd47d94a0.zip |
Fetch files as streams, and fix HEV response..
.. rendering from the Nexus.
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 1 | ||||
-rw-r--r-- | sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 10 |
2 files changed, 1 insertions, 10 deletions
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt index 6c252490..162353c5 100644 --- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt +++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt @@ -659,6 +659,7 @@ suspend fun ApplicationCall.ebicsweb() { } val strResp = XMLUtil.convertJaxbToString(hevResponse) + LOGGER.debug("HEV response: $strResp") respondText(strResp, ContentType.Application.Xml, HttpStatusCode.OK) } "ebicsNoPubKeyDigestsRequest" -> { diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt index 4e68623c..5736f636 100644 --- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt +++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -62,9 +62,7 @@ class BadAmount(badValue: Any?) : Exception("Value '${badValue}' is not a valid class UnacceptableFractional(badNumber: BigDecimal) : Exception( "Unacceptable fractional part ${badNumber}" ) - val LOGGER: Logger = LoggerFactory.getLogger("tech.libeufin.sandbox") - fun findCustomer(id: String?): BankCustomerEntity { val idN = try { @@ -94,7 +92,6 @@ fun findEbicsSubscriber(partnerID: String, userID: String, systemID: String?): E }.firstOrNull() } - data class Subscriber( val partnerID: String, val userID: String, @@ -108,14 +105,12 @@ data class SubscriberKeys( val signaturePublicKey: RSAPublicKey ) - data class EbicsHostPublicInfo( val hostID: String, val encryptionPublicKey: RSAPublicKey, val authenticationPublicKey: RSAPublicKey ) - inline fun <reified T> Document.toObject(): T { val jc = JAXBContext.newInstance(T::class.java) val m = jc.createUnmarshaller() @@ -129,7 +124,6 @@ fun BigDecimal.signToString(): String { } fun sampleData() { - transaction { val pairA = CryptoUtil.generateRsaKeyPair(2048) val pairB = CryptoUtil.generateRsaKeyPair(2048) @@ -141,14 +135,11 @@ fun sampleData() { encryptionPrivateKey = SerialBlob(pairB.private.encoded) signaturePrivateKey = SerialBlob(pairC.private.encoded) } - val customerEntity = BankCustomerEntity.new { addLogger(StdOutSqlLogger) customerName = "Mina" } - LOGGER.debug("Creating customer number: ${customerEntity.id}") - EbicsSubscriberEntity.new { partnerId = "PARTNER1" userId = "USER1" @@ -158,7 +149,6 @@ fun sampleData() { nextOrderID = 1 bankCustomer = customerEntity } - for (i in listOf<Amount>(Amount("-0.44"), Amount("6.02"))) { BankTransactionEntity.new { counterpart = "IBAN" |