Welcome! Log In Create A New Profile

Advanced

[WD22] REST service - Error 2605 - Format of binary information is incorrect

Posted by Michael Drechsel 
Hi,

I have made a application which uses a self written REST service.
It works so far but from time to time users get "error code 2605, Format of binary information is incorrect"

I think its probably a bad internet connection but I not sure.

Any ideas ?

regards Michael



Edited 1 time(s). Last edit at 03/05/2019 09:23AM by Michael Drechsel.
Re: [WD22] REST service - Error 2605 - Format of binary information is incorrect
March 05, 2019 05:55PM
Hi Michael,

if the information to be transferred is very large and complex then maybe, it is a bad internet connection. But it could be as well that threads are "fighting" for their share of the cpu time and serializing / de-serializing of the JSON message fails. If data is large I'd look whether there are ways to cut down the amount of transferred data within a single REST operation. Since it is a rare event, why not catch the error and simply re-do the transfer?

Kind regards,
Guenter Predl
office@windev.at
Hi Guenter,

yes, that could be a solution for read operations.
But I have no clue what to do with write operations. In this case there should not be a second time.
I canĀ“t get the information if the transfer of JSON is corrupt before or after doing the database operation at the backend server.

regards Michael



Edited 1 time(s). Last edit at 03/06/2019 09:00AM by Michael Drechsel.
Re: [WD22] REST service - Error 2605 - Format of binary information is incorrect
March 06, 2019 09:06AM
Michael,

I'm not sure if WD is handling this itself, but do you convert the binary info to the base64 format? This ensures the data does not contain any sequences which could "break" the JSON field holding this data.
That could very well explain the 'every now and then error'. It depends on the nature of your binary data then.

Arie
Hi Arie,

I compress the buffer after Serialize to minimize the traffic and use the following code sequence:

Serialize(stMYPara_BCF,bufBIN,psdBinary)
bufBIN=HttpRequest_einleiten("Doku_Aufgaben_holen",Compress(bufBIN),"",stMYPara_BCF.stMySystem.MyProjektkonfiguration.sWebserviceAdresse)  //Progressbar Darstellung in Hauptfenster
Deserialize(gstMyBCF,Uncompress(bufBIN),psdBinary)

Yes, I think WD converts it in base64 itself. But the "base64 stream" could nevertheless break throught a bad internet connection.

regards Michael



Edited 1 time(s). Last edit at 03/06/2019 11:02AM by Michael Drechsel.
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: