2015-11-12 04:43:50 +00:00
|
|
|
|
;;; soap-inspect.el --- Interactive WSDL inspector -*- lexical-binding: t -*-
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2024-01-02 01:47:10 +00:00
|
|
|
|
;; Copyright (C) 2010-2024 Free Software Foundation, Inc.
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2011-03-05 10:32:10 +00:00
|
|
|
|
;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
|
2011-02-17 04:41:29 +00:00
|
|
|
|
;; Created: October 2010
|
|
|
|
|
;; Keywords: soap, web-services, comm, hypermedia
|
2011-03-05 10:32:10 +00:00
|
|
|
|
;; Package: soap-client
|
2021-09-16 13:35:10 +00:00
|
|
|
|
;; URL: https://github.com/alex-hhh/emacs-soap-client
|
2011-02-17 04:41:29 +00:00
|
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
2011-02-16 09:25:37 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
2011-02-17 04:41:29 +00:00
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
2011-02-16 09:25:37 +00:00
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 22:52:52 +00:00
|
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
2011-02-16 19:33:35 +00:00
|
|
|
|
;;
|
2011-02-16 09:25:37 +00:00
|
|
|
|
;; This package provides an inspector for a WSDL document loaded with
|
|
|
|
|
;; `soap-load-wsdl' or `soap-load-wsdl-from-url'. To use it, evaluate:
|
|
|
|
|
;;
|
|
|
|
|
;; (soap-inspect *wsdl*)
|
|
|
|
|
;;
|
|
|
|
|
;; This will pop-up the inspector buffer. You can click on ports, operations
|
|
|
|
|
;; and types to explore the structure of the wsdl document.
|
|
|
|
|
;;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(require 'cl-lib)
|
2011-02-16 19:33:35 +00:00
|
|
|
|
(require 'soap-client)
|
|
|
|
|
|
2011-02-16 09:25:37 +00:00
|
|
|
|
;;; sample-value
|
|
|
|
|
|
|
|
|
|
(defun soap-sample-value (type)
|
|
|
|
|
"Provide a sample value for TYPE, a WSDL type.
|
|
|
|
|
A sample value is a LISP value which soap-client.el will accept
|
|
|
|
|
for encoding it using TYPE when making SOAP requests.
|
|
|
|
|
|
|
|
|
|
This is a generic function, depending on TYPE a specific function
|
|
|
|
|
will be called."
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(let ((sample-value (get (soap-type-of type) 'soap-sample-value)))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
(if sample-value
|
|
|
|
|
(funcall sample-value type)
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(error "Cannot provide sample value for type %s" (soap-type-of type)))))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(defun soap-sample-value-for-xs-basic-type (type)
|
|
|
|
|
"Provide a sample value for TYPE, an xs-basic-type.
|
|
|
|
|
This is a specialization of `soap-sample-value' for xs-basic-type
|
|
|
|
|
objects."
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(cl-case (soap-xs-basic-type-kind type)
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(string "a string")
|
|
|
|
|
(anyURI "an URI")
|
|
|
|
|
(QName "a QName")
|
|
|
|
|
(dateTime "a time-value-p or string")
|
|
|
|
|
(boolean "t or nil")
|
|
|
|
|
((long int integer byte unsignedInt) 42)
|
|
|
|
|
((float double) 3.14)
|
|
|
|
|
(base64Binary "a string")
|
|
|
|
|
(t (format "%s" (soap-xs-basic-type-kind type)))))
|
|
|
|
|
|
|
|
|
|
(defun soap-sample-value-for-xs-element (element)
|
|
|
|
|
"Provide a sample value for ELEMENT, a WSDL element.
|
|
|
|
|
This is a specialization of `soap-sample-value' for xs-element
|
|
|
|
|
objects."
|
|
|
|
|
(if (soap-xs-element-name element)
|
|
|
|
|
(cons (intern (soap-xs-element-name element))
|
|
|
|
|
(soap-sample-value (soap-xs-element-type element)))
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(soap-sample-value (soap-xs-element-type element))))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
|
|
|
|
|
(defun soap-sample-value-for-xs-attribute (attribute)
|
|
|
|
|
"Provide a sample value for ATTRIBUTE, a WSDL attribute.
|
|
|
|
|
This is a specialization of `soap-sample-value' for
|
|
|
|
|
soap-xs-attribute objects."
|
|
|
|
|
(if (soap-xs-attribute-name attribute)
|
|
|
|
|
(cons (intern (soap-xs-attribute-name attribute))
|
|
|
|
|
(soap-sample-value (soap-xs-attribute-type attribute)))
|
|
|
|
|
(soap-sample-value (soap-xs-attribute-type attribute))))
|
|
|
|
|
|
|
|
|
|
(defun soap-sample-value-for-xs-attribute-group (attribute-group)
|
|
|
|
|
"Provide a sample value for ATTRIBUTE-GROUP, a WSDL attribute group.
|
|
|
|
|
This is a specialization of `soap-sample-value' for
|
|
|
|
|
soap-xs-attribute objects."
|
|
|
|
|
(let ((sample-values nil))
|
|
|
|
|
(dolist (attribute (soap-xs-attribute-group-attributes attribute-group))
|
|
|
|
|
(if (soap-xs-attribute-name attribute)
|
|
|
|
|
(setq sample-values
|
|
|
|
|
(append sample-values
|
|
|
|
|
(cons (intern (soap-xs-attribute-name attribute))
|
|
|
|
|
(soap-sample-value (soap-xs-attribute-type
|
|
|
|
|
attribute)))))
|
|
|
|
|
(setq sample-values
|
|
|
|
|
(append sample-values
|
|
|
|
|
(soap-sample-value
|
|
|
|
|
(soap-xs-attribute-type attribute))))))))
|
|
|
|
|
|
|
|
|
|
(defun soap-sample-value-for-xs-simple-type (type)
|
|
|
|
|
"Provide a sample value for TYPE, a `soap-xs-simple-type'.
|
|
|
|
|
This is a specialization of `soap-sample-value' for
|
|
|
|
|
`soap-xs-simple-type' objects."
|
|
|
|
|
(append
|
2021-03-08 15:11:22 +00:00
|
|
|
|
(mapcar #'soap-sample-value-for-xs-attribute
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(soap-xs-type-attributes type))
|
|
|
|
|
(cond
|
|
|
|
|
((soap-xs-simple-type-enumeration type)
|
|
|
|
|
(let ((enumeration (soap-xs-simple-type-enumeration type)))
|
2021-09-24 17:41:03 +00:00
|
|
|
|
(and enumeration (seq-random-elt enumeration))))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
((soap-xs-simple-type-pattern type)
|
|
|
|
|
(format "a string matching %s" (soap-xs-simple-type-pattern type)))
|
|
|
|
|
((soap-xs-simple-type-length-range type)
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(cl-destructuring-bind (low . high) (soap-xs-simple-type-length-range type)
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(cond
|
2017-05-24 18:18:39 +00:00
|
|
|
|
((and low high)
|
|
|
|
|
(format "a string between %d and %d chars long" low high))
|
|
|
|
|
(low (format "a string at least %d chars long" low))
|
|
|
|
|
(high (format "a string at most %d chars long" high))
|
2021-09-21 15:52:53 +00:00
|
|
|
|
(t "a string OOPS"))))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
((soap-xs-simple-type-integer-range type)
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(cl-destructuring-bind (min . max) (soap-xs-simple-type-integer-range type)
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(cond
|
2017-05-24 18:18:39 +00:00
|
|
|
|
((and min max) (+ min (random (- max min))))
|
|
|
|
|
(min (+ min (random 10)))
|
|
|
|
|
(max (random max))
|
|
|
|
|
(t (random 100)))))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
((consp (soap-xs-simple-type-base type)) ; an union of values
|
|
|
|
|
(let ((base (soap-xs-simple-type-base type)))
|
2021-09-24 17:41:03 +00:00
|
|
|
|
(soap-sample-value (and base (seq-random-elt base)))))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
((soap-xs-basic-type-p (soap-xs-simple-type-base type))
|
|
|
|
|
(soap-sample-value (soap-xs-simple-type-base type))))))
|
|
|
|
|
|
|
|
|
|
(defun soap-sample-value-for-xs-complex-type (type)
|
|
|
|
|
"Provide a sample value for TYPE, a `soap-xs-complex-type'.
|
|
|
|
|
This is a specialization of `soap-sample-value' for
|
|
|
|
|
`soap-xs-complex-type' objects."
|
|
|
|
|
(append
|
2021-03-08 15:11:22 +00:00
|
|
|
|
(mapcar #'soap-sample-value-for-xs-attribute
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(soap-xs-type-attributes type))
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(cl-case (soap-xs-complex-type-indicator type)
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(array
|
|
|
|
|
(let* ((element-type (soap-xs-complex-type-base type))
|
|
|
|
|
(sample1 (soap-sample-value element-type))
|
|
|
|
|
(sample2 (soap-sample-value element-type)))
|
|
|
|
|
;; Our sample value is a vector of two elements, but any number of
|
|
|
|
|
;; elements are permissible
|
|
|
|
|
(vector sample1 sample2 '&etc)))
|
|
|
|
|
((sequence choice all)
|
|
|
|
|
(let ((base (soap-xs-complex-type-base type)))
|
|
|
|
|
(let ((value (append (and base (soap-sample-value base))
|
|
|
|
|
(mapcar #'soap-sample-value
|
|
|
|
|
(soap-xs-complex-type-elements type)))))
|
|
|
|
|
(if (eq (soap-xs-complex-type-indicator type) 'choice)
|
|
|
|
|
(cons '***choice-of*** value)
|
|
|
|
|
value)))))))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
|
|
|
|
(defun soap-sample-value-for-message (message)
|
|
|
|
|
"Provide a sample value for a WSDL MESSAGE.
|
2015-10-24 12:33:18 +00:00
|
|
|
|
This is a specialization of `soap-sample-value' for
|
|
|
|
|
`soap-message' objects."
|
2011-02-16 09:25:37 +00:00
|
|
|
|
;; NOTE: parameter order is not considered.
|
|
|
|
|
(let (sample-value)
|
|
|
|
|
(dolist (part (soap-message-parts message))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(push (soap-sample-value (cdr part)) sample-value))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
(nreverse sample-value)))
|
|
|
|
|
|
|
|
|
|
(progn
|
|
|
|
|
;; Install soap-sample-value methods for our types
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-basic-type))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
'soap-sample-value
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-sample-value-for-xs-basic-type)
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-element))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
'soap-sample-value
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-sample-value-for-xs-element)
|
2012-04-25 10:28:29 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-attribute))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
'soap-sample-value
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-sample-value-for-xs-attribute)
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-attribute))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
'soap-sample-value
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-sample-value-for-xs-attribute-group)
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-simple-type))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
'soap-sample-value
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-sample-value-for-xs-simple-type)
|
2015-10-24 12:33:18 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-complex-type))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
'soap-sample-value
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-sample-value-for-xs-complex-type)
|
2015-10-24 12:33:18 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-message))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
'soap-sample-value
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-sample-value-for-message))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; soap-inspect
|
|
|
|
|
|
2021-01-31 15:30:55 +00:00
|
|
|
|
(defvar-local soap-inspect-previous-items nil
|
2011-02-16 09:25:37 +00:00
|
|
|
|
"A stack of previously inspected items in the *soap-inspect* buffer.
|
|
|
|
|
Used to implement the BACK button.")
|
|
|
|
|
|
2021-01-31 15:30:55 +00:00
|
|
|
|
(defvar-local soap-inspect-current-item nil
|
2011-02-16 09:25:37 +00:00
|
|
|
|
"The current item being inspected in the *soap-inspect* buffer.")
|
|
|
|
|
|
|
|
|
|
(defun soap-inspect (element)
|
|
|
|
|
"Inspect a SOAP ELEMENT in the *soap-inspect* buffer.
|
|
|
|
|
The buffer is populated with information about ELEMENT with links
|
|
|
|
|
to its sub elements. If ELEMENT is the WSDL document itself, the
|
|
|
|
|
entire WSDL can be inspected."
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(let ((inspect (get (soap-type-of element) 'soap-inspect)))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
(unless inspect
|
2021-09-27 21:56:55 +00:00
|
|
|
|
(error "soap-inspect: No inspector for element"))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
|
|
|
|
(with-current-buffer (get-buffer-create "*soap-inspect*")
|
|
|
|
|
(setq buffer-read-only t)
|
|
|
|
|
(let ((inhibit-read-only t))
|
|
|
|
|
(erase-buffer)
|
2011-02-16 19:33:35 +00:00
|
|
|
|
|
2011-02-16 09:25:37 +00:00
|
|
|
|
(when soap-inspect-current-item
|
|
|
|
|
(push soap-inspect-current-item
|
|
|
|
|
soap-inspect-previous-items))
|
|
|
|
|
(setq soap-inspect-current-item element)
|
2011-02-16 19:33:35 +00:00
|
|
|
|
|
2011-02-16 09:25:37 +00:00
|
|
|
|
(funcall inspect element)
|
|
|
|
|
|
|
|
|
|
(unless (null soap-inspect-previous-items)
|
|
|
|
|
(insert "\n\n")
|
|
|
|
|
(insert-text-button
|
|
|
|
|
"[back]"
|
|
|
|
|
'type 'soap-client-describe-back-link
|
|
|
|
|
'item element)
|
|
|
|
|
(insert "\n"))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(pop-to-buffer (current-buffer))))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(define-button-type 'soap-client-describe-link
|
2017-05-24 18:18:39 +00:00
|
|
|
|
'face 'link
|
|
|
|
|
'help-echo "mouse-2, RET: describe item"
|
|
|
|
|
'follow-link t
|
|
|
|
|
'action (lambda (button)
|
|
|
|
|
(let ((item (button-get button 'item)))
|
|
|
|
|
(soap-inspect item)))
|
|
|
|
|
'skip t)
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
|
|
|
|
(define-button-type 'soap-client-describe-back-link
|
2017-05-24 18:18:39 +00:00
|
|
|
|
'face 'link
|
|
|
|
|
'help-echo "mouse-2, RET: browse the previous item"
|
|
|
|
|
'follow-link t
|
|
|
|
|
'action (lambda (_button)
|
|
|
|
|
(let ((item (pop soap-inspect-previous-items)))
|
|
|
|
|
(when item
|
|
|
|
|
(setq soap-inspect-current-item nil)
|
|
|
|
|
(soap-inspect item))))
|
|
|
|
|
'skip t)
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
|
|
|
|
(defun soap-insert-describe-button (element)
|
|
|
|
|
"Insert a button to inspect ELEMENT when pressed."
|
|
|
|
|
(insert-text-button
|
|
|
|
|
(soap-element-fq-name element)
|
|
|
|
|
'type 'soap-client-describe-link
|
|
|
|
|
'item element))
|
|
|
|
|
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(defun soap-inspect-xs-basic-type (type)
|
|
|
|
|
"Insert information about TYPE, a soap-xs-basic-type, in the current buffer."
|
|
|
|
|
(insert "Basic type: " (soap-element-fq-name type))
|
|
|
|
|
(insert "\nSample value:\n")
|
|
|
|
|
(pp (soap-sample-value type) (current-buffer)))
|
|
|
|
|
|
|
|
|
|
(defun soap-inspect-xs-element (element)
|
|
|
|
|
"Insert information about ELEMENT, a soap-xs-element, in the current buffer."
|
|
|
|
|
(insert "Element: " (soap-element-fq-name element))
|
|
|
|
|
(insert "\nType: ")
|
|
|
|
|
(soap-insert-describe-button (soap-xs-element-type element))
|
|
|
|
|
(insert "\nAttributes:")
|
|
|
|
|
(when (soap-xs-element-optional? element)
|
|
|
|
|
(insert " optional"))
|
|
|
|
|
(when (soap-xs-element-multiple? element)
|
|
|
|
|
(insert " multiple"))
|
|
|
|
|
(insert "\nSample value:\n")
|
|
|
|
|
(pp (soap-sample-value element) (current-buffer)))
|
|
|
|
|
|
|
|
|
|
(defun soap-inspect-xs-attribute (attribute)
|
2017-05-24 19:01:01 +00:00
|
|
|
|
"Insert information about ATTRIBUTE in the current buffer.
|
|
|
|
|
ATTRIBUTE is a soap-xs-attribute."
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(insert "Attribute: " (soap-element-fq-name attribute))
|
|
|
|
|
(insert "\nType: ")
|
|
|
|
|
(soap-insert-describe-button (soap-xs-attribute-type attribute))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
(insert "\nSample value:\n")
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(pp (soap-sample-value attribute) (current-buffer)))
|
|
|
|
|
|
|
|
|
|
(defun soap-inspect-xs-attribute-group (attribute-group)
|
2017-05-24 19:01:01 +00:00
|
|
|
|
"Insert information about ATTRIBUTE-GROUP in the current buffer.
|
|
|
|
|
ATTRIBUTE is a soap-xs-attribute-group."
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(insert "Attribute group: " (soap-element-fq-name attribute-group))
|
|
|
|
|
(insert "\nSample values:\n")
|
|
|
|
|
(pp (soap-sample-value attribute-group) (current-buffer)))
|
|
|
|
|
|
|
|
|
|
(defun soap-inspect-xs-simple-type (type)
|
|
|
|
|
"Insert information about TYPE, a soap-xs-simple-type, in the current buffer."
|
|
|
|
|
(insert "Simple type: " (soap-element-fq-name type))
|
|
|
|
|
(insert "\nBase: " )
|
|
|
|
|
(if (listp (soap-xs-simple-type-base type))
|
|
|
|
|
(let ((first-time t))
|
|
|
|
|
(dolist (b (soap-xs-simple-type-base type))
|
|
|
|
|
(unless first-time
|
|
|
|
|
(insert ", ")
|
|
|
|
|
(setq first-time nil))
|
|
|
|
|
(soap-insert-describe-button b)))
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(soap-insert-describe-button (soap-xs-simple-type-base type)))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(insert "\nAttributes: ")
|
|
|
|
|
(dolist (attribute (soap-xs-simple-type-attributes type))
|
|
|
|
|
(let ((name (or (soap-xs-attribute-name attribute) "*inline*"))
|
|
|
|
|
(type (soap-xs-attribute-type attribute)))
|
|
|
|
|
(insert "\n\t")
|
|
|
|
|
(insert name)
|
|
|
|
|
(insert "\t")
|
|
|
|
|
(soap-insert-describe-button type)))
|
|
|
|
|
(when (soap-xs-simple-type-enumeration type)
|
2015-11-10 18:22:29 +00:00
|
|
|
|
(insert "\nEnumeration values: ")
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(dolist (e (soap-xs-simple-type-enumeration type))
|
|
|
|
|
(insert "\n\t")
|
|
|
|
|
(pp e)))
|
|
|
|
|
(when (soap-xs-simple-type-pattern type)
|
|
|
|
|
(insert "\nPattern: " (soap-xs-simple-type-pattern type)))
|
|
|
|
|
(when (car (soap-xs-simple-type-length-range type))
|
|
|
|
|
(insert "\nMin length: "
|
|
|
|
|
(number-to-string (car (soap-xs-simple-type-length-range type)))))
|
|
|
|
|
(when (cdr (soap-xs-simple-type-length-range type))
|
|
|
|
|
(insert "\nMin length: "
|
|
|
|
|
(number-to-string (cdr (soap-xs-simple-type-length-range type)))))
|
|
|
|
|
(when (car (soap-xs-simple-type-integer-range type))
|
|
|
|
|
(insert "\nMin value: "
|
|
|
|
|
(number-to-string (car (soap-xs-simple-type-integer-range type)))))
|
|
|
|
|
(when (cdr (soap-xs-simple-type-integer-range type))
|
|
|
|
|
(insert "\nMin value: "
|
|
|
|
|
(number-to-string (cdr (soap-xs-simple-type-integer-range type)))))
|
|
|
|
|
(insert "\nSample value:\n")
|
|
|
|
|
(pp (soap-sample-value type) (current-buffer)))
|
|
|
|
|
|
|
|
|
|
(defun soap-inspect-xs-complex-type (type)
|
|
|
|
|
"Insert information about TYPE in the current buffer.
|
lisp/*.el: Fix typos and other trivial doc fixes
* lisp/allout-widgets.el (allout-widgets-auto-activation)
(allout-current-decorated-p):
* lisp/auth-source.el (auth-source-protocols):
* lisp/autorevert.el (auto-revert-set-timer):
* lisp/battery.el (battery-mode-line-limit):
* lisp/calc/calcalg3.el (math-map-binop):
* lisp/calendar/cal-dst.el (calendar-dst-find-startend):
* lisp/calendar/cal-mayan.el (calendar-mayan-long-count-to-absolute):
* lisp/calendar/calendar.el (calendar-date-echo-text)
(calendar-generate-month, calendar-string-spread)
(calendar-cursor-to-date, calendar-read, calendar-read-date)
(calendar-mark-visible-date, calendar-dayname-on-or-before):
* lisp/calendar/diary-lib.el (diary-ordinal-suffix):
* lisp/cedet/ede/autoconf-edit.el (autoconf-new-program)
(autoconf-find-last-macro, autoconf-parameter-strip):
* lisp/cedet/ede/config.el (ede-target-with-config-build):
* lisp/cedet/ede/linux.el (ede-linux--detect-architecture)
(ede-linux--get-architecture):
* lisp/cedet/semantic/complete.el (semantic-collector-calculate-cache)
(semantic-displayer-abstract, semantic-displayer-point-position):
* lisp/cedet/semantic/format.el (semantic-format-face-alist)
(semantic-format-tag-short-doc):
* lisp/cedet/semantic/fw.el (semantic-find-file-noselect):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-work-idle-time)
(semantic-idle-breadcrumbs-display-function)
(semantic-idle-breadcrumbs-format-tag-list-function):
* lisp/cedet/semantic/lex.el (semantic-lex-map-types)
(define-lex, define-lex-block-type-analyzer):
* lisp/cedet/semantic/senator.el (senator-search-default-tag-filter):
* lisp/cedet/semantic/symref.el (semantic-symref-result)
(semantic-symref-hit-to-tag-via-db):
* lisp/cedet/semantic/symref.el (semantic-symref-tool-baseclass):
* lisp/cedet/semantic/tag.el (semantic-tag-new-variable)
(semantic-tag-new-include, semantic-tag-new-package)
(semantic-tag-set-faux, semantic-create-tag-proxy)
(semantic-tag-function-parent)
(semantic-tag-components-with-overlays):
* lisp/cedet/srecode/cpp.el (srecode-cpp-namespaces)
(srecode-semantic-handle-:c, srecode-semantic-apply-tag-to-dict):
* lisp/cedet/srecode/dictionary.el (srecode-create-dictionary)
(srecode-dictionary-add-entries, srecode-dictionary-lookup-name)
(srecode-create-dictionaries-from-tags):
* lisp/cmuscheme.el (scheme-compile-region):
* lisp/color.el (color-lab-to-lch):
* lisp/doc-view.el (doc-view-image-width)
(doc-view-set-up-single-converter):
* lisp/dynamic-setting.el (font-setting-change-default-font)
(dynamic-setting-handle-config-changed-event):
* lisp/elec-pair.el (electric-pair-text-pairs)
(electric-pair-skip-whitespace-function)
(electric-pair-string-bound-function):
* lisp/emacs-lisp/avl-tree.el (avl-tree--del-balance)
(avl-tree-member, avl-tree-mapcar, avl-tree-iter):
* lisp/emacs-lisp/bytecomp.el (byte-compile-generate-call-tree):
* lisp/emacs-lisp/checkdoc.el (checkdoc-autofix-flag)
(checkdoc-spellcheck-documentation-flag, checkdoc-ispell)
(checkdoc-ispell-current-buffer, checkdoc-ispell-interactive)
(checkdoc-ispell-message-interactive)
(checkdoc-ispell-message-text, checkdoc-ispell-start)
(checkdoc-ispell-continue, checkdoc-ispell-comments)
(checkdoc-ispell-defun):
* lisp/emacs-lisp/cl-generic.el (cl--generic-search-method):
* lisp/emacs-lisp/eieio-custom.el (eieio-read-customization-group):
* lisp/emacs-lisp/lisp.el (forward-sexp, up-list):
* lisp/emacs-lisp/package-x.el (package--archive-contents-from-file):
* lisp/emacs-lisp/package.el (package-desc)
(package--make-autoloads-and-stuff, package-hidden-regexps):
* lisp/emacs-lisp/tcover-ses.el (ses-exercise-startup):
* lisp/emacs-lisp/testcover.el (testcover-nohits)
(testcover-1value):
* lisp/epg.el (epg-receive-keys, epg-start-edit-key):
* lisp/erc/erc-backend.el (erc-server-processing-p)
(erc-split-line-length, erc-server-coding-system)
(erc-server-send, erc-message):
* lisp/erc/erc-button.el (erc-button-face, erc-button-alist)
(erc-browse-emacswiki):
* lisp/erc/erc-ezbounce.el (erc-ezbounce, erc-ezb-get-login):
* lisp/erc/erc-fill.el (erc-fill-variable-maximum-indentation):
* lisp/erc/erc-log.el (erc-current-logfile):
* lisp/erc/erc-match.el (erc-log-match-format)
(erc-text-matched-hook):
* lisp/erc/erc-netsplit.el (erc-netsplit, erc-netsplit-debug):
* lisp/erc/erc-networks.el (erc-server-alist)
(erc-networks-alist, erc-current-network):
* lisp/erc/erc-ring.el (erc-input-ring-index):
* lisp/erc/erc-speedbar.el (erc-speedbar)
(erc-speedbar-update-channel):
* lisp/erc/erc-stamp.el (erc-timestamp-only-if-changed-flag):
* lisp/erc/erc-track.el (erc-track-position-in-mode-line)
(erc-track-remove-from-mode-line, erc-modified-channels-update)
(erc-track-last-non-erc-buffer, erc-track-sort-by-importance)
(erc-track-get-active-buffer):
* lisp/erc/erc.el (erc-get-channel-user-list)
(erc-echo-notice-hook, erc-echo-notice-always-hook)
(erc-wash-quit-reason, erc-format-@nick):
* lisp/ffap.el (ffap-latex-mode):
* lisp/files.el (abort-if-file-too-large)
(dir-locals--get-sort-score, buffer-stale--default-function):
* lisp/filesets.el (filesets-tree-max-level, filesets-data)
(filesets-update-pre010505):
* lisp/gnus/gnus-agent.el (gnus-agent-flush-cache):
* lisp/gnus/gnus-art.el (gnus-article-encrypt-protocol)
(gnus-button-prefer-mid-or-mail):
* lisp/gnus/gnus-cus.el (gnus-group-parameters):
* lisp/gnus/gnus-demon.el (gnus-demon-handlers)
(gnus-demon-run-callback):
* lisp/gnus/gnus-dired.el (gnus-dired-print):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-buffer):
* lisp/gnus/gnus-range.el (gnus-range-normalize):
* lisp/gnus/gnus-spec.el (gnus-pad-form):
* lisp/gnus/gnus-srvr.el (gnus-server-agent, gnus-server-cloud)
(gnus-server-opened, gnus-server-closed, gnus-server-denied)
(gnus-server-offline):
* lisp/gnus/gnus-sum.el (gnus-refer-thread-use-nnir)
(gnus-refer-thread-limit-to-thread)
(gnus-summary-limit-include-thread, gnus-summary-refer-thread)
(gnus-summary-find-matching):
* lisp/gnus/gnus-util.el (gnus-rescale-image):
* lisp/gnus/gnus.el (gnus-summary-line-format, gnus-no-server):
* lisp/gnus/mail-source.el (mail-source-incoming-file-prefix):
* lisp/gnus/message.el (message-cite-reply-position)
(message-cite-style-outlook, message-cite-style-thunderbird)
(message-cite-style-gmail, message--send-mail-maybe-partially):
* lisp/gnus/mm-extern.el (mm-inline-external-body):
* lisp/gnus/mm-partial.el (mm-inline-partial):
* lisp/gnus/mml-sec.el (mml-secure-message-sign)
(mml-secure-message-sign-encrypt, mml-secure-message-encrypt):
* lisp/gnus/mml2015.el (mml2015-epg-key-image)
(mml2015-epg-key-image-to-string):
* lisp/gnus/nndiary.el (nndiary-reminders, nndiary-get-new-mail):
* lisp/gnus/nnheader.el (nnheader-directory-files-is-safe):
* lisp/gnus/nnir.el (nnir-search-history)
(nnir-imap-search-other, nnir-artlist-length)
(nnir-artlist-article, nnir-artitem-group, nnir-artitem-number)
(nnir-artitem-rsv, nnir-article-group, nnir-article-number)
(nnir-article-rsv, nnir-article-ids, nnir-categorize)
(nnir-retrieve-headers-override-function)
(nnir-imap-default-search-key, nnir-hyrex-additional-switches)
(gnus-group-make-nnir-group, nnir-run-namazu, nnir-read-parms)
(nnir-read-parm, nnir-read-server-parm, nnir-search-thread):
* lisp/gnus/nnmairix.el (nnmairix-default-group)
(nnmairix-propagate-marks):
* lisp/gnus/smime.el (smime-keys, smime-crl-check)
(smime-verify-buffer, smime-noverify-buffer):
* lisp/gnus/spam-report.el (spam-report-url-ping-mm-url):
* lisp/gnus/spam.el (spam-spamassassin-positive-spam-flag-header)
(spam-spamassassin-spam-status-header, spam-sa-learn-rebuild)
(spam-classifications, spam-check-stat, spam-spamassassin-score):
* lisp/help.el (describe-minor-mode-from-symbol):
* lisp/hippie-exp.el (hippie-expand-ignore-buffers):
* lisp/htmlfontify.el (hfy-optimizations, hfy-face-resolve-face)
(hfy-begin-span):
* lisp/ibuf-ext.el (ibuffer-update-saved-filters-format)
(ibuffer-saved-filters, ibuffer-old-saved-filters-warning)
(ibuffer-filtering-qualifiers, ibuffer-repair-saved-filters)
(eval, ibuffer-unary-operand, file-extension, directory):
* lisp/image-dired.el (image-dired-cmd-pngcrush-options):
* lisp/image-mode.el (image-toggle-display):
* lisp/international/ccl.el (ccl-compile-read-multibyte-character)
(ccl-compile-write-multibyte-character):
* lisp/international/kkc.el (kkc-save-init-file):
* lisp/international/latin1-disp.el (latin1-display):
* lisp/international/ogonek.el (ogonek-name-encoding-alist)
(ogonek-information, ogonek-lookup-encoding)
(ogonek-deprefixify-region):
* lisp/isearch.el (isearch-filter-predicate)
(isearch--momentary-message):
* lisp/jsonrpc.el (jsonrpc-connection-send)
(jsonrpc-process-connection, jsonrpc-shutdown)
(jsonrpc--async-request-1):
* lisp/language/tibet-util.el (tibetan-char-p):
* lisp/mail/feedmail.el (feedmail-queue-use-send-time-for-date)
(feedmail-last-chance-hook, feedmail-before-fcc-hook)
(feedmail-send-it-immediately-wrapper, feedmail-find-eoh):
* lisp/mail/hashcash.el (hashcash-generate-payment)
(hashcash-generate-payment-async, hashcash-insert-payment)
(hashcash-verify-payment):
* lisp/mail/rmail.el (rmail-movemail-variant-in-use)
(rmail-get-attr-value):
* lisp/mail/rmailmm.el (rmail-mime-prefer-html, rmail-mime):
* lisp/mail/rmailsum.el (rmail-summary-show-message):
* lisp/mail/supercite.el (sc-raw-mode-toggle):
* lisp/man.el (Man-start-calling):
* lisp/mh-e/mh-acros.el (mh-do-at-event-location)
(mh-iterate-on-messages-in-region, mh-iterate-on-range):
* lisp/mh-e/mh-alias.el (mh-alias-system-aliases)
(mh-alias-reload, mh-alias-ali)
(mh-alias-canonicalize-suggestion, mh-alias-add-alias-to-file)
(mh-alias-add-alias):
* lisp/mouse.el (mouse-save-then-kill):
* lisp/net/browse-url.el (browse-url-default-macosx-browser):
* lisp/net/eudc.el (eudc-set, eudc-variable-protocol-value)
(eudc-variable-server-value, eudc-update-variable)
(eudc-expand-inline):
* lisp/net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result):
* lisp/net/eudcb-ldap.el (eudc-ldap-get-field-list):
* lisp/net/pop3.el (pop3-list):
* lisp/net/soap-client.el (soap-namespace-put)
(soap-xs-parse-sequence, soap-parse-envelope):
* lisp/net/soap-inspect.el (soap-inspect-xs-complex-type):
* lisp/nxml/rng-xsd.el (rng-xsd-date-to-days):
* lisp/org/ob-C.el (org-babel-prep-session:C)
(org-babel-load-session:C):
* lisp/org/ob-J.el (org-babel-execute:J):
* lisp/org/ob-asymptote.el (org-babel-prep-session:asymptote):
* lisp/org/ob-awk.el (org-babel-execute:awk):
* lisp/org/ob-core.el (org-babel-process-file-name):
* lisp/org/ob-ebnf.el (org-babel-execute:ebnf):
* lisp/org/ob-forth.el (org-babel-execute:forth):
* lisp/org/ob-fortran.el (org-babel-execute:fortran)
(org-babel-prep-session:fortran, org-babel-load-session:fortran):
* lisp/org/ob-groovy.el (org-babel-execute:groovy):
* lisp/org/ob-io.el (org-babel-execute:io):
* lisp/org/ob-js.el (org-babel-execute:js):
* lisp/org/ob-lilypond.el (org-babel-default-header-args:lilypond)
(org-babel-lilypond-compile-post-tangle)
(org-babel-lilypond-display-pdf-post-tangle)
(org-babel-lilypond-tangle)
(org-babel-lilypond-execute-tangled-ly)
(org-babel-lilypond-compile-lilyfile)
(org-babel-lilypond-check-for-compile-error)
(org-babel-lilypond-process-compile-error)
(org-babel-lilypond-mark-error-line)
(org-babel-lilypond-parse-error-line)
(org-babel-lilypond-attempt-to-open-pdf)
(org-babel-lilypond-attempt-to-play-midi)
(org-babel-lilypond-switch-extension)
(org-babel-lilypond-set-header-args):
* lisp/org/ob-lua.el (org-babel-prep-session:lua):
* lisp/org/ob-picolisp.el (org-babel-execute:picolisp):
* lisp/org/ob-processing.el (org-babel-prep-session:processing):
* lisp/org/ob-python.el (org-babel-prep-session:python):
* lisp/org/ob-scheme.el (org-babel-scheme-capture-current-message)
(org-babel-scheme-execute-with-geiser, org-babel-execute:scheme):
* lisp/org/ob-shen.el (org-babel-execute:shen):
* lisp/org/org-agenda.el (org-agenda-entry-types)
(org-agenda-move-date-from-past-immediately-to-today)
(org-agenda-time-grid, org-agenda-sorting-strategy)
(org-agenda-filter-by-category, org-agenda-forward-block):
* lisp/org/org-colview.el (org-columns--overlay-text):
* lisp/org/org-faces.el (org-verbatim, org-cycle-level-faces):
* lisp/org/org-indent.el (org-indent-set-line-properties):
* lisp/org/org-macs.el (org-get-limited-outline-regexp):
* lisp/org/org-mobile.el (org-mobile-files):
* lisp/org/org.el (org-use-fast-todo-selection)
(org-extend-today-until, org-use-property-inheritance)
(org-refresh-effort-properties, org-open-at-point-global)
(org-track-ordered-property-with-tag, org-shiftright):
* lisp/org/ox-html.el (org-html-checkbox-type):
* lisp/org/ox-man.el (org-man-source-highlight)
(org-man-verse-block):
* lisp/org/ox-publish.el (org-publish-sitemap-default):
* lisp/outline.el (outline-head-from-level):
* lisp/progmodes/dcl-mode.el (dcl-back-to-indentation-1)
(dcl-calc-command-indent, dcl-indent-to):
* lisp/progmodes/flymake.el (flymake-make-diagnostic)
(flymake--overlays, flymake-diagnostic-functions)
(flymake-diagnostic-types-alist, flymake--backend-state)
(flymake-is-running, flymake--collect, flymake-mode):
* lisp/progmodes/gdb-mi.el (gdb-threads-list, gdb, gdb-non-stop)
(gdb-buffers, gdb-gud-context-call, gdb-jsonify-buffer):
* lisp/progmodes/grep.el (grep-error-screen-columns):
* lisp/progmodes/gud.el (gud-prev-expr):
* lisp/progmodes/ps-mode.el (ps-mode, ps-mode-target-column)
(ps-run-goto-error):
* lisp/progmodes/python.el (python-eldoc-get-doc)
(python-eldoc-function-timeout-permanent, python-eldoc-function):
* lisp/shadowfile.el (shadow-make-group):
* lisp/speedbar.el (speedbar-obj-do-check):
* lisp/textmodes/flyspell.el (flyspell-auto-correct-previous-hook):
* lisp/textmodes/reftex-cite.el (reftex-bib-or-thebib):
* lisp/textmodes/reftex-index.el (reftex-index-goto-entry)
(reftex-index-kill, reftex-index-undo):
* lisp/textmodes/reftex-parse.el (reftex-context-substring):
* lisp/textmodes/reftex.el (reftex-TeX-master-file):
* lisp/textmodes/rst.el (rst-next-hdr, rst-toc)
(rst-uncomment-region, rst-font-lock-extend-region-internal):
* lisp/thumbs.el (thumbs-mode):
* lisp/vc/ediff-util.el (ediff-restore-diff):
* lisp/vc/pcvs-defs.el (cvs-cvsroot, cvs-force-dir-tag):
* lisp/vc/vc-hg.el (vc-hg--ignore-patterns-valid-p):
* lisp/wid-edit.el (widget-field-value-set, string):
* lisp/x-dnd.el (x-dnd-version-from-flags)
(x-dnd-more-than-3-from-flags): Assorted docfixes.
2019-09-20 22:27:53 +00:00
|
|
|
|
TYPE is a `soap-xs-complex-type'."
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(insert "Complex type: " (soap-element-fq-name type))
|
|
|
|
|
(insert "\nKind: ")
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(cl-case (soap-xs-complex-type-indicator type)
|
2015-10-24 12:33:18 +00:00
|
|
|
|
((sequence all)
|
|
|
|
|
(insert "a sequence ")
|
|
|
|
|
(when (soap-xs-complex-type-base type)
|
|
|
|
|
(insert "extending ")
|
|
|
|
|
(soap-insert-describe-button (soap-xs-complex-type-base type)))
|
|
|
|
|
(insert "\nAttributes: ")
|
|
|
|
|
(dolist (attribute (soap-xs-complex-type-attributes type))
|
|
|
|
|
(let ((name (or (soap-xs-attribute-name attribute) "*inline*"))
|
|
|
|
|
(type (soap-xs-attribute-type attribute)))
|
|
|
|
|
(insert "\n\t")
|
|
|
|
|
(insert name)
|
|
|
|
|
(insert "\t")
|
|
|
|
|
(soap-insert-describe-button type)))
|
|
|
|
|
(insert "\nElements: ")
|
|
|
|
|
(let ((name-width 0)
|
|
|
|
|
(type-width 0))
|
|
|
|
|
(dolist (element (soap-xs-complex-type-elements type))
|
|
|
|
|
(let ((name (or (soap-xs-element-name element) "*inline*"))
|
|
|
|
|
(type (soap-xs-element-type element)))
|
|
|
|
|
(setq name-width (max name-width (length name)))
|
|
|
|
|
(setq type-width
|
|
|
|
|
(max type-width (length (soap-element-fq-name type))))))
|
|
|
|
|
(setq name-width (+ name-width 2))
|
|
|
|
|
(setq type-width (+ type-width 2))
|
|
|
|
|
(dolist (element (soap-xs-complex-type-elements type))
|
|
|
|
|
(let ((name (or (soap-xs-element-name element) "*inline*"))
|
|
|
|
|
(type (soap-xs-element-type element)))
|
|
|
|
|
(insert "\n\t")
|
|
|
|
|
(insert name)
|
|
|
|
|
(insert (make-string (- name-width (length name)) ?\ ))
|
|
|
|
|
(soap-insert-describe-button type)
|
|
|
|
|
(insert
|
|
|
|
|
(make-string
|
|
|
|
|
(- type-width (length (soap-element-fq-name type))) ?\ ))
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(when (soap-xs-element-multiple? element)
|
|
|
|
|
(insert " multiple"))
|
|
|
|
|
(when (soap-xs-element-optional? element)
|
|
|
|
|
(insert " optional"))))))
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(choice
|
|
|
|
|
(insert "a choice ")
|
|
|
|
|
(when (soap-xs-complex-type-base type)
|
|
|
|
|
(insert "extending ")
|
|
|
|
|
(soap-insert-describe-button (soap-xs-complex-type-base type)))
|
|
|
|
|
(insert "\nElements: ")
|
|
|
|
|
(dolist (element (soap-xs-complex-type-elements type))
|
|
|
|
|
(insert "\n\t")
|
|
|
|
|
(soap-insert-describe-button element)))
|
|
|
|
|
(array
|
|
|
|
|
(insert "an array of ")
|
|
|
|
|
(soap-insert-describe-button (soap-xs-complex-type-base type))))
|
|
|
|
|
(insert "\nSample value:\n")
|
|
|
|
|
(pp (soap-sample-value type) (current-buffer)))
|
|
|
|
|
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
|
|
|
|
(defun soap-inspect-message (message)
|
|
|
|
|
"Insert information about MESSAGE into the current buffer."
|
|
|
|
|
(insert "Message name: " (soap-element-fq-name message) "\n")
|
|
|
|
|
(insert "Parts:\n")
|
|
|
|
|
(dolist (part (soap-message-parts message))
|
|
|
|
|
(insert "\t" (symbol-name (car part))
|
|
|
|
|
" type: ")
|
|
|
|
|
(soap-insert-describe-button (cdr part))
|
|
|
|
|
(insert "\n")))
|
|
|
|
|
|
|
|
|
|
(defun soap-inspect-operation (operation)
|
|
|
|
|
"Insert information about OPERATION into the current buffer."
|
|
|
|
|
(insert "Operation name: " (soap-element-fq-name operation) "\n")
|
|
|
|
|
(let ((input (soap-operation-input operation)))
|
|
|
|
|
(insert "\tInput: " (symbol-name (car input)) " (" )
|
|
|
|
|
(soap-insert-describe-button (cdr input))
|
|
|
|
|
(insert ")\n"))
|
|
|
|
|
(let ((output (soap-operation-output operation)))
|
|
|
|
|
(insert "\tOutput: " (symbol-name (car output)) " (")
|
|
|
|
|
(soap-insert-describe-button (cdr output))
|
|
|
|
|
(insert ")\n"))
|
2011-02-16 19:33:35 +00:00
|
|
|
|
|
2011-02-16 09:25:37 +00:00
|
|
|
|
(insert "\n\nSample invocation:\n")
|
2011-02-16 19:33:35 +00:00
|
|
|
|
(let ((sample-message-value
|
2015-10-24 12:33:18 +00:00
|
|
|
|
(soap-sample-value (cdr (soap-operation-input operation))))
|
|
|
|
|
(funcall (list 'soap-invoke '*WSDL* "SomeService"
|
|
|
|
|
(soap-element-name operation))))
|
2011-02-16 19:33:35 +00:00
|
|
|
|
(let ((sample-invocation
|
2021-03-08 15:11:22 +00:00
|
|
|
|
(append funcall (mapcar #'cdr sample-message-value))))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
(pp sample-invocation (current-buffer)))))
|
|
|
|
|
|
|
|
|
|
(defun soap-inspect-port-type (port-type)
|
|
|
|
|
"Insert information about PORT-TYPE into the current buffer."
|
|
|
|
|
(insert "Port-type name: " (soap-element-fq-name port-type) "\n")
|
|
|
|
|
(insert "Operations:\n")
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(cl-loop for o being the hash-values of
|
|
|
|
|
(soap-namespace-elements (soap-port-type-operations port-type))
|
|
|
|
|
do (progn
|
|
|
|
|
(insert "\t")
|
|
|
|
|
(soap-insert-describe-button (car o)))))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
|
|
|
|
(defun soap-inspect-binding (binding)
|
|
|
|
|
"Insert information about BINDING into the current buffer."
|
|
|
|
|
(insert "Binding: " (soap-element-fq-name binding) "\n")
|
|
|
|
|
(insert "\n")
|
|
|
|
|
(insert "Bound operations:\n")
|
|
|
|
|
(let* ((ophash (soap-binding-operations binding))
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(operations (cl-loop for o being the hash-keys of ophash
|
|
|
|
|
collect o))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
op-name-width)
|
|
|
|
|
|
2021-03-08 15:11:22 +00:00
|
|
|
|
(setq operations (sort operations #'string<))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2017-05-24 18:18:39 +00:00
|
|
|
|
(setq op-name-width (cl-loop for o in operations maximizing (length o)))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
|
|
|
|
(dolist (op operations)
|
|
|
|
|
(let* ((bound-op (gethash op ophash))
|
|
|
|
|
(soap-action (soap-bound-operation-soap-action bound-op))
|
|
|
|
|
(use (soap-bound-operation-use bound-op)))
|
|
|
|
|
(unless soap-action
|
|
|
|
|
(setq soap-action ""))
|
|
|
|
|
(insert "\t")
|
|
|
|
|
(soap-insert-describe-button (soap-bound-operation-operation bound-op))
|
|
|
|
|
(when (or use (not (equal soap-action "")))
|
|
|
|
|
(insert (make-string (- op-name-width (length op)) ?\s))
|
|
|
|
|
(insert " (")
|
|
|
|
|
(insert soap-action)
|
|
|
|
|
(when use
|
|
|
|
|
(insert " " (symbol-name use)))
|
|
|
|
|
(insert ")"))
|
|
|
|
|
(insert "\n")))))
|
|
|
|
|
|
|
|
|
|
(defun soap-inspect-port (port)
|
|
|
|
|
"Insert information about PORT into the current buffer."
|
|
|
|
|
(insert "Port name: " (soap-element-name port) "\n"
|
|
|
|
|
"Service URL: " (soap-port-service-url port) "\n"
|
|
|
|
|
"Binding: ")
|
|
|
|
|
(soap-insert-describe-button (soap-port-binding port)))
|
|
|
|
|
|
|
|
|
|
(defun soap-inspect-wsdl (wsdl)
|
|
|
|
|
"Insert information about WSDL into the current buffer."
|
|
|
|
|
(insert "WSDL Origin: " (soap-wsdl-origin wsdl) "\n")
|
|
|
|
|
(insert "Ports:")
|
|
|
|
|
(dolist (p (soap-wsdl-ports wsdl))
|
|
|
|
|
(insert "\n--------------------\n")
|
|
|
|
|
;; (soap-insert-describe-button p)
|
|
|
|
|
(soap-inspect-port p))
|
|
|
|
|
(insert "\n--------------------\nNamespace alias table:\n")
|
|
|
|
|
(dolist (a (soap-wsdl-alias-table wsdl))
|
|
|
|
|
(insert "\t" (car a) " => " (cdr a) "\n")))
|
|
|
|
|
|
|
|
|
|
(progn
|
|
|
|
|
;; Install the soap-inspect methods for our types
|
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-basic-type)) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-xs-basic-type)
|
2015-10-24 12:33:18 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-element)) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-xs-element)
|
2015-10-24 12:33:18 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-simple-type)) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-xs-simple-type)
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-complex-type)) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-xs-complex-type)
|
2012-04-25 10:28:29 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-attribute)) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-xs-attribute)
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-xs-attribute-group)) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-xs-attribute-group)
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-message)) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-message)
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-operation)) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-operation)
|
2011-02-16 19:33:35 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-port-type)) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-port-type)
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-binding)) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-binding)
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (make-soap-port)) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-port)
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
2018-06-09 02:41:28 +00:00
|
|
|
|
(put (soap-type-of (soap-make-wsdl "origin")) 'soap-inspect
|
2021-03-08 15:11:22 +00:00
|
|
|
|
#'soap-inspect-wsdl))
|
2011-02-16 09:25:37 +00:00
|
|
|
|
|
|
|
|
|
(provide 'soap-inspect)
|
|
|
|
|
;;; soap-inspect.el ends here
|