Examples of MockMessageExchange


Examples of org.apache.servicemix.soap.interceptors.jbi.MockMessageExchange

        Binding<?> binding = getBinding("HelloWorld-DOC.wsdl");
        PhaseInterceptorChain phaseIn = new PhaseInterceptorChain();
        phaseIn.add(binding.getInterceptors(Phase.ClientIn));
       
        Message msg = new MessageImpl();
        MessageExchange me = new MockMessageExchange();
        msg.put(Binding.class, binding);
        msg.put(Operation.class, binding.getOperations().iterator().next());
        msg.setContent(InputStream.class, getClass().getResourceAsStream("HelloWorld-DOC-Output.xml"));
        msg.setContent(MessageExchange.class, me);
        phaseIn.doIntercept(msg);
View Full Code Here

Examples of org.apache.servicemix.soap.interceptors.jbi.MockMessageExchange

       
        Message msg = new MessageImpl();
        msg.put(Binding.class, binding);
        msg.put(Operation.class, binding.getOperations().iterator().next());
        msg.setContent(InputStream.class, getClass().getResourceAsStream("HelloWorld-DOC-Fault.xml"));
        msg.setContent(MessageExchange.class, new MockMessageExchange());
        phaseIn.doIntercept(msg);

        NormalizedMessage nm = msg.getContent(NormalizedMessage.class);
        Document doc = DomUtil.parse(nm.getContent());
        baos = new ByteArrayOutputStream();
View Full Code Here

Examples of org.apache.servicemix.soap.interceptors.jbi.MockMessageExchange

        Binding<?> binding = getBinding("HelloWorld-RPC.wsdl");
        PhaseInterceptorChain phaseIn = new PhaseInterceptorChain();
        phaseIn.add(binding.getInterceptors(Phase.ClientIn));
       
        Message msg = new MessageImpl();
        MessageExchange me = new MockMessageExchange();
        msg.put(Binding.class, binding);
        msg.put(Operation.class, binding.getOperations().iterator().next());
        msg.setContent(InputStream.class, getClass().getResourceAsStream("HelloWorld-RPC-Output.xml"));
        msg.setContent(MessageExchange.class, me);
        phaseIn.doIntercept(msg);
View Full Code Here

Examples of org.apache.servicemix.tck.mock.MockMessageExchange

        assertEquals(1, ((MockAggregator) aggregator).scheduleCount);
    }
   

    private MessageExchange createExchange() throws MessagingException {
        MockMessageExchange me = (MockMessageExchange)factory.createExchange(JbiConstants.IN_ONLY);
        me.setRole(Role.PROVIDER);
        NormalizedMessage message = new MockNormalizedMessage();
        message.setContent(new StringSource("<test/>"));
        me.setMessage(message, "in");
        return me;
    }
View Full Code Here

Examples of org.apache.servicemix.tck.mock.MockMessageExchange

        //make sure that the end result is the same and no exception is thrown
        assertEquals("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + MESSAGE, stream.toString("ISO-8859-1"));
    }   

    private MessageExchange createMockExchange() throws MessagingException {
        MessageExchange exchange = new MockMessageExchange();
        exchange.setMessage(new MockNormalizedMessage(), "in");
        return exchange;
    }
View Full Code Here

Examples of org.apache.servicemix.tck.mock.MockMessageExchange

        assertEquals(1, ((MockAggregator) aggregator).scheduleCount);
    }
   

    private MessageExchange createExchange() throws MessagingException {
        MockMessageExchange me = (MockMessageExchange)factory.createExchange(JbiConstants.IN_ONLY);
        me.setRole(Role.PROVIDER);
        NormalizedMessage message = new MockNormalizedMessage();
        message.setContent(new StringSource("<test/>"));
        me.setMessage(message, "in");
        return me;
    }
View Full Code Here

Examples of org.apache.servicemix.tck.mock.MockMessageExchange

        Binding<?> binding = getBinding("HelloWorld-DOC.wsdl");
        PhaseInterceptorChain phaseIn = new PhaseInterceptorChain();
        phaseIn.add(binding.getInterceptors(Phase.ClientIn));
       
        Message msg = new MessageImpl();
        MessageExchange me = new MockMessageExchange();
        msg.put(Binding.class, binding);
        msg.put(Operation.class, binding.getOperations().iterator().next());
        msg.setContent(InputStream.class, getClass().getResourceAsStream("HelloWorld-DOC-Output.xml"));
        msg.setContent(MessageExchange.class, me);
        phaseIn.doIntercept(msg);
View Full Code Here

Examples of org.apache.servicemix.tck.mock.MockMessageExchange

       
        Message msg = new MessageImpl();
        msg.put(Binding.class, binding);
        msg.put(Operation.class, binding.getOperations().iterator().next());
        msg.setContent(InputStream.class, getClass().getResourceAsStream("HelloWorld-DOC-Fault.xml"));
        msg.setContent(MessageExchange.class, new MockMessageExchange());
        phaseIn.doIntercept(msg);

        NormalizedMessage nm = msg.getContent(NormalizedMessage.class);
        Document doc = DomUtil.parse(nm.getContent());
        baos = new ByteArrayOutputStream();
View Full Code Here

Examples of org.apache.servicemix.tck.mock.MockMessageExchange

        Binding<?> binding = getBinding("HelloWorld-RPC.wsdl");
        PhaseInterceptorChain phaseIn = new PhaseInterceptorChain();
        phaseIn.add(binding.getInterceptors(Phase.ClientIn));
       
        Message msg = new MessageImpl();
        MessageExchange me = new MockMessageExchange();
        msg.put(Binding.class, binding);
        msg.put(Operation.class, binding.getOperations().iterator().next());
        msg.setContent(InputStream.class, getClass().getResourceAsStream("HelloWorld-RPC-Output.xml"));
        msg.setContent(MessageExchange.class, me);
        phaseIn.doIntercept(msg);
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.