Package org.springframework.ws.server

Examples of org.springframework.ws.server.MessageDispatcher


        MessageContext messageContext =
                new DefaultMessageContext(new SaajSoapMessage(request), new SaajSoapMessageFactory(messageFactory));
        DefaultMethodEndpointAdapter adapter = new DefaultMethodEndpointAdapter();
        adapter.afterPropertiesSet();

        MessageDispatcher messageDispatcher = new SoapMessageDispatcher();
        messageDispatcher.setApplicationContext(applicationContext);
        messageDispatcher.setEndpointMappings(Collections.<EndpointMapping>singletonList(mapping));
        messageDispatcher.setEndpointAdapters(Collections.<EndpointAdapter>singletonList(adapter));

        messageDispatcher.receive(messageContext);

        MyEndpoint endpoint = applicationContext.getBean("endpoint", MyEndpoint.class);
        assertTrue("doIt() not invoked on endpoint", endpoint.isDoItInvoked());

        LogAspect aspect = (LogAspect) applicationContext.getBean("logAspect");
View Full Code Here


    @Test
    public void testDefaultStrategies() throws ServletException {
        servlet.setContextClass(StaticWebApplicationContext.class);
        servlet.init(config);
        MessageDispatcher messageDispatcher = (MessageDispatcher) servlet.getMessageReceiver();
        Assert.assertNotNull("No messageDispatcher created", messageDispatcher);
    }
View Full Code Here

    @Test
    public void testDetectedStrategies() throws ServletException {
        servlet.setContextClass(DetectWebApplicationContext.class);
        servlet.init(config);
        MessageDispatcher messageDispatcher = (MessageDispatcher) servlet.getMessageReceiver();
        Assert.assertNotNull("No messageDispatcher created", messageDispatcher);
        assertStrategies(PayloadRootQNameEndpointMapping.class, messageDispatcher.getEndpointMappings());
        assertStrategies(PayloadEndpointAdapter.class, messageDispatcher.getEndpointAdapters());
        assertStrategies(SimpleSoapExceptionResolver.class, messageDispatcher.getEndpointExceptionResolvers());
    }
View Full Code Here

TOP

Related Classes of org.springframework.ws.server.MessageDispatcher

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.