use of jakarta.xml.ws.handler.Handler in project metro-jax-ws by eclipse-ee4j.
the class HandlerChainTester method testHandlersOnReportPort2.
public void testHandlersOnReportPort2() {
TestService_Service service = getService();
ReportService testStub = service.getPort(ReportService.class);
Binding testBinding = ((BindingProvider) testStub).getBinding();
List<Handler> chain = testBinding.getHandlerChain();
// System.out.println(chain.size());
assertEquals(2, chain.size());
}
use of jakarta.xml.ws.handler.Handler in project metro-jax-ws by eclipse-ee4j.
the class HandlerChainTester method testHandlersOnTestPortDispatch1.
public void testHandlersOnTestPortDispatch1() {
Service service = Service.create(TESTSERVICE);
String bindingId = SOAPBinding.SOAP11HTTP_BINDING;
service.addPort(TESTSERVICEPORT, bindingId, endpointAddress);
Dispatch<Source> dispatch = service.createDispatch(TESTSERVICEPORT, Source.class, Service.Mode.PAYLOAD);
Binding testBinding = ((BindingProvider) dispatch).getBinding();
List<Handler> chain = testBinding.getHandlerChain();
// System.out.println(chain.size());
assertEquals(0, chain.size());
}
use of jakarta.xml.ws.handler.Handler in project metro-jax-ws by eclipse-ee4j.
the class HandlerChainTester method testHandlersOnReportPortDispatch.
public void testHandlersOnReportPortDispatch() {
TestService_Service service = getService();
Dispatch<Source> dispatch = service.createDispatch(REPORTSERVICEPORT, Source.class, Service.Mode.PAYLOAD);
Binding testBinding = ((BindingProvider) dispatch).getBinding();
List<Handler> chain = testBinding.getHandlerChain();
// System.out.println(chain.size());
assertEquals(2, chain.size());
}
use of jakarta.xml.ws.handler.Handler in project metro-jax-ws by eclipse-ee4j.
the class HandlerChainTester method testHandlersOnTestPortDispatch.
public void testHandlersOnTestPortDispatch() {
TestService_Service service = getService();
Dispatch<Source> dispatch = service.createDispatch(TESTSERVICEPORT, Source.class, Service.Mode.PAYLOAD);
Binding testBinding = ((BindingProvider) dispatch).getBinding();
List<Handler> chain = testBinding.getHandlerChain();
// System.out.println(chain.size());
assertEquals(3, chain.size());
}
use of jakarta.xml.ws.handler.Handler in project metro-jax-ws by eclipse-ee4j.
the class MessageContextTest method testRequestResponse.
public void testRequestResponse() throws Exception {
HelloService helloService = new HelloService();
Hello helloPort = helloService.getHelloPort();
Binding binding = ((BindingProvider) helloPort).getBinding();
List<Handler> handlers = new ArrayList<Handler>();
handlers.add(new TestHandler("CLIENT-SIDE"));
binding.setHandlerChain(handlers);
int x = 1;
int y = helloPort.sayHello(x);
assertTrue(y == x);
}
Aggregations