SOAP 1.2 Demande Python

import requests
from requests.structures import CaseInsensitiveDict

url = "https://www.w3schools.com/xml/tempconvert.asmx"

headers = CaseInsensitiveDict()
headers["Content-Type"] = "application/soap+xml"

data = """
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <FahrenheitToCelsius xmlns="https://www.w3schools.com/xml/">
      <Fahrenheit>75</Fahrenheit>
    </FahrenheitToCelsius>
  </soap12:Body>
</soap12:Envelope>
"""

resp = requests.post(url, headers=headers, data=data)

print(resp.status_code)

Hanna Solo