我们在python中使用soapis。我们需要动态地传递请求xml文件中的值。在
test.xml
文件:
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<Add xmlns="http://tempuri.org/">
<intA>3</intA>
<intB>4</intB>
</Add>
</Body>
</Envelope>
Python脚本:
^{pr2}$
我们需要从python动态传递intA和intB。在
Tags:
可以使用格式字符串方法。可以在xml文件中指定位置/关键字参数。在进行请求调用时,可以传递这些参数的值。在
这是你的测试.xml文件应如下所示:
在Python脚本中,可以加载xml文件,在发出posts请求时,可以传递参数。方法如下:
^{pr2}$相关问题 更多 >
编程相关推荐