[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: http_url_post_xml : Size limit ?
The max field length on V5R2-V5R4 is 65535.
�
It is correct that you can�allocate more storage that 16 MB with
build in %alloc, but you can allocate up to 2GB by using system
routines:
�
h bnddir('QC2LE')
d TS_Malloc������ pr������������� *�� extproc('_C_TS_malloc')�
d� size������������������������ 10u 0
value�������������������
d TS_Free�������� pr����������������� extproc('_C_TS_free')���
d� pointer����������������������� *�� value�������������������
d TS_Realloc����� pr������������� *�� extproc('_C_TS_realloc')
d� pointer����������������������� *�� value�������������������
d� size������������������������ 10u 0
value�������������������
�
Addr = TS_malloc(Size);
On Wed, Nov 9, 2011 at 9:48 AM, <[1]mignee74@xxxxxxx> wrote:
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" <[2]ronnie@xxxxxxxxxxxxxxxxxx>
� "HTTPAPI and FTPAPI Projects" <[3]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: [4]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:[5]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(
� � � � � � � � �'[6]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: [7]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:[8]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:
[9]http://www.scottklement.com/mailman/listinfo/ftpapi
----------------------------------------------------------------------
-
----------------------------------------------------------------------
-
This is the FTPAPI mailing list. �To unsubscribe, please go to:
[10]http://www.scottklement.com/mailman/listinfo/ftpapi
----------------------------------------------------------------------
-
----------------------------------------------------------------------
-
This is the FTPAPI mailing list. �To unsubscribe, please go to:
[11]http://www.scottklement.com/mailman/listinfo/ftpapi
----------------------------------------------------------------------
-
----------------------------------------------------------------------
-
This is the FTPAPI mailing list. �To unsubscribe, please go to:
[12]http://www.scottklement.com/mailman/listinfo/ftpapi
----------------------------------------------------------------------
-
--
Regards,
Henrik Rützou
�
[13]http://powerEXT.com
�
[plogofull200.png]
References
1. mailto:mignee74@xxxxxxx
2. mailto:ronnie@xxxxxxxxxxxxxxxxxx
3. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
4. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
5. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
6. http://someserver/
7. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
8. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
9. http://www.scottklement.com/mailman/listinfo/ftpapi
10. http://www.scottklement.com/mailman/listinfo/ftpapi
11. http://www.scottklement.com/mailman/listinfo/ftpapi
12. http://www.scottklement.com/mailman/listinfo/ftpapi
13. http://powerext.com/
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------