use of jakarta.xml.ws.Binding in project metro-jax-ws by eclipse-ee4j.
the class BindingTester method testBindingInstances.
/*
* get the binding object on dispatch object
*/
// public void testDispatch1() throws Exception {
// Dispatch dispatch = createDispatchForSource(
// new QName("urn:test", "TestServicePort"));
// assertNotNull("dispatch object is null", dispatch);
// Binding binding = dispatch.getBinding();
// assertNotNull("binding object should not be null", binding);
// List handlers = binding.getHandlerChain();
// assertNotNull("handler list should not be null", handlers);
// assertTrue("There should be no handlers in list", handlers.size() == 0);
// }
/*
* Used for testing of handlers shared between bindings.
*/
public void testBindingInstances() throws Exception {
TestService_Service service = getService();
TestService stub1 = getTestStub(service);
TestService stub2 = getTestStub(service);
// make some calls
stub1.testInt(0);
stub2.testInt(0);
Binding b1 = ((BindingProvider) stub1).getBinding();
Binding b2 = ((BindingProvider) stub2).getBinding();
List<Handler> chain = b1.getHandlerChain();
// get a soap handler from the chain. doesn't matter which one
BaseSOAPHandler handler = null;
for (Handler h : chain) {
if (h instanceof BaseSOAPHandler) {
handler = (BaseSOAPHandler) h;
break;
}
}
assertTrue("handler should be in 'ready' state", handler.isAvailable());
b2.setHandlerChain(new ArrayList<Handler>());
assertTrue("handler should be in 'ready' state", handler.isAvailable());
}
use of jakarta.xml.ws.Binding in project metro-jax-ws by eclipse-ee4j.
the class HandlerChainTester method testHandlersOnTestPort2.
public void testHandlersOnTestPort2() {
TestService_Service service = getService();
TestService testStub = service.getPort(TestService.class);
Binding testBinding = ((BindingProvider) testStub).getBinding();
List<Handler> chain = testBinding.getHandlerChain();
// System.out.println(chain.size());
assertEquals(3, chain.size());
}
use of jakarta.xml.ws.Binding in project metro-jax-ws by eclipse-ee4j.
the class HandlerChainTester method testHandlersOnTestPort3.
public void testHandlersOnTestPort3() {
Service service = Service.create(WSDL_LOCATION, TESTSERVICE);
TestService testStub = service.getPort(TESTSERVICEPORT, TestService.class);
Binding testBinding = ((BindingProvider) testStub).getBinding();
List<Handler> chain = testBinding.getHandlerChain();
// System.out.println(chain.size());
assertEquals(0, chain.size());
}
use of jakarta.xml.ws.Binding in project metro-jax-ws by eclipse-ee4j.
the class HandlerChainTester method testHandlersOnReportPort3.
public void testHandlersOnReportPort3() {
Service service = Service.create(WSDL_LOCATION, TESTSERVICE);
ReportService testStub = service.getPort(REPORTSERVICEPORT, ReportService.class);
Binding testBinding = ((BindingProvider) testStub).getBinding();
List<Handler> chain = testBinding.getHandlerChain();
// System.out.println(chain.size());
assertEquals(0, chain.size());
}
use of jakarta.xml.ws.Binding in project metro-jax-ws by eclipse-ee4j.
the class HandlerChainTester method testHandlersOnTestPort1.
public void testHandlersOnTestPort1() {
Service service = Service.create(WSDL_LOCATION, TESTSERVICE);
TestService testStub = service.getPort(TestService.class);
Binding testBinding = ((BindingProvider) testStub).getBinding();
List<Handler> chain = testBinding.getHandlerChain();
// System.out.println(chain.size());
assertEquals(0, chain.size());
}
Aggregations