× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




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.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.