Hello.
I have made a SOAP service using service decorator like this:
@service.soap('fileSdIConMetadati', returns={'Esito': str}, args={'IdentificativoSdI': int, 'NomeFile': str, 'File': str, 'NomeFileMetadati': str, 'Metadati': str})
def ricevi_fatture(IdentificativoSdI, NomeFile, File, NomeFileMetadati, Metadati):
...
return "ER01"
but the soap client want this response:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Body>
<Esito>ER01</Esito>
</ns2:rispostaRiceviFatture>
</soapenv:Body>
</soapenv:Envelope>
I've made this decorator to change respons bat don't work fine.
def change_response(f):
def resp(*args, **kwargs):
ret = f(*args, **kwargs)
return """<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Body>
<Esito>ER01</Esito>
</ns2:rispostaRiceviFatture>
</soapenv:Body>
</soapenv:Envelope>
"""
return resp
Have any ideas?
Thanks!
--
Nicola