Package org.apache.axis

Examples of org.apache.axis.TargetedChain


        return newInstance(null, registry);
    }
   
    public Handler newInstance(Handler pivot, DeploymentRegistry registry) throws Exception {
        Handler h = super.makeNewInstance(registry);
        TargetedChain c = (TargetedChain)h;
        c.setRequestHandler(getRequestFlow().newInstance(registry));
        c.setPivotHandler(pivot);
        c.setResponseHandler(getResponseFlow().newInstance(registry));
        return c;
    }
View Full Code Here


    }
  
    public Handler newInstance(DeploymentRegistry registry) throws Exception {
        try {
            Handler h = super.makeNewInstance(registry);
            TargetedChain c = (TargetedChain)h;
            WSDDFlow request = getRequestFlow();
            WSDDFlow response = getResponseFlow();
            if (request != null)
                c.setRequestHandler(request.newInstance(registry));
            c.setPivotHandler(getProvider().newInstance(registry));
            if (response != null)
                c.setResponseHandler(response.newInstance(registry));
            return c;
        } catch (Exception e) {
            return null;
        }
    }
View Full Code Here

        return newInstance(null, registry);
    }
   
    public Handler newInstance(Handler pivot, DeploymentRegistry registry) throws Exception {
        Handler h = super.makeNewInstance(registry);
        TargetedChain c = (TargetedChain)h;
        c.setRequestHandler(getRequestFlow().newInstance(registry));
        c.setPivotHandler(pivot);
        c.setResponseHandler(getResponseFlow().newInstance(registry));
        return c;
    }
View Full Code Here

    }
  
    public Handler newInstance(DeploymentRegistry registry) throws Exception {
        try {
            Handler h = super.makeNewInstance(registry);
            TargetedChain c = (TargetedChain)h;
            WSDDFlow request = getRequestFlow();
            WSDDFlow response = getResponseFlow();
            if (request != null)
                c.setRequestHandler(request.newInstance(registry));
            c.setPivotHandler(getProvider().newInstance(registry));
            if (response != null)
                c.setResponseHandler(response.newInstance(registry));
            return c;
        } catch (Exception e) {
            return null;
        }
    }
View Full Code Here

    }

    public void testTransportForwardReference()
            throws Exception
    {
        TargetedChain transportOne =
                        (TargetedChain)server.getTransport("transport.one");
        assertNotNull("transport.one should be non-null!", transportOne);

        Chain transportOne_responseFlow =
                        (Chain)transportOne.getResponseHandler();
        assertNotNull("transport.two/responseFlow should be non-null!",
                      transportOne_responseFlow);

        Handler transportOne_responseFlow_handlers[] =
                        transportOne_responseFlow.getHandlers();
        assertNotNull("transport.one/responseFlow/handlers should be non-null!",
                      transportOne_responseFlow_handlers);
        assertTrue("transport.one should have exactly 1 handler!",
                (1 == transportOne_responseFlow_handlers.length));

        Handler transportOne_responseFlow_handler =
                        transportOne_responseFlow_handlers[0];
        assertNotNull("transport.one's handler should be non-null!",
                      transportOne_responseFlow_handler);
        assertTrue("transport.one's handler should be a URLMapper!",
                    (transportOne_responseFlow_handler instanceof
                                org.apache.axis.handlers.http.URLMapper));

        Handler transportOne_handler_byName =
                server.getHandler("ForwardReference");
        assertTrue("transport.one's 'ForwardReference' should be same as directly accessed 'BR'!",
                   (transportOne_responseFlow_handler ==
                            transportOne_handler_byName));

        TargetedChain transportTwo =
                (TargetedChain)server.getTransport("transport.two");
        assertNotNull("transport.two should be non-null!", transportTwo);

        Chain transportTwo_requestFlow = (Chain) transportTwo.getRequestHandler();
        assertNotNull("transport.two/requestFlow should be non-null!",
                      transportTwo_requestFlow);

        Handler transportTwo_requestFlow_handlers[] =
                transportTwo_requestFlow.getHandlers();
View Full Code Here

     * @throws Exception XXX
     */
    public Handler makeNewInstance(DeploymentRegistry registry)
        throws Exception
    {
        TargetedChain c = new org.apache.axis.SimpleTargetedChain();

        WSDDChain req = getRequestFlow();
        if (req != null)
            c.setRequestHandler(req.getInstance(registry));
       
        Handler pivot = null;
        if (pivotQName != null) {
            if (WSDDConstants.WSDD_JAVA.equals(pivotQName.getNamespaceURI())) {
                pivot = (Handler)Class.forName(pivotQName.getLocalPart()).newInstance();
            } else {
                pivot = registry.getHandler(pivotQName);
            }
        }
       
        c.setPivotHandler(pivot);

        WSDDChain resp = getResponseFlow();
        if (resp != null)
            c.setResponseHandler(resp.getInstance(registry));

        return c;
    }
View Full Code Here

    }

    public void testTransportForwardReference()
            throws Exception
    {
        TargetedChain transportOne =
                        (TargetedChain)server.getTransport("transport.one");
        assertNotNull("transport.one should be non-null!", transportOne);

        Chain transportOne_responseFlow =
                        (Chain)transportOne.getResponseHandler();
        assertNotNull("transport.two/responseFlow should be non-null!",
                      transportOne_responseFlow);

        Handler transportOne_responseFlow_handlers[] =
                        transportOne_responseFlow.getHandlers();
        assertNotNull("transport.one/responseFlow/handlers should be non-null!",
                      transportOne_responseFlow_handlers);
        assertTrue("transport.one should have exactly 1 handler!",
                (1 == transportOne_responseFlow_handlers.length));

        Handler transportOne_responseFlow_handler =
                        transportOne_responseFlow_handlers[0];
        assertNotNull("transport.one's handler should be non-null!",
                      transportOne_responseFlow_handler);
        assertTrue("transport.one's handler should be a URLMapper!",
                    (transportOne_responseFlow_handler instanceof
                                org.apache.axis.handlers.http.URLMapper));

        Handler transportOne_handler_byName =
                server.getHandler("ForwardReference");
        assertTrue("transport.one's 'ForwardReference' should be same as directly accessed 'BR'!",
                   (transportOne_responseFlow_handler ==
                            transportOne_handler_byName));

        TargetedChain transportTwo =
                (TargetedChain)server.getTransport("transport.two");
        assertNotNull("transport.two should be non-null!", transportTwo);

        Chain transportTwo_requestFlow = (Chain) transportTwo.getRequestHandler();
        assertNotNull("transport.two/requestFlow should be non-null!",
                      transportTwo_requestFlow);

        Handler transportTwo_requestFlow_handlers[] =
                transportTwo_requestFlow.getHandlers();
View Full Code Here

TOP

Related Classes of org.apache.axis.TargetedChain

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.