List of utility methods to do Web Service Class Get
String | getServiceClassSource(String PackageName, String className, boolean stubs) get Service Class Source StringBuffer buffer = new StringBuffer(); if (!PackageName.equalsIgnoreCase("")) { buffer.append("package " + PackageName + ";\n"); buffer.append("\n"); buffer.append("import javax.jws.WebService;\n"); buffer.append("\n"); buffer.append("@WebService\n" + "public interface " + className + "{\n\n"); ... |
String | getServiceInterface(Class clazz) get Service Interface WebService webService = (WebService) clazz.getAnnotation(WebService.class); if (webService == null) { return ""; } else { if (webService.endpointInterface() == null || webService.endpointInterface().trim().equals("")) { return ""; } else { return webService.endpointInterface().trim(); ... |
String | getUrlPatternByWebService(Class> beanClass) get Url Pattern By Web Service String urlPattern = null; WebService webServiceAnnotation = (WebService) beanClass.getAnnotation(WebService.class); if (webServiceAnnotation != null) { String name = webServiceAnnotation.name(); urlPattern = !isEmpty(name) ? name : beanClass.getSimpleName(); String serviceName = webServiceAnnotation.serviceName(); if (!isEmpty(serviceName)) { urlPattern = serviceName + "/" + urlPattern; ... |
Class> | getWebServiceClass(Class> cls) get Web Service Class if (cls == null) { return null; if (null != cls.getAnnotation(WebService.class)) { return cls; for (Class<?> inf : cls.getInterfaces()) { if (null != inf.getAnnotation(WebService.class)) { ... |
boolean | hasWebServiceAnnotation(Class> clazz) has Web Service Annotation while (clazz != null) { if (clazz.getDeclaredAnnotation(WebService.class) != null) { return true; for (Class<?> anInterface : clazz.getInterfaces()) { if (anInterface.getDeclaredAnnotation(WebService.class) != null) { return true; clazz = clazz.getSuperclass(); return false; |