I want to make a soap request, however I am not sure how/where to add the SOAPAction. The code I have currently looks as follows:
import requests
url="https://api.nmbrs.nl/soap/v3/EmployeeService.asmx"
headers = {'content-type': 'text/xml'}
body = """<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:com="https://api.nmbrs.nl/soap/v3/CompanyService">
<soapenv:Header>
<com:AuthHeaderWithDomain>
<!--Optional:-->
<com:Username>{}</com:Username>
<!--Optional:-->
<com:Token>{}</com:Token>
<!--Optional:-->
<com:Domain>{}</com:Domain>
</com:AuthHeaderWithDomain>
</soapenv:Header>
<soapenv:Body>
<com:List_GetAll/>
</soapenv:Body>
</soapenv:Envelope>""".format(username, token, domain)
respose = requests.post(url, data=body, headers = headers)
The SOAPACtion I want to add is:
SOAPAction = "https://api.nmbrs.nl/soap/v3/CompanyService/List_GetAll"
I tried adding it as a header, or as a parameter of request.post() but that did not work. Could someone please help me with adding the SOAPAction?