Examples of JaxWsServerFactoryBean


Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

    {
        // create new instance of the service implmentation
        EmployeeService impl = new EmployeeServiceImpl(db, conn);

        // construct/configure factory to create our specific service
        svrFactory = new JaxWsServerFactoryBean();
        //svrFactory.getInInterceptors().add(new LoggingInInterceptor());
        //svrFactory.getOutInterceptors().add(new LoggingOutInterceptor());
        // specify our implementation class
        svrFactory.setServiceClass(EmployeeService.class);
        // specify the address
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

        if (cls == null) {
            checkName(portName, " endpoint/port name");
            checkName(serviceName, " service name");
            answer = new ServerFactoryBean(new WSDLServiceFactoryBean());
        } else if (CxfEndpointUtils.hasWebServiceAnnotation(cls)) {
            answer = new JaxWsServerFactoryBean();
        } else {
            answer = new ServerFactoryBean();
        }

        // setup server factory bean
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

    private Echo echo;
    private Client client;

    @Before
    public void setUpService() throws Exception {
        JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
        factory.setServiceBean(new EchoImpl());
        factory.setAddress("local://Echo");
        factory.setTransportId(LocalTransportFactory.TRANSPORT_ID);
        Server server = factory.create();
        Service service = server.getEndpoint().getService();
       
        service.getInInterceptors().add(new SAAJInInterceptor());
        service.getInInterceptors().add(new LoggingInInterceptor());
        service.getOutInterceptors().add(new SAAJOutInterceptor());
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

        if (cls == null) {
            checkName(portName, " endpoint/port name");
            checkName(serviceName, " service name");
            answer = new ServerFactoryBean(new WSDLServiceFactoryBean());
        } else if (CxfEndpointUtils.hasWebServiceAnnotation(cls)) {
            answer = new JaxWsServerFactoryBean();
        } else {
            answer = new ServerFactoryBean();
        }

        // setup server factory bean
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

        return new SpringBusFactory().createBus("/org/apache/cxf/ws/addressing/spring/spring.xml");
    }

    @Test
    public void testServerFactory() {
        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
    
        assert bus != null;
        sf.setServiceBean(new GreeterImpl());
        sf.setAddress("http://localhost/test");
        sf.setStart(false);
       
        Configurer c = getBus().getExtension(Configurer.class);
        c.configureBean("server", sf);
       
        Server server = sf.create();
       
        Endpoint endpoint = server.getEndpoint();
        checkAddressInterceptors(endpoint.getInInterceptors());
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

        // CxfSoapComponent
        ServerFactoryBean answer = null;

        if (cls == null) {
            if (!getDataFormat().equals(DataFormat.POJO)) {
                answer = new JaxWsServerFactoryBean(new WSDLServiceFactoryBean()) {
                    {
                        doInit = false;
                    }
                };
                cls = Provider.class;
            } else {
                ObjectHelper.notNull(cls, CxfConstants.SERVICE_CLASS);
            }
        } else if (CxfEndpointUtils.hasWebServiceAnnotation(cls)) {
            answer = new JaxWsServerFactoryBean();
        } else {
            answer = new ServerFactoryBean();
        }

        // setup server factory bean
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

        ServerFactoryBean answer = null;

        if (cls == null) {
            checkName(portName, " endpoint/port name");
            checkName(serviceName, " service name");
            answer = new JaxWsServerFactoryBean(new WSDLServiceFactoryBean()) {
                {
                    doInit = false;
                }
            };
            cls = Provider.class;
        } else if (CxfEndpointUtils.hasWebServiceAnnotation(cls)) {
            answer = new JaxWsServerFactoryBean();
        } else {
            answer = new ServerFactoryBean();
        }

        // setup server factory bean
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

    private Server server;

    public CxfServer(int port) throws Exception {
        Object implementor = new GreeterImpl();
        address = "http://localhost:" + port + "/WSSecurityRouteTest/GreeterPort";
        JaxWsServerFactoryBean bean = new JaxWsServerFactoryBean();
        bean.setAddress(address);
        bean.setServiceBean(implementor);
        bean.getInInterceptors().add(getWSS4JInInterceptor());
        bean.getOutInterceptors().add(getWSS4JOutInterceptor());
        server = bean.create();
    }
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

                serverFactory = new ServerFactoryBean();
                serverFactory.setServiceFactory(new WSDLSoapServiceFactoryBean());

            } else {
                boolean isJSR181SEnabled = CxfEndpointUtils.hasWebServiceAnnotation(cls);
                serverFactory = isJSR181SEnabled ? new JaxWsServerFactoryBean()
                            : new ServerFactoryBean();
            }
            return serverFactory;
        } catch (Exception e) {
            throw new CamelException(e);
View Full Code Here

Examples of org.apache.cxf.jaxws.JaxWsServerFactoryBean

        if (cls == null) {
            checkName(portName, " endpoint/port name");
            checkName(serviceName, " service name");
            answer = new ServerFactoryBean(new WSDLServiceFactoryBean());
        } else if (CxfEndpointUtils.hasWebServiceAnnotation(cls)) {
            answer = new JaxWsServerFactoryBean();
        } else {
            answer = new ServerFactoryBean();
        }

        // setup server factory bean
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.