Fehlerhandling ATEZ bei not receivedResponseHeader verbessert., Digicust API erweitert.
This commit is contained in:
@@ -581,7 +581,6 @@ Public Class cATEZ_NCTS_IN
|
||||
Dim rest As New Chilkat.Rest
|
||||
Dim success As Boolean
|
||||
|
||||
|
||||
Dim bTls As Boolean = True
|
||||
Dim port As Integer = 443
|
||||
Dim bAutoReconnect As Boolean = True
|
||||
@@ -608,6 +607,7 @@ Public Class cATEZ_NCTS_IN
|
||||
|
||||
'rest.PercentDoneOnSend = True
|
||||
rest.IdleTimeoutMs = 5000 * 16
|
||||
rest.VerboseLogging = True
|
||||
|
||||
success = rest.SendReqSb("POST", "/api/integrations/verag", sbRequestBody)
|
||||
|
||||
@@ -621,8 +621,12 @@ Public Class cATEZ_NCTS_IN
|
||||
Next
|
||||
|
||||
If rest.ResponseStatusCode <> 200 Then
|
||||
If responseStatusCode = -1 Then
|
||||
Return responseStatusCode
|
||||
End If
|
||||
MsgBox(rest.LastErrorText)
|
||||
Return responseStatusCode & "-" & rest.ResponseStatusText
|
||||
failureDesc = responseStatusCode & "-" & rest.ResponseStatusText
|
||||
Return failureDesc
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -691,7 +695,6 @@ Public Class cATEZ_NCTS_IN
|
||||
success = jsonData.UpdateString("Guarantee.GRN", ncts.Guarantee_GRN)
|
||||
|
||||
|
||||
|
||||
Dim Route_LIST As New List(Of VERAG_PROG_ALLGEMEIN.cATEZ_NCTS_Routen)
|
||||
VERAG_PROG_ALLGEMEIN.cATEZ_NCTS_Routen.LOAD_LIST_ByNCTS(Route_LIST, ncts.Id)
|
||||
|
||||
|
||||
@@ -487,7 +487,7 @@ Public Class cDigicustAPI
|
||||
|
||||
' createUserinput(rest, counter, dig)
|
||||
|
||||
rest.PartSelector = "0"
|
||||
|
||||
|
||||
rest.AddHeader("Content-Type", "multipart/form-data")
|
||||
rest.AddHeader("Authorization", "Bearer " & token)
|
||||
@@ -499,6 +499,11 @@ Public Class cDigicustAPI
|
||||
|
||||
rest.SendReqMultipart("POST", "/upload/api/" & settings.customerId & "/" & settings.projectId & "/new")
|
||||
|
||||
rest.PartSelector = "0"
|
||||
rest.ClearAllHeaders()
|
||||
rest.ClearAllParts()
|
||||
rest.PartSelector = ""
|
||||
|
||||
Dim responseStatusCode = rest.ReadResponseHeader()
|
||||
If (responseStatusCode < 0) Then
|
||||
For i = 0 To 15 'Versuche den Header 16x abzufragen (funktioniert ab und zu nicht).
|
||||
@@ -619,10 +624,15 @@ Public Class cDigicustAPI
|
||||
|
||||
Shared Function createUserinput(ByRef rest As Chilkat.Rest, ByRef counter As Integer, ByVal sendung As cDigicustSendungen)
|
||||
|
||||
'zusätzliche Informationen aus dem AVISO
|
||||
|
||||
'beforeNormalization(fallback -> falls Daten nicht gelesen werden können, wird ergänzt)
|
||||
'afterNormalization(overwrite -> werden mit mitgeschickten Infos überschrieben).
|
||||
|
||||
Dim jsonArray As New Chilkat.JsonArray()
|
||||
|
||||
|
||||
|
||||
Dim json As New Chilkat.JsonObject
|
||||
If sendung.licencePlate <> "" Then
|
||||
json.UpdateString("truckLicensePlate", sendung.licencePlate)
|
||||
|
||||
Reference in New Issue
Block a user