Giter VIP home page Giter VIP logo

Comments (5)

ngnpope avatar ngnpope commented on August 23, 2024

@oskrkal: might this be addressed by your xsd-resolver branch?

from soapfish.

oskrkal avatar oskrkal commented on August 23, 2024

@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.

ngnpope avatar ngnpope commented on August 23, 2024

@iurisilvio: can you clarify - my understanding from what you have written was that these shouldn't be imported at all?

from soapfish.

iurisilvio avatar iurisilvio commented on August 23, 2024

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.

oskrkal avatar oskrkal commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.