-
Notifications
You must be signed in to change notification settings - Fork 43
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
Do not import base namespaces #94
Comments
@oskrkal: might this be addressed by your xsd-resolver branch? |
@pope1ni: I'm sorry for late response, I somehow missed your comment. I'm not sure if I understand the problem correctly. Is it that the schemaLocation attribute is not mandatory and only the namespace is sometimes specified in the import attribute? If so, the XSDCachedSchemaResolver indeed could address this issue. It allows to pre-define schema location for specific namespaces and is then able to resolve the schema purely by the namespace, if location is not specified. Another feature of the resolver is that it caches all schemas, so it can save some time when, for example, a WSDL file imports a lot of schemas, most of which import a common set of other schemas. The branch should be ready for merging into upstream. I just thought I would go through it and fix some of the constructions that you fixed in my last pull request, but I have been quite busy at work recently. |
@iurisilvio: can you clarify - my understanding from what you have written was that these shouldn't be imported at all? |
Yes, I think I have some third-party WSDLs with these imports, I can't use soapfish with them. Even if the generated code is not broken, it is still a lot of useless code. These namespaces are in https://github.com/soapteam/soapfish/blob/master/soapfish/namespaces.py#L22, maybe we can use it to define these "ignored schemas". |
All right, thanks for clarification. Then I think We probably need to somehow preload internally implemented schemas into |
Some schemas import XSD namespaces, like
http://schemas.xmlsoap.org/soap/envelope/
andhttp://schemas.xmlsoap.org/soap/encoding/
.What is the right way to avoid import these URLs? Per domain? Any URL in
namespaces
module? Only these two hard-coded?As a side note,
xsd2py
generate broken code with them.The text was updated successfully, but these errors were encountered: