xml-toolkit 1.0.31 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/XMLMarshaller.js +1 -1
- package/package.json +1 -1
- package/test/test.js +14 -2
package/lib/XMLMarshaller.js
CHANGED
|
@@ -247,7 +247,7 @@ const XMLMarshaller = class {
|
|
|
247
247
|
|
|
248
248
|
case 'simpleType':
|
|
249
249
|
|
|
250
|
-
if (data !== null && typeof data === 'object') data = data [null]
|
|
250
|
+
if (data !== null && typeof data === 'object' && !(data instanceof Date)) data = data [null]
|
|
251
251
|
|
|
252
252
|
if (data != null) this.appendScalar (node, data)
|
|
253
253
|
|
package/package.json
CHANGED
package/test/test.js
CHANGED
|
@@ -392,12 +392,24 @@ async function test_009_schemata (fn) {
|
|
|
392
392
|
|
|
393
393
|
// console.log (xs.stringify ({AckResponse: null}))
|
|
394
394
|
|
|
395
|
+
/*
|
|
395
396
|
const data = {
|
|
396
397
|
AckRequest: {
|
|
397
398
|
// AckTargetMessage: {Id: 1, accepted: true, null: 2},
|
|
398
399
|
AckTargetMessage: 11111,
|
|
399
400
|
}
|
|
400
401
|
}
|
|
402
|
+
*/
|
|
403
|
+
|
|
404
|
+
const data = {GetResponseRequest: {
|
|
405
|
+
|
|
406
|
+
MessageTypeSelector: {
|
|
407
|
+
Id: 1,
|
|
408
|
+
Timestamp: new Date ()//.toJSON ()
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
}}
|
|
412
|
+
|
|
401
413
|
|
|
402
414
|
console.log (xs.stringify (data))
|
|
403
415
|
|
|
@@ -503,7 +515,7 @@ async function main () {
|
|
|
503
515
|
// test_007_wsdl ()
|
|
504
516
|
// await test_008_schemata ()
|
|
505
517
|
|
|
506
|
-
|
|
518
|
+
test_009_schemata ('smev-message-exchange-service-1.1.xsd')
|
|
507
519
|
// test_009_schemata ('sign.xsd')
|
|
508
520
|
|
|
509
521
|
// test_010_node ()
|
|
@@ -513,7 +525,7 @@ async function main () {
|
|
|
513
525
|
// test_012_parser ('param_types.xml')
|
|
514
526
|
// test_012_parser ('20040.wsdl')
|
|
515
527
|
|
|
516
|
-
test_013_soap ()
|
|
528
|
+
//test_013_soap ()
|
|
517
529
|
|
|
518
530
|
}
|
|
519
531
|
|