protected function process()
    {
        // Uses the response object by default
        $this->result = $this->getRequest()->getResponse();

        $contentType = $this->result->getContentType();

        if (stripos($contentType, 'xml') === false) {
            throw new \Exception('The Response is not in a valid XML Content Type.');
        }

        $body = trim($this->result->getBody(true));
        $this->result = new EncodingResponse($body);

        $this->handleResponseErrors($this->result);
    }