use of org.springframework.ws.client.core.SourceExtractor in project spring-integration by spring-projects.
the class WebServiceOutboundGatewayParserTests method simpleGatewayWithCustomSourceExtractor.
@Test
public void simpleGatewayWithCustomSourceExtractor() {
AbstractEndpoint endpoint = this.context.getBean("gatewayWithCustomSourceExtractor", AbstractEndpoint.class);
assertEquals(EventDrivenConsumer.class, endpoint.getClass());
Object gateway = new DirectFieldAccessor(endpoint).getPropertyValue("handler");
assertEquals(SimpleWebServiceOutboundGateway.class, gateway.getClass());
DirectFieldAccessor accessor = new DirectFieldAccessor(gateway);
SourceExtractor<?> sourceExtractor = (SourceExtractor<?>) context.getBean("sourceExtractor");
assertEquals(sourceExtractor, accessor.getPropertyValue("sourceExtractor"));
}
use of org.springframework.ws.client.core.SourceExtractor in project spring-integration by spring-projects.
the class WebServiceOutboundGatewayParserTests method simpleGatewayWithCustomSourceExtractorAndMessageFactory.
@Test
public void simpleGatewayWithCustomSourceExtractorAndMessageFactory() {
AbstractEndpoint endpoint = context.getBean("gatewayWithCustomSourceExtractorAndMessageFactory", AbstractEndpoint.class);
SourceExtractor<?> sourceExtractor = (SourceExtractor<?>) context.getBean("sourceExtractor");
assertEquals(EventDrivenConsumer.class, endpoint.getClass());
Object gateway = new DirectFieldAccessor(endpoint).getPropertyValue("handler");
assertEquals(SimpleWebServiceOutboundGateway.class, gateway.getClass());
DirectFieldAccessor accessor = new DirectFieldAccessor(gateway);
assertEquals(sourceExtractor, accessor.getPropertyValue("sourceExtractor"));
accessor = new DirectFieldAccessor(accessor.getPropertyValue("webServiceTemplate"));
WebServiceMessageFactory factory = (WebServiceMessageFactory) context.getBean("messageFactory");
assertEquals(factory, accessor.getPropertyValue("messageFactory"));
}
Aggregations