[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: http_url_post_xml : Size limit ?
Hi ,
I've replaced the SOAP variable by a pointer and built my soap request in memory (with %str). And I've just tested building a 10 Mo request, and it works very well. So it's ok for me, thanks every one .
For information it looks like :
D SoapAdr s *
D SoapLen s 8 0
D wwString s 32000A varying
// building
wwString = '<?xml version="1.0" encodin .....
addString(SoapAdr:SoapLen:wwString);
// For each item (thousands of them)
wwString = '<item>......</item>';
addString(SoapAdr:SoapLen:wwString);
// finalize
wwString = '</soapenv:Body></soapenv:Envelope>';
addString(SoapAdr:SoapLen:wwString);
rc = http_url_post_xml(
%trim(URLENP)
: SoapAdr
: SoapLen
: *NULL
: %paddr(Incoming)
: *NULL
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'text/xml; charset=UTF-8'
: '\"\"');
P addString B
D addString PI
* paramètres
D adresseMemoire *
D tailleMemoire 8 0
D stringToAdd 32000 VARYING
* variables locales
D len S 5 0
D ptr S *
/free
len = %len(stringToAdd);
if len > 0;
tailleMemoire = tailleMemoire + len;
if tailleMemoire= len;
adresseMemoire = %alloc(tailleMemoire+1);
else;
adresseMemoire = %realloc(adresseMemoire:tailleMemoire+1);
endif;
ptr = adresseMemoire + tailleMemoire - len;
%str(ptr:len+1) = stringToAdd;
endif;
return;
/end-free
P E
----- Mail original -----
De: "Ronnie" <ronnie@xxxxxxxxxxxxxxxxxx>
À: "HTTPAPI and FTPAPI Projects" <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Envoyé: Mercredi 9 Novembre 2011 08:17:25
Objet: RE: http_url_post_xml : Size limit ?
Hi all.
Before I get corrected I of course referred to the limit in example16 is 32767 because that is how it was defined.
When I said yes there is a limit I was referring to limit of internal storage for an rpg program whish is 16,773,104 bytes and eventually Jerome is going to run into that limit.
I use http_url_post_stmf to send up to 60mb xml files. See example7.
:)
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Ronnie
Sent: Wednesday, November 09, 2011 8:46 AM
To: HTTPAPI and FTPAPI Projects
Subject: RE: http_url_post_xml : Size limit ?
Hi all.
I think he is referring to the max length that SOAP can be which is defined as a string 32767 minus 2 bytes because its varying so a limit of 32765.
But to answer his question, yes there is a limit. I ran into the same problem. Write your xml to a stream file instead of internally to the SOAP workfield and then use http_url_post_stmf to send the complete file then there is no limit.
Eg.
rc = http_url_post_stmf(
'http://someserver/'
+'someservice'
: %trim(PathXml) - your stmf
: %trim(Fullfile) - another stmf to receive the response
: timeout
: HTTP_USERAGENT
: 'application/soap+xml'
: SoapAction);
Hope it helps.
-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: Wednesday, November 09, 2011 1:26 AM
To: HTTPAPI and FTPAPI Projects
Subject: Re: http_url_post_xml : Size limit ?
32767 was the RPG string limit in some old releases.
32766 is the limit of a record in a physical file.
...but Jerome mentioned 32765...
The only thing (that I can think of) that's limited to 32765 is the size
of a FAT32 partition on Windows XP. That's obviously not where he got
the limit from :-)
On 11/8/2011 5:10 PM, Henrik Rützou wrote:
>
> 32767 dosn't that ring a bell ?
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------