Function: soap-parse-port-type
soap-parse-port-type is a byte-compiled function defined in
soap-client.el.gz.
Signature
(soap-parse-port-type NODE)
Documentation
Parse NODE as a wsdl:portType and return the corresponding port.
Source Code
;; Defined in /usr/src/emacs/lisp/net/soap-client.el.gz
(defun soap-parse-port-type (node)
"Parse NODE as a wsdl:portType and return the corresponding port."
(cl-assert (eq (soap-l2wk (xml-node-name node)) 'wsdl:portType)
nil
"expecting wsdl:portType node got %s"
(soap-l2wk (xml-node-name node)))
(let* ((soap-target-xmlns (concat "urn:" (xml-get-attribute node 'name)))
(ns (make-soap-namespace :name soap-target-xmlns)))
(dolist (node (soap-xml-get-children1 node 'wsdl:operation))
(let ((o (soap-parse-operation node)))
(let ((other-operation (soap-namespace-get
(soap-element-name o) ns 'soap-operation-p)))
(if other-operation
;; Unfortunately, the Confluence WSDL defines two operations
;; named "search" which differ only in parameter names...
(soap-warning "Discarding duplicate operation: %s"
(soap-element-name o))
(progn
(soap-namespace-put o ns)
;; link all messages from this namespace, as this namespace
;; will be used for decoding the response.
(cl-destructuring-bind (name . message) (soap-operation-input o)
(soap-namespace-put-link name message ns))
(cl-destructuring-bind (name . message) (soap-operation-output o)
(soap-namespace-put-link name message ns))
(dolist (fault (soap-operation-faults o))
(cl-destructuring-bind (name . message) fault
(soap-namespace-put-link name message ns)))
)))))
(make-soap-port-type :name (xml-get-attribute node 'name)
:operations ns)))