public HttpResponseMessage VerificarEmail(int p_usuarioweb_oid) { // CAD, CEN, returnValue UsuarioWebVerificarCuentaRESTCAD usuarioWebVerificarCuentaRESTCAD = null; UsuarioWebCEN usuarioWebCEN = null; try { SessionInitializeTransaction(); usuarioWebVerificarCuentaRESTCAD = new UsuarioWebVerificarCuentaRESTCAD(session); usuarioWebCEN = new UsuarioWebCEN(usuarioWebVerificarCuentaRESTCAD); // Operation usuarioWebCEN.VerificarEmail(p_usuarioweb_oid); SessionCommit(); } catch (Exception e) { SessionRollBack(); if (e.GetType() == typeof(HttpResponseException)) { throw e; } else if (e.GetType() == typeof(ReciclaUAGenNHibernate.Exceptions.ModelException) && e.Message.Equals("El token es incorrecto")) { throw new HttpResponseException(HttpStatusCode.Forbidden); } else if (e.GetType() == typeof(ReciclaUAGenNHibernate.Exceptions.ModelException) || e.GetType() == typeof(ReciclaUAGenNHibernate.Exceptions.DataLayerException)) { throw new HttpResponseException(HttpStatusCode.BadRequest); } else { throw new HttpResponseException(HttpStatusCode.InternalServerError); } } finally { SessionClose(); } // Return 200 - OK return(this.Request.CreateResponse(HttpStatusCode.OK)); }