문제

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