[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: recvchunk: saveproc: Not all data was written
Hi Tim,
The "raw" routines in HTTPAPI let you supply your own "saveproc"
routine. The idea is that each time data is received, it calls your
custom-written subprocedure, and lets that subprocedure do the work.
If you look closely at the prototype for saveproc, you'll see that the
code looks something like this:
D saveproc PR 10I 0 ExtProc(peProcedure)
D fd 10I 0 value
D data * value
D length 10I 0 value
Notice the ExtProc() keyword. This tells RPG to call a procedure based
on a procedure pointer. In this case, the pointer is called peProcedure.
If you trace it back, you'll see that peProcedure is a parameter that
ultimately comes from your call to http_url_post_raw(). Specifically,
you coded %paddr(RcvRawDta) for that parameter.
So each time "saveproc" is called in HTTPAPI, it'll actually call your
subprocedure named RcvRawDta().
If you want to find out why saveproc is returning 8191 instead of the
correct value of 8192, you need to look at the code for the RcvRawDta()
subprocedure -- which, of course, is something that you wrote, and is
not part of HTTPAPI.
> the value of RC, returned from saveproc is 8191, while the value of
> wwRecSize is 8192. I tried to debug the saveproc routine, but am
> having no luck in finding the thing. Can someone give me some
> direction here?
>
> BTW, my post routine looks like this:
>
> rc = http_url_post_raw(
> 'https://copyws.cendant.com/B2BGateway/service/XMLSelect'
> : %addr(XMLdata)
> : %len(%trim(XMLdata))
> : 1
> : %paddr(RcvRawDta)
> : 90
> : HTTP_USERAGENT
> : 'text/xml; charset=utf-8'
> : '"http://webservices.galileo.com/SubmitXml"');
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------