;;;; soap-client.el -- Access SOAP web services from Emacs
-;; Copyright (C) 2009-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2014 Free Software Foundation, Inc.
;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
;; Created: December, 2009
;;;; Soap Envelope parsing
-(put 'soap-error
- 'error-conditions
- '(error soap-error))
-(put 'soap-error 'error-message "SOAP error")
+(define-error 'soap-error "SOAP error")
(defun soap-parse-envelope (node operation wsdl)
"Parse the SOAP envelope in NODE and return the response.
(defun soap-encode-simple-type (xml-tag value type)
"Encode inside XML-TAG the LISP VALUE according to TYPE."
- ;; Validate VALUE agains the simple type's enumeration, than just encode it
+ ;; Validate VALUE against the simple type's enumeration, than just encode it
;; using `soap-encode-basic-type'
(let ((enumeration (soap-simple-type-enumeration type)))
(url-package-name "soap-client.el")
(url-package-version "1.0")
(url-http-version "1.0")
- (url-request-data (soap-create-envelope operation parameters wsdl))
+ (url-request-data
+ ;; url-request-data expects a unibyte string already encoded...
+ (encode-coding-string
+ (soap-create-envelope operation parameters wsdl)
+ 'utf-8))
(url-mime-charset-string "utf-8;q=1, iso-8859-1;q=0.5")
(url-request-coding-system 'utf-8)
(url-http-attempt-keepalives t)