public function execute(Request $request, Response $response)
 {
     parent::execute($request, $response);
     Logger::info("Starting processing of listener request from {$this->request->getClientIp()}");
     try {
         $this->doIngressSecurity();
         $soapData = $request->getRawRequest();
         $tl = Logger::getTaggedLogger('RawData');
         $tl->info($soapData);
         $response->sendHeaders();
         /* --- Unfortunately because of how PHP handles SOAP requests we cannot do the fully wrapped
         					loop like we could in the REST listener. Instead it is up to the listener itself to
         					do the required call to $this->processMessage( $msg ).
         
         					It is also expected that inside the handle() context that an exception will throw a SOAP
         					fault through $this->server->fault() instead of doing a $response->kill_response() call.
         			*/
         $this->server->setObject($this);
         $this->server->handle($soapData);
         /* We disable output late in the game in case there was a last minute exception that could
         			be handled by the SOAP listener object inside the handle() context. */
         $response->setOutputDisabled();
     } catch (ListenerSecurityException $ex) {
         Logger::notice('Message denied by security policy, death is me.', null, $ex);
         $response->setStatusCode(403, "Not authorized.");
     } catch (\Exception $ex) {
         Logger::error('Listener threw an unknown exception, death is me.', null, $ex);
         $response->setStatusCode(500, "Unknown listener exception.");
     }
     Logger::info('Finished processing listener request');
 }
 public function execute(Request $request, Response $response)
 {
     parent::execute($request, $response);
     Logger::info("Starting processing of listener request from {$this->request->getClientIp()}");
     try {
         $this->doIngressSecurity();
         $msgs = $this->parseEnvelope($request);
         if (is_array($msgs)) {
             foreach ($msgs as $msg) {
                 $this->processMessage($msg);
             }
         }
         $this->ackEnvelope();
     } catch (ListenerSecurityException $ex) {
         Logger::notice('Message denied by security policy, death is me.', null, $ex);
         $response->setStatusCode(403, "Not authorized.");
     } catch (ListenerDataException $ex) {
         Logger::error('Listener received request it could not process, death is me.', null, $ex);
         $response->setStatusCode(500, 'Received data could not be processed.');
     } catch (Core\ConfigurationException $ex) {
         Logger::alert('Some sad panda gave me a bad configuration.', null, $ex);
         $response->setStatusCode(500, "Configuration error.");
     } catch (\Exception $ex) {
         Logger::error('Listener threw an unknown exception, death is me.', null, $ex);
         $response->setStatusCode(500, "Unknown listener exception");
     }
     Logger::info('Finished processing listener request');
 }