}
public void test01_runRuntimeException() {
try {
final AuthenticatorService withHandler = Service.create(
new URL("http://localhost:" + port + "/openejb-cxf/AuthenticatorServiceBean?wsdl"),
new QName("http://superbiz.org/wsdl", "AuthenticatorServiceBeanService"))
.getPort(AuthenticatorService.class);
assertNotNull(withHandler);
final AuthenticatorService noHandler = Service.create(
new URL("http://localhost:" + port + "/openejb-cxf/AuthenticatorServiceBeanNoHandler?wsdl"),
new QName("http://superbiz.org/wsdl", "AuthenticatorServiceBeanNoHandlerService"))
.getPort(AuthenticatorService.class);
assertNotNull(noHandler);
try {
withHandler.authenticateRuntime("John", "Doe");
} catch (final WrongPasswordRuntimeException e) {
e.printStackTrace();
fail("My checked exception instead of a throwableS...");
} catch (final Throwable e) {
System.out.println("A throwable exception...");
}
try {
noHandler.authenticateRuntime("John", "Doe");
} catch (final WrongPasswordRuntimeException e) {
e.printStackTrace();
fail("My checked exception instead of a throwableS...");
} catch (final Throwable e) {
System.out.println("A throwable exception...");