public HttpResponseMessage ActCred(JObject data) { String token = AccountController.GetTokenHeader(Request); string mensaje; int codigoError; try { Debug.Print("----- START ws ActCred ----"); var user = data.GetValue("user").Value <string>(); var credAnt = data.GetValue("cred_act").Value <string>(); var credNew = data.GetValue("cred_new").Value <string>(); ConsultaService service = new ConsultaService(); var results = service.ActualizarCredenciales(user, credAnt, credNew, out mensaje, out codigoError); RestDataResponse response = new RestDataResponse(results, RestDataResponse.STATUS_OK, mensaje); Debug.Print("----- END ws ActCred ----"); CRUDConsultaDbUtil.SaveConsulta(token, Constants.ACTUALIZAR_CRED, data.ToString(), codigoError.ToString(), mensaje); return(this.Request.CreateResponse(HttpStatusCode.OK, response)); } catch (Exception e) { Debug.Print(e.Message); Debug.Print(e.StackTrace.ToString()); CRUDConsultaDbUtil.SaveConsulta(token, Constants.ACTUALIZAR_CRED, data.ToString(), RestDataResponse.STATUS_ERROR.ToString(), "Error: " + e.Message); return(this.Request.CreateResponse(HttpStatusCode.InternalServerError, ErrorMessagesUtil.error())); } }