Package org.apache.axis

Examples of org.apache.axis.SimpleChain



    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 setUp() throws Exception {
        engine.init();
        localTransport.setUrl(localURL);
        SimpleChain chain = new SimpleChain();
        chain.addHandler(new TestFaultHandler());
        chain.addHandler(new TestHandler());
        SOAPService service = new SOAPService(chain,
                                              new RPCProvider(),
                                              null);
       
        service.setOption("className", TestService.class.getName());
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.