Package org.apache.cxf.test

Examples of org.apache.cxf.test.TestApplicationContext


    @Test
    public void testNMRBinding() throws Exception {
        URL wsdl = getClass().getClassLoader().getResource("./hello_world_nmr.wsdl");
        assertNotNull(wsdl);

        TestApplicationContext ctx = new TestApplicationContext(new String[] {
                S1, S2 });
        ConfigurerImpl cfg = new ConfigurerImpl(ctx);
        Bus bus = (Bus) ctx.getBean(Bus.DEFAULT_BUS_ID);
        bus.setExtension(cfg, Configurer.class);
       
        HelloWorldService ss = new HelloWorldService(wsdl, serviceName);
        QName portName = new QName("http://apache.org/hello_world/nmr", "SoapPort");
        ss.addPort(portName, NMRConstants.NS_NMR_BINDING, "local://nmrendpoint");
View Full Code Here


        NMROperationInInterceptorTest.class.getResource("/META-INF/cxf/cxf.xml").toString();
    private static final String S2 =
        NMROperationInInterceptorTest.class.getClassLoader().getResource("cxf-binding-nmr.xml").toString();

    protected void run() {
        TestApplicationContext ctx = new TestApplicationContext(new String[] {
                S1, S2 });
        ConfigurerImpl cfg = new ConfigurerImpl(ctx);
        Bus bus = (Bus) ctx.getBean(Bus.DEFAULT_BUS_ID);
        bus.setExtension(cfg, Configurer.class);
       
       
        Object implementor = new GreeterImpl();
        String address = "local://nmrendpoint";
View Full Code Here

        Exchange me = EasyMock.createMock(Exchange.class);
        EasyMock.expect(me.getOperation()).andReturn(new QName("urn:test", "SayHi")).times(4);
        EasyMock.replay(me);
        msg.put(Exchange.class, me);

        TestApplicationContext ctx = new TestApplicationContext(new String[] {
                S1, S2 });
        ConfigurerImpl cfg = new ConfigurerImpl(ctx);
        Bus bus = (Bus) ctx.getBean(Bus.DEFAULT_BUS_ID);
        bus.setExtension(cfg, Configurer.class);
        assertNotNull(bus.getExtension(BindingFactoryManager.class).getBindingFactory(NMRConstants.NS_NMR_BINDING));
       
        EndpointInfo endpointInfo = new EndpointInfo();
        endpointInfo.setBinding(new NMRBindingInfo(null, NMRConstants.NS_NMR_BINDING));
View Full Code Here

    public void testInvalid() throws Exception {
        String s4 = getClass()
            .getResource("/org/apache/cxf/transport/http_jetty/spring/invalid-beans.xml").toString();
   
        try {
            new TestApplicationContext(new String[] {S1, S2, S3, s4});
            fail("Expected XmlBeanDefinitionStoreException not thrown.");
        } catch (XmlBeanDefinitionStoreException ex) {
            assertTrue(ex.getCause() instanceof SAXParseException);
        }
    }
View Full Code Here

    @Test
    public void testContext() throws Exception {
        String s4 = getClass()
            .getResource("/org/apache/cxf/transport/http_jetty/spring/beans.xml").toString();
       
        TestApplicationContext ctx = new TestApplicationContext(
            new String[] {S1, S2, S3, s4});
       
        //ctx.refresh();
        checkContext(ctx);
    }
View Full Code Here

    @Test
    public void testContextWithProperties() throws Exception {
        String s4 = getClass()
            .getResource("/org/apache/cxf/transport/http_jetty/spring/beans-props.xml").toString();
       
        TestApplicationContext ctx = new TestApplicationContext(
            new String[] {S1, S2, S3, s4});
        checkContext(ctx);
    }
View Full Code Here

    public void testInvalid() throws Exception {
        String s4 = getClass()
            .getResource("/org/apache/cxf/transport/http_jetty/spring/invalid-beans.xml").toString();
   
        try {
            new TestApplicationContext(new String[] {S1, s4});
            fail("Expected XmlBeanDefinitionStoreException not thrown.");
        } catch (XmlBeanDefinitionStoreException ex) {
            assertTrue(ex.getCause() instanceof SAXParseException);
        }
    }
View Full Code Here

    @Test
    public void testContext() throws Exception {
        String s4 = getClass()
            .getResource("/org/apache/cxf/transport/http_jetty/spring/beans.xml").toString();
       
        TestApplicationContext ctx = new TestApplicationContext(
            new String[] {S1, s4});
       
        //ctx.refresh();
        checkContext(ctx);
    }
View Full Code Here

    @Test
    public void testContextWithProperties() throws Exception {
        String s4 = getClass()
            .getResource("/org/apache/cxf/transport/http_jetty/spring/beans-props.xml").toString();
       
        TestApplicationContext ctx = new TestApplicationContext(
            new String[] {S1, s4});
        checkContext(ctx);
    }
View Full Code Here

    public void testInvalid() throws Exception {
        String s4 = getClass()
            .getResource("/org/apache/cxf/transport/http_jetty/spring/invalid-beans.xml").toString();
   
        try {
            new TestApplicationContext(new String[] {S1, S2, S3, s4});
            fail("Expected XmlBeanDefinitionStoreException not thrown.");
        } catch (XmlBeanDefinitionStoreException ex) {
            assertTrue(ex.getCause() instanceof SAXParseException);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.test.TestApplicationContext

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.