Idea Details

IBMi REST Webservices

Last activity 06-13-2019 10:01 AM
George Jeffcock's profile image
05-08-2015 02:36 AM

Consume & Publish Webservices from IBMi - Solved

 

 

As the author of this idea I do consider it to be closed but will not delete it as others may still feel the above solution does not meet their needs

 

 

 

 

 

 

 

 

 

As a Plex developer working on the IBMi only, I'd like to implement my existing business logic as a set of REST published web services via Apache HTTP server using JSON

 

This idea  will help to continue to protect customers' investment in Plex, by allowing Plex developed IBMi database and logic to be accessed by 3rd parties with unparalleled speed.

 

In-order to achieve this idea, the solution is as important as the goal.

- Built for speed. REST and JSON not SOAP and XML

- Native RPG solution no Java components. Performs as fast as your RPG code can go

- Suggest using YAJL an open source ported JSON library http://www.scottklement.com/yajl/

- Suggest using HTTPAPI an open source tool to act like an HTTP client http://www.scottklement.com/httpapi/

 

History

- CA Plex IBMi variant has not supported publishing or consuming any webservices previously and suggest not catching up by supporting SOAP and XML but going straight to REST and JSON. SOAP is still important in today's landscape but this idea is aimed at supporting an organisation's internal audience's strategy

 

Quick background info

- http://www.scottklement.com/presentations/Web%20Services%20for%20RPGers.pdf


Comments

01-16-2016 06:05 PM

Have a look HERE for the solution.

 

05-11-2015 11:48 AM

IWS has come on over the years and does support Rest and Json but with CA Plex generating meaningless names and names that are not static then the PCML files and therefore the WSDL make no sense. Do like https://communities.ca.com/message/18399568#18399568 Dean's generating his own PCML files thou to get around the meaningless plex source names.

 

I think this could actually also be a pattern ( thin stub to marshal the parameters) to wrapper a call to your rpg. If you consider Scott Klement thoughts on how he approaches it:

 

When I write my own web services without IBM's tools, I typically:

• Use the standard IBM HTTP server (powered by Apache)

• Configure Apache to call my RPG program

• Use the "Read Standard Input" (QtmhRdStin) API to get any

uploaded documents (such as XML or JSON input parameters)

• Use the "Write Standard Output" (QtmhWrStout) API to send back

results.

• Retrieve the URL (to get REST resource) from the REQUEST_URI

environment variable.

• If needed, the open source YAJL tool can generate/parse JSON

• RPG has built-in support for parsing XML

• If needed, the CGIDEV2 tool can make it easy to output either

JSON or XML.

 

Already do something similar in AutoTestBox, Create a stub that recreates the called function's interface but locally.

05-11-2015 11:12 AM

At one point this was on the CA Plex 7.2 roadmap presentation for increment 2 or 3. i hope that it will remain there for the enterprise folks that do not wish or can't accept IIS and .NET as part of their architecture.

 

With CM WebClient Hsync, you have an ability to consume CA Plex functions as REST services using a Java web server on IIS like Tomcat or Websphere- but even so we at CM First would prefer this to be part of the core CA Plex capabilities, just as the C# version is.

05-09-2015 04:49 AM

But can anyone comment on the IWS approach of generating Java/C code under the covers what are the circumstances and levels of poor performance?