Introduction
This document provides the text for the procedures covered in the video “Create an Adapter Service” that is available on:
Problem Statement
Create an adapter service to fetch the details of an employee whose employee ID is 100 from the database.
Steps Involved
- Obtain a trusted database driver
- Create a JDBC connection in webMethods Integration Server
- Create an adapter service using the JDBC connection to fetch the list of employees from the database
Creating a JDBC Connection
- Obtain trusted database driver
- Place the database driver under: “Install_location\IntegrationServer\packages\WmJDBCAdapter\code\jars”
- Launch webMethods Service Designer
- Open the administrator view. (Right click on Default, select Open Administrator View).
- Click Adapters > webMethods Adapter for JDBC.
- Click Configure New Connection.
- Select the connection type, webMethods Adapter for JDBC Connection.
- Configure the connection details under the Configure Connection Type page.
- Click Save Connection.
- On the webMethods Adapter for JDBC Connection page, enable the connection by selecting Yes from the Enabled column.
Creating an Adapter Service
- Create a new package:
- Click File > New > Package.
- Type the package name as HR.
- Create a new folder in the package:
- Click File > New > Folder.
- Type the folder name as dept.
- Create a new adapter service in the folder:
- Click File > New > Adapter Service.
- Type the name of the flow service as GetEmpDetails and click Next.
- Select an Adapter type and click Next.
- Select an Adapter Connection Alias and click Next.
- Select a template and click Finish.
- Select the table name.
- Select the Tables tab.
- From the Table Name column, click .
- From the Adapter Tree Chooser screen, select HR > EMPLOYEES.
- Click OK.
- Populate the table content.
- Click the SELECT tab.
- Click to populate the table rows.
The records from the EMPLOYEES table are displayed.
- Add a filter condition.
- Select the WHERE tab.
- Click to add a filter condition.
- Executing the adapter service.
- Click File > Save All.
- Right click on the adapter service and select Run As > Run Service.
- In the Input for Adapter Service wizard, enter the filter condition as “employee ID=100”.
- Click OK.
The employee details based on the filter condition are displayed under the Results tab.