Package org.apache.servicemix.soap.api

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);
        return session.createTextMessage(baos.toString());
    }
   
    public Message createFault(MessageExchange exchange, Fault fault, Session session, JmsContext context) throws Exception {
        org.apache.servicemix.soap.api.Message in = ((Context) context).msg;
View Full Code Here


        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);
        return session.createTextMessage(baos.toString());
    }

    public Message createError(MessageExchange exchange, Exception error, Session session, JmsContext context) throws Exception {
        org.apache.servicemix.soap.api.Message in = ((Context) context).msg;
View Full Code Here

            soapFault = (SoapFault) error;
        } else {
            soapFault = new SoapFault(error);
        }
        msg.setContent(Exception.class, soapFault);
        phase.doIntercept(msg);
        return session.createTextMessage(baos.toString());
    }

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

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

        InterceptorChain phaseOut = getChain(Phase.ClientOut);
        phaseOut.doIntercept(msg);
        TextMessage jmsMessage = session.createTextMessage();
        jmsMessage.setText(baos.toString());
        return jmsMessage;
    }
View Full Code Here

        msg.setContent(NormalizedMessage.class, normalizedMessage);
        String str = ((TextMessage) message).getText();
        msg.setContent(InputStream.class, new ByteArrayInputStream(str.getBytes()));

        InterceptorChain phaseIn = getChain(Phase.ClientIn);
        phaseIn.doIntercept(msg);
    }

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

        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()));
       
        for (String header : msg.getTransportHeaders().keySet()) {
View Full Code Here

        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

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.