Not sure if Henrik is still supporting PowerExt, but this was pretty easy for me to use.
http://www.powerext.com
You can do some pretty simple RPG/CGI to return a simple JSON result. He's wrapped several services in to the PowerExt Core.
Maybe start with that since you already have Apache running.
Or better yet, get your Apache server to return a simple JSON Hello World file.
Then write a CGI to mimic returning that same JSON data.
Then expand that CGI program to take in parms and return JSON data you compose.
Can't think of anything more simple than using a plain old RPG-CGI program to eliminate all the framework stuff also.
Regards,
Richard Schoen
Director of Document Management
e. richard.schoen@xxxxxxxxxxxxxxx
p. 952.486.6802
w. helpsystems.com
----------------------------------------------------------------------
message: 1
date: Thu, 11 Oct 2018 21:13:58 -0500
from: Booth Martin <booth@xxxxxxxxxxxx>
subject: [WEB400] Simple, really simple, example of web services
Web services have been around for a while now.? It looks to me like a lot of the information, tutorials, wizards, and examples that are available? have become stale, superseded, or otherwise abandoned.? There also seems to be several different approaches with various pluses & minuses.
I want to write a web service that is about as basic as it can be and still legitimately deserve to be called a web service.? Seeing it in action will, I believe, help me understand what all is happening.
To that end I have a web page where someone can enter a date and I have an Apache server set up for serving the response.? The web page HTML & javascript will send that date as a request to the iSeries Apache web server where an RPG program will calculate the Day-of-the-Week (Sunday through Saturday) and return that answer to the requesting web page and be displayed to the user.
Any and all comments, suggestions, pointers and references will be appreciated; especially when geared toward the novice.
--
Booth Martin
www.martinvt.com
(870)576-9371
(802)461-5349
A sine curve goes off into infinity or at least to the end of the
blackboard.
As an Amazon Associate we earn from qualifying purchases.