Package org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser

Examples of org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser.SpringJAXRSServerFactoryBean


    root.addEventListener(new ContextLoaderListener());
    root.addServlet(org.apache.cxf.transport.servlet.CXFServlet.class, "/services/*");

    server.start();

    SpringJAXRSServerFactoryBean factoryBean = new JAXRSServerFactoryBeanDefinitionParser.SpringJAXRSServerFactoryBean();
    factoryBean.setAddress("/rest");
    factoryBean.setServiceBeanObjects(new CommandExecutor());
    List<Object> arrayList = new ArrayList<Object>();
    // arrayList.add(new JacksonJsonProvider());
    JAXBElementProvider elementProvider = new JAXBElementProvider();
    elementProvider.setMarshallAsJaxbElement(true);
    elementProvider.setUnmarshallAsJaxbElement(true);
    arrayList.add(elementProvider);
    factoryBean.setProviders(arrayList);
    // List<?> providers = factoryBean.getProviders();
    List<?> providers = factoryBean.getProviders();
    // factoryBean.getProperties().put("faultStackTraceEnabled", "true");

    factoryBean.create();
    Thread.sleep(100000);
  }
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxrs.spring.JAXRSServerFactoryBeanDefinitionParser.SpringJAXRSServerFactoryBean

Copyright © 2018 www.massapicom. 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.