use of org.springframework.ws.client.core.FaultMessageResolver in project spring-boot by spring-projects.
the class WebServiceTemplateBuilderTests method setFaultMessageResolver.
@Test
void setFaultMessageResolver() {
FaultMessageResolver faultMessageResolver = mock(FaultMessageResolver.class);
WebServiceTemplate webServiceTemplate = this.builder.setFaultMessageResolver(faultMessageResolver).build();
assertThat(webServiceTemplate.getFaultMessageResolver()).isEqualTo(faultMessageResolver);
}
use of org.springframework.ws.client.core.FaultMessageResolver in project spring-integration by spring-projects.
the class WebServiceOutboundGatewayParserTests method simpleGatewayWithCustomFaultMessageResolver.
@Test
public void simpleGatewayWithCustomFaultMessageResolver() {
AbstractEndpoint endpoint = this.context.getBean("gatewayWithCustomFaultMessageResolver", AbstractEndpoint.class);
assertEquals(EventDrivenConsumer.class, endpoint.getClass());
Object gateway = new DirectFieldAccessor(endpoint).getPropertyValue("handler");
assertEquals(SimpleWebServiceOutboundGateway.class, gateway.getClass());
DirectFieldAccessor accessor = new DirectFieldAccessor(gateway);
accessor = new DirectFieldAccessor(accessor.getPropertyValue("webServiceTemplate"));
FaultMessageResolver resolver = (FaultMessageResolver) context.getBean("faultMessageResolver");
assertEquals(resolver, accessor.getPropertyValue("faultMessageResolver"));
}
Aggregations