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:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns2:rispostaRiceviFatture
xmlns:ns2="http://www.fatturapa.gov.it/sdi/ws/ricezione/v1.0/types">
<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:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns2:rispostaRiceviFatture
xmlns:ns2="http://www.fatturapa.gov.it/sdi/ws/ricezione/v1.0/types">
<Esito>ER01</Esito>
</ns2:rispostaRiceviFatture>
</soapenv:Body>
</soapenv:Envelope>
"""
return resp
Have any ideas?
Thanks!
--
Nicola
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.