python - zeep:没有可用于命名空间“urn:WebdialerSoap”的架构
问题描述
我正在尝试从 Cisco CUCM 10.5.2(即getProfileSoap)获取与指定最终用户关联的设备列表。我正在使用 zeep 来处理请求和响应。我这样称呼这样的端点:
service.getProfileSoap(in0={"userID": "foo", "password": "bar"}, in1="just_a_username")
但我得到:
zeep.exceptions.NamespaceError:无法解析类型 {urn:WebdialerSoap}WDDeviceInfo。没有可用于命名空间“urn:WebdialerSoap”的架构。
响应如下:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:getProfileSoapResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:WD70">
<getProfileSoapReturn href="#id0"/>
</ns1:getProfileSoapResponse>
<multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:GetConfigResponse" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:WD70">
<description xsi:type="xsd:string">Success</description>
<deviceInfoList soapenc:arrayType="ns3:WDDeviceInfo[1]" xsi:type="soapenc:Array" xmlns:ns3="urn:WebdialerSoap">
<item href="#id1"/>
</deviceInfoList>
<responseCode href="#id2"/>
</multiRef>
<multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">0</multiRef>
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:WDDeviceInfo" xmlns:ns4="urn:WebdialerSoap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<deviceName xsi:type="xsd:string">IPCMRAEU5UCM5X7</deviceName>
<lines soapenc:arrayType="xsd:string[1]" xsi:type="soapenc:Array">
<item xsi:type="xsd:string">1251 ; no partition</item>
</lines>
</multiRef>
</soapenv:Body>
</soapenv:Envelope>
它看起来像是 XML 模式的问题。有解决方法吗?
解决方案
推荐阅读
- windows - 成功执行后机器人框架不退出
- json - Typescript - 如果其键包含点,如何将 JSON 解析为对象?
- css - React JSX 无法识别图像的样式属性中的对象匹配
- flutter - carousel_slider 只显示一张图片
- google-apps-script - 每天两次自动发送电子邮件的触发器
- oracle - 如何使用 Oracle 缩小表分区?
- java - Springboot 与 log4j2,结构化 JSON 日志记录
- android - Android根据锁屏密码切换用户
- python-2.7 - 无法使用 python 2.7 在 ubuntu 16.04 上运行 tensorflow
- apache - .htaccess 中的第三条规则重定向到特定文件