Hi Paolo,

Actually, we've put the contents of http://www.w3.org/2001/XMLSchema.html in 
cache/suds/XMLSchema.xml, and suds works just fine with that.

I'm not sufficiently familiar with SOAP to be positive, but here's what I 
understand from 
http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic/:
  - http://www.w3.org/2001/XMLSchema is just a standard identifier, it's not 
meant to be fetched
  - SOAP should not depend on the content hosted at that URL
  - One may consider that the fact that suds fetches this URL is a bug in suds.

Best regards,

Aymeric AUGUSTIN
Polyconseil | 11bis, rue Scribe | 75009 Paris
mob : (+33) 6 22 43 79 99
tel : (+33) 1 58 18 67 40 | fax : (+33) 1 47 42 38 32

On 17 mai 2011, at 12:08, Paolo Losi wrote:

> Hi Aymeric,
> 
> thanks for your reply :-)
> 
> On Mon, May 16, 2011 at 4:16 PM, Aymeric Augustin 
> <[email protected]> wrote:
> Hi Paolo,
> 
> We're using this code to avoid hitting w3.org during the tests:
> 
> import os.path
> from suds.xsd import sxbasic
> sxbasic.Import.bind('http://www.w3.org/2001/XMLSchema',
>                     'file://' + os.path.join(ROOT_DIR, 'cache', 'suds', 
> 'XMLSchema.xml'))
> 
> And we store a copy of XMLSchema.xml in ROOT_DIR/cache/suds/.
> 
> I tested your workaround but suds hit the net again for xml.xsd.
> 
> DEBUG:suds.xsd.sxbasic:Import:0xb749c5ecL, importing 
> ns="http://www.w3.org/XML/1998/namespace";, 
> location="http://www.w3.org/2001/xml.xsd";
> DEBUG:suds.transport.http:opening (http://www.w3.org/2001/xml.xsd)
> 
> That schema is imported by XMLSchema.xsd by specifying explicitely
> a schemaLocation. So adding the following line doesn't help (suds ignores it).
> 
> sxbasic.Import.bind('http://www.w3.org/XML/1998/namespace', 
> 'file:///my_path/xml.xsd')
> 
> Didn't you have the same problem?
> Is there a way to avoid triggering all these imports on soaplib side?
> I'm using suds with other wsdl and complex types and no internet access
> without sperimenting these problems...
> 
> Thanks again!
> 
> Paolo

_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to