[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Returned values with more than 16383 characters



Hello,

> As  a result of a web service call using http_url_post_xml, I am
> receiving data where the value field in the procedure is being
> truncated to only 16383 characters.  There is more data than that.  I
> need to know how to get the truncated data.

Just to be absolutely clear...  HTTPAPI's simplified XML parser has a 
16383 limit per XML element.  That's PER ELEMENT, it's not the limit of 
the XML document, which has no practical limit.

So if you have the following document:

<exampleDoc>
    <element1>....data....</element1>
    <element2>....data....</element2>
</exampleDoc>

Each "data" section can be as large as 16383.  If you have a million 
elements, your document can be gigabytes long.

Having said that... 16383 is the current limit in HTTPAPI. This is the 
price you pay for having a "simple" XML parser.  In order to make it 
easier to use, data is saved in RPG's variables, and RPG's variables are 
limited to 16383 in length (for Unicode fields).

I could change the code to overcome this limit, but your calling program 
would then have to use pointer logic to extract the data, which sort of 
defeats the point of "making it simpler".

HTTPAPI's simplified interface is based on Expat, but Expat does not 
have this limit.  If you call Expat directly, you can overcome this 
limit.  There's info on how to use Expat from RPG at the following link:
http://www.scottklement.com/expat/

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------