Package org.apache.cxf.frontend

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


        }
        // we do not need use the destination here
        sfb.setDestinationFactory(new NullDestinationFactory());
        sfb.setStart(false);

        server = sfb.create();
    }


    public void start() throws Exception {
        server.start();
View Full Code Here


        ServerFactoryBean sf2 = new ServerFactoryBean();
        sf2.setAddress("http://localhost:" + PORT + "/SimpleEcho");
        sf2.setDataBinding(new AegisDatabinding());
        sf2.setServiceBean(new Echo());
        sf2.getInInterceptors().add(new URIMappingInterceptor());
        server = sf2.create();
        // turn off nanny in URIMappingInterceptor
        server.getEndpoint()
            .getService().put(AbstractInDatabindingInterceptor.NO_VALIDATE_PARTS, Boolean.TRUE);
    }
   
View Full Code Here

    // } catch (ClassNotFoundException e) {
    // // TODO Auto-generated catch block
    // e.printStackTrace();
    // }

    Server res = srvFactory.create();

    while (!res.isStarted()) {
        try {
      logger.info("Server {} not started, waiting..",
        srvFactory.getAddress());
View Full Code Here

                }
            }

        });
        server = svrBean.create();
        // Apply the server configurer if it is possible
        if (cxfEndpoint.getCxfEndpointConfigurer() != null) {
            cxfEndpoint.getCxfEndpointConfigurer().configureServer(server);
        }
        if (ObjectHelper.isNotEmpty(endpoint.getPublishedEndpointUrl())) {
View Full Code Here

        ServerFactoryBean factory = new ServerFactoryBean();
        factory.setServiceClass(type);
        factory.setAddress(address);
        factory.getServiceFactory().setDataBinding(new AegisDatabinding());
        factory.setServiceBean(impl);
        Server server = factory.create();
        server.start();
        return server;
    }
   
}
View Full Code Here

                }
            }

        });
        server = svrBean.create();
        if (ObjectHelper.isNotEmpty(endpoint.getPublishedEndpointUrl())) {
            server.getEndpoint().getEndpointInfo().setProperty("publishedEndpointUrl", endpoint.getPublishedEndpointUrl());
        }
    }
   
View Full Code Here

            String [] intents = applyIntents(
                dswContext, callingContext, factory.getFeatures(), factory, sd);
       
           
            Thread.currentThread().setContextClassLoader(ServerFactoryBean.class.getClassLoader());
            Server server = factory.create();
            getDistributionProvider().addExposedService(serviceReference, registerPublication(server, intents));
            addAddressProperty(sd.getProperties(), address);
            return server;
        } catch (IntentUnsatifiedException iue) {
            getDistributionProvider().intentsUnsatisfied(serviceReference);
View Full Code Here

        try {
            String [] intents =
                applyIntents(dswContext, callingContext, factory.getFeatures(), factory, sd);

            Thread.currentThread().setContextClassLoader(ServerFactoryBean.class.getClassLoader());
            Server server = factory.create();
            getDistributionProvider().addExposedService(serviceReference, registerPublication(server, intents, address));
            addAddressProperty(sd.getProperties(), address);
            return server;
        } catch (IntentUnsatifiedException iue) {
            getDistributionProvider().intentsUnsatisfied(serviceReference);
View Full Code Here

       
        ServerFactoryBean sfb = EasyMock.createNiceMock(ServerFactoryBean.class);
        Server server = createMockServer(sfb);   
       
        EasyMock.expect(sfb.getServiceFactory()).andReturn(sf).anyTimes();
        EasyMock.expect(sfb.create()).andReturn(server);
        sfb.setAddress((String) EasyMock.anyObject());
        EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
            public Object answer() throws Throwable {
                serverURI.setLength(0);
                serverURI.append(EasyMock.getCurrentArguments()[0]);
View Full Code Here

       
        ServerFactoryBean sfb = EasyMock.createNiceMock(ServerFactoryBean.class);
        Server server = createMockServer(sfb);   
       
        EasyMock.expect(sfb.getServiceFactory()).andReturn(sf).anyTimes();
        EasyMock.expect(sfb.create()).andReturn(server);
        sfb.setAddress((String) EasyMock.anyObject());
        EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
            public Object answer() throws Throwable {
                serverURI.setLength(0);
                serverURI.append(EasyMock.getCurrentArguments()[0]);
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.