lundi 17 décembre 2018

get Interface by invoking method in java

if I have a method that it's return Interface instead of Object Class how can call method by invoke reflection like this?

Method getInterfaceMethod = clazz.getMethod("getInterfaceMethod");
instance.invoke(getInterfaceMethod);

when i test it it's return java.lang.reflect.InvocationTargetException. the detail of that is:

Service class TEST.testService_v1_0.client.SOATestEndpoint does not implement the soaTest method.





Aucun commentaire:

Enregistrer un commentaire