public void testSchemaValidationProviderMessage() throws Exception {
doProviderTest("MProvider");
}
private void doProviderTest(String postfix) throws Exception {
SchemaValidation validation = createService(Boolean.FALSE, postfix);
SomeRequest req = new SomeRequest();
req.setId("9999999999");
try {
validation.doSomething(req);
fail("Should have faulted");
} catch (DoSomethingFault e) {
assertEquals("1234", e.getFaultInfo().getErrorCode());
}
req.setId("8888888888");
try {
validation.doSomething(req);
fail("Should have faulted");
} catch (DoSomethingFault e) {
fail("Should not have happened");