5.2.1 Dealing with an Externally Hosted XSD

The SOAP API references an externally hosted XSD:

<xs:import namespace="http://www.w3.org/2005/08/addressing"
schemaLocation="http://www.w3.org/2006/03/addressing/ws-addr.xsd"/>

In environments where your client application is unable to directly access the Internet, this could pose a problem for the Suds library. In this case, you should host a localized copy of this XSD and bind the new schema location for the namespace, as described at https://fedorahosted.org/suds/wiki/Documentation#BindingSchemaLocationsURLtoNamespaces. An example function follows to show how to bind the namespace to an XSD hosted locally in a temporary directory:

from suds.xsd.sxbasic import Import

def bind_schema_locations():
    Import.bind(
        'http://www.w3.org/2005/08/addressing',
        'file:///tmp/xsd/www.w3.org/2006/03/addressing/ws-addr.xsd')