Domanda

I am trying to get the response in onBootstrap function in zf2. It gives me the getRequest object in detail i.e. the Soap request that had been made. But it does not give me the getResponse object competely i.e. Soap response. Only thing it returns as a response is HTTP/1.1 200 OK. The bootstrap code is as follows:

public function onBootstrap(MvcEvent $e)
{

        $app = $e->getApplication();

        $em  = $app->getEventManager();

        $response = new Response();
        $logger = $sm->get('Zend\Log\Logger');


            $params = $e->getParams();      
        $logger->debug(sprintf(
                'Route event with route %s with name %s, response: %s ',
                 json_encode($params),
          $e->getApplication()->getRequest(),
          $e->getApplication()->getResponse()

        ));
    }
È stato utile?

Soluzione

Was Able to solve the issue by adding the line setResponse(true) in Soap Server.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top