About Consuming Internet Webservices
This module covers the basics of interacting with internet web services from the IBM i system and receiving responses. There are several methods available for consuming web services over the internet or any remote network. Here, we’ll explore different techniques to access web services from the IBM i Power System.
This module demystifies how IBM i systems can communicate with external web services, enabling RPG, COBOL, C, or C++ programs to act as consumers of internet-based APIs. It explores multiple techniques for fetching data from remote services, including:
This module demystifies how IBM i systems can communicate with external web services, enabling RPG, COBOL, C, or C++ programs to act as consumers of internet-based APIs. It explores multiple techniques for fetching data from remote services, including:
- IBM i Integrated Web Services (IWS) client: Leverages native support for calling web services directly from ILE programs.
- Open-source HTTPAPI (LIBHTTP): A hands-on walkthrough using Scott Klement’s powerful RPG toolkit to connect and interact with RESTful services.
- Native SQL methods: Demonstrates how to use built-in SQL functions to call web APIs and process JSON responses, ideal for quick, lightweight integrations.
- IBM-supplied APIs (e.g., AXIS): Showcases how to use standard IBM tools to consume web services with minimal overhead.
The module includes step-by-step guides, code examples, and debugging tips, making it a practical resource for developers looking to modernize their IBM i applications by integrating with the broader internet ecosystem
Module Content
This module covers the basics of interacting with internet web services from the IBM i system and receiving responses. There are several methods available for consuming web services over the internet or any remote network. Here, we’ll explore different techniques to access web services from the IBM i Power System.
Talking to Internet Webservices and Consuming Responses
IBM i can consume Internet web services using its Integrated Web Services (IWS) client. This client allows Integrated Language Environment (ILE) programs, such as those written in RPG, COBOL, C, or C++, to act as web service consumers.
Consuming Webservices with Opensource HTTPAPI (LIBHTTP)
Come with me - we will go and download Scott Klements excellent open source toolset HTTPAPI (LIBHTTP). This lets us easily write RPG code to connect to webservices out there in the cloud. It's easy. Let's do this step by step...
Come with me - we will go and download Scott Klements excellent open source toolset HTTPAPI (LIBHTTP). This lets us easily write RPG code to connect to webservices out there in the cloud. It's easy. Let's do this step by step...
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.
If you are using the IBM i HTTPAPI (LIBHTTP) opensource utilities, you already realize how easy it is to talk to an internet web service from within your IBM i RPG programs but sometimes even the best-laid plans go wrong. This is when you need to learn how about the “debug HTTPAPI webservices” function.
Consuming Webservices with native IBM i SQL
IBM comes with pre supplied SQL functions - the SQL integration in IBM i makes connecting to external webservices so simple you will slap yourself.
How about we write a super simple SQL statement to connect to an internet webservice and get a little bit of JSON back as a reply? Then we can wrap that super simple SQL statement in an SQLRPGLE program that is nearly as simple? Ready? Let's Gooooo
IBM comes with pre supplied SQL functions - easy to use from RPG - allowing you to talk natively to the Internet
Consuming Webservices with standard IBM Code
IBM comes with pre supplied API's - easy to use from RPG - allowing you to talk natively to the Internet