【发布时间】:2020-11-06 20:48:24
【问题描述】:
我收到绿色警报,但我的 POST 无法正常工作,并且出现错误:output_missing 请定义输出或提前返回。
我正在尝试使用 Python 发送 SOAP 请求:
url = "https://service.velocify.com/ClientService.asmx"
headers = {
'Content-Type': 'text/xml; charset=utf-8',
'Host': 'service.velocify.com',
'Content-Length': '0',
'SOAPAction': 'https://service.leads360.com/ModifyLeadField'
}
body = """
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ModifyLeadField xmlns="https://service.leads360.com">
<username>*************</username>
<password>***********</password>
<leadId>310595</leadId>
<fieldId>1238</fieldId>
<newValue>blah</newValue>
</ModifyLeadField>
</soap:Body>
</soap:Envelope>
"""
r = requests.post(url, headers=headers, params=body)
print(r.content)
【问题讨论】: