/** * Returns generated WSDL file for the webservice * * @param SimpleXMLElement $webservice Webservice configuration xml * @param string $wsdlPath Path of WSDL file * * @return SimpleXMLElement */ public static function generateWsdl($webservice, $wsdlPath = null) { if (empty($wsdlPath) && !empty($webservice)) { $client = RApiHalHelper::attributeToString($webservice, 'client', 'site'); $version = !empty($webservice->config->version) ? (string) $webservice->config->version : '1.0.0'; $name = (string) $webservice->config->name; $webserviceInstance = RApiHalHelper::getInstalledWebservice($client, $name, $version); $wsdlPath = self::getWebserviceFilePath($client, $name, $version, 'wsdl', $webserviceInstance['path']); } $wsdl = new RApiSoapWsdl($webservice); return $wsdl->generateWsdl($wsdlPath); }
/** * Returns generated WSDL file for the webservice * * @param SimpleXMLElement $webservice Webservice configuration xml * @param string $wsdlPath Path of WSDL file * * @return SimpleXMLElement */ public static function generateWsdl($webservice, $wsdlPath) { $wsdl = new RApiSoapWsdl($webservice); return $wsdl->generateWsdl($wsdlPath); }