Examples of CXFNonSpringServlet


Examples of org.apache.cxf.transport.servlet.CXFNonSpringServlet

            ContextHandlerCollection contexts = new ContextHandlerCollection();
            httpServer.setHandler(contexts);

            Context root = new Context(contexts, "/", Context.SESSIONS);

            CXFNonSpringServlet cxf = new CXFNonSpringServlet();
            ServletHolder servlet = new ServletHolder(cxf);
            servlet.setName("soap");
            servlet.setForcedPath("soap");
            root.addServlet(servlet, "/soap/*");

            httpServer.start();

            Bus bus = cxf.getBus();
            setBus(bus);
            BusFactory.setDefaultBus(bus);
            GreeterImpl impl = new GreeterImpl();
            Endpoint.publish("/Greeter", impl);
            HelloImpl helloImpl = new HelloImpl();
View Full Code Here

Examples of org.apache.cxf.transport.servlet.CXFNonSpringServlet

        if (contextRoot == null) {
            LOG.warning("Remote address is unavailable");
            return null;
        }

        CXFNonSpringServlet cxf = new CXFNonSpringServlet();
        HttpService httpService = getHttpService();
        try {
            httpService.registerServlet(contextRoot, cxf, new Hashtable<String, String>(), null);
            LOG.info("Successfully registered CXF DOSGi servlet at " + contextRoot);
        } catch (Exception e) {
            throw new ServiceException("CXF DOSGi: problem registering CXF HTTP Servlet", e);
        }
        Bus bus = cxf.getBus();
        DataBinding databinding;
        String dataBindingImpl = (String) serviceReference.getProperty(Constants.WS_DATABINDING_PROP_KEY);
        if("jaxb".equals(dataBindingImpl)) {
          databinding = new JAXBDataBinding();
        } else {
View Full Code Here

Examples of org.apache.cxf.transport.servlet.CXFNonSpringServlet

        if (contextRoot == null) {
            LOG.warning("Remote address is unavailable");
            return null;
        }

        CXFNonSpringServlet cxf = new CXFNonSpringServlet();
        HttpService httpService = getHttpService();
        try {
            httpService.registerServlet(contextRoot, cxf, new Hashtable<String, String>(), null);
            LOG.info("Successfully registered CXF DOSGi servlet at " + contextRoot);
        } catch (Exception e) {
            throw new ServiceException("CXF DOSGi: problem registering CXF HTTP Servlet", e);
        }       
        Bus bus = cxf.getBus();
       
        JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean();
        factory.setBus(bus);
       
        List<UserResource> resources = JaxRSUtils.getModel(callingContext, iClass);
View Full Code Here

Examples of org.apache.cxf.transport.servlet.CXFNonSpringServlet

   
    public void start(BundleContext context) throws Exception {
        ConfigAdminHttpConduitConfigurer conduitConfigurer = new ConfigAdminHttpConduitConfigurer();
        DestinationRegistry destinationRegistry = new DestinationRegistryImpl();
        HTTPTransportFactory transportFactory = new HTTPTransportFactory(destinationRegistry);
        Servlet servlet = new CXFNonSpringServlet(destinationRegistry , false);
        ServletConfigurer servletConfig = new ServletConfigurer(context, servlet);

        registerService(context, ManagedServiceFactory.class, conduitConfigurer,
                        ConfigAdminHttpConduitConfigurer.FACTORY_PID);
        registerService(context, HTTPConduitConfigurer.class, conduitConfigurer,
View Full Code Here

Examples of org.apache.cxf.transport.servlet.CXFNonSpringServlet

            return;
        }
       
        DestinationRegistry destinationRegistry = new DestinationRegistryImpl();
        HTTPTransportFactory transportFactory = new HTTPTransportFactory(destinationRegistry);
        Servlet servlet = new CXFNonSpringServlet(destinationRegistry , false);
        ServletConfigurer servletConfig = new ServletConfigurer(context, servlet);

        context.registerService(DestinationRegistry.class.getName(), destinationRegistry, null);
        context.registerService(HTTPTransportFactory.class.getName(), transportFactory, null);
        registerService(context, ManagedService.class, servletConfig, CXF_CONFIG_SCOPE);
View Full Code Here

Examples of org.apache.cxf.transport.servlet.CXFNonSpringServlet

            return;
        }
       
        DestinationRegistry destinationRegistry = new DestinationRegistryImpl();
        HTTPTransportFactory transportFactory = new HTTPTransportFactory(destinationRegistry);
        Servlet servlet = new CXFNonSpringServlet(destinationRegistry , false);
        ServletConfigurer servletConfig = new ServletConfigurer(context, servlet);

        context.registerService(DestinationRegistry.class.getName(), destinationRegistry, null);
        context.registerService(HTTPTransportFactory.class.getName(), transportFactory, null);
        registerService(context, ManagedService.class, servletConfig, CXF_CONFIG_SCOPE);
View Full Code Here

Examples of org.apache.cxf.transport.servlet.CXFNonSpringServlet

        factory.setAddress("/receiver/");
        factory.setServiceBean(new DefaultPortReceiver(filterChain));
    }

    private void registerServletForBus(Bus cxfBus) {
        CXFNonSpringServlet cxf = new CXFNonSpringServlet();
        cxf.setBus(cxfBus);
        try {
            httpService.registerServlet(CONTEXT_ROOT, cxf, new Hashtable<String, String>(),
                httpService.createDefaultHttpContext());
        } catch (Exception e) {
            throw new ServiceException("CXF: problem registering CXF HTTP Servlet", e);
View Full Code Here

Examples of org.apache.cxf.transport.servlet.CXFNonSpringServlet

            ContextHandlerCollection contexts = new ContextHandlerCollection();
            httpServer.setHandler(contexts);

            Context root = new Context(contexts, "/", Context.SESSIONS);

            CXFNonSpringServlet cxf = new CXFNonSpringServlet();
            ServletHolder servlet = new ServletHolder(cxf);
            servlet.setName("soap");
            servlet.setForcedPath("soap");
            root.addServlet(servlet, "/soap/*");

            httpServer.start();

            Bus bus = cxf.getBus();
            setBus(bus);
            BusFactory.setDefaultBus(bus);
            GreeterImpl impl = new GreeterImpl();
            Endpoint.publish("/Greeter", impl);
            HelloImpl helloImpl = new HelloImpl();
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.