'Gets the values from the given response'

def get_response_values(self, response):

    parser = etree.XMLParser(ns_clean=True, recover=True, encoding='utf-8')
    root = etree.fromstring(response.body.strip(), parser=parser)
    lti_spec_namespace = 'http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0'
    namespaces = {'def': lti_spec_namespace}
    code_major = root.xpath('//def:imsx_codeMajor', namespaces=namespaces)[0].text
    description = root.xpath('//def:imsx_description', namespaces=namespaces)[0].text
    message_identifier = root.xpath('//def:imsx_messageIdentifier', namespaces=namespaces)[0].text
    imsx_pox_body = root.xpath('//def:imsx_POXBody', namespaces=namespaces)[0]
    try:
        action = imsx_pox_body.getchildren()[0].tag.replace((('{' + lti_spec_namespace) + '}'), '')
    except Exception:
        action = None
    return {'code_major': code_major, 'description': description, 'messageIdentifier': message_identifier, 'action': action}
