
Hi Leute! Ich probiere samt SOAP (via Soappy) auf den Webdienst meines Providers den Zugang zu erlangen, die er mir via API und meiner Authentifizierungsdaten zur Verfügung stellt.
Ich erhalte, was immer ich auch mache IMMER DIE GLEICHE Fehlermeldung:
Traceback (most recent call last): File "/storage/PyProjects/toolsAPP/KASUpdate.py", line 38, in <module> KasObj = KASSystem() File "/storage/PyProjects/toolsAPP/KASUpdate.py", line 32, in __init__ 'SessionUpdateLifeTime':'Y'}) File "build/bdist.linux-x86_64/egg/SOAPpy/Client.py", line 540, in __call__ File "build/bdist.linux-x86_64/egg/SOAPpy/Client.py", line 562, in __r_call File "build/bdist.linux-x86_64/egg/SOAPpy/Client.py", line 475, in __call SOAPpy.Types.faultType: <Fault SOAP-ENV:Client: session_lifetime_syntax_incorrect>
Ich komme nicht auf dem Trichter was ich falsch gemacht habe.
Hier ist der 33 Zeilen-Quelltext:
from SOAPpy import WSDL from SOAPpy.Errors import HTTPError as SoapHTTPError from SOAPpy.Types import faultType import hashlib from array import array
class KASSystem:
def __init__(self): WSDL_AUTH = 'https://kasapi.kasserver.com/soap/wsdl/KasAuth.wsdl' WSDL_API = 'https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl'
userpass = ['mylogin','mypassword'] m = hashlib.sha1() m.update(userpass[1])
userpass[1] = m.hexdigest() loginData = {'user':userpass[0],'pass':userpass[1]}
self.__SoapClient = WSDL.Proxy(WSDL_AUTH)
try: self.__CredentialToken = self.__SoapClient.KasAuth('authAnfrage',{ 'KasUser':loginData['user'], 'KasAuthType':'sha1', 'KasPassword':loginData['pass'], 'SessionLifeTime':1800, 'SessionUpdateLifeTime':'Y'})
except (SoapHTTPError), e: print "Fehlermeldung:", e.code,e.msg
KasObj = KASSystem()
Für jede Hilf bin ich Dankbar!
Tamer