IBM i Webservices - RPG Examples to Read/Write webservices

About IBM i Webservices - RPG Examples to Read/Write webservices

We have various techniques for reading (consuming) webservices out there in Internet Land. Let's use (a) SQL which is super convenient and native to IBM i and (b) the HTTPAPI opensource solution.

Module Content

We have various techniques for reading (consuming) webservices out there in Internet Land. Let's use (a) SQL which is super convenient and native to IBM i and (b) the HTTPAPI opensource solution.

IBM i connecting and reading from an internet webservice

MEMBERS ONLY

Good Question! Let's discuss the various ways an RPG program can be written as A WEBSERVICE to share information with any requesters on the internet.

This reads the JSON from the IFS – decodes it using Y.A.J.L and reports on time taken to perform decode. Writing an RPG program to read JSON using YAJL is actually pretty straightforward — I hope this code example helps!

This reads the JSON from the IFS – decodes it using JSON_TABLE and reports on time taken to perform decode.

IBM i Hosting a webservice and serving the results to the outside world

MEMBERS ONLY

Some simple SQLRPGLE code that will run as an IWS webservice...

Ready to learn?
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>