If your XML request is less than 32k you can get it this way:

QtmhGetEnv (ENVData:10:ENVDataLn:'CONTENT_LENGTH':14:ApiError);
Content_Length = atoi(%trim(%subst(ENVDATA:1:ENVDataLn)));
If Content_Length > %len(INData);
  INDataLn = %len(INData);
else;
  INDataLn = Content_Length;
endif;
QtmhRdStin (INData:INDataLn:INActLn:ApiError);

Otherwise you can create a usrspc or %alloc more storage based on
Content_Length and address INData to it.

Giuseppe.

----- Original Message ----- 
From: "Kevin Touchette" <KTouchette@xxxxxxxxxxxx>
To: <web400@xxxxxxxxxxxx>
Sent: Wednesday, December 03, 2003 4:53 PM
Subject: [WEB400] XML request processing.


> Can anyone tell me how to read an XML request sent from another web site
into an rpg cgi program on my web site.  I know how to process a query
string to get input variables but what I really need to do is read the
entire XML document into a variable so that I can parse the XML document
into the correct variables.  Currently I'm using CGIDEV2 but I'm open to
whatever works.  TIA.
>
>   ___________________________________
>
>    Washington Corporations
>    Kevin R. Touchette - Programmer/Analyst
>    E-mail:  KTouchette@xxxxxxxxxxxx
>    Phone: (406) 523-1369
>   ___________________________________
>
>
>
> _______________________________________________
> This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
> To post a message email: WEB400@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/web400
> or email: WEB400-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/web400.


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-2022 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.