Closed baskoopmans closed 4 years ago
TransIP changed their API on March 5th, 2020: https://www.transip.nl/nieuws/de-nieuwe-transip-rest-api-is-live/
Voor onze nieuwe API zijn we overgestapt van SOAP naar het REST-protocol. Dit houdt onder andere in dat de API voortaan JSON in plaats van XML returnt
Translation: the new API moved from SOAP to REST. This means - for example - that the API now returns JSON instead of XML.
It may be that they moved the api endpoint. I'll contact TransIP about this.
See the discussion in #62 Apparently TransIP had made a breaking change on the SOAP API, and they are rolling out a fix.
Version 2.1.0 has just been released to fix this problem. Thanks for all the help on this!
I'm still experiencing this issue..
$ pip freeze | grep transip
transip==2.1.1
$ transip-api -s --domain-name <domain> -l <username> --api-key /transip.key
Traceback (most recent call last):
File "/usr/local/bin/transip-api", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/transip/transip_cli.py", line 102, in main
domain_service = DomainService(args.loginname, args.api_key_file)
File "/usr/local/lib/python2.7/dist-packages/transip/service/domain.py", line 12, in __init__
super(DomainService, self).__init__('DomainService', *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/transip/client.py", line 103, in __init__
self.soap_client = SudsClient(self.url, doctor=doc, plugins=[WSDLFixPlugin()], **suds_kwargs)
File "/usr/local/lib/python2.7/dist-packages/suds/client.py", line 122, in __init__
sd = ServiceDefinition(self.wsdl, s)
File "/usr/local/lib/python2.7/dist-packages/suds/servicedefinition.py", line 58, in __init__
self.addports()
File "/usr/local/lib/python2.7/dist-packages/suds/servicedefinition.py", line 86, in addports
method = (m.name, binding.param_defs(m))
File "/usr/local/lib/python2.7/dist-packages/suds/bindings/rpc.py", line 35, in param_defs
return self.bodypart_types(method)
File "/usr/local/lib/python2.7/dist-packages/suds/bindings/binding.py", line 379, in bodypart_types
raise TypeNotFound(query.ref)
suds.TypeNotFound: Type not found: '(array, http://www.w3.org/2001/XMLSchema, )'
Anyone have any idea why? I've tried reinstalling the package.
It looks like you have the fixed version:
self.soap_client = SudsClient(self.url, doctor=doc, plugins=[WSDLFixPlugin()], **suds_kwargs)
I guess it's not working. Anybody else see this?
Also getting the Type not found error with transip==2.1.1
Tried to debug the issue, looks like a typo in https://api.transip.nl/wsdl/?service=DomainService
There is a message block named TransferWithOwnerChangeWithExtraContactFieldsRequest with:
<part name="extraContactFields" type="xsd:array"/>
Where the sister block TransferWithoutOwnerChangeWithExtraContactFieldsRequest and others have:
<part name="extraContactFields" type="tns:ArrayOfstring"/>
Problem is that sudsClient loads plugins after loading (and crashing on) the wsdl. So we can't fix it.
# suds/client.py line: 114-117
reader = DefinitionsReader(options, Definitions)
self.wsdl = reader.open(url) <-- Exception happens in here
plugins = PluginContainer(options.plugins)
plugins.init.initialized(wsdl=self.wsdl)
Okay, so any (temporary) workaround suggestions?
I would advise contacting TransIP with a message saying:
I just tested this command with Python 3.8 and transip-api 2.1.2 (just released) and it seems to be working.
transip-api -s --domain-name example.org -l <username> --api-key /transip-rsa.key
@maikelpoot @KajdeMunter Do you have an example command that's not working?
Upgrading to 2.1.2 seems to fix it indeed: (python2.7)
$ transip-api -s --domain-name example.org -l <username> --api-key /transip-rsa.key
ValueError: Could not deserialize key data.
$ pip install --upgrade transip
Successfully uninstalled transip-2.1.1 Successfully installed transip-2.1.2
$ transip-api -s --domain-name example.org -l <username> --api-key /transip-rsa.key
[(DnsEntry){ name = "*" expire = 300 type = "A" .....
Yeah. Seems to work for me now as well! The fix for 2.1.2 was for ValueError: Could not deserialize key data
which I had in 2.1.1 after first experiencing Type not found: '(array, http://www.w3.org/2001/XMLSchema, )'
. Maybe TransIP changed their API?
Maybe TransIP changed their API?
My guess is that's exactly what happened.
Thanks to everybody who's helped fix the few issues we've hit recently!
We run the following command:
$ transip-api -s --domain-name example.org -l <username> --api-key /transip-rsa.key
And get the following error:
Any ideas why this happens all of the sudden? Did TransIP change their API?
The following packages are installed (transip==2.0.0):