Dato che non ne vengo a capo ho deciso di fare un passo indietro.
Se invio "a mano" con python un messaggio all'ACS ottengo una risposta che
mi sembra corretta, ad esempio:
1.py
Codice:
import requests
url="http://acswind.wind.it:7003/cwmpWeb/CPEMgt"
headers = {'content-type': 'text/xml'}
body = """<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:cwmp="urn:dslforum-org:cwmp-1-0">
[...]/troppo altro testo da riportare qui
"""
response = requests.post(url,data=body,headers=headers)
print response.content
Codice:
$ python 1.py
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cwmp="urn:dslforum-org:cwmp-1-2">
<SOAP-ENV:Header>
<cwmp:ID SOAP-ENV:mustUnderstand="1">1</cwmp:ID>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<cwmp:InformResponse>
<MaxEnvelopes>1</MaxEnvelopes></cwmp:InformResponse></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
$
Poi però dovrei inviare un messaggio
vuoto, e ottenere una risposta dall'ACS... ma non ricevo mai nulla (
print response.content mi ritorna una stringa vuota).
Sicuramente sbaglio qualcosa (immagino che il messaggio vuoto non sia "vuoto" come lo aspetta lui), ma cosa?