help-debbugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 00/12] Download WSDL for SOAP services from server


From: Michael Albinus
Subject: Re: [PATCH 00/12] Download WSDL for SOAP services from server
Date: Tue, 12 Mar 2024 09:55:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Felix Lechner <felix.lechner@lease-up.com> writes:

> Hi Michael,

Hi Felix,

>> Even then it doesn't work for me. Could you, pls, show me the patch
>> you okan for debbugs.el, and how it works then for loading
>> debbugs.el from scratch?
>
> I just used C-M-x (eval-defun) to reload the WSDL, but here is a
> complete patch series that implements it transparently to the
> user.

I've applied your patches, and compilation shows some warning:

--8<---------------cut here---------------start------------->8---
In debbugs-get-bugs:
packages/debbugs/debbugs.el:180:2: Warning: docstring has wrong usage of 
unescaped single quotes (use \=' or different quoting such as `...')

In debbugs-get-status:
packages/debbugs/debbugs.el:374:2: Warning: docstring has wrong usage of 
unescaped single quotes (use \=' or different quoting such as `...')

In debbugs-get-usertag:
packages/debbugs/debbugs.el:581:2: Warning: docstring has wrong usage of 
unescaped single quotes (use \=' or different quoting such as `...')

In debbugs-gnu-display-status:
packages/debbugs/debbugs-gnu.el:1579:10: Warning: Unused lexical variable 
‘pp-default-function’
packages/debbugs/debbugs-gnu.el:2432:11: Warning: attempt to let-bind 
nonvariable ‘(soap-wsdl (debbugs-download-wsdl))’

In debbugs-gnu-usertags:
packages/debbugs/debbugs-gnu.el:2453:72: Warning: reference to free variable 
‘soap-wsdl’
--8<---------------cut here---------------end--------------->8---

The warning about ‘pp-default-function’ you can ignore, I'll fix it.

Then I have called Emacs 30 like this:

--8<---------------cut here---------------start------------->8---
# emacs -Q --eval '(setq debug-on-error t)' -L ~/src/elpa/packages/debbugs -l 
debbugs-gnu -f debbugs-gnu
--8<---------------cut here---------------end--------------->8---

There are the same warnings, and finally an error with backtrace:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "Error retrieving WSDL: 411")
  error("Error retrieving WSDL: %s" 411)
  soap-fetch-xml-from-url("https://debbugs.gnu.org/cgi/soap.cgi?WSDL"; 
#s(soap-wsdl :origin "https://debbugs.gnu.org/cgi/soap.cgi?WSDL"; :current-file 
"https://debbugs.gnu.org/cgi/soap.cgi?WSDL"; :xmlschema-imports nil :ports nil 
:alias-table (("soapenc" . "http://schemas.xmlsoap.org/soap/encoding/";) ("xsd" 
. "http://www.w3.org/2001/XMLSchema";)) :namespaces (#s(soap-namespace :name 
"http://schemas.xmlsoap.org/soap/encoding/"; :elements #<hash-table equal 33/96 
0x82a985 ...>) #s(soap-namespace :name "http://www.w3.org/2001/XMLSchema"; 
:elements #<hash-table equal 33/96 0x82ab57 ...>))))
  soap-fetch-xml("https://debbugs.gnu.org/cgi/soap.cgi?WSDL"; #s(soap-wsdl 
:origin "https://debbugs.gnu.org/cgi/soap.cgi?WSDL"; :current-file 
"https://debbugs.gnu.org/cgi/soap.cgi?WSDL"; :xmlschema-imports nil :ports nil 
:alias-table (("soapenc" . "http://schemas.xmlsoap.org/soap/encoding/";) ("xsd" 
. "http://www.w3.org/2001/XMLSchema";)) :namespaces (#s(soap-namespace :name 
"http://schemas.xmlsoap.org/soap/encoding/"; :elements #<hash-table equal 33/96 
0x82a985 ...>) #s(soap-namespace :name "http://www.w3.org/2001/XMLSchema"; 
:elements #<hash-table equal 33/96 0x82ab57 ...>))))
  soap-load-wsdl("https://debbugs.gnu.org/cgi/soap.cgi?WSDL";)
  debbugs-download-wsdl()
  debbugs-gnu(("serious" "important" "normal") ("emacs") nil nil nil)
  funcall-interactively(debbugs-gnu ("serious" "important" "normal") ("emacs") 
nil nil nil)
  command-execute(debbugs-gnu)
  command-line-1(("--eval" "(setq debug-on-error t)" "-L" 
"/home/albinus/src/elpa/packages/debbugs" "-l" "debbugs-gnu" "-f" 
"debbugs-gnu"))
  command-line()
  normal-top-level()
--8<---------------cut here---------------end--------------->8---

So this doesn't work.

> The current WSDL object is passed around efficiently via a keyword
> argument without any caching. It seems to work reasonably well
> locally.

The idea with keeping the WSDL object is cool. However, you have changed
many functions in order to pass the object as argument. This is not the
way it shall go.

The Debbugs package is divided into a backend and a frontend. The
backend is debbugs.el, and this is the only file which shall know about
SOAP, WSDL and alike. It is designed to contact different debbugs
servers, like <https://bugs.debian.org> and <https://debbugs.gnu.org>.
New servers shall be plugged in only into this file.

The file debbugs-gnu.el, the frontend implementation, has its name for a
reason. Intially, it wasis intended to speak with debbugs.gnu.org
only. You extend this now, but this shall be visible in debbugs-gnu.el
only by another value of debbugs-port.

Currently, we just change the value of debbugs-port if we want to access
another debbugs server. This isn't sufficient, if we want to create also
a respective wsdl object, and alike. So please add a setter funtion to
the user option debbugs-port. Instead of calling

--8<---------------cut here---------------start------------->8---
(setq debbugs-gnu-port "another-debbugs-server")
--8<---------------cut here---------------end--------------->8---

we will call then

--8<---------------cut here---------------start------------->8---
(customize-set-variable 'debbugs-gnu-port "another-debbugs-server")
--8<---------------cut here---------------end--------------->8---

No change needed in tramp-gnu.el and tramp-org.el.

> Kind regards
> Felix

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]