Cordys Purchase Order MashApp for Google App

Nice video:


Cordys BOP4: Database connector


Just like any other Enterprise Service Bus, Cordys BOP4 also has connectors like file, ftp, mail and database.
This blog item shows how a database connector is configured within the product.

Within a Service Oriented Architecture that must be flexible and product independant I would advise not to use product specific
database connectors. I would recommend to implement an abstraction layer around the database with for instance Hibernate and expose it as a webservice.


Within the Cordys BOP4 platform a database connector is implemented with a so-called Ws-AppServer. This is a java layer between the database and can be used to implement some business logic
and/or the place to react on database events.

For this example I have used a MySql database instance (Test) with an Employee table.


CREATE TABLE test.Employee (
  EmployeeNumber varchar(255) NOT NULL DEFAULT '',
  FirstName varchar(255) NOT NULL DEFAULT '',
  LastName varchar(255),
  BirthDate date NOT NULL,
  PRIMARY KEY (EmployeeNumber)

INSERT INTO `test`.`Employee` (EmployeeNumber, FirstName, LastName, BirthDate) VALUES (1,'Roger', 'van de Kimmenade', '1971-12-04');

Database Configuration

First we will create a database configuration which contains the database connection properties.
  1. Goto System Resource Manager

  2. Select Manage Database Configurations

  3. Select Insert Button

  1. Select MySql and fill database properties. Select green button to test the connection.
    Select Save to save this configuration.

Service Group

Next we will create a Service Group (WS-AppServer) that is the connection pool to the database.
  1. In the System Resource Manager goto Show all service groups

  2. Select Plus sign

  3. Select WS-AppServer as application connector and click Next

  1. Fill in Name and Select all Web Service Interfaces and click Next

  1. Fill in Name and select Automatic as Startup Type. Click Next.

  1. Check Configure Database and select the database configuration created above (Employee database). Click Next.
  • The Initializer Class Name is the name of the class that implements theiOnBsfConnectorinterface. This helps you implement custom logic that will run whenever WS-AppServer starts or stops. 

  1. Leave defaults and click Finish.

Database Metadata

Now we can generate a Database MetaData object that represents the structure of a database. It uses the metadata service to connect to the database and get the details.

  1. Create a Metadata Folder in you workspace

  2. Right click on the Folder and select Database Metadata document

  1. Select the Ws-AppServer service and click Save

  1. Fill in Name and Description and click Save

  1. The database tables are loaded and shown. You can click on a table to view the columns. You can Save and close the window.

Generating webservice operations

Now we are ready to generate webservice operations on the database tables.
There are three ways to do that, but i will only describe the first in this blog item.
  1. Generate Web Service Operations directly on the database
  2. Generate Java Code (WS-AppServer package)

  1. Generate Custom Web Service Operation

To generate webservice operations on the tables you have to do the following:
  1. Create a Web Services Folder

  2. Right click on the Employee Database Metadata and select Generate Web Service Operations

  1. Select the table on which the operations must be generated. In this case only one table (employee) is present. And click Finish.

  1. When you look in the Web Services Folder you can see the generated data and webservice operations

This concludes this blog about generating webservices on your database.