2008/4/10, Alessandro Dentella <[EMAIL PROTECTED]>: > Ho finalmente chiarito come è il protocollo. Ho quattro metodi che accettano > un solo parametro scringa che a sua volta è un xml. (sotto CRED). > > Ora mi fermo un po' più in la... > > > On Tue, Apr 01, 2008 at 03:21:02PM +0200, Giorgio Zoppi wrote: > > ZSI è l'ideale. > > http://www.programmazione.it/index.php?entity=eitem&idItem=37378 > > > il tuo articolo parla del lato server a me serviva il lato client. Ce il codice allegato con client e server. > Ho come l'impressione che tutti lo considerino la parte banale e quindi non > spieghino nulla... > > Ho poi trovato questo articolo: > > http://www.kb.ucla.edu/articles/how-to-create-a-python-class-from-a-soap-wsdl > > che mi ha guidato nella comprensione di come passare i parametri dei metodi > esposti, cosa che non mi era affatto chiara. > > Vorrei capire come attivre il debug del codice xml scambiato, ciò che con > SOAPpy era: > > server.soapproxy.config.dumpSOAPOut = 1 > server.soapproxy.config.dumpSOAPIn = 1 > > ma con zsi non lo capisco. > > > > > Attalmente quindi faccio così: > > CRED = """ > <richiesta> > <credenziali> > <username>myuser</username> > <password>mypass</password> > </credenziali> > </richiesta> > """ > > from ws_ricarica_sistemi_esterni_services import * > > locator = ws_ricarica_sistemi_esterniLocator() > myport = locator.getws_ricarica_sistemi_esterniSoap() > > > myrequest = SaldoSoapIn() > myrequest.xml_saldo = CRED > myresponse = myport.Saldo(myrequest) > > > Ottengo però un "Evento imprevisto, impossibile autenticare" per cui vorrei > abilitare il debug come ho mostrato prima che avrei fatto con SOAPpy. > > Qualche suggerimento? Dal manuale...
During development, it is often useful to record "packet traces" of the SOAP messages being exchanged. Both the Binding and ServiceProxy classes provide a tracefile parameter to specify an output stream (such as a file) to capture messages. It can be particularly useful when debugging unexpected SOAP faults. Nel tuo caso il locator restituisce un Binding e nel codice del locator che devi aggiungere, ci pass il parametro del tracefile. mybind = Binding(url=serverPath, nsdict={'ns1':myns}, host='www.pascalbotte.be', port=80, tracefile=sys.stdout) Ciao, Giorgio. --- Giorgio Zoppi [EMAIL PROTECTED] _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python