Introduction to RXS
Calling Web Services with RPG API Express
The illustration demonstrates how an RPG program on your IBM i 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 API Express
The illustration demonstrates RPG API Express playing the opposite role. In this case, the Server/Client calls RPG API Express 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 API Express 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 API Express is the right choice and proven alternative to move your IBM i into the Service Oriented Architecture arena.