diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 7402464..bee3a12 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -536,9 +536,10 @@ soap-encode-xs-basic-type (number-to-string value)) (base64Binary - (unless (stringp value) - (error "Not a string value for base64Binary")) - (base64-encode-string (encode-coding-string value 'utf-8))) + (unless (and (stringp value) + (not (multibyte-string-p value))) + (error "Not a unibyte string value for base64Binary")) + (base64-encode-string value)) (otherwise (error "Don't know how to encode %s for type %s" @@ -682,7 +683,7 @@ soap-decode-xs-basic-type 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 +3097,9 @@ soap-invoke 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. `soap-invoke' base64-decodes +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