public void GetDatalayers() { try { DataLayers dataLayers = _adapterProvider.GetDataLayers(); string xml = Utility.Serialize <DataLayers>(dataLayers, true); HttpContext.Current.Response.ContentType = "application/xml"; HttpContext.Current.Response.Write(xml); } catch (Exception e) { CustomErrorLog objCustomErrorLog = new CustomErrorLog(); _CustomError = objCustomErrorLog.customErrorLogger(ErrorMessages.errGetDataLayer, e, _logger); objCustomErrorLog.throwJsonResponse(_CustomError); } }