我有这个方案:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="tns" xmlns:nam="https://iotchet.ru/namespases">
<soapenv:Header>
<tns:RequestHeader>
<!--Optional:-->
<tns:sessionkey>b01daba7289e4e8baa87dbd1eb8c4f6b</tns:sessionkey>
</tns:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<tns:SendContainer>
<!--Optional:-->
<tns:Container>
<nam:name>test</nam:name>
<nam:content></nam:content>
</tns:Container>
</tns:SendContainer>
</soapenv:Body>
</soapenv:Envelope>
在这里我提出要求:
from pysimplesoap.client import SoapClient
client = SoapClient(wsdl='http://localhost:5555/api/containerize?wsdl')
client.SendContainer(Container={'name': 'test', 'content': 'test'})
我找不到将标头添加到客户端请求的方法。