I’m using Python’s suds library which tries to fetch xml.xsd over the network. Unfortunately, the w3c server is hammered due to other programs like mine and cannot usually serve the document.
How do I intercept suds’ URL fetching to always grab a local copy of this file, even without having to download it into a long-lived cache successfully the first time?
The problem with fetching xml.xsd has to do with the “http://www.w3.org/XML/1998/namespace” namespace, which is required for most WSDLs. This namespace is mapped by default to http://www.w3.org/2001/xml.xsd.
You may override the location binding for this namespace to point to a local file: