V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
JerryV2
V2EX  ›  Python

内网环境下 Suds type not found 的处理办法

  •  
  •   JerryV2 · 2021-03-27 22:17:31 +08:00 · 1394 次点击
    这是一个创建于 1096 天前的主题,其中的信息可能已经有所发展或是发生改变。

    客户在内网环境下有一个 WebService,我使用 suds 访问时,会报错:Type not found:'(schema, http://www.w3.org/2001/XMLSchema.xsd, )'

    参考网上的处理办法,使用 doctor 参数:

    imp = Import('http://www.w3.org/2001/XMLSchema', location='http://www.w3.org/2001/XMLSchema.xsd')
    imp.filter.add('http://tempuri.org/')
    doctor = ImportDoctor(imp)
        
    client = Client(url, doctor=doctor)      
    

    上一个错误消失了,但是接下来会访问 http://www.w3.org/2001/XMLSchema.xsd , 由于是内网环境,因而连接失败,向万能的 v2er 求助,该如何处理?

    在此先谢过了!

    JerryV2
        1
    JerryV2  
    OP
       2021-04-08 08:43:14 +08:00
    改用 zeep 了,很好用
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3148 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 12:32 · PVG 20:32 · LAX 05:32 · JFK 08:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.