我有一个SOAP请求,已知它可以使用类似于SoapUI的工具工作,但是我试图使用urllib使它工作。
这是我迄今为止所做的尝试,但没有成功:
import urllib
f = "".join(open("ws_request_that_works_in_soapui", "r").readlines())
urllib.urlopen('http://url.com/to/Router?wsdl', f)
我还没有找到关于如何将文档发布到SOAP服务器的规范。
urllib不是必需的。
Tags:
简言之:是的,你可以。
长答案:
看看这个example它不使用urllib,但会让您了解如何准备SOAP请求。
至于urllib,我建议使用urllib2,是的,您可以使用它提交一个SOAP请求,按照与前面示例中相同的步骤准备请求。
我回答了我自己的问题
相关问题 更多 >
编程相关推荐