From a255caf19b9a3e45472d2a2d14fa8087eea838f1 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Wed, 24 Jul 2019 04:45:07 -0400 Subject: [PATCH] soap-client: Allow attributes and a value * lisp/net/soap-client.el (soap-encode-xs-basic-type): Allow attributes and a value to be specified in the same element. --- lisp/net/soap-client.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el index 1632ee13758..40c6e62500a 100644 --- a/lisp/net/soap-client.el +++ b/lisp/net/soap-client.el @@ -464,8 +464,14 @@ position. This is a specialization of `soap-encode-value' for `soap-xs-basic-type' objects." - (let ((kind (soap-xs-basic-type-kind type))) - + (let ((kind (soap-xs-basic-type-kind type)) + ;; Handle conversions of this form: + ;; (Element (AttrA . "A") (AttrB . "B") "Value here") + ;; to: + ;; Value here + ;; by assuming that if this is a list, it must have attributes + ;; preceding the basic value. + (value (if (listp value) (progn (car (last value))) value))) (when (eq kind 'anyType) (cond ((stringp value) (setq kind 'string)) -- 2.39.2