Examples of CXFNonSpringServlet


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

  // switch to the cxg minimal bundle class loader
  Thread.currentThread().setContextClassLoader(
    CXFNonSpringServlet.class.getClassLoader());

  try {
      CXFNonSpringServlet servlet = new CXFNonSpringServlet();

      // Register a CXF Servlet dispatcher
      http.registerServlet(ROOT_NAME, servlet, null, null);

      // get the bus
      cxfbus = servlet.getBus();

  } catch (Exception e) {
      // TODO log
      throw new RuntimeException(e);
  } finally {
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();
       
        String address = constructAddress(dswContext, contextRoot);
        ServerFactoryBean factory = createServerFactoryBean();
        factory.setBus(bus);
        factory.setServiceClass(iClass);
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

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

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

        CXFNonSpringServlet cxf = new CXFNonSpringServlet();
        HttpService httpService = getHttpService();
        try {
            httpService.registerServlet(contextRoot, cxf, new Hashtable<String, String>(),
                                       getHttpContext(dswContext, httpService));
            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)exportRegistration.getExportedService()
            .getProperty(Constants.WS_DATABINDING_PROP_KEY);
        if ("jaxb".equals(dataBindingImpl)) {
            databinding = new JAXBDataBinding();
View Full Code Here

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

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

        CXFNonSpringServlet cxf = new CXFNonSpringServlet();
        HttpService httpService = getHttpService();
        try {
            HttpContext httpContext = getHttpContext(dswContext, httpService);                                httpService.registerServlet(contextRoot, cxf, new Hashtable<String, String>(),                                         httpContext);
            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

            httpServer.setHandler(contexts);

            ServletContextHandler root = new ServletContextHandler(contexts, "/",
                                                                   ServletContextHandler.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

            httpServer.setHandler(contexts);

            ServletContextHandler root = new ServletContextHandler(contexts, "/",
                                                                   ServletContextHandler.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

            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);
        } catch (Exception e) {
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

            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.