sympa-community / sympa

Sympa, Mailing List Management Software
https://www.sympa.community/sympa
GNU General Public License v2.0
241 stars 95 forks source link

SOAP: No type 'ArrayOfCustom' in namespace http://www.w3.org/2001/XMLSchema. #1696

Closed dpc22 closed 9 months ago

dpc22 commented 1 year ago

Version

6.2.72

Installation method

My own rpm, derived from the official rpm for RHEL 7

Expected behavior

My example scripts at: https://help.uis.cam.ac.uk/service/email/lists/sympa/information-about-uis-managed-mailing-lists/sympasoap

should work without throwing an exception.

Actual behavior

Both scripts worked with 6.2.70. After I upgraded to version 6.2.72 the Perl script still works, but the Python version throws an exception:

File "/usr/lib/python3/dist-packages/zeep/xsd/schema.py", line 530, in _get_component
    raise exceptions.LookupError(
zeep.exceptions.LookupError: No type 'ArrayOfCustom' in namespace http://www.w3.org/2001/XMLSchema. Available types are
...
zeep.exceptions.LookupError: Unable to resolve type {http://www.w3.org/2001/XMLSchema}ArrayOfCustom in None. (via {https://lists.cam.ac.uk/sympa/wsdl}detailsType)

I have uploaded the full text of the exception as a txt attachment:

exception.txt

It is entirely possible that this is a bug in my script. However it looks like the Python zeep module is expecting to find something in http://www.w3.org/2001/XMLSchema which does not exist.

Steps to reproduce

You should be able to use the script at https://help.uis.cam.ac.uk/system/files/documents/sync.py, replacing:

soap_url = "https://lists.cam.ac.uk/sympa/wsdl"

with some other service.

Additional information

I am going to revert back to version 6.2.70 tomorrow morning. I do however have a test system if we need to test anything.

dpc22 commented 1 year ago

Here's a minimal Python script which throws the same exception:

#!/usr/bin/python3
#
# Ubuntu python3-zeep is "a fast and modern Python SOAP client"
from zeep.client import Client, Settings

soap_url = "https://lists.cam.ac.uk/sympa/wsdl"
zeep = Client(soap_url, settings=Settings(strict=False))

(that particular soap_url should start to work tomorrow after I revert to 6.2.70)

ikedas commented 1 year ago

Hi @dpc22 ,

Thanks for reporting bug! Could you please apply this patch and check if the problem will be solved?

dpc22 commented 1 year ago

Yes, that seems to have fixed the problem. Thank you.

I included the patch from #1676 at the same time, as that seems to be related.