-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid content was found starting with element \'ns0:quantity\' #14
Comments
Think it's a XML namespaces problem!
EDIT: I found https://stackoverflow.com/questions/27640853/howto-set-text-value-for-suds-webservice-object ;) |
With "I found it" you mean you have a solution for your problem? |
Maybe, see: wearehoods@1a2a079 Don't know if this is related to the update from suds-jurko -> suds-community |
Hm. Seems not to be fixed :( The bug was probably only hidden by #16 who raise a Traceback earlier... Current "Type not found: 'unitOfMeasure'" traceback: With this code:
|
any news here? |
Any change you sketch a detailed scenario when you encounter this so we can try to reproduce? |
Also added Destination.from_address() and friends for easier construction.
Nothing special is necessary for that: Simply use the payment test backend account. Try to buy and pay for an article. The origin code is:
This was committed here: ce62b43#diff-b997b1a5e15cf73c89f351aa34c328bbR806 With this origin code you can raise into different namespaces... e.g.: Everything is "ns0" and the inserted "quantity" has "ns1" prefix. Or the other case: everything has "ns1" and it's "ns0:quantity" I think the code from #14 (comment) is the right solution, but raise into "Type not found: 'unitOfMeasure'" |
any news? |
I first focused on creating a working (and less hackish) sandbox. I have it now working and it is in the I will merge it when the cleanup is done. The idea is to write at least some functional tests on the sandbox the following week. On topic: With the new sandbox I can reproduce your error now with python 3.7:
As it does not happen with python 2.7 I'm pretty sure it's an encoding issue. Hopefully I have a fix soon. |
Hmm, not as easy at is seams. I could only reproduce this once. Is it also occasionally happening on your side? |
It's IMHO not about encoding. It's about XML namespaces, see: #14 (comment) It's a old problem, see also: https://stackoverflow.com/questions/27640853/howto-set-text-value-for-suds-webservice-object I don't know if the real problem is with the provider and wrong WSDL files.
+1 I always do these in my projects, too. |
@maerteijn don't miss to update suds, see: #15 |
Can you answer my question please: Does it happen all the time in your situation? I want to know because suds can sometimes make a mess of the namespaces which I've seen in several other projects. If you can confirm it happens sometimes but not all the time I know where to look for. And I will update suds once we found the problem and are able to reproduce it on demand. (narrow down the problem first with as less variables as possible) |
Yes, it happens often but not all the time. |
I had it once again but not in a reproducible way unfortunately. It looks like it is "fixed" with the development server restarted: Suds is doing some dynamic magic when parsing the WSDL so it could be that the auto-reloading of the Django development server ( Can you confirm this? How did you deploy / run your application? |
Hm, interesting... Currently i use the Django development server via If that's true: Is then the very first request always correct and all others not?!? |
No, I mean when you use
I think this only happens with suds and python 3 in combination with the hardcoded |
21efd5e seems like a solution, at least in my local test environment. Could you give it a try and see if it solves the namespace issues? |
Seems not to work:
EDIT: One moment... Seems that i used the wrong code base... |
OK, i checked it: With the old code base i get this: With your changes i get this: That doesn't look right, isn't it? I add logging output, e.g.:
output: |
Can you post a complete traceback of the error you get with this code included please? |
No, sorry. That contains to much information that i can't post ;) I don't think this will help very much, either. Does the error not occur with you? |
No. Can you rescramble the information then with fake data? It would really help to see the complete traceback. |
This Bug doesn't appear with you? Strange! I'm trying to clean up a traceback. |
The CSS errors and numberOfDays errors are occuring after the Quantity errors. (I can reproduce them with suds-community but not with suds-jurko). So it looks like the changes in 21efd5e fixed at least this issue? |
Yes! That's it. So there are some breaking changes in suds-community |
Only happening with "suds-community" but not with "suds-jurko", see also: #15 So, i close this issues. |
👍 |
I don't like to think that the mistake is mine. I get this error:
But in the soap "create" request contains: <ns0:quantity unitOfMeasure="PCS">1</ns0:quantity>
Any idea?
The text was updated successfully, but these errors were encountered: