from suds.client import Client url = 'http://localhost:4066/mccm/InsaCmsFacade?wsdl' client = Client(url) sessId = client.service.login('insauser','$insauser') print "Obtained Insa session %s from AppServer" % (sessId) jlog = client.service.getJobLog(sessId,'100000005') """ Logentries have the following format: (logEntry){ entryTextLine = "[JOB-0037] ** Finished ActionSet MCCMImportRuleSet all right." severity = "INFO" timestamp = "Mon Jun 29 12:26:34 CEST 2009" } """ logfile = open("/tmp/insa."+sessId+".log","w") for line in jlog.logEntry: logfile.write( "%s %s\n" % (line.severity,line.entryTextLine)) logfile.close() client.service.logout(sessId) print "Logged out from Insa session %s successfully" % sessId