use of fromwsdl.handler_singlepipe.common.HandlerTracker in project metro-jax-ws by eclipse-ee4j.
the class HandlerClient method testServerRtException2.
public void testServerRtException2() throws Exception {
HandlerTracker tracker = HandlerTracker.getClientInstance();
tracker.clearAll();
Hello12 stub = create12Stub();
ReportService report = createReportStub();
report.clearHandlerTracker();
try {
int bar = stub.hello12(SERVER_THROW_RUNTIME_EXCEPTION);
assert (false);
} catch (SOAPFaultException e) {
// as expected.
System.out.println("ok");
}
List<String> expClientCalled = Arrays.asList(new String[] { "client2", "client2_FAULT" });
List<String> gotClientCalled = tracker.getCalledHandlers();
assertTrue(ERR_CLIENT_CALLED_HANDLERS, checkEqual(expClientCalled, gotClientCalled));
List<String> expServerCalled = Arrays.asList(new String[] { "server1", "server1_FAULT" });
List<String> gotServerCalled = report.getReport(REPORT_CALLED_HANDLERS);
assertTrue(ERR_SERVER_CALLED_HANDLERS, checkEqual(expServerCalled, gotServerCalled));
List<String> expClientClosed = Arrays.asList(new String[] { "client2" });
List<String> gotClientClosed = tracker.getClosedHandlers();
assertTrue(ERR_CLIENT_CLOSED_HANDLERS, checkEqual(expClientClosed, gotClientClosed));
List<String> expServerClosed = Arrays.asList(new String[] { "server1" });
List<String> gotServerClosed = report.getReport(REPORT_CLOSED_HANDLERS);
assertTrue(ERR_SERVER_CLOSED_HANDLERS, checkEqual(expServerClosed, gotServerClosed));
}
use of fromwsdl.handler_singlepipe.common.HandlerTracker in project metro-jax-ws by eclipse-ee4j.
the class HandlerClient method testServerRtException1.
public void testServerRtException1() throws Exception {
HandlerTracker tracker = HandlerTracker.getClientInstance();
tracker.clearAll();
Hello stub = createStub();
ReportService report = createReportStub();
report.clearHandlerTracker();
try {
int bar = stub.hello(SERVER_THROW_RUNTIME_EXCEPTION);
assert (false);
} catch (SOAPFaultException e) {
// as expected.
System.out.println("ok");
}
List<String> expClientCalled = Arrays.asList(new String[] { "client1", "client1_FAULT" });
List<String> gotClientCalled = tracker.getCalledHandlers();
assertTrue(ERR_CLIENT_CALLED_HANDLERS, checkEqual(expClientCalled, gotClientCalled));
List<String> expServerCalled = Arrays.asList(new String[] { "server2", "server2_FAULT" });
List<String> gotServerCalled = report.getReport(REPORT_CALLED_HANDLERS);
assertTrue(ERR_SERVER_CALLED_HANDLERS, checkEqual(expServerCalled, gotServerCalled));
List<String> expClientClosed = Arrays.asList(new String[] { "client1" });
List<String> gotClientClosed = tracker.getClosedHandlers();
assertTrue(ERR_CLIENT_CLOSED_HANDLERS, checkEqual(expClientClosed, gotClientClosed));
List<String> expServerClosed = Arrays.asList(new String[] { "server2" });
List<String> gotServerClosed = report.getReport(REPORT_CLOSED_HANDLERS);
assertTrue(ERR_SERVER_CLOSED_HANDLERS, checkEqual(expServerClosed, gotServerClosed));
}
use of fromwsdl.handler_singlepipe.common.HandlerTracker in project metro-jax-ws by eclipse-ee4j.
the class HandlerClient method testSimple1.
// report.setInstruction(SERVER_PREFIX + 2, HA_THROW_PROTOCOL_EXCEPTION_INBOUND);
// tracker.setHandlerAction(CLIENT_PREFIX + 1, HA_THROW_PROTOCOL_EXCEPTION_INBOUND);
public void testSimple1() throws Exception {
HandlerTracker tracker = HandlerTracker.getClientInstance();
tracker.clearAll();
Hello stub = createStub();
ReportService report = createReportStub();
report.clearHandlerTracker();
int foo = 1;
int bar = stub.hello(foo);
assertTrue(foo == bar);
System.out.println("ok");
List<String> expClientCalled = Arrays.asList(new String[] { "client1", "client1" });
List<String> gotClientCalled = tracker.getCalledHandlers();
assertTrue(ERR_CLIENT_CALLED_HANDLERS, checkEqual(expClientCalled, gotClientCalled));
List<String> expServerCalled = Arrays.asList(new String[] { "server2", "server2" });
List<String> gotServerCalled = report.getReport(REPORT_CALLED_HANDLERS);
assertTrue(ERR_SERVER_CALLED_HANDLERS, checkEqual(expServerCalled, gotServerCalled));
List<String> expClientClosed = Arrays.asList(new String[] { "client1" });
List<String> gotClientClosed = tracker.getClosedHandlers();
assertTrue(ERR_CLIENT_CLOSED_HANDLERS, checkEqual(expClientClosed, gotClientClosed));
List<String> expServerClosed = Arrays.asList(new String[] { "server2" });
List<String> gotServerClosed = report.getReport(REPORT_CLOSED_HANDLERS);
assertTrue(ERR_SERVER_CLOSED_HANDLERS, checkEqual(expServerClosed, gotServerClosed));
}
use of fromwsdl.handler_singlepipe.common.HandlerTracker in project metro-jax-ws by eclipse-ee4j.
the class HandlerClient method testSimple2.
public void testSimple2() throws Exception {
HandlerTracker tracker = HandlerTracker.getClientInstance();
tracker.clearAll();
Hello12 stub = create12Stub();
ReportService report = createReportStub();
report.clearHandlerTracker();
int foo = 1;
int bar = stub.hello12(foo);
assertTrue(foo == bar);
System.out.println("ok");
List<String> expClientCalled = Arrays.asList(new String[] { "client2", "client2" });
List<String> gotClientCalled = tracker.getCalledHandlers();
assertTrue(ERR_CLIENT_CALLED_HANDLERS, checkEqual(expClientCalled, gotClientCalled));
List<String> expServerCalled = Arrays.asList(new String[] { "server1", "server1" });
List<String> gotServerCalled = report.getReport(REPORT_CALLED_HANDLERS);
assertTrue(ERR_SERVER_CALLED_HANDLERS, checkEqual(expServerCalled, gotServerCalled));
List<String> expClientClosed = Arrays.asList(new String[] { "client2" });
List<String> gotClientClosed = tracker.getClosedHandlers();
assertTrue(ERR_CLIENT_CLOSED_HANDLERS, checkEqual(expClientClosed, gotClientClosed));
List<String> expServerClosed = Arrays.asList(new String[] { "server1" });
List<String> gotServerClosed = report.getReport(REPORT_CLOSED_HANDLERS);
assertTrue(ERR_SERVER_CLOSED_HANDLERS, checkEqual(expServerClosed, gotServerClosed));
}
Aggregations