.st0{fill:#FFFFFF;}

Web Services in native RPG straight from IBMi with RPG-XML 

 November 11, 2010

By  NickLitten

I’ve long been a follower of Mr Aaron Bartell – a nice guy and one of the most dynamic IBMi developers I have come across for a while.

He works for a company, Krengel Tech, offering some neat functions that simplify getting good old AS400 data out onto the internet. Yes, I know the AS400 was replaced by the iSeries and few years ago upgraded and replaced by the more powerful IBM i running on an IBM Power system but sometimes I just like to type the old names to (a) tweak the search engines and (b) keep the gray haired programmers happy šŸ™‚

In simplistic terms, RPG-XML Suite essentially is an RPG service program that allows RPG programmers the ability to compose, transmit, and parse XML along with many other supporting subprocedures. These three capabilities fully equip an RPG programmer to offer (or provide) web services on the iSeries as well as call (or consume) web services on remote machines.

Calling Web Services with RPG-XML Suite

The illustration below demonstrates how an RPG program on your iSeries can “call” a web service that resides on another machine. The RPG program composes and passes an XML stream from the remote web service on the Server/Client and receives back the response XML which it parses for its data contents. For example, the RPG program could send an XML invoice to a business partner to automate the billing process, or a purchase order could be sent to a supplier to automate the shipping of widgets to your company.

Remote Web Services Calling RPG-XML Suite

The illustration above demonstrates RPG-XML Suite playing the opposite role. In this case, the Server/Client calls RPG-XML Suite by passing an XML request. The RPG Web Service running under Apache receives and parses the XML. Once the RPG Web Service program makes the data from the XML document available, other RPG business logic can be called or simply store the information to the DB2/400 database. The RPG Web Service program can then compose an XML response and return it to the caller (Server/Client).

For another example – a CRM application might reside on another machine (i.e. Salesforce.com) and is used by sales personnel to add new accounts. That application could send the newly created account information to the RPG Web Service which would write it to the appropriate DB2 database for future order fulfillment purposes.

RPG-XML Suite was built by RPG developers who have lived through creating web services in RPG and Java without a well-packaged toolset. There are a handful of alternatives that will allow RPG to connect to the outside world (like front-ending it with a Java web service), but those alternatives require the introduction of a new programming language into your environment, which can be very costly and labor intensive.

RPG-XML Suite is the right choice and proven alternative to move your iSeries into the Service Oriented Architecture arena.

You can read more on RPG-XML at:http://www.rpg-xml.com/

NickLitten


IBM i Software Developer, Digital Dad, AS400 Anarchist, RPG Modernizer, Shameless Trekkie, Belligerent Nerd, Englishman Abroad and Passionate Eater of Cheese and Biscuits. Nick Litten Dot Com is a mixture of blog posts that can be sometimes serious, frequently playful and probably down-right pointless all in the space of a day. Enjoy your stay, feel free to comment and remember: If at first you don't succeed then skydiving probably isn't a hobby you should look into.

Nick Litten

related posts:

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
__CONFIG_colors_palette__{"active_palette":0,"config":{"colors":{"cff50":{"name":"Main Accent","parent":-1},"a344d":{"name":"Accent Transparent","parent":"cff50"}},"gradients":[]},"palettes":[{"name":"Default","value":{"colors":{"cff50":{"val":"var(--tcb-skin-color-0)"},"a344d":{"val":"rgba(46, 138, 229, 0.85)","hsl_parent_dependency":{"h":210,"l":0.54,"s":0.78}}},"gradients":[]},"original":{"colors":{"cff50":{"val":"rgb(0, 178, 255)","hsl":{"h":198,"s":1,"l":0.5}},"a344d":{"val":"rgba(0, 178, 255, 0.85)","hsl_parent_dependency":{"h":198,"s":1,"l":0.5}}},"gradients":[]}}]}__CONFIG_colors_palette__

Get In Touch

Iā€™m always looking for awesome input, feedback and critique!

>