throwing HTTP Error(BAD REQUEST) if XML is not proper