use of com.predic8.membrane.core.interceptor.schemavalidation.ValidatorInterceptor in project service-proxy by membrane.
the class ValidatorInterceptorTest method createSchemaValidatorInterceptor.
private ValidatorInterceptor createSchemaValidatorInterceptor(String schema) throws Exception {
ValidatorInterceptor interceptor = new ValidatorInterceptor();
interceptor.setResourceResolver(new ResolverMap());
interceptor.setSchema(schema);
interceptor.init();
return interceptor;
}
use of com.predic8.membrane.core.interceptor.schemavalidation.ValidatorInterceptor in project service-proxy by membrane.
the class SOAPFaultTest method testSkipFault2.
@Test
public void testSkipFault2() throws Exception {
ValidatorInterceptor i = createValidatorInterceptor(true);
Exchange exc = getExchangeCP("wsdlValidator/soapFaultCustom.xml");
assertEquals(Outcome.CONTINUE, i.handleResponse(exc));
}
use of com.predic8.membrane.core.interceptor.schemavalidation.ValidatorInterceptor in project service-proxy by membrane.
the class UnavailableSoapProxyTest method setup.
@Before
public void setup() {
r = new Router();
HttpClientConfiguration httpClientConfig = new HttpClientConfiguration();
httpClientConfig.setMaxRetries(1);
r.setHttpClientConfig(httpClientConfig);
r.setHotDeploy(false);
r.setRetryInit(true);
sp = new SOAPProxy();
sp.setPort(2000);
sp.setWsdl("http://localhost:2001/axis2/services/BLZService?wsdl");
sp3 = new ServiceProxy();
sp3.setPort(2000);
sp3.setTarget(new AbstractServiceProxy.Target("localhost", 2001));
ValidatorInterceptor v = new ValidatorInterceptor();
v.setWsdl("http://localhost:2001/axis2/services/BLZService?wsdl");
sp3.getInterceptors().add(v);
SOAPProxy sp2 = new SOAPProxy();
sp2.setPort(2001);
sp2.setWsdl("http://www.thomas-bayer.com/axis2/services/BLZService?wsdl");
r2 = new Router();
r2.setHotDeploy(false);
r2.getRules().add(sp2);
// r2 will be started during the test
}
use of com.predic8.membrane.core.interceptor.schemavalidation.ValidatorInterceptor in project service-proxy by membrane.
the class UnavailableSoapProxyTest method checkWSDLDownloadFailureInSoapProxyAndValidator.
@Test
public void checkWSDLDownloadFailureInSoapProxyAndValidator() {
sp.getInterceptors().add(new ValidatorInterceptor());
r.getRules().add(sp);
test();
}
use of com.predic8.membrane.core.interceptor.schemavalidation.ValidatorInterceptor in project service-proxy by membrane.
the class SOAPFaultTest method testValidateFaults.
@Test
public void testValidateFaults() throws Exception {
ValidatorInterceptor i = createValidatorInterceptor(false);
Exchange exc = createFaultExchange();
assertEquals(Outcome.ABORT, i.handleResponse(exc));
assertContainsNot("secret", exc.getResponse().toString());
}
Aggregations