Package org.apache.servicemix.tck.mock

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


        aggregator.setTimerManager(new TimerManagerImpl());
        aggregator.getTimerManager().start();
        aggregator.setLockManager(new SimpleLockManager());
        aggregator.setStore(new MemoryStore(new IdGenerator()));
        aggregator.start();
        factory = new MockExchangeFactory();
    }
View Full Code Here


        PhaseInterceptorChain phaseIn = new PhaseInterceptorChain();
        phaseIn.add(binding.getInterceptors(Phase.ServerIn));
       
        Message message = new MessageImpl();
        message.put(Binding.class, binding);
        message.put(MessageExchangeFactory.class, new MockExchangeFactory());
        message.getTransportHeaders().put(HttpConstants.REQUEST_URI, "http://localhost:8192/person/312?code=abc");
        message.getTransportHeaders().put(HttpConstants.REQUEST_METHOD, HttpConstants.METHOD_GET);
       
        phaseIn.doIntercept(message);
View Full Code Here

        PhaseInterceptorChain phaseIn = new PhaseInterceptorChain();
        phaseIn.add(binding.getInterceptors(Phase.ServerIn));
       
        Message message = new MessageImpl();
        message.put(Binding.class, binding);
        message.put(MessageExchangeFactory.class, new MockExchangeFactory());
        message.getTransportHeaders().put(HttpConstants.REQUEST_URI, "http://localhost:8192/person/312");
        message.getTransportHeaders().put(HttpConstants.REQUEST_METHOD, HttpConstants.METHOD_POST);
        message.setContent(InputStream.class, new ByteArrayInputStream("ssn=321&name=Nodet".getBytes()));
       
        phaseIn.doIntercept(message);
View Full Code Here

        PhaseInterceptorChain phaseIn = new PhaseInterceptorChain();
        phaseIn.add(binding.getInterceptors(Phase.ServerIn));
       
        Message message = new MessageImpl();
        message.put(Binding.class, binding);
        message.put(MessageExchangeFactory.class, new MockExchangeFactory());
        message.getTransportHeaders().put(HttpConstants.REQUEST_URI, "http://localhost:8192/person/312");
        message.getTransportHeaders().put(HttpConstants.REQUEST_METHOD, HttpConstants.METHOD_PUT);
        message.setContent(InputStream.class, new ByteArrayInputStream("ssn=321&name=Nodet".getBytes()));
       
        phaseIn.doIntercept(message);
View Full Code Here

        PhaseInterceptorChain phaseIn = new PhaseInterceptorChain();
        phaseIn.add(binding.getInterceptors(Phase.ServerIn));
       
        Message message = new MessageImpl();
        message.put(Binding.class, binding);
        message.put(MessageExchangeFactory.class, new MockExchangeFactory());
        message.getTransportHeaders().put(HttpConstants.REQUEST_URI, "http://localhost:8192/person/312");
        message.getTransportHeaders().put(HttpConstants.REQUEST_METHOD, HttpConstants.METHOD_DELETE);
       
        phaseIn.doIntercept(message);
View Full Code Here

        aggregator = new MockAggregator();
        aggregator.setTimerManager(new TimerManagerImpl());
        aggregator.getTimerManager().start();
        aggregator.setLockManager(new SimpleLockManager());
        aggregator.setStore(new MemoryStore(new IdGenerator()));
        factory = new MockExchangeFactory();
    }
View Full Code Here

        phaseIn.add(binding.getInterceptors(Phase.ServerIn));
       
        Message msg = new MessageImpl();
        msg.put(Binding.class, binding);
        msg.setContent(InputStream.class, getClass().getResourceAsStream("HelloWorld-DOC-Input.xml"));
        msg.put(MessageExchangeFactory.class, new MockExchangeFactory());
        phaseIn.doIntercept(msg);

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

        phaseIn.add(binding.getInterceptors(Phase.ServerIn));
       
        Message msg = new MessageImpl();
        msg.put(Binding.class, binding);
        msg.setContent(InputStream.class, getClass().getResourceAsStream("HelloWorld-RPC-Input.xml"));
        msg.put(MessageExchangeFactory.class, new MockExchangeFactory());
        phaseIn.doIntercept(msg);
       
        NormalizedMessage nm = msg.getContent(NormalizedMessage.class);
        Document doc = DomUtil.parse(nm.getContent());
View Full Code Here

    public void test() throws Exception {
        Interceptor interceptor = new JbiInInterceptor(true);
        Message message = new MessageImpl();
        message.put(JbiInInterceptor.OPERATION_MEP, JbiConstants.IN_ONLY);
        message.put(MessageExchangeFactory.class, new MockExchangeFactory());
        message.setContent(Source.class, new StreamSource(new StringReader("<hello/>")));
        message.getTransportHeaders().put("Content-Type", "text/xml");
       
        interceptor.handleMessage(message);
       
View Full Code Here

TOP

Related Classes of org.apache.servicemix.tck.mock.MockExchangeFactory

Copyright © 2018 www.massapicom. 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.