0
Good afternoon, I’m trying to make an integration with a Soap system and I don’t know how to get the information it returns to me, only work with json so far and it’s quite different, follow the code and the answer
import xmltodict
import requests
import json
from datetime import date
import zeep
import xml.etree.ElementTree as ET
import xml.dom.minidom
url = "http://177.11.209.20/wsadmin/ws.asmx?WSDL"
payload = """
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:vsc="vscwsadmin">
<soap:Header/>
<soap:Body>
<vsc:Login>
<!--Optional:-->
<vsc:strUserName>integrabtv</vsc:strUserName>
<!--Optional:-->
<vsc:strUserPassword>@twplu9hy</vsc:strUserPassword>
</vsc:Login>
</soap:Body>
</soap:Envelope>
"""
headers = {
"content-type" : "application/soap+xml",
"Accept": "application/xml"
}
response = requests.post(url, headers=headers, data=payload)
a = response.text
xmlparse = xml.dom.minidom.parseString(a)
prettyxml = xmlparse.toprettyxml()
print(prettyxml)
and the answer is as follows::
How do I get the information from Message and WSVSC?