SOAPpy.Types.faultType: Cannot use object of type stdClass as array

Tamer Higazi th982a at googlemail.com
Wed Mar 20 15:06:00 EDT 2013


Hi poeple!
I wrote a small script, and I am not getting smart....what is ment with
this error message... Any ideas?!

I got this error message:

SOAPpy.Types.faultType: <Fault SOAP-ENV:Server: Cannot use object of
type stdClass as array>
File "/storage/PyProjects/toolsAPP/KASUpdate.py", line 32, in <module>
  KasObj = KASSystem()
File "/storage/PyProjects/toolsAPP/KASUpdate.py", line 27, in __init__
  'SessionLifeTime':loginData['sess_lt'],'SessionUpdateLifeTime':'Y'})



Here is the code:

from SOAPpy import WSDL
from SOAPpy.Errors import HTTPError as SoapHTTPError
from SOAPpy.Types import faultType
import hashlib

class KASSystem(object):
   
    def __init__(self):
        WSDL_AUTH = 'https://kasapi.kasserver.com/soap/wsdl/KasAuth.wsdl'
        WSDL_API = 'https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl'
       
       
        userpass = ['login','password']
        m = hashlib.sha1()
        m.update(userpass[1])
       
        userpass[1] = m.hexdigest()
        loginData = {'user':userpass[0],'pass':userpass[1]}
       
        self.__SoapServer = WSDL.Proxy(WSDL_AUTH)
       
        try:
            self.__CredentialToken = self.__SoapServer.KasAuth({
                'KasUser':loginData['user'],
                'KasAuthType':'sha1',
                'KasPassword':loginData['pass'],
                'SessionLifeTime':1800,'SessionUpdateLifeTime':'Y'})
           
        except (SoapHTTPError), e:
            print "Fehlermeldung:", e.code,e.msg
           
KasObj = KASSystem()




More information about the Python-list mailing list