[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 7/8] Split the WSDL file into two that could be served remotel
From: |
Felix Lechner |
Subject: |
[PATCH v3 7/8] Split the WSDL file into two that could be served remotely. |
Date: |
Mon, 18 Mar 2024 06:07:08 -0700 |
---
Debbugs-debian.wsdl | 319 +++++++++++++++++++++++++++++++
Debbugs.wsdl => Debbugs-gnu.wsdl | 13 +-
debbugs.el | 15 +-
3 files changed, 337 insertions(+), 10 deletions(-)
create mode 100644 Debbugs-debian.wsdl
rename Debbugs.wsdl => Debbugs-gnu.wsdl (97%)
diff --git a/Debbugs-debian.wsdl b/Debbugs-debian.wsdl
new file mode 100644
index 0000000000..775c453e44
--- /dev/null
+++ b/Debbugs-debian.wsdl
@@ -0,0 +1,319 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- Copyright (C) 2011-2024 Free Software Foundation, Inc.
+
+This file is not part of GNU Emacs.
+
+This file is free software: you can redistribute it and/or modify
+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.
+
+This file is distributed in the hope that it will be useful,
+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
+along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. -->
+
+<!-- This file strives to describe the bindings of the debbugs SOAP interface
+for interaction with bugs.debian.org, but may have diverged over the years
+from what's deployed there. One day the server may serve it.
+
+For what is deployed, see <https://wiki.debian.org/DebbugsSoapInterface>.
+
+The operation "get_versions" is not contained (yet). -->
+
+<wsdl:definitions
+ name="Debbugs/SOAP"
+ targetNamespace="urn:Debbugs/SOAP"
+ xmlns:tns="urn:Debbugs/SOAP"
+ xmlns:types="urn:Debbugs/SOAP/TYPES"
+ xmlns:apachens="http://xml.apache.org/xml-soap"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
+
+ <wsdl:types>
+ <schema targetNamespace="urn:Debbugs/SOAP/TYPES"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+ <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+ <complexType name="ArrayOfBugNumber">
+ <complexContent>
+ <restriction base="soapenc:Array">
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:int[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ArrayOfAnyType">
+ <complexContent>
+ <restriction base="soapenc:Array">
+ <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ArrayOfArrayOfAnyType">
+ <complexContent>
+ <restriction base="soapenc:Array">
+ <attribute ref="soapenc:arrayType"
+ wsdl:arrayType="types:ArrayOfAnyType[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+ <complexType name="ArrayOfArrayOfArrayOfAnyType">
+ <complexContent>
+ <restriction base="soapenc:Array">
+ <attribute ref="soapenc:arrayType"
+ wsdl:arrayType="types:ArrayOfArrayOfAnyType[]"/>
+ </restriction>
+ </complexContent>
+ </complexType>
+ </schema>
+
+ <schema targetNamespace="http://xml.apache.org/xml-soap"
+ xmlns="http://www.w3.org/2001/XMLSchema">
+ <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
+
+ <complexType name="mapItem">
+ <sequence>
+ <element name="key" nillable="true" type="xsd:int"/>
+ <element name="value" nillable="true" type="xsd:anyType"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="Map">
+ <sequence>
+ <element maxOccurs="unbounded" minOccurs="0"
+ name="item" type="apachens:mapItem"/>
+ </sequence>
+ </complexType>
+ </schema>
+ </wsdl:types>
+
+ <wsdl:message name="get_statusRequest">
+ <wsdl:part name="bugs" type="types:ArrayOfBugNumber"/>
+ </wsdl:message>
+ <wsdl:message name="get_statusResponse">
+ <wsdl:part name="s-gensym3" type="apachens:Map"/>
+ </wsdl:message>
+
+ <wsdl:message name="get_bug_logRequest">
+ <wsdl:part name="bugnumber" type="xsd:int"/>
+ </wsdl:message>
+ <wsdl:message name="get_bug_logResponse">
+ <wsdl:part name="soapenc:Array" type="types:ArrayOfAnyType"/>
+ </wsdl:message>
+
+ <wsdl:message name="get_bugsRequest">
+ <wsdl:part name="query" type="types:ArrayOfAnyType"/>
+ </wsdl:message>
+ <wsdl:message name="get_bugsResponse">
+ <wsdl:part name="soapenc:Array" type="types:ArrayOfBugNumber"/>
+ </wsdl:message>
+
+ <wsdl:message name="get_usertagRequest">
+ <wsdl:part name="user" type="xsd:string"/>
+ <!-- We do not support tags -->
+ </wsdl:message>
+ <wsdl:message name="get_usertagResponse">
+ <wsdl:part name="s-gensym3" type="xsd:anyType"/>
+ </wsdl:message>
+
+ <wsdl:message name="newest_bugsRequest">
+ <wsdl:part name="amount" type="xsd:int"/>
+ </wsdl:message>
+ <wsdl:message name="newest_bugsResponse">
+ <wsdl:part name="soapenc:Array" type="types:ArrayOfBugNumber"/>
+ </wsdl:message>
+
+ <wsdl:portType name="Debbugs/SOAP">
+ <wsdl:operation name="get_status" parameterOrder="bugs">
+ <wsdl:input message="tns:get_statusRequest">
+ <soap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:input>
+ <wsdl:output message="tns:get_statusResponse">
+ <soap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="get_bug_log" parameterOrder="bugnumber">
+ <wsdl:input message="tns:get_bug_logRequest">
+ <soap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:input>
+ <wsdl:output message="tns:get_bug_logResponse">
+ <soap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="get_bugs" parameterOrder="query">
+ <wsdl:input message="tns:get_bugsRequest">
+ <soap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:input>
+ <wsdl:output message="tns:get_bugsResponse">
+ <soap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="get_usertag" parameterOrder="user">
+ <wsdl:input message="tns:get_usertagRequest">
+ <soap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:input>
+ <wsdl:output message="tns:get_usertagResponse">
+ <soap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="newest_bugs" parameterOrder="amount">
+ <wsdl:input message="tns:newest_bugsRequest">
+ <soap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:input>
+ <wsdl:output message="tns:newest_bugsResponse">
+ <soap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="Debbugs/SOAP/BINDING" type="tns:Debbugs/SOAP">
+ <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="get_status">
+ <wsdlsoap:operation soapAction="Debbugs/SOAP"/>
+ <wsdl:input name="get_statusRequest">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:input>
+ <wsdl:output name="get_statusResponse">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="get_bug_log">
+ <wsdlsoap:operation soapAction="Debbugs/SOAP"/>
+ <wsdl:input name="get_bug_logRequest">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:input>
+ <wsdl:output name="get_bug_logResponse">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="get_bugs">
+ <wsdlsoap:operation soapAction="Debbugs/SOAP"/>
+ <wsdl:input name="get_bugsRequest">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:input>
+ <wsdl:output name="get_bugsResponse">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="get_usertag">
+ <wsdlsoap:operation soapAction="Debbugs/SOAP"/>
+ <wsdl:input name="get_tagRequest">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:input>
+ <wsdl:output name="get_tagResponse">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="newest_bugs">
+ <wsdlsoap:operation soapAction="Debbugs/SOAP"/>
+ <wsdl:input name="newest_bugsRequest">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:input>
+ <wsdl:output name="newest_bugsResponse">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+
+ <wsdl:operation name="search_est">
+ <wsdlsoap:operation soapAction="Debbugs/SOAP"/>
+ <wsdl:input name="search_estRequest">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:input>
+ <wsdl:output name="search_estResponse">
+ <wsdlsoap:body
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
+ namespace="urn:Debbugs/SOAP"
+ use="encoded"/>
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="Debbugs/SOAP/SERVICE">
+ <wsdl:port binding="tns:Debbugs/SOAP/BINDING" name="debian.org">
+ <wsdlsoap:address location="https://bugs.debian.org/cgi-bin/soap.cgi"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
diff --git a/Debbugs.wsdl b/Debbugs-gnu.wsdl
similarity index 97%
rename from Debbugs.wsdl
rename to Debbugs-gnu.wsdl
index c25cf2f2ed..7c4ecc4c37 100644
--- a/Debbugs.wsdl
+++ b/Debbugs-gnu.wsdl
@@ -17,9 +17,13 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. -->
-<!-- This file describes the bindings of the debbugs SOAP interface
-(see <https://wiki.debian.org/DebbugsSoapInterface>). The operation
-"get_versions" is not contained (yet). -->
+<!-- This file strives to describe the bindings of the debbugs SOAP interface
+for interaction with debbugs.gnu.org, but may not be entirely up to date. One
+day the server may serve it.
+
+For what is actually deployed, please see
<https://gitlab.com/npostavs/debbugs>.
+
+The operation "get_versions" is not contained (yet). -->
<wsdl:definitions
name="Debbugs/SOAP"
@@ -333,8 +337,5 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. -->
<wsdl:port binding="tns:Debbugs/SOAP/BINDING" name="gnu.org">
<wsdlsoap:address location="https://debbugs.gnu.org/cgi/soap.cgi"/>
</wsdl:port>
- <wsdl:port binding="tns:Debbugs/SOAP/BINDING" name="debian.org">
- <wsdlsoap:address location="https://bugs.debian.org/cgi-bin/soap.cgi"/>
- </wsdl:port>
</wsdl:service>
</wsdl:definitions>
diff --git a/debbugs.el b/debbugs.el
index b8acfea3da..5804752d77 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -89,11 +89,11 @@ This corresponds to the Debbugs server to be accessed,
either
:type '(choice :tag "Debbugs server" (const "gnu.org") (const "debian.org")
(string :tag "user defined port name")))
-(defun debbugs-read-soap-wsdl-file ()
- "Return the WSDL object from the local file describing the SOAP interface."
+(defun debbugs-read-soap-wsdl-file (name)
+ "Return the WSDL object from a local file describing the SOAP interface."
(soap-load-wsdl
(expand-file-name
- "Debbugs.wsdl"
+ name
(if load-in-progress
(file-name-directory load-file-name)
default-directory))))
@@ -136,7 +136,14 @@ reload it if the cache expired."
nil nil 'equal)
nil))
(wsdl-object (or cache-hit
- (debbugs-read-soap-wsdl-file))))
+ (cond ((string= "gnu.org" debbugs-port)
+ (debbugs-read-soap-wsdl-file
+ "Debbugs-gnu.wsdl"))
+ ((string= "debian.org" debbugs-port)
+ (debbugs-read-soap-wsdl-file
+ "Debbugs-debian.wsdl"))
+ (error "Unknown Debbugs port %s"
+ debbugs-port)))))
(if (or (eq debbugs-wsdl-cache-expiry t)
(eq debbugs-wsdl-cache-expiry 0))
(progn
--
2.41.0
- [PATCH v2 3/5] Fix description in docstring for debbugs-ports., (continued)
- [PATCH v2 3/5] Fix description in docstring for debbugs-ports., Felix Lechner, 2024/03/15
- [PATCH v2 5/5] Download WSDL specification dynamically from selected server., Felix Lechner, 2024/03/15
- [PATCH v2 4/5] Bring labels for debbugs-cache-expiry in line with docstring., Felix Lechner, 2024/03/15
- Re: [PATCH v2 0/5] Download WSDL for SOAP services from servers, Michael Albinus, 2024/03/16
- [PATCH v3 0/8] Download WSDL for SOAP services from servers, Felix Lechner, 2024/03/18
- [PATCH v3 1/8] Enforce standard line length of 80 characters., Felix Lechner, 2024/03/18
- [PATCH v3 3/8] Fix docstring for :affects., Felix Lechner, 2024/03/18
- [PATCH v3 8/8] Download WSDL specification dynamically from selected server., Felix Lechner, 2024/03/18
- [PATCH v3 4/8] Fix description in docstring for debbugs-ports., Felix Lechner, 2024/03/18
- [PATCH v3 5/8] Bring labels for debbugs-cache-expiry in line with docstring., Felix Lechner, 2024/03/18
- [PATCH v3 7/8] Split the WSDL file into two that could be served remotely.,
Felix Lechner <=
- [PATCH v3 6/8] Offer cache facility for WSDL specification; default to no expiry., Felix Lechner, 2024/03/18
- [PATCH v3 2/8] Don't hardcode gnu.org as debbugs-port for Gnus interface., Felix Lechner, 2024/03/18
- [PATCH] Enforce standard line length of 80 characters., Felix Lechner, 2024/03/18
- Re: [PATCH] Enforce standard line length of 80 characters., Michael Albinus, 2024/03/19
- Re: [PATCH v3 0/8] Download WSDL for SOAP services from servers, Michael Albinus, 2024/03/19
- Re: [PATCH v3 0/8] Download WSDL for SOAP services from servers, Felix Lechner, 2024/03/20
- Re: [PATCH v3 0/8] Download WSDL for SOAP services from servers, Michael Albinus, 2024/03/21