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");