Java Utililty Methods Web Service Class Get

List of utility methods to do Web Service Class Get

Description

The list of methods to do Web Service Class Get are organized into topic(s).

Method

StringgetServiceClassSource(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");
...
StringgetServiceInterface(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();
...
StringgetUrlPatternByWebService(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;
...
ClassgetWebServiceClass(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)) {
...
booleanhasWebServiceAnnotation(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;