[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libebics] 01/02: fix Revision and Version for CAMT.053 typ
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libebics] 01/02: fix Revision and Version for CAMT.053 type. |
Date: |
Fri, 26 Oct 2018 12:23:04 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository libebics.
commit c70e99fd6a8f6b6da110891b7a020566e8a9f26f
Author: Marcello Stanisci <address@hidden>
AuthorDate: Fri Oct 26 12:17:26 2018 +0200
fix Revision and Version for CAMT.053 type.
---
src/libebics.c | 4 ++++
src/sandbox_tests.c | 6 +++---
src/xmlmessages.c | 34 +++++++++++++++++++++++++---------
src/xmlproto.c | 15 ++++++++-------
4 files changed, 40 insertions(+), 19 deletions(-)
diff --git a/src/libebics.c b/src/libebics.c
index a915766..27a5a0f 100644
--- a/src/libebics.c
+++ b/src/libebics.c
@@ -1027,6 +1027,10 @@ EBICS_generate_message_camt053
return NULL;
}
+ LOG (EBICS_LOGLEVEL_DEBUG,
+ "camt053, picked base document %s\n",
+ instance->name);
+
struct EBICS_MSG_Spec spec[] = {
EBICS_MSG_op_subcommand (EBICS_build_header_ebicsRequest,
header_args),
diff --git a/src/sandbox_tests.c b/src/sandbox_tests.c
index 4f6685f..2dda6ca 100644
--- a/src/sandbox_tests.c
+++ b/src/sandbox_tests.c
@@ -259,7 +259,7 @@ run ()
&camt053_args)))
{
LOG (EBICS_LOGLEVEL_ERROR,
- "Failed to instantiate HPB message\n");
+ "Failed to instantiate CAMT.053 message\n");
return;
}
@@ -269,11 +269,11 @@ run ()
cb))
{
LOG (EBICS_LOGLEVEL_ERROR,
- "Could not POST the HIA message\n");
+ "Could not POST the CAMT.053 message\n");
return;
}
#else
- write_xml_file ("HPB.xml",
+ write_xml_file ("CAMT.053.xml",
msg);
#endif
GNUNET_free (msg);
diff --git a/src/xmlmessages.c b/src/xmlmessages.c
index f38f3db..e8ca74d 100644
--- a/src/xmlmessages.c
+++ b/src/xmlmessages.c
@@ -191,6 +191,11 @@ EBICS_build_header_generic (void *cls,
struct EBICS_ARGS_build_header*) cls;
struct EBICS_MSG_Spec header[] = {
+
+ EBICS_MSG_op_set_string
+ ("//ebics:OrderDetails/ebics:OrderAttribute",
+ "UZHNN"),
+
EBICS_MSG_op_unique_choice ("//ebics:static"),
EBICS_MSG_op_set_string ("//ebics:static//ebics:HostID",
data->hostID),
@@ -218,8 +223,9 @@ EBICS_build_header_generic (void *cls,
*
*/
void
-EBICS_build_header_ebicsRequest (void *cls,
- struct EBICS_genex_document *document)
+EBICS_build_header_ebicsRequest
+ (void *cls,
+ struct EBICS_genex_document *document)
{
char nonce[EBICS_NONCE_STRING_SIZE];
char date[DATE_STR_SIZE];
@@ -228,6 +234,13 @@ EBICS_build_header_ebicsRequest (void *cls,
EBICS_MSG_op_subcommand (EBICS_build_header_generic,
cls),
+ EBICS_MSG_op_set_string
+ ("ebics:ebicsRequest/@Version",
+ EBICS_MSG_VERSION),
+ EBICS_MSG_op_set_uint
+ ("ebics:ebicsRequest/@Revision",
+ EBICS_REVISION),
+
EBICS_MSG_op_set_string ("//ebics:static//ebics:Nonce",
tools_get_nonce (nonce)),
@@ -582,15 +595,18 @@ EBICS_build_content_camt053 (void *cls,
struct EBICS_ARGS_build_content_camt053*) cls;
struct EBICS_MSG_Spec request[] = {
-
+
EBICS_MSG_op_unique_choice ("//ebics:OrderDetails"),
- EBICS_MSG_op_set_string ("//ebics:OrderDetails/ebics:OrderType",
- "C53"),
+ EBICS_MSG_op_set_string
+ ("//ebics:OrderDetails/ebics:OrderType",
+ "C53"),
EBICS_MSG_op_unique_choice ("//ebics:StandardOrderParams"),
- EBICS_MSG_op_set_date ("//ebics:StandardOrderParams//ebics:Start",
- data->startdate),
- EBICS_MSG_op_set_date("//ebics:StandardOrderParams//ebics:End",
- data->enddate),
+ EBICS_MSG_op_set_date
+ ("//ebics:StandardOrderParams//ebics:Start",
+ data->startdate),
+ EBICS_MSG_op_set_date
+ ("//ebics:StandardOrderParams//ebics:End",
+ data->enddate),
EBICS_MSG_op_del_node ("//ebics:body/ds:X509Data"),
EBICS_MSG_op_select_choice ("//ebics:body/schema:CHOICES",
0),
diff --git a/src/xmlproto.c b/src/xmlproto.c
index 24f0f67..b605d00 100644
--- a/src/xmlproto.c
+++ b/src/xmlproto.c
@@ -646,15 +646,16 @@ process_string (const struct EBICS_MSG_Spec *operation,
xmlChar *text = operation->data.set_string.value;
xmlNodePtr node;
xmlXPathObjectPtr xpathObjPtr = xmlXPathEvalExpression(BAD_CAST
operation->xpath, xpathCtxPtr);
- assert(NULL != xpathObjPtr);
- assert(NULL != xpathObjPtr->nodesetval);
+
+ LOG (EBICS_LOGLEVEL_DEBUG,
+ "process_string:"
+ " xpath: %s\n",
+ operation->xpath);
+
+ assert (NULL != xpathObjPtr);
+ assert (NULL != xpathObjPtr->nodesetval);
xmlNodeSetPtr nodeset = xpathObjPtr->nodesetval;
- LOG(EBICS_LOGLEVEL_INFO,"process_string: \
- xpath: %s Xpathresult: %p, \
- nodeset: %p, nodeNr: %u",
- operation->xpath, xpathObjPtr,
- nodeset, nodeset->nodeNr);
int i;
--
To stop receiving notification emails like this one, please contact
address@hidden