Following example webinars on how to use a web-service to upload a file.
My client uses a simple POST. no Soap, no JSON.I kept GPFing the server, and have found two anomalies
in my NetWebServiceMethod
I am using a 'File' type parameter which is a local Stringtheory object called Incomingfile - just like webinar example.
it generates something like this
PrimeParameters routine
!clear all table record structures nice and early.
IncomingFile = p_web.MethodParameter ! REST default parameter. May be overridden lower down
Case p_web.RequestMethodType
of NetWebServer_GET
of NetWebServer_POST
of NetWebServer_PUT
of NetWebServer_DELETE
End
If p_web.xml = 0 and p_web.json = 0 ! incoming parameters are just url encoded, either in the URL, or as post data, or as a cookie.
IncomingFile.Free()
If p_web.IfExistsValue('IncomingFile') then IncomingFile.SetValue(p_web.GetFileFromPost('IncomingFile')).
...
I GPF on IncomingFile.Free() i believe because of
IncomingFile = p_web.MethodParameter ! REST default parameter. May be overridden lower down
commenting this line allows the code to execute.
also if i tick the send parameters to debugview it generates a comple error.
p_web.Trace('IncomingFile = ' & IncomingFile.Sub(1,100 & ' .....' )