Skip to content

Latest commit

 

History

History

7-DBLookup-mediator

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
  1. Create table EMPLOYEES
    CREATE TABLE EMPLOYEES (EmployeeNumber int(11) NOT NULL, FirstName varchar(255) NOT NULL, LastName varchar(255) DEFAULT NULL, Email varchar(255) DEFAULT NULL, JobTitle varchar(255) DEFAULT NULL, OfficeCode int(11) NOT NULL, PRIMARY KEY (EmployeeNumber,OfficeCode), CONSTRAINT employees_ibfk_1 FOREIGN KEY (OfficeCode) REFERENCES OFFICES (OfficeCode));
  2. Add sample values to table EMPLOYEES
    INSERT INTO EMPLOYEES VALUES (1,"John","Gardiner","[email protected]","Manager",1);
    INSERT INTO EMPLOYEES VALUES (2,"Jane","Stewart","[email protected]","Head of Sales",2);
    INSERT INTO EMPLOYEES VALUES (3,"David","Green","[email protected]","Manager",1);
  3. Add dblookup_mediator_proxy.xml into the proxy service.
  4. Evoke the service with
    curl -H 'Accept: application/json' -X GET https://localhost:8243/services/dblookup_proxy -k

This will print "Name = FirstName: John" in carbon logs.