Package org.apache.cxf

Examples of org.apache.cxf.Bus.shutdown()


            String error = "A replay attack has been detected";
            assertTrue(ex.getMessage().contains(error));
        }
       
        ((java.io.Closeable)utPort).close();
        bus.shutdown(true);
    }
   
    // In this test, the service is using the UsernameTokenInterceptor, but the
    // client is using the WSS4JOutInterceptor
    @org.junit.Test
View Full Code Here


            String error = "A replay attack has been detected";
            assertTrue(ex.getMessage().contains(error));
        }
       
        ((java.io.Closeable)utPort).close();
        bus.shutdown(true);
    }
   
    @org.junit.Test
    public void testPlaintextPrincipal() throws Exception {
View Full Code Here

            String error = "Unauthorized";
            assertTrue(ex.getMessage().contains(error));
        }
       
        ((java.io.Closeable)utPort).close();
        bus.shutdown(true);
    }
}
View Full Code Here

    @Test
    public void testCustomerBusShutdown() {
        String cfgFile = "org/apache/cxf/bus/spring/customerBus.xml";
        Bus bus = new SpringBusFactory().createBus(cfgFile, true);
        // We have three bus here, which should be closed rightly
        bus.shutdown(true);
    }
   
    @Test
    public void testCustomFileURLFromSystemProperty() {
        URL cfgFileURL = this.getClass().getResource("resources/bus-overwrite.xml");       
View Full Code Here

        bl.preShutdown();
        EasyMock.expectLastCall();
        bl.postShutdown();
        EasyMock.expectLastCall();
        EasyMock.replay(bl);
        bus.shutdown(true);
        EasyMock.verify(bl);
       
    }

    @Test
View Full Code Here

    public void testJsr250() {
        Bus bus = new SpringBusFactory().createBus("org/apache/cxf/bus/spring/testjsr250.xml");
        TestExtension te = bus.getExtension(TestExtension.class);
        assertTrue("@PostConstruct annotated method has not been called.", te.postConstructMethodCalled);
        assertTrue("@PreDestroy annoated method has been called already.", !te.preDestroyMethodCalled);
        bus.shutdown(true);
        assertTrue("@PreDestroy annotated method has not been called.", te.preDestroyMethodCalled);
       
    }

    @Test
View Full Code Here

        }
       
        doubleIt(asymmetricSaml1Port, 25);
       
        ((java.io.Closeable)asymmetricSaml1Port).close();
        bus.shutdown(true);
    }

    @org.junit.Test
    public void testUsernameTokenSAML2() throws Exception {
View Full Code Here

        doubleIt(asymmetricSaml2Port, 30);

        TokenTestUtils.verifyToken(asymmetricSaml2Port);
       
        ((java.io.Closeable)asymmetricSaml2Port).close();
        bus.shutdown(true);
    }

    @org.junit.Test
    public void testUsernameTokenSAML1Encrypted() throws Exception {
View Full Code Here

        stsClient.setUseKeyCertificate(certs[0]);
       
        doubleIt(asymmetricSaml1EncryptedPort, 40);
       
        ((java.io.Closeable)asymmetricSaml1EncryptedPort).close();
        bus.shutdown(true);
    }

    private static void doubleIt(DoubleItPortType port, int numToDouble) {
        int resp = port.doubleIt(numToDouble);
        assertEquals(numToDouble * 2 , resp);
View Full Code Here

        doubleIt(symmetricSaml1Port, 25);

        TokenTestUtils.verifyToken(symmetricSaml1Port);
       
        ((java.io.Closeable)symmetricSaml1Port).close();
        bus.shutdown(true);
    }

    @org.junit.Test
    public void testUsernameTokenSAML2() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.