Package org.apache.cxf.jaxrs

Examples of org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create()


                               new SingletonResourceProvider(new BookStore(), true));
        sf.setAddress("http://localhost:" + PORT + "/");

        sf.getProperties(true).put("org.apache.cxf.jaxrs.mediaTypeCheck.strict", true);
        sf.getProperties().put("org.apache.cxf.http.header.split", true);
        sf.create();
    }

    public static void main(String[] args) {
        try {
            BookServer s = new BookServer();
View Full Code Here


        JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
        Customer customer = new Customer();
        sf.setServiceBeanObjects(customer);
        sf.setApplication(app);
        sf.setStart(false);
        Server server = sf.create()
        assertSame(app, customer.getApplication1());
        assertSame(app, customer.getApplication2());
        ThreadLocalProxy proxy = (ThreadLocalProxy)app.getUriInfo();
        assertNotNull(proxy);
        invokeCustomerMethod(sf.getServiceFactory().getClassResourceInfo().get(0),
View Full Code Here

        CustomerApplication app = new CustomerApplication();
        JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
        sf.setServiceClass(Customer.class);
        sf.setApplication(app);
        sf.setStart(false);
        Server server = sf.create()
       
        ThreadLocalProxy proxy = (ThreadLocalProxy)app.getUriInfo();
        assertNotNull(proxy);
       
        ClassResourceInfo cri = sf.getServiceFactory().getClassResourceInfo().get(0);
View Full Code Here

        BindingFactoryManager.class);
    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());
    manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
    server = sf.create();
  }

  @After
  public void tearDown() {
    server.stop();
View Full Code Here

    sf.setAddress(endPoint + "/");
    BindingFactoryManager manager = sf.getBus().getExtension(BindingFactoryManager.class);
    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());
    manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID, factory);
    server = sf.create();
  }

  @After
  public void tearDown()  {
    server.stop();
View Full Code Here

        BindingFactoryManager.class);
    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());
    manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
    server = sf.create();
  }

    @After
  public void tearDown() {
    server.stop();
View Full Code Here

    manager.registerBindingFactory(
        JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory
    );

    server = sf.create();
  }

  @After
  public void tearDown() throws Exception {
    server.stop();
View Full Code Here

        BindingFactoryManager.class);
      JAXRSBindingFactory factory = new JAXRSBindingFactory();
      factory.setBus(sf.getBus());
      manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
      sf.create();
      logger.info("Started");
    } catch (Exception ex) {
      logger.fatal("Can't start", ex);
      System.exit(-1);
    }
View Full Code Here

        BindingFactoryManager.class);
    JAXRSBindingFactory factory = new JAXRSBindingFactory();
    factory.setBus(sf.getBus());
    manager.registerBindingFactory(JAXRSBindingFactory.JAXRS_BINDING_ID,
        factory);
    server = sf.create();
  }

    @After
  public void tearDown() throws Exception {
    server.stop();
View Full Code Here

        JAXRSServerFactoryBean bean = ResourceUtils.createApplication(app, false);
        if (JAXRSServerFactoryBean.class.isAssignableFrom(endpointType)) {
            return endpointType.cast(bean);
        }
        bean.setStart(false);
        Server server = bean.create();
        return endpointType.cast(server);
    }
   

}
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.