Package org.apache.axis

Examples of org.apache.axis.SimpleChain


    }

    public void testSimpleChainFaultAfterInvoke()
    {
        try {
            SimpleChain c = new SimpleChain();

            for (int i = 0; i < 5; i++) {
                c.addHandler(new TestHandler(i));
            }

            TestMessageContext mc = new TestMessageContext();
            c.invoke(mc);
            c.onFault(mc);
            assertEquals("Some onFaults were missed", mc.count(), 0);

        } catch (Exception ex) {
            assertTrue("Unexpected exception", false);
        }
View Full Code Here



    public void testSimpleChainFaultDuringInvoke()
    {
        try {
            SimpleChain c = new SimpleChain();

            for (int i = 0; i < 5; i++) {
                TestHandler th = new TestHandler(i);
                if (i == 3) {
                    th.setToFault();
                }
                c.addHandler(th);
            }


            TestMessageContext mc = new TestMessageContext();
            try {
                c.invoke(mc);
                assertTrue("Testcase error - didn't throw fault", false);
            } catch (AxisFault f) {
                assertEquals("Some onFaults were missed", mc.count(), 0);
            }
View Full Code Here

      // the handler instance to validate
      // NOTE:must execute before the handler that throws the fault
      TestHandler testHandler = null;

        try {
            SimpleChain c = new SimpleChain();

            for (int i = 0; i < 5; i++) {
                TestHandler th = new TestHandler(i);
                if (i == 2)
                  testHandler = th;

                if (i == 3) {
                    th.setToFault();
                }
                c.addHandler(th);
            }


            TestMessageContext mc = new TestMessageContext();
            try {
                c.invoke(mc);
                assertTrue("Testcase error - didn't throw fault", false);
            } catch (AxisFault f) {
                // did we save off the fault string?
              assertEquals("faultstring does not match constant",
                testHandler.getFaultCatch(),TestChainFault.FAULT_MESSAGE);
View Full Code Here

    }

    public void testSimpleChainFaultAfterInvoke()
    {
        try {
            SimpleChain c = new SimpleChain();

            for (int i = 0; i < 5; i++) {
                c.addHandler(new TestHandler(i));
            }

            TestMessageContext mc = new TestMessageContext();
            c.invoke(mc);
            c.onFault(mc);
            assertEquals("Some onFaults were missed", mc.count(), 0);

        } catch (Exception ex) {
            assertTrue("Unexpected exception", false);
        }
View Full Code Here


    public void testSimpleChainFaultDuringInvoke()
    {
        try {
            SimpleChain c = new SimpleChain();

            for (int i = 0; i < 5; i++) {
                TestHandler th = new TestHandler(i);
                if (i == 3) {
                    th.setToFault();
                }
                c.addHandler(th);
            }


            TestMessageContext mc = new TestMessageContext();
            try {
                c.invoke(mc);
                assertTrue("Testcase error - didn't throw fault", false);
            } catch (AxisFault f) {
                assertEquals("Some onFaults were missed", mc.count(), 0);
            }
View Full Code Here

      // the handler instance to validate
      // NOTE:must execute before the handler that throws the fault
      TestHandler testHandler = null;

        try {
            SimpleChain c = new SimpleChain();

            for (int i = 0; i < 5; i++) {
                TestHandler th = new TestHandler(i);
                if (i == 2)
                  testHandler = th;

                if (i == 3) {
                    th.setToFault();
                }
                c.addHandler(th);
            }


            TestMessageContext mc = new TestMessageContext();
            try {
                c.invoke(mc);
                assertTrue("Testcase error - didn't throw fault", false);
            } catch (AxisFault f) {
                // did we save off the fault string?
              assertEquals("faultstring does not match constant",
                testHandler.getFaultCatch(),TestChainFault.FAULT_MESSAGE);
View Full Code Here

    public static void initClient() throws AxisFault {
        if (log.isDebugEnabled()) {
            log.debug("STARTING SENDER FOR THE CLIENT .......");
        }
        sender = new Sender(storageManager);
        SimpleChain reqChain = null;
        SimpleChain resChain = null;
        try {
            reqChain = getRequestChain();
            resChain = getResponseChain();
        } catch (Exception e) {
            throw new AxisFault(e.getMessage());
View Full Code Here

        getSas().setMyConfig(new SimpleProvider());
    }


    protected void configureClientService() {
        SimpleChain reqHandlers = getListenerRequestChain();
        SimpleChain resHandlers = getListenerResponseChain();
        RMProvider rmp = new RMProvider();
        rmp.setClient(true);
        SOAPService rmService = new SOAPService(reqHandlers, rmp, resHandlers);
        JavaServiceDesc desc = new JavaServiceDesc();
        rmService.setOption(Constants.ClientProperties.CLASS_NAME, Constants.ClientProperties.RMSERVICE_CLASS);
View Full Code Here

    private static final Log log = LogFactory.getLog(ClientHandlerUtil.class.getName());


    public static SimpleChain getHandlerChain(List arr) {

        SimpleChain reqHandlers = new SimpleChain();

        Iterator it = arr.iterator();

        boolean hasReqHandlers = false;

        try {

            while (it.hasNext()) {

                hasReqHandlers = true;

                String strClass = (String) it.next();

                Class c = Class.forName(strClass);

                Handler h = (Handler) c.newInstance();

                reqHandlers.addHandler(h);

            }

        } catch (Exception e) {
View Full Code Here

        if (log.isDebugEnabled()) {
            log.debug(Constants.InfomationMessage.SENDER_STARTED);
        }

        cleintSender = new Sender(storageManager);
        SimpleChain reqChain = null;
        SimpleChain resChain = null;
        try {
            reqChain = getRequestChain();
            resChain = getResponseChain();
        } catch (Exception e) {
            throw new AxisFault(e.getMessage());
View Full Code Here

TOP

Related Classes of org.apache.axis.SimpleChain

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.