Package org.apache.cxf.service.factory

Examples of org.apache.cxf.service.factory.ServerFactoryBean


       
        Imple im = new Imple();
       
        service.setInvoker(new JAXWSMethodInvoker(im));

        ServerFactoryBean svrFactory = new ServerFactoryBean();

        String address = "http://localhost:9999/Hello";
        Server server = jcaBusFactory.createServer(svrFactory, bean, address);
        assertNotNull("The server should not be null", server);
       
View Full Code Here


        Service service = createService(interfaceClass, bean);
       
        // REVISIT this is easy to be replace by EJBMethodInvoker
        service.setInvoker(new JAXWSMethodInvoker(ejb));

        ServerFactoryBean svrFactory = new ServerFactoryBean();

        return createServer(svrFactory, bean, address);

       
    }
View Full Code Here

        Service service = bean.create();

        InterfaceInfo i = service.getServiceInfo().getInterface();
        assertEquals(2, i.getOperations().size());

        ServerFactoryBean svrFactory = new ServerFactoryBean();
        svrFactory.setBus(bus);
        svrFactory.setServiceFactory(bean);
        svrFactory.setAddress(address);
        svrFactory.create();
       
        Collection<BindingInfo> bindings = service.getServiceInfo().getBindings();
        assertEquals(1, bindings.size());
       
        ServiceWSDLBuilder wsdlBuilder =
View Full Code Here

                     service.getName().getNamespaceURI());
       
        InterfaceInfo intf = service.getServiceInfo().getInterface();
        assertNotNull(intf);
       
        ServerFactoryBean svrFactory = new ServerFactoryBean();
        svrFactory.setBus(bus);
        svrFactory.setServiceFactory(bean);
        svrFactory.setStart(false);
       
        ServerImpl server = (ServerImpl) svrFactory.create();
       
        Endpoint endpoint = server.getEndpoint();
        Binding binding = endpoint.getBinding();
        assertTrue(binding instanceof SoapBinding);
    }
View Full Code Here

       
        EndpointInfo ei = service.getServiceInfo().getEndpoint(new QName("SourcePayloadProviderPort"));
       
        assertNotNull(ei);
       
        ServerFactoryBean svrFactory = new ServerFactoryBean();
        svrFactory.setBus(bus);
        svrFactory.setServiceFactory(bean);
       
        ServerImpl server = (ServerImpl) svrFactory.create();
        Endpoint endpoint = server.getEndpoint();
        Binding binding = endpoint.getBinding();
        assertTrue(binding instanceof XMLBinding);
    }
View Full Code Here

        BeanInvoker invoker = new BeanInvoker(greeter);
        bean.setInvoker(invoker);

        service = bean.create();

        ServerFactoryBean svrFactory = new ServerFactoryBean();
        svrFactory.setBus(bus);
        svrFactory.setServiceFactory(bean);
       
        svrFactory.create();
    }
View Full Code Here

        bean.setServiceClass(TestMtomImpl.class);
       
        Service service = bean.create();
        service.setInvoker(new JAXWSMethodInvoker(new TestMtomImpl()));
       
        ServerFactoryBean svr = new ServerFactoryBean();
        svr.setBus(bus);
        svr.setServiceFactory(bean);
        svr.create();

        Node response = invoke("http://localhost:9036/mime-test",
                               LocalTransportFactory.TRANSPORT_ID,
                               "echoData.xml");
        addNamespace("h", "http://cxf.apache.org/mime/types");       
View Full Code Here

        }
    }

    protected void doPublish(String address) {

        ServerFactoryBean svrFactory = new ServerFactoryBean();
        svrFactory.setBus(bus);
        svrFactory.setAddress(address);
        svrFactory.setServiceFactory(serviceFactory);
        svrFactory.setStart(false);
        configureObject(svrFactory);
       
        // TODO: Replace with discovery mechanism!!
        AbstractBindingInfoFactoryBean bindingFactory = null;
        if (XMLConstants.NS_XML_FORMAT.equals(bindingURI)) {
            bindingFactory = new XMLBindingInfoFactoryBean();
        } else {
            // Just assume soap otherwise...
            bindingFactory = new JaxWsSoapBindingInfoFactoryBean();
        }
       
        svrFactory.setBindingFactory(bindingFactory);
       
        server = svrFactory.create();

        init();
       
        if (implInfo.isWebServiceProvider()) {
            getServer().setMessageObserver(new ProviderChainObserver(getEndpoint(), bus, implInfo));
View Full Code Here

        Service service = bean.create();

        assertEquals("SOAPService", service.getName().getLocalPart());
        assertEquals("http://apache.org/hello_world_soap_http", service.getName().getNamespaceURI());

        ServerFactoryBean svr = new ServerFactoryBean();
        svr.setBus(bus);
        svr.setServiceFactory(bean);
       
        svr.create();

        Node response = invoke("http://localhost:9000/SoapContext/SoapPort",
                           LocalTransportFactory.TRANSPORT_ID,
                           "GreeterMessage.xml");
       
View Full Code Here

        assertEquals(TestHeader5.class, part.getTypeClass());
         
//        part = parts.get(1);
//        assertNotNull(part.getTypeClass());
       
        ServerFactoryBean svr = new ServerFactoryBean();
        svr.setBus(bus);
        svr.setServiceFactory(bean);
       
        svr.create();
       
        Node response = invoke("http://localhost:9104/SoapHeaderContext/SoapHeaderPort",
                               LocalTransportFactory.TRANSPORT_ID,
                               "testHeader5.xml");
View Full Code Here

TOP

Related Classes of org.apache.cxf.service.factory.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.