def call(): kam = client.create("Kam") kam.name = kam_name result = client.service.LoadKam(kam) print result status = result["loadStatus"] if status == "FAILED": print "FAILED!" print sys.exc_info()[1] exit_failure() return result
print "Copyright (c) 2011-2012, Selventa. All Rights Reserved" print # setup wsdl client = start() # fetch catalog try: catalog = get_catalog(client) print " === LISTING KAMs === " for entry in catalog: print " " + entry.name print except WebFault: print "FAILED!" print sys.exc_info()[1] exit_failure() # retrieve bel documents for each KAM for entry in catalog: name = entry.name print " === LOADING KAM === " print ' KAM: "' + name + '"' handle = load_kam(client, name) print " KAM loaded" print documents = client.service.GetBelDocuments(handle) print " === LISTING DOCUMENTS === " for document in documents: id = document.id name = document.name desc = document.description