public function load($file, $type = null)
 {
     $path = $this->locator->locate($file);
     $xml = $this->parseFile($path);
     $definition = new ServiceDefinition();
     $definition->setName((string) $xml['name']);
     $definition->setNamespace((string) $xml['namespace']);
     foreach ($xml->header as $header) {
         $definition->getHeaders()->add($this->parseHeader($header));
     }
     foreach ($xml->method as $method) {
         $definition->getMethods()->add($this->parseMethod($method));
     }
     return $definition;
 }
 public function processServiceHeader($name, $data)
 {
     $headerDefinition = $this->definition->getHeaders()->get($name);
     return $this->createSoapHeader($headerDefinition, $data);
 }