'Add I{static} mapping of an XML namespace prefix to a namespace.
This is useful for cases when a wsdl and referenced schemas make heavy
use of namespaces and those namespaces are subject to changed.
@param prefix: An XML namespace prefix.
@type prefix: str
@param uri: An XML namespace URI.
@type uri: str
@raise Exception: when prefix is already mapped.'

def add_prefix(self, prefix, uri):

    root = self.wsdl.root
    mapped = root.resolvePrefix(prefix, None)
    if (mapped is None):
        root.addPrefix(prefix, uri)
        return
    if (mapped[1] != uri):
        raise Exception(('"%s"    already    mapped    as    "%s"' % (prefix, mapped)))
