// Call the initializeService method on the Service private void initializeService(SEMplestService service) throws Exception { Class initClass = Class.forName(service.connectionData.getServiceOffered()); Constructor constructor = initClass.getConstructor(); ServiceInterface myService = (ServiceInterface) constructor.newInstance(); String empty = ""; // new String[] {}; Gson gson = new Gson(); String json = gson.toJson(empty); String ret = myService.ServiceGet(INITMETHODNAME, json); logger.debug("Ret = " + ret); }