That is one way of doing it, but by no means the only way (or necessarily the simplest way).
You can also just as easily do it with a simple Apache server and an RPG program that reads from stdin (via QtmhRdStin) and return the response on stdout (via QtmhWrStout).
XML parsing can be done with the RPGLE built-in functions for the job or via expat (
http://www.scottklement.com/expat/)
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Paul Roy
Sent: 04 November 2015 09:57
To: web400@xxxxxxxxxxxx
Subject: Re: [WEB400] WEB400 Digest, Vol 13, Issue 399
Hello,
HTTPAPI is usefull to call webservice. (the client part). it is not intended to provide a webservice (the server part)
to implement a webservice server, you should (basically)
- write a RPG program with 2 parms
1) input DS matching the request XML)
2) output DS matching the response...
- generate the PCML when you compile the program
- install and configure the web service server using http:/:yoursystem:2001/HttpAdmin
- install the service in the webservice server using the PCML...
Paul
message: 1
date: Tue, 3 Nov 2015 22:48:49 +0000
from: Matt Shea <mshea@xxxxxxxxxxxx>
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.
___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/
________________________________
NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.
--------------------------------------------------------------------------------
CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
As an Amazon Associate we earn from qualifying purchases.