On Thursday, November 9, 2017 at 3:00:15 AM UTC-8, Nicola Gramola wrote:
>
> 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
>

Sorry you didn't get a timely answer.  For my part, I used PySimpleSoap on 
the server (from contrib.pysimplesoap.client import SoapClinet). The remote 
call in was either a normal  Java client or normal Python client.   I think 
the WSDL was automatically generated  by the call() wrapper, so nothing 
custom about its format.  My  controller functions use the standard 
decorator, with the name, returns, and args only.

I also have service.xmlrpc decorator and a service.json decorator, but I 
haven't tried accessing in those ways.

Hope you found a way around your obstacles.

Dave
/dps



-- 
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.

Reply via email to