Package org.apache.cxf.service.invoker

Examples of org.apache.cxf.service.invoker.BeanInvoker


    protected Invoker createInvoker() {
        if (getServiceBean() == null) {
            return new FactoryInvoker(new SingletonFactory(getServiceClass()));
        }
        return new BeanInvoker(getServiceBean());
    }
View Full Code Here


        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setServiceClass(BookService.class);
        // Use the HTTP Binding which understands the Java Rest Annotations
        sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID);
        sf.setAddress("http://localhost:9080/xml/");
        sf.getServiceFactory().setInvoker(new BeanInvoker(serviceObj));

        // Turn the "wrapped" style off. This means that CXF won't generate
        // wrapper XML elements and we'll have prettier XML text. This
        // means that we need to stick to one request and one response
        // parameter though.
        sf.getServiceFactory().setWrapped(false);

        sf.create();
       
        JaxWsServerFactoryBean sfJson = new JaxWsServerFactoryBean();
        sfJson.setServiceClass(BookService.class);
        // Use the HTTP Binding which understands the Java Rest Annotations
        sfJson.setBindingId(HttpBindingFactory.HTTP_BINDING_ID);
        sfJson.setAddress("http://localhost:9080/json");
        sfJson.getServiceFactory().setInvoker(new BeanInvoker(serviceObj));

        // Turn the "wrapped" style off. This means that CXF won't generate
        // wrapper JSON elements and we'll have prettier JSON text. This
        // means that we need to stick to one request and one response
        // parameter though.
View Full Code Here

   
    @Test
    public void testMissingTransliteration() throws Exception {
        Server server = createService(MissingType.class, null);
        Service service = server.getEndpoint().getService();
        service.setInvoker(new BeanInvoker(new MissingTypeImpl()));
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setAddress("local://MissingType");
        proxyFac.setBus(getBus());
        setupAegis(proxyFac.getClientFactoryBean());
View Full Code Here

       
        client = (WS1) pf.create();

        Server server = createService(WS1.class, "WS1", null);
        new LoggingFeature().initialize(server, null);
        server.getEndpoint().getService().setInvoker(new BeanInvoker(new WS1Impl()));
    }
View Full Code Here

        }
        return hasAnnotation;
    }
   
    protected Invoker createInvoker() {
        return new BeanInvoker(serviceBean);
    }
View Full Code Here

        bean.setWsdlURL(resource.toString());
        Bus bus = getBus();
        bean.setBus(bus);
        bean.setServiceClass(GreeterImpl.class);

        BeanInvoker invoker = new BeanInvoker(new GreeterImpl());
        bean.setInvoker(invoker);
       
        Service service = bean.create();

        String ns = "http://apache.org/hello_world_soap_http";
View Full Code Here

        bean.setWsdlURL(resource.toString());
        Bus bus = getBus();
        bean.setBus(bus);
        bean.setServiceClass(GreeterImpl.class);

        BeanInvoker invoker = new BeanInvoker(new GreeterImpl());
        bean.setInvoker(invoker);
       
        Service service = bean.create();

        String ns = "http://apache.org/hello_world_soap_http";
View Full Code Here

    protected Invoker createInvoker() {
        if (getServiceBean() == null) {
            return new FactoryInvoker(new SingletonFactory(getServiceClass()));
        }
        return new BeanInvoker(getServiceBean());
    }
View Full Code Here

        assertNotNull(resource);
        bean.setWsdlURL(resource.toString());
        bean.setBus(getBus());
        bean.setServiceClass(GreeterImpl.class);
        GreeterImpl greeter = new GreeterImpl();
        BeanInvoker invoker = new BeanInvoker(greeter);
        bean.setInvoker(invoker);

        Service service = bean.create();

        String namespace = "http://apache.org/hello_world_soap_http";
View Full Code Here

        assertNotNull(resource);
        bean.setWsdlURL(resource.toString());
        bean.setBus(getBus());
        bean.setServiceClass(RPCLitGreeterImpl.class);
        RPCLitGreeterImpl greeter = new RPCLitGreeterImpl();
        BeanInvoker invoker = new BeanInvoker(greeter);
        bean.setInvoker(invoker);

        Service service = bean.create();
       
        EndpointInfo endpointInfo = service.getEndpointInfo(new QName(ns, "SoapPortRPCLit"));
View Full Code Here

TOP

Related Classes of org.apache.cxf.service.invoker.BeanInvoker

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.