public static function create(\SoapClient $client, \Exception $exception)
    {
        $exception = new static($exception->getMessage(), $exception->getCode(), $exception);

        if (!empty($xml = $client->__getLastRequest())) {
            $exception->request = static::formatXml($xml);
        }
        if (!empty($xml = $client->__getLastResponse())) {
            $exception->response = static::formatXml($xml);
        }

        return $exception;
    }