Package javax.jws

Examples of javax.jws.HandlerChain


        return clazz.isAnnotationPresent(HandlerChain.class);
    }

    public HandlerChainAnnotation getHandlerChainAnnotation(Class clazz)
    {
        HandlerChain handlerChain = (HandlerChain) clazz.getAnnotation(HandlerChain.class);
        HandlerChainAnnotation annotation = null;
        if (handlerChain != null)
        {
            annotation = new HandlerChainAnnotation(handlerChain.file(),
                                                    handlerChain.name());
        }
        return annotation;
    }
View Full Code Here


        return buildHandlerChainFor(clz, null);
    }

    private HandlerChainAnnotation findHandlerChainAnnotation(Class<?> clz) {

        HandlerChain ann = clz.getAnnotation(HandlerChain.class);
        Class<?> declaringClass = clz;

        if (ann == null) {
            for (Class<?> iface : clz.getInterfaces()) {
                if (LOG.isLoggable(Level.FINE)) {
View Full Code Here

        assertEquals(4, files.length);
        File handlerConfig = new File(address, "Greeter_handler.xml");
        assertTrue(handlerConfig.exists());

        Class clz = classLoader.loadClass("ws.address.Greeter");
        HandlerChain handlerChainAnno = AnnotationUtil.getPrivClassAnnotation(clz, HandlerChain.class);
        assertEquals("Greeter_handler.xml", handlerChainAnno.file());
        assertNotNull("Handler chain xml generate fail!", classLoader
                      .findResource("ws/address/Greeter_handler.xml"));
    }
View Full Code Here

                                    provider.serviceName());

      portInfo = new PortInfoImpl(bindingType.value(), portName, serviceName);
    }

    HandlerChain handlerChain =
      (HandlerChain) _class.getAnnotation(HandlerChain.class);

    if (handlerChain != null) {
      if (portInfo != null) {
        HandlerResolver handlerResolver =
View Full Code Here

      PortInfoImpl portInfo = new PortInfoImpl(bindingId, portName,
                                               _serviceName, endpointAddress);

      // Check for @HandlerChain on the service API
      if (_handlerResolver == null) {
        HandlerChain handlerChain =
          (HandlerChain) api.getAnnotation(HandlerChain.class);

        if (handlerChain != null)
          _handlerResolver = JAXWSUtil.createHandlerResolver(api, handlerChain);
      }

      // Check for @HandlerChain on the Service
      if (_handlerResolver == null) {
        HandlerChain handlerChain =
          (HandlerChain) _serviceClass.getAnnotation(HandlerChain.class);

        if (handlerChain != null)
          _handlerResolver = JAXWSUtil.createHandlerResolver(api, handlerChain);
      }
View Full Code Here

        assertEquals(Arrays.asList(address.listFiles()).toString(), 6, files.length);
        File handlerConfig = new File(address, "Greeter_handler.xml");
        assertTrue(handlerConfig.exists());

        Class<?> clz = classLoader.loadClass("ws.address.Greeter");
        HandlerChain handlerChainAnno = AnnotationUtil.getPrivClassAnnotation(clz, HandlerChain.class);
        assertEquals("Greeter_handler.xml", handlerChainAnno.file());
        assertNotNull("Handler chain xml generate fail!", classLoader
            .getResource("ws/address/Greeter_handler.xml"));
    }
View Full Code Here

        List<Field> fieldswithHandlerChain = classFinder.findAnnotatedFields(HandlerChain.class);


        // Method-level annotation
        for ( Method method : methodswithHandlerChain ) {
            HandlerChain handlerChain = method.getAnnotation(HandlerChain.class);
            if ( handlerChain != null ) {
                addHandlerChain(annotatedApp, handlerChain, null, method, null);
            }
        }

        // Field-level annotation
        for ( Field field : fieldswithHandlerChain ) {
            HandlerChain handlerChain = field.getAnnotation(HandlerChain.class);
            if ( handlerChain != null ) {
                addHandlerChain(annotatedApp, handlerChain, null, null, field);
            }
        }
View Full Code Here

            }
        }

        // handler-chains
        if (!serviceRef.isSetHandlerChains()) {
            HandlerChain handlerChain = null;
            Class annotatedClass = null;
            if (method != null) {
                handlerChain = method.getAnnotation(HandlerChain.class);
                annotatedClass = method.getDeclaringClass();
            } else if (field != null) {
View Full Code Here

     * @param composite        - <code>TMFAnnotationComposite</code>
     * @param annotatedElement - <code>AnnotatedElement</code>
     */
    public static void attachHandlerChainAnnotation(TMFAnnotationComposite composite,
                                                    AnnotatedElement annotatedElement) {
        HandlerChain handlerChain = (HandlerChain)ConverterUtils.getAnnotation(
                HandlerChain.class, annotatedElement);
        if (handlerChain != null) {
            HandlerChainAnnot hcAnnot = ConverterUtils.createHandlerChainAnnot(
                    handlerChain);
            composite.setHandlerChainAnnot(hcAnnot);
View Full Code Here

                buildWebServiceRef(consumer, webserviceref, null, null, classLoader);
            }

            for (Field field : classFinder.findAnnotatedFields(WebServiceRef.class)) {
                WebServiceRef webserviceref = field.getAnnotation(WebServiceRef.class);
                HandlerChain handlerChain = field.getAnnotation(HandlerChain.class);

                Member member = new FieldMember(field);

                buildWebServiceRef(consumer, webserviceref, handlerChain, member, classLoader);
            }

            for (Method method : classFinder.findAnnotatedMethods(WebServiceRef.class)) {
                WebServiceRef webserviceref = method.getAnnotation(WebServiceRef.class);
                HandlerChain handlerChain = method.getAnnotation(HandlerChain.class);

                Member member = new MethodMember(method);

                buildWebServiceRef(consumer, webserviceref, handlerChain, member, classLoader);
            }
View Full Code Here

TOP

Related Classes of javax.jws.HandlerChain

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.