-- mejora
This commit is contained in:
@@ -129,11 +129,12 @@ Public Class E119 : Implements IHttpHandler
|
||||
End If
|
||||
|
||||
If Metodo = "RegistraRemision" Then
|
||||
|
||||
context.Response.ContentType = "application/json"
|
||||
Dim Auth As AuthMessage = ValidarSolicitud(context)
|
||||
|
||||
MsgLog.AppendLine("Validado:" & Auth.IsSuccess)
|
||||
If Auth.IsSuccess Then
|
||||
retorno = RegistraRemision(context)
|
||||
retorno = RegistraRemision(context, MsgLog)
|
||||
Else
|
||||
context.Response.StatusCode = Auth.StatusCode
|
||||
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
|
||||
@@ -335,15 +336,14 @@ Public Class E119 : Implements IHttpHandler
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function RegistraRemision(ByVal context As HttpContext) As String
|
||||
Private Function RegistraRemision(ByVal context As HttpContext, ByRef MsgLog As StringBuilder) As String
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim JsonRequest As JObject = Nothing
|
||||
Dim Respuesta As New ResponseMsg
|
||||
Dim RespuestaError As New ResponseMsgError
|
||||
Dim MsgLog As New StringBuilder
|
||||
Try
|
||||
|
||||
Try
|
||||
MsgLog.AppendLine("1.0 Registra")
|
||||
If context.Request.InputStream IsNot Nothing Then
|
||||
Using reader As New StreamReader(context.Request.InputStream)
|
||||
@@ -355,6 +355,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
MsgLog.AppendLine("json:" & json)
|
||||
TieneError = True
|
||||
End If
|
||||
End Using
|
||||
@@ -362,7 +363,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
|
||||
MsgLog.AppendLine("1.1 accedido")
|
||||
If TieneError Then
|
||||
RespuestaError.message = "No se pudo procesar la solicitud - Formato mal formado"
|
||||
RespuestaError.message = "No se pudo procesar la solicitud - Formato mal formado (1.1)"
|
||||
context.Response.StatusCode = 200
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
End If
|
||||
@@ -528,9 +529,10 @@ Public Class E119 : Implements IHttpHandler
|
||||
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
Finally
|
||||
MsgLog.ToString.GuardaLogAD("LogE119")
|
||||
End Try
|
||||
|
||||
MsgLog.ToString.GuardaLogAD("LogE119")
|
||||
If TieneError Then
|
||||
context.Response.StatusCode = 200
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
|
||||
Reference in New Issue
Block a user