Skip to content

Instantly share code, notes, and snippets.

@Prithivi-Raj
Prithivi-Raj / call_soap_with_requests.py
Created December 3, 2021 06:19 — forked from toast38coza/call_soap_with_requests.py
Call a SOAP Service with plain old requests
import requests
url="http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL"
#headers = {'content-type': 'application/soap+xml'}
headers = {'content-type': 'text/xml'}
body = """<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://ws.cdyne.com/WeatherWS/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns1:Body><ns0:GetWeatherInformation/></ns1:Body>
</SOAP-ENV:Envelope>"""
@Prithivi-Raj
Prithivi-Raj / j.css
Created September 13, 2021 05:08
First Gist
//ssdwdqdqwwdd