[Fedora-suds-list] suds.sax.text.Text howto

jo jose.soares at sferacarta.com
Wed Oct 26 08:11:42 UTC 2011


Hi all,

I'm arguing with an object sax and I can't extract the values from it.
Someone could please give me some help?


(Pdb) type(result)
<class 'suds.sax.text.Text'>

(Pdb) result
<?xml version="1.0" encoding="UTF-8"?>
<Output>
  <OpenSession>
    <SessionID>1e0000001333f3e9185</SessionID>
    <user>VETER</user>
    <nome>VETERINARI</nome>
    <azienda>0112</azienda>
    <ufficio>1G12</ufficio>
    <ruolo>GC21</ruolo>
    <dataLavoro>20111026</dataLavoro>
    <entita>FO211212</entita>
  </OpenSession>
</Output>

thanks
j


from suds.client import Client
url='http://172.28.32.185:8082/demone1/jbfServices/JBFService?wsdl'
client = Client(url)

par=dict(
    user='VETER',
    password='1INTE',
    azienda='0112',
    ufficio='1G12',
    ruolo='GC21',
    entita='FO211212')

xml="""
    <Input>
        <OpenSession>
            <user>%(user)s</user>
            <password>%(password)s</password>
            <azienda>%(azienda)s</azienda>
            <ufficio>%(ufficio)s</ufficio>
            <ruolo>%(ruolo)s</ruolo>
            <entita>%(entita)s</entita>
        </OpenSession>
    </Input>
    """ % par

result =  client.service.call(xml)




More information about the suds mailing list