Question

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()

        ));
    }
Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top