Error <MAXSTRING> (Stream to %xsd.base64Binary)
Hello everyone :-) A colleague wants to use data got from a stream into another type of object: %xsd.base64Binary (related to a webservice context).
His code works for regular data, but the following error appears when parsing large streams (~43 MB): "ERREUR #5002: Erreur Cache: <MAXSTRING>"
Here is below his code:
Class (...).StampDataRequest Extends Ens.Request [ ProcedureBlock ]
{
…
Property DocumentData As %xsd.base64Binary;
…
}
Method OnRequest(pRequest As Ens.StreamContainer, Output pResponse As Ens.Response) As %Status
{
...
set fileStream = ##class(%Stream.GlobalCharacter).%New()
do fileStream.CopyFromAndSave(pRequest.Stream)
//fileStream contains bytes from pRequest
set tsRequest = ##class((...).StampDataRequest).%New()
…
do fileStream.Rewind()
while 'fileStream.AtEnd {
set tsRequest.DocumentData = tsRequest.DocumentData_fileStream.Read(30000)
}
…
}
What should he change in this code for not to have this size limitation ?
Best regards,
Mathieu