Comments (5)
@oskrkal: might this be addressed by your xsd-resolver branch?
from soapfish.
@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.
from soapfish.
@iurisilvio: can you clarify - my understanding from what you have written was that these shouldn't be imported at all?
from soapfish.
Yes, I think soap/envelope
and soap/encoding
should be ignored. We implement them internally.
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".
from soapfish.
All right, thanks for clarification. Then I think XSDSchemaResolver
/XSDCachedSchemaResolver
in my xsd-resolver branch is not the right place to address this problem. Its purpose is simply to load a schema file from correct location, parse it and return it to the caller, or to return a cached xsdspec.Schema
instance if the schema has already been processed.
We probably need to somehow preload internally implemented schemas into known_paths
list and ensure that get_type
function returns correct module and class name.
from soapfish.
Related Issues (20)
- Add template file extensions. HOT 1
- Round trip through wsdl2py and py2wsdl should be consistent.
- Create <wsdl:documentation> and <xs:documentation> from docstrings and vice versa
- Python code generation behaviour when dealing with invalid WSDL HOT 1
- Repetition in xs:pattern broken by string formatting.
- wsdl2py failing HOT 2
- Fix Github parent child relationship with FlightDataServices/Soapfish HOT 5
- wsdl2py should mangle python keywords and reserved symbols HOT 4
- soapfish.xsd.Time is missing HOT 1
- wsdl2py throws AttributeError: 'Part' object has no attribute 'split' error HOT 1
- Multiples schema fail to validate in server mode HOT 1
- Client connection to a SOAP service with authentication
- After Enumeration a comma is missing when generating a client code from a locally saved WSDL file
- AttributeError: 'str' object has no attribute 'Service' HOT 6
- Refactor handling of location rewriting. HOT 3
- wsdl2py with imported xsd fails HOT 4
- Remote imports are handled as local files HOT 2
- Named XSD Element with unnamed complexType child generates invalid python. HOT 4
- wsdl2py jinja2 template not found HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from soapfish.