Examples of BeanInvoker


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

        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

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

        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.setBus(getBus());
        setupAegis(proxyFac.getClientFactoryBean());
View Full Code Here

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

        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:" + PORT + "/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:" + PORT + "/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:" + PORT + "/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

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

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

        }
    }


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

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

    @Test
    public void testEndpointServiceConstructor() throws Exception {  
        GreeterImpl greeter = new GreeterImpl();
        JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
        serviceFactory.setBus(getBus());
        serviceFactory.setInvoker(new BeanInvoker(greeter));
        serviceFactory.setServiceClass(GreeterImpl.class);
       
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter,
                                                 new JaxWsServerFactoryBean(serviceFactory));
View Full Code Here

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

    @Test
    public void testWSAnnoWithoutWSDLLocationInSEI() throws Exception {
        HelloImpl hello = new HelloImpl();
        JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
        serviceFactory.setBus(getBus());
        serviceFactory.setInvoker(new BeanInvoker(hello));
        serviceFactory.setServiceClass(HelloImpl.class);
       
        EndpointImpl endpoint = new EndpointImpl(getBus(), hello,
                                                 new JaxWsServerFactoryBean(serviceFactory));
View Full Code Here

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

    @Test
    public void testSOAPBindingOnMethodWithRPC() {
        HelloWrongAnnotation hello = new HelloWrongAnnotation();
        JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
        serviceFactory.setBus(getBus());
        serviceFactory.setInvoker(new BeanInvoker(hello));
        serviceFactory.setServiceClass(HelloWrongAnnotation.class);
       
        try {
            new EndpointImpl(getBus(), hello, new JaxWsServerFactoryBean(serviceFactory));
        } catch (Exception e) {
View Full Code Here

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

    @Test
    public void testAddWSAFeature() throws Exception {
        GreeterImpl greeter = new GreeterImpl();
        JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
        serviceFactory.setBus(getBus());
        serviceFactory.setInvoker(new BeanInvoker(greeter));
        serviceFactory.setServiceClass(GreeterImpl.class);
       
        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter,
                                                 new JaxWsServerFactoryBean(serviceFactory));
View Full Code Here

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

    @Test
    public void testJaxWsaFeature() throws Exception {
        HelloWsa greeter = new HelloWsa();
        JaxWsServiceFactoryBean serviceFactory = new JaxWsServiceFactoryBean();
        serviceFactory.setBus(getBus());
        serviceFactory.setInvoker(new BeanInvoker(greeter));
        serviceFactory.setServiceClass(HelloWsa.class);

        EndpointImpl endpoint = new EndpointImpl(getBus(), greeter,
                                                 new JaxWsServerFactoryBean(serviceFactory));
        try {
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.