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

        ));
    }
有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top