wsdl 不包含时如何设置 suds 模式位置
how to set suds schema loction while wsdl doesn't contain one
我在 python 中使用 suds 库(版本 4.0)作为 soap 客户端
wsdl 中没有定义模式位置,但供应商给了我们一些 xsd 文件。
现在我正在尝试为 url 和本地模式设置 suds 客户端。我可以这样做吗?
我已经看到很多使用 Import 和 ImportDoctor 解释的事情,但我真的不明白它是否与我的案例有关。我想要这样的东西..
from suds.client import Client
url = "https://someurl?WSDL"
schemaLocation = "/some/local/Location/file.xsd"
client = Client(url,schemaLocation)
我知道这是错误的,但我怎样才能实现这样的目标
你可以使用这个:
url = "/some/local/Location/file.xsd" #xsd local location
new_url = "https://someurl?WSDL" #service url
c = Client(url)
c.sd[0].service.setlocation(new_url)
我在 python 中使用 suds 库(版本 4.0)作为 soap 客户端 wsdl 中没有定义模式位置,但供应商给了我们一些 xsd 文件。 现在我正在尝试为 url 和本地模式设置 suds 客户端。我可以这样做吗? 我已经看到很多使用 Import 和 ImportDoctor 解释的事情,但我真的不明白它是否与我的案例有关。我想要这样的东西..
from suds.client import Client
url = "https://someurl?WSDL"
schemaLocation = "/some/local/Location/file.xsd"
client = Client(url,schemaLocation)
我知道这是错误的,但我怎样才能实现这样的目标
你可以使用这个:
url = "/some/local/Location/file.xsd" #xsd local location
new_url = "https://someurl?WSDL" #service url
c = Client(url)
c.sd[0].service.setlocation(new_url)