Exemplo n.º 1
0
 public function addFault(Fault $fault)
 {
     $this->faults[$fault->getName()] = $fault;
     return $this;
 }
Exemplo n.º 2
0
 public function onBindingOperationFault(FaultEvent $event)
 {
     $operation = $event->getFault()->getOperation();
     $soapOperation = $this->operations[spl_object_hash($operation)];
     $typeOperation = $operation->getBinding()->getType()->getOperation($operation->getName());
     $message = $typeOperation->getFault($event->getFault()->getName())->getMessage();
     foreach ($event->getNode()->childNodes as $node) {
         if ($node->namespaceURI !== self::SOAP_NS) {
             continue;
         }
         if ($node->localName == 'fault') {
             $fault = new Fault($typeOperation->getFault($event->getFault()->getName()));
             $fault->setName($event->getNode()->getAttribute("name"));
             $this->fillBody($fault, $message, $node);
             $soapOperation->addFault($fault);
         }
     }
 }