Thanks Everyone,
I thought it would be a trivial task using PHP too. Which it is if I simply have to parse out the necessary elements from a local XML file. I ran into my roadblock when attempting to receive an actual POST via the php://input stream. I am receiving nothing via the stream or $_REQUEST or $_POST.
So, I thought I could switch gears and use RPG to do the same thing. I haven't had to use RPG as CGI, I've only written PHP as the interface to IBM I programs, stored procedures and database.
So, after perusing Google for hours:
1) I'm stuck on how to receive the POST in RPG. (And apparently PHP too!)
2) How to parse the XML in RPG. I can parse the document easily enough in PHP.
3) Tips on why the php://input stream may not be working correctly.
I've been using Apache with PHP for years for web, and have been using RPG for years for business. (And perhaps foolishly thought never the twain shall meet.)
Thanks,
Matt
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Allen, Todd
Sent: Wednesday, November 04, 2015 6:46 AM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] IBM i Receive XML POST
I assume you have an Apache or other HTTP server set up to handle incoming requests. If so, why not parse the XML data using PHP and pass off the parsed data to DB2 via stored procedure? PHP has a built in parser and a huge community to lean on for questions. The XML parsing seems much better suited for PHP than RPG. Perhaps I am oversimplifying.
Thanks,
Todd
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Matt Shea
Sent: Tuesday, November 03, 2015 5:49 PM
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: [WEB400] IBM i Receive XML POST
Hi Everyone,
I have a requirement to begin receiving POSTed XML requests from a customer, process the request, and return an XML response back. I'm not sure where to begin. I have attempted this in PHP but have not been successful.
So now I'm considering handling this in RPG using Scott's HTTPAPI but I haven't located an example that receives a XML POST request, only those that read from existing XML files.
Does anyone have thoughts on best route to take without investment in another software package as there is no budget? RPG vs PHP vs ???.
Thanks in advance,
Matt
--
This is the Web Enabling the IBM i (AS/400 and 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.
For More Than 80 Years—Delivering Solutions That Exceed Expectations.
This communication and any transmitted documents are intended to be confidential. If there is a problem with this transmission, please contact the sender. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--
This is the Web Enabling the IBM i (AS/400 and 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.