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