Examples of WebService


Examples of javax.jws.WebService

                                     type.getName()));
    */
    boolean isInterface = type.isInterface();

    WebService webService = (WebService) type.getAnnotation(WebService.class);

    // Get all the classes that JAXB needs, then generate schema for them
    HashSet<Class> jaxbClasses = new HashSet<Class>();
    JAXBUtil.introspectClass(type, jaxbClasses);
    Class[] jaxbClassArray = new Class[jaxbClasses.size()];
View Full Code Here

Examples of javax.jws.WebService

    return list;
  }

  public static Class getEndpointInterface(Class type)
  {
    WebService webService = (WebService) type.getAnnotation(WebService.class);

    if (webService != null && ! "".equals(webService.endpointInterface())) {
      try {
        ClassLoader loader = type.getClassLoader();
        return loader.loadClass(webService.endpointInterface());
      }
      catch (ClassNotFoundException e) {
        throw new WebServiceException(e);
      }
    }
View Full Code Here

Examples of javax.jws.WebService

    return type;
  }

  public static String getTargetNamespace(Class type, Class api)
  {
    WebService webService = (WebService) type.getAnnotation(WebService.class);

    // try to get the namespace from the annotation first...
    if (webService != null) {
      if (! "".equals(webService.targetNamespace()))
        return webService.targetNamespace();

      else if (! api.equals(type)) {
        webService = (WebService) api.getAnnotation(WebService.class);

        if (! "".equals(webService.targetNamespace()))
          return webService.targetNamespace();
      }
    }

    // get the namespace from the package name
    String namespace = null;
View Full Code Here

Examples of javax.jws.WebService

 
  private Class findWebServiceEndpointInterface(Class implClass)
    throws ClassNotFoundException
  {
    if (implClass.isAnnotationPresent(javax.jws.WebService.class)) {
      WebService webServiceAnnotation =
        (WebService) implClass.getAnnotation(javax.jws.WebService.class);

      String endpoint = webServiceAnnotation.endpointInterface();
      if (endpoint != null && ! "".equals(endpoint))
        return CauchoSystem.loadClass(endpoint);
    }

    return null;
View Full Code Here

Examples of javax.jws.WebService

        assertTrue("class " + clz.getName() + " modifier is not public", Modifier
            .isPublic(clz.getModifiers()));
        assertTrue("class " + clz.getName() + " modifier is interface", Modifier.isInterface(clz
            .getModifiers()));

        WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class);
        assertEquals("Greeter", webServiceAnn.name());

        Method method = clz.getMethod("sayHi", new Class[] {});
        WebMethod webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
        if (webMethodAnno.operationName() != null
            && !"".equals(webMethodAnno.operationName())) {
View Full Code Here

Examples of javax.jws.WebService

        assertTrue("class " + clz.getName() + " modifier is not public", Modifier
            .isPublic(clz.getModifiers()));
        assertTrue("class " + clz.getName() + " modifier is interface", Modifier.isInterface(clz
            .getModifiers()));

        WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class);
        assertEquals("Greeter", webServiceAnn.name());

        Method method = clz.getMethod("sayHi", new Class[] {});
        WebMethod webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
        if (webMethodAnno.operationName() != null
            && !"".equals(webMethodAnno.operationName())) {
View Full Code Here

Examples of javax.jws.WebService

        processor.execute();

        assertNotNull("Trouble processing logical only wsdl", output);

        Class clz = classLoader.loadClass("org.apache.cxf.cxf1678.hello_world_soap_http.GreeterImpl");
        WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class);
        assertEquals("org.apache.cxf.cxf1678.hello_world_soap_http.Greeter",
                     webServiceAnn.endpointInterface());
    }
View Full Code Here

Examples of javax.jws.WebService

        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/bug305773/hello_world.wsdl"));
        processor.setContext(env);
        processor.execute();
        Class clz = classLoader.loadClass("org.apache.cxf.w2j.hello_world_soap_http.GreeterImpl");

        WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class);
        assertTrue("Impl class should note generate name property value in webService annotation",
                    webServiceAnn.name().equals(""));
        assertFalse("Impl class should generate portName property value in webService annotation",
                    webServiceAnn.portName().equals(""));
        assertFalse("Impl class should generate serviceName property value in webService annotation",
                    webServiceAnn.serviceName().equals(""));

    }
View Full Code Here

Examples of javax.jws.WebService

        env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/cxf1048/test.wsdl"));
        processor.setContext(env);
        processor.execute();
        Class clz = classLoader.loadClass("org.apache.hello_world_soap_http.PingImpl");

        WebService webServiceAnn = AnnotationUtil.getPrivClassAnnotation(clz, WebService.class);
        assertEquals("org.apache.hello_world_soap_http.Ping", webServiceAnn.endpointInterface());
        assertEquals("GreeterSOAPService", webServiceAnn.serviceName());
        assertEquals("PingSoapPort", webServiceAnn.portName());
    }
View Full Code Here

Examples of javax.jws.WebService

   
    private JAXWSUtils() {
    }

    public static QName getPortType(Class seiClass) {
        WebService webService = (WebService) seiClass.getAnnotation(WebService.class);       
        if (webService != null) {
            String localName = webService.name();
            if (localName == null || localName.length() == 0) {
                localName = seiClass.getName();
            }
            String namespace = webService.targetNamespace();
            return new QName(getNamespace(seiClass, namespace), localName);
        }
        return null;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.