gallemodena
Member
Hi everyone, I need help from anyone who has the desire and time to help me.
I have an application that sends a json to a web service via a httpjob and wait for the response (always a json) with a wait for.
On my PC, debug or release, everything works correctly.
On the server machine both the first sending and the first response work, but the response of a possible second sending causes the application crash.
No errors are caught even though there are "try catch" everywhere in the code.
Can someone help me?
This is the code:
The second time it passes through job.success the application crashes and no exception is caught.
For this application I use the library "jOkHttpUtils2 rel 3.03", and I tried to look for solutions on the forum, but I didn't find anything that could help me.
Thanks,
Christian
I have an application that sends a json to a web service via a httpjob and wait for the response (always a json) with a wait for.
On my PC, debug or release, everything works correctly.
On the server machine both the first sending and the first response work, but the response of a possible second sending causes the application crash.
No errors are caught even though there are "try catch" everywhere in the code.
Can someone help me?
This is the code:
sendJson:
Sub inviaJsonMultiplo (js As Object)
Try
Dim j As Map
j=js
Dim msg As JSONGenerator
msg.Initialize(j)
File.WriteString(File.DirApp & "\jsonSend","_order_" & DateTime.now & "_.json",msg.ToPrettyString(2))
Main.WriteLogInf("json create")
Dim job As HttpJob
job.Initialize("job",Me)
job.PostString(url,msg.ToString)
job.GetRequest.SetContentType("application/json; charset=utf-8")
job.GetRequest.SetHeader("Authorization",aut)
job.GetRequest.Timeout=600000
Main.WriteLogInf("json send")
Wait For (job) JobDone(job As HttpJob)
If job.Success Then
Main.WriteLogInf("job.success")
.....................
....................
Else
Log("connection error")
End If
Catch
Main.WriteLogErr("Exception")
Main.WriteLogErrWS(LastException)
End Try
job.Release
End Sub
The second time it passes through job.success the application crashes and no exception is caught.
For this application I use the library "jOkHttpUtils2 rel 3.03", and I tried to look for solutions on the forum, but I didn't find anything that could help me.
Thanks,
Christian