[英]How to use SUDS with different WSDL and target address?
我的WSDL文件位於http://www.onvif.org/ver10/device/wsdl/devicemgmt.wsdl ,我應該調用方法的目標是http://192.168.0.33:8080/onvif/services
,如何配置SUDS
客戶端使用這兩個地址?
這篇文章回答了您的問題: 更改SUDS庫中的Web服務URL
from suds.client import Client
client = Client('http://www.onvif.org/ver10/device/wsdl/devicemgmt.wsdl')
client.wsdl.services[0].setlocation('http://192.168.0.33:8080/onvif/services')
我一直在尋找解決相同的問題。 我想出了另一種解決方案,我發現它比Antti提供的解決方案更優雅:
from suds.client import Client
client = Client(
'http://www.onvif.org/ver10/device/wsdl/devicemgmt.wsdl',
location='http://192.168.0.33:8080/onvif/services',
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.