Package org.apache.cxf.frontend

Examples of org.apache.cxf.frontend.ServerFactoryBean.create()


    protected Server createService(Class serviceClass,
                                   String address, QName name,
                                   SDODataBinding binding) {
        ServerFactoryBean sf = createServiceFactory(serviceClass, null, address, name, binding);
        return sf.create();
    }
   
    public Server createService(Class serviceClass,
                                Object serviceBean,
                                String address,
View Full Code Here


    public Server createService(Class serviceClass,
                                Object serviceBean,
                                String address,
                                QName name) {
        ServerFactoryBean sf = createServiceFactory(serviceClass, serviceBean, address, name, null);
        return sf.create();
    }

    protected ServerFactoryBean createServiceFactory(Class serviceClass,
                                                     Object serviceBean,
                                                     String address,
View Full Code Here

        globalContext.setRootClassNames(l);
        AegisDatabinding binding = new AegisDatabinding();
        binding.setAegisContext(globalContext);

        sf.getServiceFactory().setDataBinding(binding);
        sf.create();
    }

    @Test
    public void testGenerateWsdl() throws Exception {
        Document d = getWSDLDocument("InheritanceService");
View Full Code Here

        ServerFactoryBean svrFac = new ServerFactoryBean();
        svrFac.setAddress("local://Echo");
        svrFac.setServiceFactory(factory);
        svrFac.setServiceClass(Echo.class);
        svrFac.setBus(getBus());
        svrFac.create();

        Endpoint endpoint = Endpoint.create(new EchoImpl());
        EndpointImpl impl = (EndpointImpl) endpoint;
        impl.setDataBinding(new AegisDatabinding());
        endpoint.publish("local://JaxWsEcho");
View Full Code Here

        svrBean.setServiceClass(HelloService.class);
        svrBean.setServiceBean(new HelloServiceImpl());
        svrBean.setBus(getBus());
        svrBean.setDestinationFactory(new CustomDestinationFactory(getBus()));

        ServerImpl server = (ServerImpl)svrBean.create();
        assertTrue(server.getDestination() instanceof CustomDestination);
    }
   
    public interface TestService<P> {
        int open(P args);
View Full Code Here

    public void testCXF1758() throws Exception {
        ServerFactoryBean svrBean = new ServerFactoryBean();
        svrBean.setAddress("http://localhost/Generics");
        svrBean.setServiceBean(new TestServiceImpl<String>() { });
        svrBean.setBus(getBus());
        ServerImpl server = (ServerImpl)svrBean.create();
        //XMLUtils.printDOM(getWSDLDocument(server));
        assertValid("//xsd:schema/xsd:complexType[@name='open']/xsd:sequence/"
                    + "xsd:element[@type='xsd:string']",
                    getWSDLDocument(server));
    }
View Full Code Here

            props = new HashMap<String, Object>();
        }
        props.put("jaxb.additionalContextClasses",
                  new Class[] {GreetMe.class, GreetMeOneWay.class});
        svrBean.setProperties(props);
        Server serv = svrBean.create();
        Class[] extraClass = ((JAXBDataBinding)serv.getEndpoint().getService()
                .getDataBinding()).getExtraClass();
        assertEquals(extraClass.length, 2);
        assertEquals(extraClass[0], GreetMe.class);
        assertEquals(extraClass[1], GreetMeOneWay.class);
View Full Code Here

        return createService(serviceClass, serviceClass.getSimpleName(), name, binding);
    }

    protected Server createService(Class serviceClass, String address, QName name, AegisDatabinding binding) {
        ServerFactoryBean sf = createServiceFactory(serviceClass, null, address, name, binding);
        return sf.create();
    }

    protected Server createService(Class serviceClass, String address) {
        ServerFactoryBean sf = createServiceFactory(serviceClass, null, address, null, null);
        return sf.create();
View Full Code Here

        return sf.create();
    }

    protected Server createService(Class serviceClass, String address) {
        ServerFactoryBean sf = createServiceFactory(serviceClass, null, address, null, null);
        return sf.create();
    }

    protected Server createService(Class serviceClass) {
        ServerFactoryBean sf = createServiceFactory(serviceClass, null, serviceClass.getSimpleName(), null,
                                                    null);
View Full Code Here

    }

    protected Server createService(Class serviceClass) {
        ServerFactoryBean sf = createServiceFactory(serviceClass, null, serviceClass.getSimpleName(), null,
                                                    null);
        return sf.create();
    }

    protected Server createJaxwsService(Class serviceClass, Object serviceBean, String address, QName name) {
        if (address == null) {
            address = serviceClass.getSimpleName();
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.