• Модуль: webservice
  • Путь к файлу: ~/bitrix/modules/webservice/classes/general/wsdl/wsdlcreator.php
  • Класс: CWSDLCreator
  • Вызов: CWSDLCreator::__createPortType
function __createPortType ($portTypes)
{
	if (is_array($portTypes)) {
		foreach ($portTypes as $class=>$methods) {
			$pt = new CXMLCreator("wsdl:portType");
			$pt->setAttribute("name", $class."Interface");
			foreach ($methods as $method=>$components) {
				$op = new CXMLCreator("wsdl:operation");
				$op->setAttribute("name", $method);

				$input = new CXMLCreator("wsdl:input");
				$input->setAttribute("message", "tns:".$method."SoapIn");
				$op->addChild($input);

				$output = new CXMLCreator("wsdl:output");
				$output->setAttribute("message", "tns:".$method."SoapOut");
				$op->addChild($output);

				if ($components["documentation"]) {
					$doc = new CXMLCreator("wsdl:documentation");
					$doc->setData($components["documentation"]);
					$op->addChild($doc);
				}

				$pt->addChild($op);
			}
			$this->portTypes[] = $pt;
		}
	}
}