Package org.apache.cxf.service.invoker

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


        sfbean.setServiceClass(ExceptionService.class);
        sfbean.setDataBinding(new AegisDatabinding());
        sfbean.setAddress("local://ExceptionServiceJaxWs1");
        Server server = sfbean.create();
        Service service = server.getEndpoint().getService();
        service.setInvoker(new BeanInvoker(new ExceptionServiceImpl()));
       
        ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
        proxyFac.setAddress("local://ExceptionServiceJaxWs1");
        proxyFac.setServiceClass(ExceptionService.class);
        proxyFac.setBus(getBus());
View Full Code Here


        sfbean.setDataBinding(new AegisDatabinding());
        sfbean.getServiceFactory().setDataBinding(sfbean.getDataBinding());
        sfbean.setAddress("local://ExceptionServiceJaxWs");
        Server server = sfbean.create();
        Service service = server.getEndpoint().getService();
        service.setInvoker(new BeanInvoker(new ExceptionServiceImpl()));
       
        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
        proxyFac.setAddress("local://ExceptionServiceJaxWs");
        proxyFac.setServiceClass(ExceptionService.class);
        proxyFac.setBus(getBus());
View Full Code Here

        sfbean.setServiceClass(ExceptionService.class);
        setupAegis(sfbean);
        sfbean.setAddress("local://ExceptionService4");
        Server server = sfbean.create();
        Service service = server.getEndpoint().getService();
        service.setInvoker(new BeanInvoker(new ExceptionServiceImpl()));
       
        JaxWsProxyFactoryBean proxyFac = new JaxWsProxyFactoryBean();
        proxyFac.setAddress("local://ExceptionService4");
        proxyFac.setServiceClass(ExceptionService.class);
        proxyFac.setBus(getBus());
View Full Code Here

        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
        sf.setBus(getBus());
        sf.setBindingId(HttpBindingFactory.HTTP_BINDING_ID);       
        sf.setServiceBean(impl);
        sf.getServiceFactory().setInvoker(new BeanInvoker(impl));
        sf.getServiceFactory().setWrapped(true);
        sf.setAddress("http://localhost:9001/");

        Map<String, Object> props = new HashMap<String, Object>();
        props.put("mtom-enabled", Boolean.TRUE);
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();
       
        //book service in wrapped style
        BookServiceWrappedImpl serviceWrappedObj = new BookServiceWrappedImpl();
        JaxWsServerFactoryBean sfWrapped = new JaxWsServerFactoryBean();
        sfWrapped.setServiceClass(BookServiceWrapped.class);
        // Use the HTTP Binding which understands the Java Rest Annotations
        sfWrapped.setBindingId(HttpBindingFactory.HTTP_BINDING_ID);
        sfWrapped.setAddress("http://localhost:9080/xmlwrapped");
        sfWrapped.getServiceFactory().setInvoker(new BeanInvoker(serviceWrappedObj));
        sfWrapped.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

        bean.setWsdlURL(resource);
        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

        svr.setBus(getBus());
        svr.setServiceClass(GreeterImpl.class);
        svr.setAddress("http://localhost/services/Greeter");

        GreeterImpl greeter = new GreeterImpl();
        BeanInvoker invoker = new BeanInvoker(greeter);
        svr.getServiceFactory().setInvoker(invoker);

        svr.create();

        invoke("UTF-8");
View Full Code Here

        svr.setBus(getBus());
        svr.setServiceClass(GreeterImpl.class);
        svr.setAddress("http://localhost/services/Greeter");

        GreeterImpl greeter = new GreeterImpl();
        BeanInvoker invoker = new BeanInvoker(greeter);
        svr.getServiceFactory().setInvoker(invoker);

        svr.create();
       
        client.setExceptionsThrownOnErrorStatus(false);
View Full Code Here

        assertNotNull(resource);
        bean.setWsdlURL(resource);
        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.getServiceInfo().getEndpoint(new QName(ns, "SoapPortRPCLit"));
View Full Code Here

        assertNotNull(resource);
        bean.setWsdlURL(resource);
        bean.setBus(getBus());
        bean.setServiceClass(CalculatorImpl.class);
        CalculatorImpl calculator = new CalculatorImpl();
        BeanInvoker invoker = new BeanInvoker(calculator);
        bean.setInvoker(invoker);

        Service service = bean.create();
       
        EndpointInfo endpointInfo = service.getServiceInfo().getEndpoint(new QName(ns, "CalculatorPort"));
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.