Search in sources :

Example 6 with ValidatorInterceptor

use of com.predic8.membrane.core.interceptor.schemavalidation.ValidatorInterceptor in project service-proxy by membrane.

the class SOAPFaultTest method testSkipFaults.

@Test
public void testSkipFaults() throws Exception {
    ValidatorInterceptor i = createValidatorInterceptor(true);
    Exchange exc = createFaultExchange();
    assertEquals(Outcome.CONTINUE, i.handleResponse(exc));
    assertContains("secret", exc.getResponse().toString());
}
Also used : Exchange(com.predic8.membrane.core.exchange.Exchange) Test(org.junit.Test)

Example 7 with ValidatorInterceptor

use of com.predic8.membrane.core.interceptor.schemavalidation.ValidatorInterceptor in project service-proxy by membrane.

the class SOAPMessageValidatorInterceptorTest method createValidatorInterceptor.

private ValidatorInterceptor createValidatorInterceptor(String wsdl) throws Exception {
    ValidatorInterceptor interceptor = new ValidatorInterceptor();
    interceptor.setWsdl(wsdl);
    interceptor.setResourceResolver(new ResolverMap());
    interceptor.init();
    return interceptor;
}
Also used : ResolverMap(com.predic8.membrane.core.resolver.ResolverMap)

Example 8 with ValidatorInterceptor

use of com.predic8.membrane.core.interceptor.schemavalidation.ValidatorInterceptor in project service-proxy by membrane.

the class ValidatorInterceptorTest method createValidatorInterceptor.

private ValidatorInterceptor createValidatorInterceptor(String wsdl) throws Exception {
    ValidatorInterceptor interceptor = new ValidatorInterceptor();
    interceptor.setResourceResolver(new ResolverMap());
    interceptor.setWsdl(wsdl);
    interceptor.init();
    return interceptor;
}
Also used : ResolverMap(com.predic8.membrane.core.resolver.ResolverMap)

Aggregations

Test (org.junit.Test)4 Exchange (com.predic8.membrane.core.exchange.Exchange)3 ResolverMap (com.predic8.membrane.core.resolver.ResolverMap)3 ValidatorInterceptor (com.predic8.membrane.core.interceptor.schemavalidation.ValidatorInterceptor)2 Router (com.predic8.membrane.core.Router)1 HttpClientConfiguration (com.predic8.membrane.core.transport.http.client.HttpClientConfiguration)1 Before (org.junit.Before)1