[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Soap Variable Limited to 32767 Bytes Length in HTTP API
Hi Scott,
Maybe that I am wrong, but I assume that Jamal is talking about the
"SOAPAction" parameter which is "limited" to 32767 bytes (see: do_oper()).
@Jamal: The web service request message is not put into the "SOAPAction"
parameter but sent as POST data to the web service. The post data is passed
to http_url_post_xml() as a pointer and hence it is limited to the maximum
size of storage that you can assign to a pointer.
Sample:
D soapAction D 64A inz
D postData D 8000A varying inz
soapAction = 'getDisplayPrice';
rc = http_url_post_xml(URL
: %addr(postData)+2: %len(postData)
: *null: %paddr(incoming)
: *null
: HTTP_TIMEOUT
: HTTP_USERAGENT
: HTTP_CONTTYPE
: soapAction);
The content of the SOAPACtion parameter depends on the web service operation!
Thomas.
Am 07.06.2012 01:26, schrieb Scott Klement:
> Hi Jamal,
>
> HTTPAPI does not have a 32767 limit in it's POST data. (which is what I
> assume you mean by "Soap Variable")
>
> You can use a bigger variable if you like, just be sure to pass the
> proper pointer and size to HTTPAPI.
>
> If you are compiling your RPG program targeting IBM i version 6.1 or
> higher, the RPG language supports up to 16 megabytes in a variable.
> HTTPAPI will send variables that large, as long as the proper pointer
> and length are passed to the API.
>
> If you are targeting V5R4 or earlier, the RPG language does not support
> variables larger than 65535. However, HTTPAPI still supports longer
> data, you just have to do it the "hard way", with pointer logic and
> memory allocation. (Or a user space, which is similar.)
>
> HTTPAPI can also send stuff from a stream file when you call the
> http_url_post_stmf or http_url_post_stmf_xml APIs. That might be easier
> for you if you are on V5R4 or earlier, and don't want to work with
> dynamic memory.
>
> -SK
>
>
> On 6/6/2012 4:08 PM, jamal mekhaemar wrote:
>> Hello Everyny
>>
>>
>>
>> Thanks a lot for Scott for his open source projet for Web service
>> consumer on iSeries. In fact, i have a big problem because i have to
>> build an XML request that is 300 KBytes of size and i use HTTP API and
>> the SOAP variable is limited to 32 KBytes.
>>
>> D SOAP s 32767A varying
>>
>> Can you please help, any suggestions welcome.
>>
>> My very best regards.
>> Jamal MEKHAEMAR
>> Paris France
>> [1]jamal.mekhaemar@xxxxxxxxx
>>
>> References
>>
>> 1. mailto:jamal.mekhaemar@xxxxxxxxx
>>
>>
>>
>> -----------------------------------------------------------------------
>> 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
-----------------------------------------------------------------------