def __resolveport(self, definitions):
        """
        Resolve port_type reference.

        @param definitions: A definitions object.
        @type definitions: L{Definitions}

        """
        ref = qualify(self.type, self.root, definitions.tns)
        port_type = definitions.port_types.get(ref)
        if port_type is None:
            raise Exception("portType '%s', not-found" % (self.type,))
        # Later on we will require access to the message data referenced by
        # this port_type instance, and in order for those data references to be
        # available, port_type first needs to dereference its message
        # identification string. The only scenario where the port_type might
        # possibly not have already resolved its references, and where this
        # explicit resolve() call is required, is if we are dealing with a
        # recursive WSDL import chain.
        port_type.resolve(definitions)
        self.type = port_type