I'm trying to acces a SOAP API. This works while using SOAP-UI as a test environment. Now I want to implement it in Suds/Python. The actual request suds makes differs in the soap:Envelope element. I have no idea how to set it so it works.
The correct request made by SOAP-UI
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:plur="pluriform:works:datatypes:DagstatenApp-0">
<soap:Header/>
<soap:Body>
...
</soap:Body>
</soap:Envelope>
with the rather minimal python code:
from suds.client import Client
client = Client(url)
client.set_options(soapheaders=(user, passwd)
result = client.service.getWhatEver(arg1, arg2)
I get this:
<SOAP-ENV:Envelope xmlns:ns0="pluriform:works:datatypes:DagstatenApp-0" 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>
...
</ns1:Body>
</SOAP-ENV:Envelope>
Which if I copy-paste it in SOAP-UI. I get this error:
<soapenv12:Text xml:lang="EN">Systeemmelding 6EDB::4844 XML Type error (code 19060)
Systeemmelding 6EDB::4844 XML Type error (code 19060)
Error: Systeemmelding XML Type error (6EDB::4844)
XML Type mismatch. Expected tag [http://www.w3.org/2003/05/soap-envelope]Envelope, not [http://schemas.xmlsoap.org/soap/envelope/]Envelope. Error code App:19060
Error: Systeemmelding XML Type error (6EDB::4844)
element start ("SOAP-ENV:Envelope") rejected at 1, 240
Error code App:19060
Generic XML Import IMPL (6EDB::11267)
Generic XML Import (6EDB::9780)</soapenv12:Text>
I tried various examples like: Overwrite the Soap Envelope in Suds python but they all add another namespace and do not seem to work. Any suggestions would be welcome.