Package javax.xml.ws

Examples of javax.xml.ws.WebServiceProvider


    for (String beanName : beanNames) {
      try {
        Class<?> type = this.beanFactory.getType(beanName);
        if (type != null && !type.isInterface()) {
          WebService wsAnnotation = type.getAnnotation(WebService.class);
          WebServiceProvider wsProviderAnnotation = type.getAnnotation(WebServiceProvider.class);
          if (wsAnnotation != null || wsProviderAnnotation != null) {
            Endpoint endpoint = createEndpoint(this.beanFactory.getBean(beanName));
            if (this.endpointProperties != null) {
              endpoint.setProperties(this.endpointProperties);
            }
View Full Code Here


   
    public static QName getServiceQName(Class clazz) {
        WebService webService =
            (WebService)clazz.getAnnotation(WebService.class);
        if (webService == null) {
            WebServiceProvider webServiceProvider =
                (WebServiceProvider)clazz.getAnnotation(WebServiceProvider.class);
            if (webServiceProvider == null) {
                throw new IllegalArgumentException("The " + clazz.getName() + " is not annotated");
            }
            return getServiceQName(clazz, webServiceProvider.targetNamespace(), webServiceProvider.serviceName());
        } else {
            return getServiceQName(clazz, webService.targetNamespace(), webService.serviceName());
        }
    }
View Full Code Here

   
    public static QName getPortQName(Class clazz) {
        WebService webService =
            (WebService)clazz.getAnnotation(WebService.class);
        if (webService == null) {
            WebServiceProvider webServiceProvider =
                (WebServiceProvider)clazz.getAnnotation(WebServiceProvider.class);
            if (webServiceProvider == null) {
                throw new IllegalArgumentException("The " + clazz.getName() + " is not annotated");
            }
            return getPortQName(clazz, webServiceProvider.targetNamespace(), null, webServiceProvider.portName());
        } else {
            return getPortQName(clazz, webService.targetNamespace(), webService.name(), webService.portName());
        }
    }
View Full Code Here

       
    public static String getName(Class clazz) {
        WebService webService =
            (WebService)clazz.getAnnotation(WebService.class);
        if (webService == null) {
            WebServiceProvider webServiceProvider =
                (WebServiceProvider)clazz.getAnnotation(WebServiceProvider.class);
            if (webServiceProvider == null) {
                throw new IllegalArgumentException("The " + clazz.getName() + " is not annotated");
            }
            return clazz.getSimpleName();        
View Full Code Here

    }

    private static String getWsdlLocation(Class clazz) {
        WebService webService = (WebService) clazz.getAnnotation(WebService.class);
        if (webService == null) {
            WebServiceProvider webServiceProvider =
                (WebServiceProvider)clazz.getAnnotation(WebServiceProvider.class);
            if (webServiceProvider == null) //no WebService or WebServiceProvider annotation
                return "";
            return webServiceProvider.wsdlLocation().trim();
           
        } else
            return webService.wsdlLocation().trim();
    }
View Full Code Here

            }
            hasJaxwsAnnotation = true;
        }
       
        // Process @WebServiceProvider annotation - JCA_11015, POJO_8034
        WebServiceProvider webServiceProviderAnnotation = clazz.getAnnotation(WebServiceProvider.class);
        if (webServiceProviderAnnotation != null) {
            // if the implmentation already has a service set, use it's name
            // and the new service, which uses the implementation as an interface,
            // will be replaced
            String serviceName = clazz.getSimpleName();
           
            if (type.getServices().size() > 0){
                serviceName = ((Service)type.getServices().get(0)).getName();
            }
           
            // the annotation may specify a service name
            serviceName = getValue(webServiceProviderAnnotation.serviceName(), serviceName);
           
            String wsdlLocation = webServiceProviderAnnotation.wsdlLocation();
           
            // Make sure that there is a service with an interface
            // based on the implementation class and have it replace
            // any service with the same name
            try {
View Full Code Here

            serviceInterfaceClassName = webServiceAnnotation.endpointInterface();
            wsdlFileName = webServiceAnnotation.wsdlLocation();
            javaInterface.setRemotable(true);
        }
       
        WebServiceProvider webServiceProviderAnnotation = clazz.getAnnotation(WebServiceProvider.class);
        if (webServiceProviderAnnotation != null) {
            servineNamespace = getValue(webServiceProviderAnnotation.targetNamespace(), servineNamespace);
            serviceName = getValue(webServiceProviderAnnotation.serviceName(), serviceName);
            wsdlFileName = webServiceProviderAnnotation.wsdlLocation();
            javaInterface.setRemotable(true);
       
       
        serviceQName = new QName(servineNamespace, serviceName);
        javaInterface.setQName(serviceQName);
View Full Code Here

                pojoClass = Loader.loadClass(classLoader, className);
            } catch (Exception e){
                continue;
            }
            WebService wsAnnotation = pojoClass.getAnnotation(WebService.class);
            WebServiceProvider wspAnnotation = null;
            if (wsAnnotation == null) {
                wspAnnotation = pojoClass.getAnnotation(WebServiceProvider.class);
            }

            // Create an Axis Service only if the class is not an interface and it has either
View Full Code Here

    private static WebServiceProvider getWebServiceProviderAnnotation(Class<?> cls) {
        if (cls == null) {
            return null;
        }
        WebServiceProvider ann = cls.getAnnotation(WebServiceProvider.class);
        if (null != ann) {
            return ann;
        }
        for (Class<?> inf : cls.getInterfaces()) {
            if (null != inf.getAnnotation(WebServiceProvider.class)) {
View Full Code Here

        if (wscAnn != null) {
            return true;
        }

        // Check for provider
        WebServiceProvider wspAnn = (WebServiceProvider)cls.getAnnotation(WebServiceProvider.class);
        if (wspAnn != null) {
            return true;
        }

        // Check for Exception
View Full Code Here

TOP

Related Classes of javax.xml.ws.WebServiceProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.