'Cache a token for later use.
The cached tag is stored by simply saving the entire RSP response
containing the auth element.'

def __setCachedToken(self, xml):

    path = self.__getCachedTokenPath()
    if (not os.path.exists(path)):
        os.makedirs(path)
    f = file(self.__getCachedTokenFilename(), 'w')
    f.write(xml)
    f.close()
