private function binding()
{
$name = $this->builder->getName();
$targetNamespace = $this->builder->getTargetNamespace();
$bindingElement = $this->createElementWithAttributes('binding', ['name' => $name . 'Binding', 'type' => 'tns:' . $name . 'PortType']);
$soapBindingElement = $this->XMLStyle->generateBinding($this->DOMDocument, $this->XMLSoapVersion);
$bindingElement->appendChild($soapBindingElement);
foreach ($this->builder->getMethods() as $method) {
$methodName = $method->getName();
$operationElement = $this->createElementWithAttributes('operation', ['name' => $methodName]);
$soapOperationElement = $this->createElementWithAttributes($this->XMLSoapVersion . ':operation', ['soapAction' => $targetNamespace . '/#' . $methodName]);
$operationElement->appendChild($soapOperationElement);
$soapBodyElement = $this->XMLUse->generateSoapBody($this->DOMDocument, $targetNamespace, $this->XMLSoapVersion);
$this->bindingElement($methodName, $soapBodyElement, $operationElement, 'input', 'RequestHeader', $method->getHeaderParameter());
$this->bindingElement($methodName, $soapBodyElement, $operationElement, 'output', 'ResponseHeader', $method->getHeaderReturn());
$bindingElement->appendChild($operationElement);
}
$this->definitionsRootNode->appendChild($bindingElement);
return $this;
}