Search in sources :

Example 1 with BaseSOAPHandler

use of handler.handler_processing.common.BaseSOAPHandler in project metro-jax-ws by eclipse-ee4j.

the class BindingTest method testBindingInstances.

/*
     * 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());
}
Also used : SOAPBinding(jakarta.xml.ws.soap.SOAPBinding) Binding(jakarta.xml.ws.Binding) BaseSOAPHandler(handler.handler_processing.common.BaseSOAPHandler) Handler(jakarta.xml.ws.handler.Handler) BaseSOAPHandler(handler.handler_processing.common.BaseSOAPHandler) BindingProvider(jakarta.xml.ws.BindingProvider)

Aggregations

BaseSOAPHandler (handler.handler_processing.common.BaseSOAPHandler)1 Binding (jakarta.xml.ws.Binding)1 BindingProvider (jakarta.xml.ws.BindingProvider)1 Handler (jakarta.xml.ws.handler.Handler)1 SOAPBinding (jakarta.xml.ws.soap.SOAPBinding)1