# File lib/casclient/responses.rb, line 6 def check_and_parse_xml(raw_xml) begin doc = REXML::Document.new(raw_xml, :raw => :all) rescue REXML::ParseException => e raise BadResponseException, "MALFORMED CAS RESPONSE:\n#{raw_xml.inspect}\n\nEXCEPTION:\n#{e}" end unless doc.elements && doc.elements["cas:serviceResponse"] raise BadResponseException, "This does not appear to be a valid CAS response (missing cas:serviceResponse root element)!\nXML DOC:\n#{doc.to_s}" end return doc.elements["cas:serviceResponse"].elements[1] end
Generated with the Darkfish Rdoc Generator 2.