95 \
Magento\Webapi\Model\
Soap\Wsdl\Generator $wsdlGenerator,
99 \
Magento\Framework\Locale\ResolverInterface $localeResolver,
106 $this->_wsdlGenerator = $wsdlGenerator;
107 $this->_soapServer = $soapServer;
108 $this->_errorProcessor = $errorProcessor;
109 $this->_appState = $appState;
110 $this->_localeResolver = $localeResolver;
111 $this->_pathProcessor = $pathProcessor;
124 $path = $this->_pathProcessor->process(
$request->getPathInfo());
125 $this->_request->setPathInfo(
$path);
126 $this->areaList->getArea($this->_appState->getAreaCode())->load(\
Magento\Framework\
App\Area::PART_TRANSLATE);
130 $responseBody = $this->_wsdlGenerator->generate(
131 $this->_request->getRequestedServices(),
132 $this->_request->getScheme(),
133 $this->_request->getHttpHost(),
134 $this->_soapServer->generateUri()
140 foreach ($this->_wsdlGenerator->getListOfServices() as $serviceName) {
141 $servicesList[$serviceName][
'wsdl_endpoint'] = $this->_soapServer->getEndpointUri()
144 $renderer = $this->rendererFactory->get();
148 $this->_soapServer->handle();
150 }
catch (\Exception $e) {
163 return $this->_request->getParam(\
Magento\Webapi\Model\
Soap\Server::REQUEST_PARAM_WSDL) !==
null;
173 return $this->_request->getParam(\
Magento\Webapi\Model\
Soap\Server::REQUEST_PARAM_LIST_WSDL) !==
null;
184 $maskedException = $this->_errorProcessor->maskException($exception);
186 $httpCode = $maskedException->getHttpCode();
193 $this->_response->setHttpResponseCode($httpCode);
194 $soapFault = new \Magento\Webapi\Model\Soap\Fault(
198 $this->_localeResolver,
212 $this->_response->clearHeaders()->setHeader(
214 "{$contentType}; charset={$this->_soapServer->getApiCharset()}" 227 $this->_response->setBody(
229 '/<\?xml version="([^\"]+)"([^>]+)>/i',
230 '<?xml version="$1" encoding="' . $this->_soapServer->getApiCharset() .
'"?>',
247 $requestParams = array_keys($this->_request->getParams());
248 $allowedParams = [$wsdlParam, $servicesParam];
249 $notAllowedParameters = array_diff($requestParams, $allowedParams);
250 if (count($notAllowedParameters)) {
251 $notAllowed = implode(
', ', $notAllowedParameters);
253 'Not allowed parameters: %1. Please use only %2 and %3.',
258 throw new \Magento\Framework\Webapi\Exception(
$message);
elseif(isset( $params[ 'redirect_parent']))
_setResponseContentType($contentType='text/xml')
dispatch(\Magento\Framework\App\RequestInterface $request)
_setResponseBody($responseBody)
const CONTENT_TYPE_SOAP_CALL
const REQUEST_PARAM_SERVICES
_prepareErrorResponse($exception)
__construct(Request $request, \Magento\Framework\Webapi\Response $response, \Magento\Webapi\Model\Soap\Wsdl\Generator $wsdlGenerator, \Magento\Webapi\Model\Soap\Server $soapServer, ErrorProcessor $errorProcessor, \Magento\Framework\App\State $appState, \Magento\Framework\Locale\ResolverInterface $localeResolver, PathProcessor $pathProcessor, \Magento\Framework\Webapi\Rest\Response\RendererFactory $rendererFactory, \Magento\Framework\App\AreaList $areaList)
const CONTENT_TYPE_WSDL_REQUEST