Examples of HandlerChainInvoker


Examples of org.apache.cxf.jaxws.handler.HandlerChainInvoker

            W3CDOMStreamWriter domWriter = (W3CDOMStreamWriter)message.getContent(XMLStreamWriter.class);
            XMLStreamWriter origWriter = (XMLStreamWriter)message
                .get(LogicalHandlerOutInterceptor.ORIGINAL_WRITER)
           
           
            HandlerChainInvoker invoker = getInvoker(message);
            LogicalMessageContextImpl lctx = new LogicalMessageContextImpl(message);
            invoker.setLogicalMessageContext(lctx);
            boolean requestor = isRequestor(message);
           
           
            XMLStreamReader reader = (XMLStreamReader)message.get("LogicalHandlerInterceptor.INREADER");
            SOAPMessage origMessage = null;
            if (reader != null) {
                origMessage = message.getContent(SOAPMessage.class);
                message.setContent(XMLStreamReader.class, reader);
                message.removeContent(SOAPMessage.class);
            } else if (domWriter.getCurrentFragment() != null) {
                DocumentFragment frag = domWriter.getCurrentFragment();
                Node nd = frag.getFirstChild();
                while (nd != null && !(nd instanceof Element)) {
                    nd = nd.getNextSibling();
                }
                Source source = new DOMSource(nd);
                message.setContent(Source.class, source);
                message.setContent(XMLStreamReader.class,
                                   new W3CDOMStreamReader(domWriter.getCurrentFragment()));
            } else if (domWriter.getDocument().getDocumentElement() != null) {
                Source source = new DOMSource(domWriter.getDocument());
                message.setContent(Source.class, source);
                message.setContent(XMLStreamReader.class,
                                   StaxUtils.createXMLStreamReader(domWriter.getDocument()));
            }           
           
            if (!invoker.invokeLogicalHandlers(requestor, lctx)) {
                if (requestor) {
                    // client side - abort
                    message.getInterceptorChain().abort();
                    if (!message.getExchange().isOneWay()) {
                        Endpoint e = message.getExchange().get(Endpoint.class);
View Full Code Here

Examples of org.apache.cxf.jaxws.handler.HandlerChainInvoker

        MessageContext context = createProtocolMessageContext(message);
        if (context == null) {
            return true;
        }
               
        HandlerChainInvoker invoker = getInvoker(message);
        invoker.setProtocolMessageContext(context);

        if (!invoker.invokeProtocolHandlers(isRequestor(message), context)) {
            handleAbort(message, context);
        }

        // If this is the outbound and end of MEP, call MEP completion
        if (isRequestor(message) && invoker.getLogicalHandlers().isEmpty()
            && !isOutbound(message) && isMEPComlete(message)) {
            onCompletion(message);
        } else if (isOutbound(message) && isMEPComlete(message)) {
            onCompletion(message);
        }
View Full Code Here

Examples of org.apache.cxf.jaxws.handler.HandlerChainInvoker

            }

            public void close(MessageContext messageContext) {
            }
        });
        HandlerChainInvoker invoker = new HandlerChainInvoker(list);

        IMocksControl control = createNiceControl();
        Binding binding = control.createMock(Binding.class);
        Exchange exchange = control.createMock(Exchange.class);
        expect(exchange.get(HandlerChainInvoker.class)).andReturn(invoker).anyTimes();
View Full Code Here

Examples of org.apache.cxf.jaxws.handler.HandlerChainInvoker

            }

            public void close(MessageContext messageContext) {
            }
        });
        HandlerChainInvoker invoker = new HandlerChainInvoker(list);

        IMocksControl control = createNiceControl();
        Binding binding = control.createMock(Binding.class);
        Exchange exchange = control.createMock(Exchange.class);
        expect(exchange.get(HandlerChainInvoker.class)).andReturn(invoker).anyTimes();
View Full Code Here

Examples of org.apache.cxf.jaxws.handler.HandlerChainInvoker

            }

            public void close(MessageContext messageContext) {
            }
        });
        HandlerChainInvoker invoker = new HandlerChainInvoker(list);

        IMocksControl control = createNiceControl();
        Binding binding = control.createMock(Binding.class);
        Exchange exchange = control.createMock(Exchange.class);
        expect(exchange.get(HandlerChainInvoker.class)).andReturn(invoker).anyTimes();
View Full Code Here

Examples of org.apache.cxf.jaxws.handler.HandlerChainInvoker

            }

            public void close(MessageContext messageContext) {
            }
        });
        HandlerChainInvoker invoker = new HandlerChainInvoker(list);

        IMocksControl control = createNiceControl();
        Binding binding = control.createMock(Binding.class);
        Exchange exchange = control.createMock(Exchange.class);
        expect(exchange.get(HandlerChainInvoker.class)).andReturn(invoker).anyTimes();
View Full Code Here

Examples of org.apache.cxf.jaxws.handler.HandlerChainInvoker

            }

            public void close(MessageContext messageContext) {
            }
        });
        HandlerChainInvoker invoker = new HandlerChainInvoker(list);

        IMocksControl control = createNiceControl();
        Binding binding = control.createMock(Binding.class);
        SoapMessage message = control.createMock(SoapMessage.class);
        Exchange exchange = control.createMock(Exchange.class);
View Full Code Here

Examples of org.apache.cxf.jaxws.handler.HandlerChainInvoker

        }
    }
   
    private void handleMessageInternal(SoapMessage message) {
        MessageContext context = createProtocolMessageContext(message);
        HandlerChainInvoker invoker = getInvoker(message);
        invoker.setProtocolMessageContext(context);       

        try {
            if (!invoker.invokeProtocolHandlersHandleFault(isRequestor(message), context)) {
                // handleAbort(message, context);
            }
        } catch (RuntimeException exception) {
            /*
             * handleFault throws exception, in this case we need to replace
View Full Code Here

Examples of org.apache.cxf.jaxws.handler.HandlerChainInvoker

        MessageContext context = createProtocolMessageContext(message);
        if (context == null) {
            return true;
        }
               
        HandlerChainInvoker invoker = getInvoker(message);
        invoker.setProtocolMessageContext(context);

        if (!invoker.invokeProtocolHandlers(isRequestor(message), context)) {
            handleAbort(message, context);
        }

        // If this is the outbound and end of MEP, call MEP completion
        if (isRequestor(message) && invoker.getLogicalHandlers().isEmpty()
            && !isOutbound(message) && isMEPComlete(message)) {
            onCompletion(message);
        } else if (isOutbound(message) && isMEPComlete(message)) {
            onCompletion(message);
        }
View Full Code Here

Examples of org.apache.cxf.jaxws.handler.HandlerChainInvoker

        }
    }
   
    private void handleMessageInternal(SoapMessage message) {
        MessageContext context = createProtocolMessageContext(message);
        HandlerChainInvoker invoker = getInvoker(message);
        invoker.setProtocolMessageContext(context);       

        try {
            if (!invoker.invokeProtocolHandlersHandleFault(isRequestor(message), context)) {
                // handleAbort(message, context);
            }
        } catch (RuntimeException exception) {
            /*
             * handleFault throws exception, in this case we need to replace
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.