• Модуль: webservice
  • Путь к файлу: ~/bitrix/modules/webservice/classes/general/wsdl/wsdlcreator.php
  • Класс: CWSDLCreator
  • Вызов: CWSDLCreator::__createBinding
function __createBinding ($bindings)
{
	if (is_array($bindings)) {
		$b = new CXMLCreator("wsdl:binding");
		foreach ($bindings as $class=>$methods) {
			$b->setAttribute("name", $class."Binding");
			$b->setAttribute("type", "tns:".$class."Interface");
			$s = new CXMLCreator("soap:binding");
			$s->setAttribute("transport", "http://schemas.xmlsoap.org/soap/http");
			$b->addChild($s);
			foreach ($methods as $method=>$components) {
				$op = new CXMLCreator("wsdl:operation");
				$op->setAttribute("name", $method);
				$s = new CXMLCreator("soap:operation");
				$s->setAttribute("soapAction", $this->targetNamespace.$method);
				$s->setAttribute("style", "document");
				$op->addChild($s);

				$input = new CXMLCreator("wsdl:input");
				$s = new CXMLCreator("soap:body");
				$s->setAttribute("use", "literal");

				$input->addChild($s);
				$op->addChild($input);

				$output = new CXMLCreator("wsdl:output");
				$output->addChild($s);
				$op->addChild($output);
				$b->addChild($op);
			}
			$this->bindings[] = $b;
		}
	}
}