Package org.apache.cxf.interceptor

Examples of org.apache.cxf.interceptor.InterceptorChain.doIntercept()


       
        chain.add(new SOAPHandlerInterceptor(binding));
        message.setInterceptorChain(chain);
        control.replay();

        chain.doIntercept(message);
       
        control.verify();

        writer.flush();
       
View Full Code Here


        });
        chain.add(new SOAPHandlerInterceptor(binding));
        message.setInterceptorChain(chain);
        control.replay();

        chain.doIntercept(message);
       
        control.verify();

        // Verify SOAPMessage header
        SOAPMessage soapMessageNew = message.getContent(SOAPMessage.class);
View Full Code Here

                    partialResponse.setInterceptorChain(chain);
                    exchange.put(ConduitSelector.class,
                                 new PreexistingConduitSelector(backChannel,
                                                                exchange.get(Endpoint.class)));

                    if (chain != null && !chain.doIntercept(partialResponse)
                        && partialResponse.getContent(Exception.class) != null) {
                        if (partialResponse.getContent(Exception.class) instanceof Fault) {
                            throw (Fault)partialResponse.getContent(Exception.class);
                        } else {
                            throw new Fault(partialResponse.getContent(Exception.class));
View Full Code Here

                    partialResponse.setInterceptorChain(chain);
                    exchange.put(ConduitSelector.class,
                                 new PreexistingConduitSelector(backChannel,
                                                                exchange.get(Endpoint.class)));

                    if (chain != null && !chain.doIntercept(partialResponse)
                        && partialResponse.getContent(Exception.class) != null) {
                        if (partialResponse.getContent(Exception.class) instanceof Fault) {
                            throw (Fault)partialResponse.getContent(Exception.class);
                        } else {
                            throw new Fault(partialResponse.getContent(Exception.class));
View Full Code Here

        outMessage.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
        outMessage.put(Message.INBOUND_MESSAGE, Boolean.FALSE);
        InterceptorChain chain = OutgoingChainInterceptor.getOutInterceptorChain(cxfExchange);
        outMessage.setInterceptorChain(chain);

        chain.doIntercept(outMessage);
        CachedOutputStream outputStream = (CachedOutputStream)outMessage.getContent(OutputStream.class);
        exchange.getOut().setBody(outputStream.getInputStream());
        exchange.getIn().setBody(outputStream.getInputStream());
    }
View Full Code Here

        org.apache.cxf.message.Message outMessage = CxfSoapBinding.getCxfOutMessage(
                endpoint.getHeaderFilterStrategy(), exchange, false);
        org.apache.cxf.message.Exchange cxfExchange = outMessage.getExchange();
        InterceptorChain chain = OutgoingChainInterceptor.getOutInterceptorChain(cxfExchange);
        outMessage.setInterceptorChain(chain);
        chain.doIntercept(outMessage);
        CachedOutputStream outputStream = (CachedOutputStream)outMessage.getContent(OutputStream.class);
        exchange.getOut().setBody(outputStream.getInputStream());
    }

}
View Full Code Here

        org.apache.cxf.message.Message outMessage = CxfSoapBinding.getCxfOutMessage(
                endpoint.getHeaderFilterStrategy(), exchange, false);
        org.apache.cxf.message.Exchange cxfExchange = outMessage.getExchange();
        InterceptorChain chain = OutgoingChainInterceptor.getOutInterceptorChain(cxfExchange);
        outMessage.setInterceptorChain(chain);
        chain.doIntercept(outMessage);
        CachedOutputStream outputStream = (CachedOutputStream)outMessage.getContent(OutputStream.class);
        exchange.getOut().setBody(outputStream.getInputStream());
    }

}
View Full Code Here

            String verb = mapper.getVerb(bop);
            message.put(Message.HTTP_REQUEST_METHOD, verb);
            boolean putOrPost = verb.equals(HttpConstants.POST) || verb.equals(HttpConstants.PUT);
           
            if (putOrPost) {
                chain.doIntercept(message);
                chain.add(new URIParameterOutInterceptor());
                chain.add(new DocumentWriterInterceptor());
                chain.add(STAX_OUT);
            } else {
                chain.add(new URIParameterOutInterceptor());
View Full Code Here

                         boi.getOperationInfo().getOutput());
        }

        outBound.put(Message.INBOUND_MESSAGE, Boolean.FALSE);
        outBound.setInterceptorChain(chain);
        chain.doIntercept(outBound);
    }
}
View Full Code Here

        List<Phase> phases = new ArrayList<Phase>(bus.getExtension(PhaseManager.class).getInPhases());
        ColocUtil.setPhases(phases, Phase.USER_LOGICAL, Phase.INVOKE);
        InterceptorChain chain = ColocUtil.getInInterceptorChain(ex, phases);
        inMsg.setInterceptorChain(chain);

        chain.doIntercept(inMsg);

        //Set Server OutBound Message onto InBound Exchange.
        setOutBoundMessage(ex, m.getExchange());
    }
   
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.