public function showWSDL()
    {
        //check if it's a legal webservice class
        if (!in_array($this->name, $this->classNameArr)) {
            throw new Exception('No valid webservice class.');
        }

        header('Content-type: text/xml');
        if ($this->useWSDLCache && file_exists($this->wsdlfile)) {
            readfile($this->wsdlfile);
        } else {
            //make sure to refresh PHP WSDL cache system
            ini_set('soap.wsdl_cache_enabled', 0);
            echo $this->createWSDL();
        }
    }