Package org.apache.cxf.frontend

Examples of org.apache.cxf.frontend.ServerFactoryBean


    }

    protected Server createService(Class serviceClass,
                                   String address, QName name,
                                   SDODataBinding binding) {
        ServerFactoryBean sf = createServiceFactory(serviceClass, null, address, name, binding);
        return sf.create();
    }
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();
    }
View Full Code Here

    protected ServerFactoryBean createServiceFactory(Class serviceClass,
                                                     Object serviceBean,
                                                     String address,
                                                     QName name,
                                                     SDODataBinding binding) {
        ServerFactoryBean sf = super.createServiceFactory(serviceClass, serviceBean, address, name, binding);
        sf.setWsdlLocation(HelloWorldStaticTest.class
                               .getResource("/wsdl_sdo/HelloService_dynamic.wsdl").toString());
        sf.setServiceName(new QName("http://apache.org/cxf/databinding/sdo/hello_world_soap_http",
                                    "SOAPService"));
        sf.setEndpointName(new QName("http://apache.org/cxf/databinding/sdo/hello_world_soap_http",
                                     "SoapPort"));
        return sf;
    }
View Full Code Here

    protected ServerFactoryBean createServiceFactory(Class serviceClass,
                                                     Object serviceBean,
                                                     String address,
                                                     QName name,
                                                     SDODataBinding binding) {
        ServerFactoryBean sf = super.createServiceFactory(serviceClass, serviceBean, address, name, binding);
        sf.setWsdlLocation(HelloWorldStaticTest.class
                               .getResource("/wsdl_sdo/HelloService_static.wsdl").toString());
        sf.setServiceName(new QName("http://apache.org/cxf/databinding/sdo/hello_world_soap_http",
                                    "SOAPService"));
        sf.setEndpointName(new QName("http://apache.org/cxf/databinding/sdo/hello_world_soap_http",
                                     "SoapPort"));
        return sf;
    }
View Full Code Here

    }
   
    @Before
    public void before() {
        ServerFactoryBean serverFactoryBean = getBean(ServerFactoryBean.class, "hw-service-endpoint");
        hwEndpoint = serverFactoryBean.getServer().getEndpoint();
        serverFactoryBean = getBean(ServerFactoryBean.class, "hwg-service-endpoint");
        hwgEndpoint = serverFactoryBean.getServer().getEndpoint();
        serverFactoryBean = getBean(ServerFactoryBean.class, "dlb-service-endpoint");
        dlbEndpoint = serverFactoryBean.getServer().getEndpoint();
    }
View Full Code Here

    @Before
    public void setUp() throws Exception {
        super.setUp();

        ServerFactoryBean sf = createServiceFactory(InheritanceService.class,
                                                    null, "InheritanceService",
                                                    new QName("urn:xfire:inheritance",
                                                              "InheritanceService"),
                                                    null);
        AegisContext globalContext = new AegisContext();
        globalContext.setWriteXsiTypes(true);

        Set<String> l = new HashSet<String>();
        l.add(Employee.class.getName());
        globalContext.setRootClassNames(l);
        AegisDatabinding binding = new AegisDatabinding();
        binding.setAegisContext(globalContext);

        sf.getServiceFactory().setDataBinding(binding);
        sf.create();
    }
View Full Code Here

        ReflectionServiceFactoryBean factory = new ReflectionServiceFactoryBean();
        factory.setInvoker(new BeanInvoker(new EchoImpl()));
        factory.setDataBinding(new AegisDatabinding());

        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

    protected ServerFactoryBean createServiceFactory(Class serviceClass,
                                                     Object serviceBean,
                                                     String address,
                                                     QName name,
                                                     AegisDatabinding b) {
        ServerFactoryBean sf = super.createServiceFactory(serviceClass,
                                                          serviceBean,
                                                          address,
                                                          name,
                                                          b);
        sf.getServiceFactory().setProperties(props);
        return sf;
    }
View Full Code Here

public class ServerFactoryTest extends AbstractSimpleFrontendTest {

    @Test
    public void testSetDF() throws Exception {
        ServerFactoryBean svrBean = new ServerFactoryBean();
        svrBean.setAddress("http://localhost/Hello");
        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);
    }
View Full Code Here

        }
    }
   
    @Test
    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

TOP

Related Classes of org.apache.cxf.frontend.ServerFactoryBean

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.