1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-28 01:00:52 -07:00

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.
This commit is contained in:
Thomas Fitzsimmons 2019-07-24 04:45:07 -04:00
parent b38e326eea
commit a255caf19b

View file

@ -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:
;; <ns:Element AttrA="A" AttrB="B">Value here</ns:Element>
;; 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))