Beispiel #1
0
 /**
  * Dispatch request to SOAP endpoint.
  *
  * @return Mage_Webapi_Controller_Dispatcher_Soap
  */
 public function dispatch()
 {
     try {
         if ($this->_request->getParam(Mage_Webapi_Model_Soap_Server::REQUEST_PARAM_WSDL) !== null) {
             $responseBody = $this->_autoDiscover->handle($this->_request->getRequestedResources(), $this->_soapServer->generateUri());
             $this->_setResponseContentType('text/xml');
         } else {
             $responseBody = $this->_initSoapServer()->handle();
             $this->_setResponseContentType('application/soap+xml');
         }
         $this->_setResponseBody($responseBody);
     } catch (Exception $e) {
         $maskedException = $this->_errorProcessor->maskException($e);
         $this->_processBadRequest($maskedException->getMessage());
     }
     $this->_response->sendResponse();
     return $this;
 }