1 package org.onap.boot.example.demo;
3 import java.io.IOException;
5 import org.onap.boot.example.demo.model.Employee;
6 import org.onap.msb.sdk.httpclient.RestServiceCreater;
7 import org.onap.msb.sdk.httpclient.msb.MSBServiceClient;
9 import retrofit2.Response;
12 public class ExampleClient {
18 public static void main(String[] args) throws IOException {
19 //For real use case, MSB IP and Port should come from configuration file instead of hard code here
20 String MSB_IP="192.168.0.110";
23 MSBServiceClient msbClient = new MSBServiceClient(MSB_IP, MSB_Port);
25 RestServiceCreater restServiceCreater =
26 new RestServiceCreater(msbClient);
28 EmployeeServiceClient implProxy =
29 restServiceCreater.createService(EmployeeServiceClient.class);
31 Employee employee = implProxy.queryEmployee().execute().body();
32 System.out.println("Employee:" + employee);