/** * {@inheritdoc} */ public function call($serviceInfo, $arguments = [], $storeCode = null, $integration = null) { $soapOperation = $this->_getSoapOperation($serviceInfo); $arguments = $this->_converter->convertKeysToCamelCase($arguments); $soapResponse = $this->_getSoapClient($serviceInfo, $storeCode)->{$soapOperation}($arguments); //Convert to snake case for tests to use same assertion data for both SOAP and REST tests $result = is_array($soapResponse) || is_object($soapResponse) ? $this->toSnakeCase($this->_converter->convertStdObjectToArray($soapResponse, true)) : $soapResponse; /** Remove result wrappers */ $result = isset($result[SoapHandler::RESULT_NODE_NAME]) ? $result[SoapHandler::RESULT_NODE_NAME] : $result; return $result; }
/** * Convert SOAP operation arguments into format acceptable by service method. * * @param string $serviceClass * @param string $serviceMethod * @param array $arguments * @return array */ protected function _prepareRequestData($serviceClass, $serviceMethod, $arguments) { /** SoapServer wraps parameters into array. Thus this wrapping should be removed to get access to parameters. */ $arguments = reset($arguments); $arguments = $this->_dataObjectConverter->convertStdObjectToArray($arguments, true); return $this->serviceInputProcessor->process($serviceClass, $serviceMethod, $arguments); }