From 079255d7bd96fef6fecbc2dbc39ea56073a7ade2 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Tue, 20 Mar 2018 00:25:25 -0700 Subject: [PATCH] Add support for base64 and hexBinary types --- lib/device.js | 2 ++ lib/session.coffee | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/device.js b/lib/device.js index 0e0904e..d70a7f9 100644 --- a/lib/device.js +++ b/lib/device.js @@ -51,6 +51,8 @@ function sanitizeParameterValue(parameterValue) { } break; case 'xsd:string': + case 'xsd:base64': + case 'xsd:hexBinary': if (typeof parameterValue[0] !== 'string') { parameterValue[0] = '' + parameterValue[0]; } diff --git a/lib/session.coffee b/lib/session.coffee index b08e306..af38b4e 100644 --- a/lib/session.coffee +++ b/lib/session.coffee @@ -447,7 +447,7 @@ runVirtualParameters = (sessionContext, provisions, startRevision, endRevision, _returnValue.value[1] = 'xsd:string' if not _returnValue.value[0]? or - _returnValue.value[1] not in ['xsd:int', 'xsd:unsignedInt', 'xsd:boolean', 'xsd:string', 'xsd:dateTime'] + _returnValue.value[1] not in ['xsd:int', 'xsd:unsignedInt', 'xsd:boolean', 'xsd:string', 'xsd:dateTime', 'xsd:base64', 'xsd:hexBinary'] if counter & 1 callback(null, {code: 'script', message: 'Invalid virtual parameter value attribute'}) return counter = 0