Also, the getHtmlBytesBuffered() call should come AFTER your WrtSection()
call.
Matt
|------------>
| From: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|"Versfelt, Charles" <CVERSFELT@xxxxxxxxx> |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|"rpg400-l@xxxxxxxxxxxx" <rpg400-l@xxxxxxxxxxxx> |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|03/02/2010 12:26 PM |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject: |
|------------>
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|CGIDEV2 Total bytes in XML document |
>--------------------------------------------------------------------------------------------------------------------------------------------------|
I've received help on the FTPAPI list with a program I'm working on that
creates an XML document using CGIDEV2 and then sends to an FTP server using
HTTPAPI.
Since this question is about the CGIDEV2 and the XML itself, I think this
is the right list to send to. If I'm sending to the wrong list, please let
me know.
Apparently, my XML document needs header information, something called a
"MIME header." Included in the MIME header is a field called
"Content-length" which I believe is the byte count of the entire XML
document. I don't know yet if that includes or excludes the MIME header
itself.
How do I get the length of the XML document?
I thought it might be ContLen field, but wherever I check it, it's zero.
I'm not sure if I need to do anything to cause that to load.
Here's what's in my code...
callp http_debug(*ON);
callp ClrHtmlBuffer();
callp gethtml('HTMLSRC':'MYLIB':'MYDOC':'<as400>');
callp UpdHtmlVar('VAR1':VAR1);
(a whole series of those...)
CodePage = 819;
XML_Output = 'TestFile1.xml';
len = contlen;
callp wrtsection('NEWORD');
rc = WrtHtmlToStmf(XML_Output:CodePage);
ContentType = 'text/xml';
len = contlen;
rc = http_url_post_stmf('
https://xxx.xxx.xxx' +
'/xxx/'
: '/home/xxx/TestFile1.xml'
: '/home/xxx/ReplyFile1.xml'
: HTTP_TIMEOUT
: HTTP_USERAGENT
: ContentType );
Thanks,
Charlie
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/rpg400-l..
As an Amazon Associate we earn from qualifying purchases.