- Модуль: webservice
- Путь к файлу: ~/bitrix/modules/webservice/classes/general/wsdl/wsdlcreator.php
- Класс: CWSDLCreator
- Вызов: CWSDLCreator::__construct
public function __construct($serviceName, $serviceUrl = "", $targetNamespace = "")
{
global $APPLICATION;
$serviceName = str_replace(" ", "_", $serviceName);
if (!$serviceUrl) $serviceUrl = ($APPLICATION->IsHTTPS() ? "https" : "http")."://".$_SERVER["HTTP_HOST"].$APPLICATION->GetCurPage();
if (!$targetNamespace) $targetNamespace = ($APPLICATION->IsHTTPS() ? "https" : "http")."://".$_SERVER["HTTP_HOST"]."/";
$this->WSDLXML = new CXMLCreator("wsdl:definitions");
$this->WSDLXML->setAttribute("name", $serviceName);
$this->WSDLXML->setAttribute("targetNamespace", $targetNamespace);
$this->WSDLXML->setAttribute("xmlns:tns",$targetNamespace);
$this->WSDLXML->setAttribute("xmlns:http","http://schemas.xmlsoap.org/wsdl/http/");
$this->WSDLXML->setAttribute("xmlns:mime","http://schemas.xmlsoap.org/wsdl/mime/");
$this->WSDLXML->setAttribute("xmlns:tm","http://microsoft.com/wsdl/mime/textMatching/");
$this->WSDLXML->setAttribute("xmlns:xsd", "http://www.w3.org/2001/XMLSchema");
$this->WSDLXML->setAttribute("xmlns:soap", "http://schemas.xmlsoap.org/wsdl/soap/");
$this->WSDLXML->setAttribute("xmlns:soap12", "http://schemas.xmlsoap.org/wsdl/soap12/");
$this->WSDLXML->setAttribute("xmlns:soapenc", "http://schemas.xmlsoap.org/soap/encoding/");
$this->WSDLXML->setAttribute("xmlns:wsdl", "http://schemas.xmlsoap.org/wsdl/");
//$this->WSDLXML->setAttribute("xmlns", "http://schemas.xmlsoap.org/wsdl/");
$this->serviceName = $serviceName;
$this->serviceUrl = $serviceUrl;
$this->targetNamespace = $targetNamespace;
}