From c3ed95b1c57265138b7673ea37eef2d30204abcc Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Wed, 16 Mar 2016 09:15:17 -0400 Subject: [PATCH] Move xsd:base64Binary decoding fix to debbugs.el 0.9.1 * lisp/net/soap-client.el (soap-encode-xs-basic-type): Do not assume xsd:base64Binary values are UTF-8 strings. (soap-decode-xs-basic-type): Likewise. (soap-invoke): Document xsd:base64Binary handling. --- lisp/net/soap-client.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 7402464496..12c9f41955 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -538,7 +538,7 @@ This is a specialization of `soap-encode-value' for (base64Binary (unless (stringp value) (error "Not a string value for base64Binary")) - (base64-encode-string (encode-coding-string value 'utf-8))) + (base64-encode-string value)) (otherwise (error "Don't know how to encode %s for type %s" @@ -682,7 +682,7 @@ This is a specialization of `soap-decode-type' for decimal byte float double duration) (string-to-number (car contents))) (boolean (string= (downcase (car contents)) "true")) - (base64Binary (decode-coding-string (base64-decode-string (car contents)) 'utf-8)) + (base64Binary (base64-decode-string (car contents))) (anyType (soap-decode-any-type node)) (Array (soap-decode-array node)))))) @@ -3096,7 +3096,11 @@ the SOAP request. NOTE: The SOAP service provider should document the available operations and their parameters for the service. You can also use the `soap-inspect' function to browse the available -operations in a WSDL document." +operations in a WSDL document. + +NOTE: `soap-invoke' base64-decodes xsd:base64Binary return values +into unibyte strings; these byte-strings require further +interpretation by the caller." (apply #'soap-invoke-internal nil nil wsdl service operation-name parameters)) (defun soap-invoke-async (callback cbargs wsdl service operation-name -- 2.39.2