arthurdejong / python-stdnum

A Python library to provide functions to handle, parse and validate standard numbers.
https://arthurdejong.org/python-stdnum/
GNU Lesser General Public License v2.1
498 stars 206 forks source link

EU Vies checking is broken since https is required #204

Closed dabela closed 4 years ago

dabela commented 4 years ago

When using zeep soap client (have not tried with anything else), the vies_wsdl soap wdsl should be in https. Current version has this as (http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl) which breaks with the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ruiservs/.pyenv/versions/rui_raa_dev_1/lib/python3.7/site-packages/zeep/proxy.py", line 45, in __call__
    kwargs,
  File "/home/ruiservs/.pyenv/versions/rui_raa_dev_1/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 130, in send
    return self.process_reply(client, operation_obj, response)
  File "/home/ruiservs/.pyenv/versions/rui_raa_dev_1/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 195, in process_reply
    return self.process_error(doc, operation)
  File "/home/ruiservs/.pyenv/versions/rui_raa_dev_1/lib/python3.7/site-packages/zeep/wsdl/bindings/soap.py", line 299, in process_error
    detail=fault_node.find("detail"),
zeep.exceptions.Fault: No such operation:  (HTTP GET PATH_INFO: /taxation_customs/vies/checkVatService)
grzekru commented 4 years ago

The error was probably on the vies api side. It works correctly now.

dabela commented 4 years ago

The error was probably on the vies api side. It works correctly now.

Yes it started working again without needing https. So closing the issue.

Not sure if it should always be https however or whether this should be configurable....

arthurdejong commented 4 years ago

They probably wanted to switch to HTTPS and botched it. The service is now available over HTTPS and HTTP while it was only available over HTTP before. I'll check all the HTTP URLs in python-stdnum and change those that allow it.