- 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));
- 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);
- Add dblookup_mediator_proxy.xml into the proxy service.
- 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.