Open jedie opened 5 years ago
Good to know that there is a new community maintained version of suds. I'll check it out and see if we can use it.
As it is causing a lot more problems then fixing them I won’t be including this in the first py3 compatible release right now, I’ll focus on fixing the namespace issue with suds-jurko first.
I don't think the difference between "suds-jurko" and "suds-community" is relevant.
"suds-community" contains just more bug fixes and didn't change the API, isn't it?
But it is also easy to swap the packages (while developing) and test if it makes a difference.
EDIT: I'm wrong: https://github.com/django-oscar/django-oscar-docdata/issues/14#issuecomment-459709398
But why this happening?
About namespace issue, maybe https://github.com/suds-community/suds/issues/3 is relevant?
👋 Hi, happy to see that folks are interested in using suds-community.
Looking at the setup.py of this project, it looks like you're using suds-jurko v0.6 (https://pypi.org/project/suds-jurko/#history) which was the last released version of suds-jurko. There were many changes to master that were never released, so suds-community was started to release those changes and provide a path forward.
I'm sorry to hear that you're having an issue - briefly reading the description, it does sound like it might be related to https://github.com/suds-community/suds/issues/3.
@phillbaker It's clear that there's going to be a change from suds-jurko to suds-community
I've tried this before. A simple replacement breaks the functionality e.g.: #14 So, code modifications are necessary. Is there a overview about migration somewhere?
@jedie there shouldn't be a migration necessary - this is the first instance I've heard of major compatibility differences.
I took a quick look at the wsdl/xsd, https://github.com/django-oscar/django-oscar-docdata/blob/d4aaf9d0222da3ea2229be9aec7ee8ef3e5de99d/oscar_docdata/gateway.py#L72
I will point out that for some of the elements you're trying to factory.create
, e.g. Quantity
, they're not defined as top level objects in the XSD, but only as sub-objects of Item
. If you do factory.create('ns0:item')
at the console you'll see that it has a quantity
object initialized:
(item){
name = None
code = None
quantity =
(quantity){
_unitOfMeasure = ""
}
description = None
image = None
netAmount =
(amount){
value = None
_currency = ""
}
grossAmount =
(amount){
value = None
_currency = ""
}
As well, I think the .namespace()
call isn't quite right - you're looking for the prefix, not the namespace.
In the examples where you had multiple prefixes (ns0 and ns1) are you able to print out the client (e.g. print(Client('https://test.docdatapayments.com/ps/services/paymentservice/1_3?wsdl'))
)? That might help diagnosis where the extra prefix is coming from.
The currently used fork "suds-jurko" is not maintained, see:
There is a new fork here: