George Jeffcock

Consume & Publish Webservices from IBMi - Solved

Discussion created by George Jeffcock Champion on Jun 7, 2015
Latest reply on Jul 1, 2015 by George Jeffcock

Eye catching headline and not exactly true but give this a read and see if you agree.






IBMi REST Webservices made me stop waiting for IBMi variant support from CA but to see how Scott Klement's web page open source projects could help IBMi CA Plex sites.


As noted in the above idea and 2E sites over the years Hypertext Transfer Protocol API project will allow you to write native RPGLE CA Plex functions that can Consume SOAP and RESTful webservices (XML respsonse format)


After installing HTTP API on your IBMi then download the local model called StellaTools1.5_Beta.mdl currently at  Downloads - Stella Tools (CA Plex Developer Tools)


Have a play,

build StellaTools.Klement.HTTPAPI.Examples.Example16 [SOAP].Example   (Currency Exchange Rate Web service)

build StellaTools.Klement.HTTPAPI.Examples.Example12 [REST].Example  (Hurricanes with Cities weather forecast)


The way Scott Klement has provided modular reusable service programs allow us as Plex developers to inherit what we need and it really does work. I have both SOAP and RESTful services being called from the IBMi and results been shown back on WinC clients.





I asked the as400 community (20,000 members) linkedin if there was Performance implications of 'IWS' and 'Do It Yourself Native' REST webservices and heard nothing back. On this forum I had been advised by Crispin to look at PCML before but wanted to wait for CA and maybe avoid the use of Java/C code under the covers.


BUT with 7.2 IBMi supporting RESTFul services now I had a look and consider the matter closed on Publishing. Integrated Web Services (IWS) works great

  • Create PCML files and edit them to give meaningful names. Create a pattern to create them for you as I know Dean_Eshleman already has.
  • Look at scripting the deployment and general maintenance of the publish services like 2E does using the IBM supplied scripts
  • Unfortunately, RPG doesn't currently allow developers to dynamically size arrays or multi-occurrence data structures at run time (this needs verification)  but IWS allows you to use an existing counter output field to restrict the number. Edited: BUT not much use for CA Plex generated functions as you can not specify an Type INT field yet...and you can not output a field only, it is always contained in a data type structure (plex variable) so IWS does not pick the field up as an option from the PCML file. Shame. Will test workarounds






Over the years I have waited for CA to support the IBMi and I have had the luxury of using Websydian TransacXML but today when I was forced to investigate I believe a CA Plex site can publish and consume webservices natively on the IBMi for no additional cost.