private String getPortClass(Endpoint ep, Class serviceClass)
throws Exception {
String pkg = serviceClass.getPackage().getName();
for(Method m : serviceClass.getMethods()) {
WebEndpoint webEP = (WebEndpoint)
m.getAnnotation(WebEndpoint.class);
if(webEP == null || webEP.name() == null ||
webEP.name().length() == 0) {
continue;
}
String getPortMethodName = "get" +
JAXBRIContext.mangleNameToClassName(webEP.name());
Method getPortMethod =
serviceClass.getMethod(getPortMethodName, (Class[])null);
return getPortMethod.getReturnType().getName();
}
return null;