Package javax.xml.ws.handler

Examples of javax.xml.ws.handler.Handler


                XMLStreamReaderUtil.nextElementContent(reader);
            }

            // process all <handler> elements
            while (reader.getName().equals(QNAME_HANDLER)) {
                Handler handler;

                XMLStreamReaderUtil.nextContent(reader);
                if (reader.getName().equals(QNAME_HANDLER_NAME)) {
                    skipTextElement(reader);
                }

                // handler class
                ensureProperName(reader, QNAME_HANDLER_CLASS);
                try {
                    handler = (Handler) loadClass(classLoader,
                            XMLStreamReaderUtil.getElementText(reader).trim()).newInstance();
                } catch (InstantiationException ie){
                    throw new RuntimeException(ie);
                } catch (IllegalAccessException e) {
                    throw new RuntimeException(e);
                }
                XMLStreamReaderUtil.nextContent(reader);

                // init params (ignored)
                while (reader.getName().equals(QNAME_HANDLER_PARAM)) {
                    skipInitParamElement(reader);
                }

                // headers (ignored)
                while (reader.getName().equals(QNAME_HANDLER_HEADER)) {
                    skipTextElement(reader);
                }

                // roles (not stored per handler)
                while (reader.getName().equals(QNAME_HANDLER_ROLE)) {
                    roles.add(XMLStreamReaderUtil.getElementText(reader));
                    XMLStreamReaderUtil.nextContent(reader);
                }

                // call @PostConstruct method on handler if present
                for (Method method : handler.getClass().getMethods()) {
                    if (method.getAnnotation(PostConstruct.class) == null) {
                        continue;
                    }
                    try {
                        method.invoke(handler, new Object [0]);
View Full Code Here


            }
            if(hchainMatched) {
                for(HandlerType handler : hchain.getHandlers()) {
                    try {
                        Handler handlerClass = (Handler) loadClass(annotatedClass.getClassLoader(),
                                handler.getHandlerClass()).newInstance();
                        callHandlerPostConstruct(handlerClass);
                        handlerClassList.add(handlerClass);
                    } catch (InstantiationException ie){
                        throw new RuntimeException(ie);
View Full Code Here

     *
     * @param bindingProvider
     */
    private void configureClientHandler(BindingProvider bindingProvider)
    {
        Handler handler = new JaxWSHeaderContextProcessor();
        List<Handler> handlers = Collections.singletonList(handler);
        bindingProvider.getBinding().setHandlerChain(handlers);
    }
View Full Code Here

   {
      log.debug("close");
      MessageContextJAXWS context = (MessageContextJAXWS)msgContext;
      for (int index = 1; index <= executedHandlers.size(); index++)
      {
         Handler currHandler = executedHandlers.get(executedHandlers.size() - index);
         try
         {
            context.setCurrentScope(Scope.HANDLER);
            currHandler.close(msgContext);
         }
         finally
         {
            context.setCurrentScope(Scope.APPLICATION);
         }
View Full Code Here

      if (handlers.size() > 0)
      {
         log.debug("Enter: handle" + (isOutbound ? "Out" : "In ") + "BoundMessage");

         int index = getFirstHandler();
         Handler currHandler = null;
         try
         {
            String lastMessageTrace = null;
            while (doNext && index >= 0)
            {
View Full Code Here

            }
         }

         int index = getFirstHandler();
        
         Handler currHandler = null;
         try
         {
            String lastMessageTrace = null;
            while (doNext && index >= 0)
            {
View Full Code Here

      try
      {
         // Load the handler class using the deployments top level CL
         Class hClass = classLoader.loadClass(className);
         Handler handler = (Handler)hClass.newInstance();

         if (handler instanceof GenericHandler)
            ((GenericHandler)handler).setHandlerName(handlerName);

         if (handler instanceof GenericSOAPHandler)
View Full Code Here

      try
      {
         // Load the handler class using the deployments top level CL
         Class hClass = classLoader.loadClass(className);
         Handler handler = (Handler)hClass.newInstance();

         if (handler instanceof GenericHandler)
            ((GenericHandler)handler).setHandlerName(handlerName);

         if (handler instanceof GenericSOAPHandler)
View Full Code Here

                XMLStreamReaderUtil.nextElementContent(reader);
            }

            // process all <handler> elements
            while (reader.getName().equals(QNAME_HANDLER)) {
                Handler handler;

                XMLStreamReaderUtil.nextContent(reader);
                if (reader.getName().equals(QNAME_HANDLER_NAME)) {
                    skipTextElement(reader);
                }

                // handler class
                ensureProperName(reader, QNAME_HANDLER_CLASS);
                try {
                    handler = (Handler) loadClass(classLoader,
                            XMLStreamReaderUtil.getElementText(reader).trim()).newInstance();
                } catch (InstantiationException ie){
                    throw new RuntimeException(ie);
                } catch (IllegalAccessException e) {
                    throw new RuntimeException(e);
                }
                XMLStreamReaderUtil.nextContent(reader);

                // init params (ignored)
                while (reader.getName().equals(QNAME_HANDLER_PARAM)) {
                    skipInitParamElement(reader);
                }

                // headers (ignored)
                while (reader.getName().equals(QNAME_HANDLER_HEADER)) {
                    skipTextElement(reader);
                }

                // roles (not stored per handler)
                while (reader.getName().equals(QNAME_HANDLER_ROLE)) {
                    roles.add(XMLStreamReaderUtil.getElementText(reader));
                    XMLStreamReaderUtil.nextContent(reader);
                }

                // call @PostConstruct method on handler if present
                for (Method method : handler.getClass().getMethods()) {
                    if (method.getAnnotation(PostConstruct.class) == null) {
                        continue;
                    }
                    try {
                        method.invoke(handler, new Object [0]);
View Full Code Here

            }
            if(hchainMatched) {
                for(HandlerType handler : hchain.getHandlers()) {
                    try {
                        Handler handlerClass = (Handler) loadClass(annotatedClass.getClassLoader(),
                                handler.getHandlerClass()).newInstance();
                        callHandlerPostConstruct(handlerClass);
                        handlerClassList.add(handlerClass);
                    } catch (InstantiationException ie){
                        throw new RuntimeException(ie);
View Full Code Here

TOP

Related Classes of javax.xml.ws.handler.Handler

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.