Examples of doIntercept()


Examples of org.apache.cxf.phase.PhaseInterceptorChain.doIntercept()

        prepareConduitSelector(message);

        modifyChain(chain, null);
        // execute chain

        chain.doIntercept(message);

        //it will close all the stream in the message, so we do not call it
        //getConduitSelector().complete(exchange);

        // Check to see if there is a Fault from the outgoing chain
View Full Code Here

Examples of org.apache.cxf.phase.PhaseInterceptorChain.doIntercept()

            PhaseInterceptorChain inChain = inboundChainCache.get(pm
                    .getInPhases(), inList);
            inChain.add(providerEndpoint.getOutInterceptors());
            inChain.add(providerEndpoint.getOutFaultInterceptors());
            soapMessage.setInterceptorChain(inChain);
            inChain.doIntercept(soapMessage);

            if (boi.getOperationInfo().isOneWay()) {
                messageExchange.setStatus(ExchangeStatus.DONE);
            } else if (soapMessage.get("jbiFault") != null
                    && soapMessage.get("jbiFault").equals(true)) {
View Full Code Here

Examples of org.apache.cxf.phase.PhaseInterceptorChain.doIntercept()

        } catch (XMLStreamException e) {
            //
        }
        message.setContent(XMLStreamWriter.class, writer);
        message.put(org.apache.cxf.message.Message.REQUESTOR_ROLE, true);
        outChain.doIntercept(message);
        XMLStreamWriter xtw = message.getContent(XMLStreamWriter.class);
        if (xtw != null) {
            xtw.writeEndDocument();
            xtw.close();
        }
View Full Code Here

Examples of org.apache.servicemix.soap.api.InterceptorChain.doIntercept()

        msg.setContent(NormalizedMessage.class, inMsg);
        msg.setContent(OutputStream.class, baos);
        exchange.setProperty(Message.class.getName(), msg);

        InterceptorChain phaseOut = getChain(Phase.ClientOut);
        phaseOut.doIntercept(msg);
        httpExchange.setMethod(HttpMethods.POST);
        httpExchange.setURL(baseUrl);
        httpExchange.setRequestContent(new ByteArrayBuffer(baos.toByteArray()));
        /*
        httpExchange.setRequestEntity(new Entity() {
View Full Code Here

Examples of org.apache.servicemix.soap.api.InterceptorChain.doIntercept()

        msg.put(JbiConstants.USE_JBI_WRAPPER, useJbiWrapper);
        msg.setContent(MessageExchange.class, exchange);
        msg.setContent(InputStream.class, new ByteArrayInputStream(httpExchange.getResponseData()));
        msg.put(StaxInInterceptor.ENCODING, httpExchange.getResponseEncoding());
        InterceptorChain phaseOut = getChain(Phase.ClientIn);
        phaseOut.doIntercept(msg);
        // TODO: Retrieve headers ?
    }

    protected InterceptorChain getChain(Phase phase) {
        InterceptorChain chain = binding.getInterceptorChain(phase);
View Full Code Here

Examples of org.apache.servicemix.soap.api.InterceptorChain.doIntercept()

        if (HttpConstants.METHOD_POST.equals(method) || HttpConstants.METHOD_PUT.equals(method)) {
            msg.setContent(InputStream.class, request.getInputStream());
        }
        request.setAttribute(Message.class.getName(), msg);
        InterceptorChain phase = getChain(Phase.ServerIn);
        phase.doIntercept(msg);
        return msg.getContent(MessageExchange.class);
    }

    public void sendAccepted(MessageExchange exchange, HttpServletRequest request, HttpServletResponse response)
        throws Exception {
View Full Code Here

Examples of org.apache.servicemix.soap.api.InterceptorChain.doIntercept()

        msg.setContent(MessageExchange.class, exchange);
        msg.setContent(NormalizedMessage.class, outMsg);
        msg.put(SoapVersion.class, in.get(SoapVersion.class));
        msg.put(JbiConstants.USE_JBI_WRAPPER, useJbiWrapper);
        InterceptorChain phase = getChain(Phase.ServerOut);
        phase.doIntercept(msg);
        // TODO: handle http headers: Content-Type, ...
    }

    public void sendError(MessageExchange exchange, Exception error, HttpServletRequest request,
        HttpServletResponse response) throws Exception {
View Full Code Here

Examples of org.apache.servicemix.soap.api.InterceptorChain.doIntercept()

            soapFault = (SoapFault) error;
        } else {
            soapFault = new SoapFault(error);
        }
        msg.setContent(Exception.class, soapFault);
        phase.doIntercept(msg);
    }

    public void sendFault(MessageExchange exchange, Fault fault, HttpServletRequest request,
        HttpServletResponse response) throws Exception {
        response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
View Full Code Here

Examples of org.apache.servicemix.soap.api.InterceptorChain.doIntercept()

        InterceptorChain phase = getChain(Phase.ServerOutFault);
        QName code = (QName) fault.getProperty("org.apache.servicemix.soap.fault.code");
        String reason = (String) fault.getProperty("org.apache.servicemix.soap.fault.reason");
        SoapFault soapFault = new SoapFault(code, reason, null, null, fault.getContent());
        msg.setContent(Exception.class, soapFault);
        phase.doIntercept(msg);
        // TODO: handle http headers: Content-Type, ...
    }

    protected InterceptorChain getChain(Phase phase) {
        InterceptorChain chain = binding.getInterceptorChain(phase);
View Full Code Here

Examples of org.apache.servicemix.soap.core.PhaseInterceptorChain.doIntercept()

        msgOut.put(Binding.class, binding);
        msgOut.setContent(OutputStream.class, baos);
        msgOut.setContent(MessageExchange.class, msg.getContent(MessageExchange.class));
        msgOut.setContent(NormalizedMessage.class, nm);
        msgOut.put(SoapVersion.class, msg.get(SoapVersion.class));
        phaseOut.doIntercept(msgOut);
        log.info(baos.toString());
       
        Document node = DomUtil.parse(new ByteArrayInputStream(baos.toByteArray()));
        Element envelope = DomUtil.getFirstChildElement(node);
        Element headers = DomUtil.getFirstChildElement(envelope);
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.