def toDom(self):
        namespaceURI = DOM.GetWSDLUri(self.version)
        self.document = DOM.createDocument(namespaceURI ,'wsdl:definitions')

        # Set up a couple prefixes for easy reading.
        child = DOM.getElement(self.document, None)
        child.setAttributeNS(None, 'targetNamespace', self.targetNamespace)
        child.setAttributeNS(XMLNS.BASE, 'xmlns:wsdl', namespaceURI)
        child.setAttributeNS(XMLNS.BASE, 'xmlns:xsd', 'http://www.w3.org/1999/XMLSchema')
        child.setAttributeNS(XMLNS.BASE, 'xmlns:soap', 'http://schemas.xmlsoap.org/wsdl/soap/')
        child.setAttributeNS(XMLNS.BASE, 'xmlns:tns', self.targetNamespace)

        # wsdl:import
        for item in self.imports: 
            item.toDom()
        # wsdl:message
        for item in self.messages:
            item.toDom()
        # wsdl:portType
        for item in self.portTypes:
            item.toDom()
        # wsdl:binding
        for item in self.bindings:
            item.toDom()
        # wsdl:service
        for item in self.services:
            item.toDom()
Generate a DOM representation of the WSDL instance.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/SOAPpy/wstools/WSDLTools.py/WSDL.toDom