public function getWsdl($class = null)
    {
        /*
        if ($class != null) {
            $this->class = $class;
        } elseif ($this->class == null) {
            throw new \RuntimeException("No class defined");
        }

        if (!is_object($this->class) && !is_string($this->class)) {
            throw new \RuntimeException("Given class is neither class nor string");
        }

        if (is_string($this->class)) {
            if (!class_exists($this->class)) {
                throw new \RuntimeException("Class ".$class." is not found. Did you forget to include it?");
            }
            $this->class = new $this->class();
        }

        */

        //$this->refl = new \ReflectionClass($this->class);

        //$this->wsdl = new \Zend_Soap_Wsdl($this->refl->getShortName(),
        //                                 $this->namespaceToUrn($this->refl->getNamespaceName()));



        $factory = new wsdl\WsdlFactory($class, wsdl\WsdlFactory::WSDL_1_1);
        $this->wsdl = $factory->getImplementation();
        $this->wsdl->debug = true;
        /*
        $this->addTypes();
        $this->addMessages();
        $this->addPortType();
        $this->addBindings();

        $this->addServices();

        $dom = $this->wsdl->toDomDocument();
        if ($this->debug) {
            $dom->formatOutput = true;
        }*/

        return $this->wsdl->toXml();//$dom->saveXml();
    }