Krengel Tech Eases XML Integration with DB2 Web Service Enabler
October 6, 2009 Alex Woodie
Krengel Technology is days away from formally launching DB2 Web Service Enabler, a new piece of middleware designed to help System i (AS/400) shops expose DB2/400 data using XML. By doing the dirty work of handling outside XML-based Web services requests, converting them into SQL statements, and returning XML data via HTTP communication, Krengel Tech hopes the new software will make DB2/400-resident data more accessible to programs written in Java, PHP, and .NET–without a lot of programming.
In today’s heterogeneous IT shops, System i professionals are typically in the minority. Whether it’s because the System i is no longer politically correct at that company, or because Windows and Unix platforms simply require more babysitting, varies from company to company. Whatever the reason, there is often one constant, and that’s the need for “open systems” programs and programmers to get at critical data sitting in the System i’s database, DB2/400.
Make it too hard to get at DB2/400, and it can have unintended consequences, according to Aaron Bartell, Krengel Tech’s lead developer on DB2 Web Service Enabler.
“Java and .NET developers are always looking for the easiest way to get at this data on the System i,” Bartell says. “If you don’t make it easy, they’ll find ways around it. Then the next question they’ll be asking you is ‘Can we just, in the nightly process, duplicate your DB2 data over to my MS SQL Server, because I don’t understand how you want me to communicate with you?'”
And once that data is moved from DB2/400 to SQL Server … well, you get the picture.
Now, with the DB2 Web Service Enabler product, Krengel Tech and Bartell are aiming to make it as easy as possible to access DB2/400 data from other programs, via XML. All a Java, .NET, or PHP programmer needs to know is how to handle SQL. DB2 Web Service Enabler will do the dirty work of turning it into something that the System i can understand, and returning the requested data.
“Basically what happens is you create an SQL statement in a string variable like you normally would,” Bartell says. “You call one of our APIs and, behind the scenes, it serializes that into an XML/HTTP post. It sends it to the server that was specified, the server receives that, parses the SQL statements, and outputs the XML result set back to the requester. So it’s all exactly like JDBC. You can almost call it XML-JDBC.”
The server side component of DB2 Web Service Enabler is written in RPG and Krengel Tech has also written the client side portion in .NET, Java, and PHP that developers can plug into their programs.
“What we were trying to do is have a .NET or Java or PHP program to not have to worry at all about what’s going on underneath the covers” on the System i, Bartell says. “We do publish the specs of what the incoming and outgoing XML looks like, in case there’s another language somebody wants to communicate with. But you’re never really exposed to the fact that HTTP and XML are happening under the covers.”
Another advantage of using DB2 Web Service Enabler is that data requests will automatically be subject to System i security. If a specific user does not have proper authority to access a certain table in DB2/400, they will be denied access. And if a customer wants to implement even tighter security, Krengel Tech has built its own security APIs for the product that don’t require the user to utilize IBM i user names and passwords to authenticate.
Bartell says Krengel Tech provides its own security APIs because “sometimes it’s just better if you don’t have to hand out IBM i profiles and instead can use ones within the DB2 Web Service Enabler product. The ease of this customized authentication approach will see its value when people start utilizing cloud applications, where an application might be communicating from GoogleApps to a back-end IBM i DB2 database.”
This is not the first product to integrate XML into DB2/400. IBM delivered some enhancements in this regard with the Integrated Web Server (IWS) in i OS 6.1. It also offers tooling in the WDSc and RDi development tools. However, those tools have limitations based on underlying technology–namely PCML–and require additional programming on the IBM i whereas the DB2 Web Service Enabler does not, Bartell says.
Krengel Tech also has other products in this field. Its first product, the RPG XML Suite, offers similar capabilities as DB2 Web Service Enabler. The big difference between the products is that RPG XML Suite looks at data through the lens of RPG programs, and requires RPG to be written to deliver DB2 data. DB2 Web Service Enabler, on the other hand, does not concern itself at all with RPG; it’s only looking at data in DB2/400.
There are a number of practical uses for DB2 Web Service Enabler. Krengel Tech sees the product helping companies share data such as purchase orders, invoices, product data, or shipment information. To demonstrate the variety of things customers can do once their DB2/400 tables are accessible, Krengel Tech developed a cloud application that’s hosted on Google‘s App Engine.
Beta testing for DB2 Web Service Enabler is complete, and version 1 is expected to be available soon. Pricing is P-group based and ranges from $1,995 to about $5,000. For more information, see the company’s Web site at www.krengeltech.com.