5 Attachment(s)
Error message when send a JSON greater than 520000
I've created a RESTFUL API using the following link:
[URL]https://www.unicorninterglobal.com/Company-White-Papers-Creating-RESTful-JSON-Web-Services-in-DataFlex-868[/URL]
When I try to send a JSON with greater than 520000 characters, the following errors occur.
[B]At Client Side[/B]
[ATTACH=CONFIG]12626[/ATTACH]
[B]At Server Side[/B]
[ATTACH=CONFIG]12627[/ATTACH]
[ATTACH=CONFIG]12628[/ATTACH]
[ATTACH=CONFIG]12629[/ATTACH]
[B]At Debugger
[/B][ATTACH=CONFIG]12630[/ATTACH]
I tried the POSTMAN program.
I used the HttpPostRequest / HttpPostAddrRequest function
I increased the maximum limit of the variables size and the error remained
In all the cases, the error still remains.
PS: Sorry for my bad English.
Re: Error message when send a JSON greater than 520000
i would guess your issue is with the argument_size which limits string sizes
Re: Error message when send a JSON greater than 520000
[QUOTE=starzen;342099]i would guess your issue is with the argument_size which limits string sizes[/QUOTE]
Thanks for the answer, but I set the argument_size to 6144000.
Re: Error message when send a JSON greater than 520000
where are you setting it. It may be too late
i have not used DAWs rest stuff as there are too many limits with it so i am not sure if this will work at all but i would think it should
you need to set the argument size as early as possible. Any code executing that processes your data has to have it set
so to test i would set it way at the beginning of the program before anything else.
Re: Error message when send a JSON greater than 520000
[QUOTE=starzen;342102]where are you setting it. It may be too late
i have not used DAWs rest stuff as there are too many limits with it so i am not sure if this will work at all but i would think it should
you need to set the argument size as early as possible. Any code executing that processes your data has to have it set
so to test i would set it way at the beginning of the program before anything else.[/QUOTE]
I set it inside the procedure 'Construct_Object' of 'cRESTfulService' class.
I also tried to set it inside of every procedure in 'cRESTfulService' class.
The error still remains.
I think the issue is in 'REST.asp' archive or maybe in IIS, because the error only occurs in the last line of 'ReturnJson' Procedure.
[B]REST.asp[/B]
[I]<%[/I]
[I]Dim sData, iLen[/I]
[I]iLen = Request.TotalBytes[/I]
[I]If (iLen > 0) Then sData = oExamesWS.UTF8ToString(Request.BinaryRead(iLen))[/I]
[I]Response.BinaryWrite oExamesWS.StringToUTF8 (oExamesWS.call("GET_ProcessCall", sData, iLen))[/I]
[I]%>[/I]
Re: Error message when send a JSON greater than 520000
Hi Dominicano
Two things...
1. This way of creating RESTful web services was really a short-term work-around - the 19.1 version (now at the Release Candidate stage) provides [U]much[/U] better facilities for doing this. If at all possible, I'd switch to that (no more ASP - just pure DataFlex).
2. Could you post some of your DataFlex code here? Not the business functionality, but the working guts of your cRESTfulService object. Use the code tags to make it readable (there is an icon for it if you click "Go Advanced" below).
Mike (I wrote the article)