3
我想通过使用SUDS库的Python脚本访问一个非常简单的SOAP Web服务。如何使用Python/SUDS将键/值对发送到Web服务?
这里的WSDL体:
我使用提交这两个键/值对的Python代码如下:
url = "http://somewhereontheweb.com/WS.asmx?wsdl"
client = suds.client.Client(url)
try:
result = client.service.SendKDIRequest({"Key1": value1, "Key2": value2})
#display success
except Exception as e:
#display error
进入他们直接进入了SoapUI客户端建议服务正常工作。所以我很确定我没有通过Web服务期望的键/值对发送。
我非常感谢你们提供的帮助。