public function generateWsdl()
    {
        if (is_object($this->provider)) {
            $providerClass = get_class($this->provider);
        } else {
            $providerClass = $this->provider;
        }
        if ($this->wsdlCacheDuration > 0 && $this->cacheID !== false && ($cache = Yii::$app->get($this->cacheID, false)) !== null) {
            $key = 'Yii.WebService.' . $providerClass . $this->serviceUrl . $this->encoding;
            if (($wsdl = $cache->get($key)) !== false) {
                return $wsdl;
            }
        }
        $generator = Yii::createObject($this->generatorConfig);
        $wsdl = $generator->generateWsdl($providerClass, $this->serviceUrl, $this->encoding);
        if (isset($key, $cache)) {
            $cache->set($key, $wsdl, $this->wsdlCacheDuration);
        }
        return $wsdl;
    }