[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
XALLOC in program LIBHTTP/HTTPAPIR4
I'm using HTTPAPI to send a request to a web service and then parse the response. When receiving the response, I create a new stream file in the IFS and write the embedded XML document received in the response to the stream file.
To create the stream file, I'm using this code:
fd = open( embfile
: O_CREAT + O_WRONLY + O_EXCL +
O_CCSID + O_TEXTDATA + O_TEXT_CREAT
: S_IRUSR + S_IWUSR + S_IROTH
: 819
: 0 );
callp write(fd: retval.valptr: retval.len);
callp close(fd);
It's been working very well, until I received an error message:
From module . . . . . . . . : QRNXMSG
From procedure . . . . . . : SignalException
Statement . . . . . . . . . : 21
To module . . . . . . . . . : HTTPUTILR4
To procedure . . . . . . . : XALLOC
Statement . . . . . . . . . : 3433
Message . . . . : The length requested for storage allocation is out of
range.
Cause . . . . . : RPG procedure XALLOC in program LIBHTTP/HTTPAPIR4 tried to
allocate storage with a length that was not a value between 1 and 16776704.
Recovery . . . : Contact the person responsible for program maintenance
The HTTP header of the response in this case follows:
HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Content-Length: 9767093
Content-Type: text/xml; charset=utf-8
svr: renwws02
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Date: Mon, 07 Feb 2011 19:52:11 GMT
I dumped the program, but am not sure how to tell how much memory XALLOC tried to allocate. I do know that this response is significantly larger than most that I receive, but probably not as large as some that are going to come down the pike.
Any ideas on where to start?
Thanks so much,
Kim Gibson
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------