No, without seeing the complete wsdl I can't say how to fix it. I've found that a lot of schemas in WSDL simply aren't valid; if it really does have two Value elements at the top level with conflicting types, then there's nothing PyXB can do about it.
Tools like SOAP UI don't usually don't validate the XML, so it isn't surprising that they work. It's also possible that PyXB is not extracting the schema from the WSDL correctly.
Without seeing the cause of the error I can't explain it, but the PyXB diagnostic says there are two elements at the top level, both named Value, that have slightly different type definitions: one is a restriction of xs:decimal that appears to force an int value by disallowing fraction digits, and one is a restriction of xs:int. They are not equivalent from a type model since xs:decimal does not impose a max/min value while xs:int does. In that case the only way those declarations could be compatible is if they belong to two different namespaces.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's also possible that one or both is not at the top level but that they end up both appearing at the same level in the content for some other type.
Another way such declarations could be compatible is if the two Value element declarations were inside distinct types that are not related by restriction/extension. If that's the case then it could be a PyXB bug, but I'd have to see a schema that reproduced the problem in order to fix it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the reproducing test case. That is a bug, now recorded as trac 193, and fixed in the branch next of the git repository. You can obtain a patch either from git, or here. The full patch includes the reproducing test case.
Let me know if you have further issues.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, I've added another patch that extends the fix to handle cases where the base declaration references an ur type. Patch is here. Let me know if you find anything else.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've been working with pyxb for quite a while and every wsdl/xsd I've processed was working without problem.
Now I'm facing a wsdl which I can't convert into class bindings:
https://paste.welcloud.de/show/aOavmPtlRuKriZsy0MdT/
I can't provide you the wsdl file.
Can you tell me how to debug or fix this error?
Thanks!
Error copied below for historical purposes.
No, without seeing the complete wsdl I can't say how to fix it. I've found that a lot of schemas in WSDL simply aren't valid; if it really does have two Value elements at the top level with conflicting types, then there's nothing PyXB can do about it.
Tools like SOAP UI can load the wsdl without any problems.
Can you explain the error message to me? For what elements I have to look out and where?
Tools like SOAP UI don't usually don't validate the XML, so it isn't surprising that they work. It's also possible that PyXB is not extracting the schema from the WSDL correctly.
Without seeing the cause of the error I can't explain it, but the PyXB diagnostic says there are two elements at the top level, both named Value, that have slightly different type definitions: one is a restriction of xs:decimal that appears to force an int value by disallowing fraction digits, and one is a restriction of xs:int. They are not equivalent from a type model since xs:decimal does not impose a max/min value while xs:int does. In that case the only way those declarations could be compatible is if they belong to two different namespaces.
It's also possible that one or both is not at the top level but that they end up both appearing at the same level in the content for some other type.
Another way such declarations could be compatible is if the two Value element declarations were inside distinct types that are not related by restriction/extension. If that's the case then it could be a PyXB bug, but I'd have to see a schema that reproduced the problem in order to fix it.
The wsdl requires 25 xsd's, so it's a bit tricky to find the correct location, but I've found the following:
In syspara Money is defined as following:
Could this cause the error?
Yes, that seems possible. I'll try to build a standalone schema that reproduces the problem.
Thanks for the reproducing test case. That is a bug, now recorded as trac 193, and fixed in the branch
nextof the git repository. You can obtain a patch either from git, or here. The full patch includes the reproducing test case.Let me know if you have further issues.
Thanks for the fast fix! I'm sorry to bother you again, but here is another error:
Here is the according xml:
From common.xsd:
OK, I've added another patch that extends the fix to handle cases where the base declaration references an ur type. Patch is here. Let me know if you find anything else.
Awesome!
I was just able to generate the bindings.
Thanks a lot :)