-
Notifications
You must be signed in to change notification settings - Fork 314
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
Types introduced in service end up in spyne.model.primitive namespace #569
Comments
BTW: This can be worked around by explicitly giving the namespace like this: UUIDType = Unicode(
type_name="UUIDType",
pattern=r"[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}",
__namespace__="expected.namespace",
) This makes the wsdl of spyne 2.9 and spyne 2.12 match up again for this example. |
FYI: The behaviour in spyne master at 049b789 is unchanged. |
this could be the result of calling
agreed
please do as I can't say I have time to look at this right now. |
Edit: Simplified the stack trace, dropping pytest and debugger frames.
You bet. Here is the traceback of that call:
It appears to me that commit 7029e18 changed the behaviour to call resolve_namespace immediately when customizing a type. |
2013?! Honestly?! shows how much spyne's soap protocol gets used I guess :) |
I guess it's more about how many people care about the generated WSDL. After all, whatever the namespace, this would stil work. |
BTW: I just noted this comment in resolve_namespace:
Given this comment, the changes in 7029e18 appear to be wrong in that resolve_namespace is now called immediately when creating a new type. |
yes, this needs to be fixed. |
I believe I'm experience a similar issue except with complex types. In particular, the
and the second to the spyne namespace
conflicting on the name
as naturally both have the same base name, as they're the same class, and the namespace, for the same reason. Ah, sorry. Investigating, the issue stems from something else. tl;dr, I had a WSDL, to be able to in-place swap this service as much as possible, I was fiddling with spyne to get as equivalent a WSDL as possible. One issue was response element name which is determined by the function name (which I wanted to keep distinct and in snake-case). I attempted to use the However, overriding in this manner, when the class name of the return type matches what that message name would be results in a conflict. For those who have the element sharing a name with a namespaced type, the work arounds are rename your function call to match. That won't run into the issue. However, if you're like me and wanted to keep the function name distinct and in snake-case, either override and re-implement the I'm unsure if the latter is desired as PR, so I'll just leave the idea out here. |
Hello world,
we are working on upgrading our application from spyne 2.9 to spyne 2.13 (for Python 3 support). While working on this, we noticed that spyne now misplaces the local types introduced for our service.
Here is a full example:
Here is the WSDL that is generated by spyne 2.9 and spyne 2.12: generated_wsdl.zip
This was created by running
Here is the diff between both WSDL files:
WSDL_Diff_Generator.pdf
I think the old behaviour makes much more sense and would rather like it back. Trying to come up with a patch...
Greetings, Torsten
The text was updated successfully, but these errors were encountered: