AutoPower is a project to automaticate the creation of IBM Datapower Gateway Multi-Protocol gateways
AutoPower is a project to automate the creation of IBM Datapower Gateway Multi-Protocol gateways.
A Multi-Protocol Gateway is a middleware that exposes a backend (web service, database stored procedure, queues, etc.) through a frontend (tipically a RESTful or SOAP web service).
For now Autopower supports DB stored procedure as backend.
TODO Support other backends
To run AutoPower, you need to follow the following steps:
gradle clean test
AutoPower connects to a database using JDBC and extracts metadata of all stored procedures of one catalog and schema. Then, AutoPower create a template XML with the stored procedure data and inject in a folder for default of a Multi-Protocol Gateway. Finally, the folder generated is compresssed and are ready to import in DataPower Hardware.
Autopower generates one file: procedures.json which contains a list of all stored procedures. Each stored procedure has a name and parameters. Parameters are grouped as: In, Out, InOut, Result and Unknown.
[
{
"name": "dm_cryptographic_provider_algorithms;0",
"Result": [
{
"columnName": "@TABLE_RETURN_VALUE",
"dataType": null,
"typeName": "table"
}
],
"In": [
{
"columnName": "@ProviderId",
"dataType": "INTEGER",
"typeName": "int"
}
]
},
...
To generate procedures.json file, AutoPower work on a file created for us :
This you can found in MetaDBBuilder.groovy file.
To generate a template XML file, AutoPower use Hogan to inject stored procedures metadata in a DataPower object template. This you can found in RenderBuilder.groovy file.
What is next?