Examples of JAXRSServiceImpl


Examples of org.apache.cxf.jaxrs.JAXRSServiceImpl

        c = ResourceUtils.createClassResourceInfo(TheBooks.class, TheBooks.class, true, true);
    }
   
    @Test
    public void testAegisWrite() throws Exception {
        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
        s.put("writeXsiType", true);
        AegisDatabinding binding = new AegisDatabinding();
        binding.initialize(s);
        DataBindingProvider p = new DataBindingProvider(binding);
        Book b = new Book("CXF", 127L);
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
View Full Code Here

Examples of org.apache.cxf.jaxrs.JAXRSServiceImpl

        doTestAegisRead(data);
    }
   
    @SuppressWarnings("unchecked")
    public void doTestAegisRead(String data) throws Exception {
        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
        s.put("readXsiType", true);
        AegisDatabinding binding = new AegisDatabinding();
        binding.initialize(s);
        DataBindingProvider p = new DataBindingProvider(binding);
        ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
        Book book = (Book)p.readFrom((Class)Book.class, Book.class,
View Full Code Here

Examples of org.apache.cxf.jaxrs.JAXRSServiceImpl

        assertEquals(127L, book.getId());
    }
   
    @Test
    public void testJAXBWrite() throws Exception {
        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
        DataBinding binding = new JAXBDataBinding();
        binding.initialize(s);
        DataBindingProvider p = new DataBindingProvider(binding);
        Book b = new Book("CXF", 127L);
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
View Full Code Here

Examples of org.apache.cxf.jaxrs.JAXRSServiceImpl

   
    @SuppressWarnings("unchecked")
    @Test
    public void testJAXBRead() throws Exception {
        String data = "<Book><id>127</id><name>CXF</name><state></state></Book>";
        Service s = new JAXRSServiceImpl(Collections.singletonList(c), true);
        DataBinding binding = new JAXBDataBinding();
        binding.initialize(s);
        DataBindingProvider p = new DataBindingProvider(binding);
        ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
        Book book = (Book)p.readFrom((Class)Book.class, Book.class,
View Full Code Here

Examples of org.apache.cxf.jaxrs.JAXRSServiceImpl

        return headers;
    }
   
    public WebClient createWebClient() {
       
        Service service = new JAXRSServiceImpl(getAddress());
        getServiceFactory().setService(service);
       
        try {
            Endpoint ep = createEndpoint();
            WebClient client = new WebClient(getAddress());
View Full Code Here

Examples of org.apache.cxf.jaxrs.JAXRSServiceImpl

   
    private Message mockMessage(String baseAddress, String pathInfo, String query,
                                List<ClassResourceInfo> cris) {
        Message m = new MessageImpl();
        Exchange e = new ExchangeImpl();
        e.put(Service.class, new JAXRSServiceImpl(cris));
       
        m.setExchange(e);
        control.reset();
        ServletDestination d = control.createMock(ServletDestination.class);
        EndpointInfo epr = new EndpointInfo();
View Full Code Here

Examples of org.apache.cxf.jaxrs.JAXRSServiceImpl

        return headers;
    }
   
    public WebClient createWebClient() {
       
        Service service = new JAXRSServiceImpl(getAddress(), getServiceName());
        getServiceFactory().setService(service);
       
        try {
            Endpoint ep = createEndpoint();
            ClientState actualState = getActualState();
View Full Code Here

Examples of org.apache.cxf.jaxrs.JAXRSServiceImpl

   
    private Message mockMessage(String baseAddress, String pathInfo, String query,
                                List<ClassResourceInfo> cris) {
        Message m = new MessageImpl();
        Exchange e = new ExchangeImpl();
        e.put(Service.class, new JAXRSServiceImpl(cris));
       
        m.setExchange(e);
        control.reset();
        ServletDestination d = control.createMock(ServletDestination.class);
        EndpointInfo epr = new EndpointInfo();
View Full Code Here

Examples of org.apache.cxf.jaxrs.JAXRSServiceImpl

   
    private Message mockMessage(String baseAddress, String pathInfo, String query,
                                List<ClassResourceInfo> cris) {
        Message m = new MessageImpl();
        Exchange e = new ExchangeImpl();
        e.put(Service.class, new JAXRSServiceImpl(cris));
       
        m.setExchange(e);
        control.reset();
        ServletDestination d = control.createMock(ServletDestination.class);
        EndpointInfo epr = new EndpointInfo();
View Full Code Here

Examples of org.apache.cxf.jaxrs.JAXRSServiceImpl

     * Creates a WebClient instance
     * @return WebClient instance
     */
    public WebClient createWebClient() {
       
        Service service = new JAXRSServiceImpl(getAddress(), getServiceName());
        getServiceFactory().setService(service);
       
        try {
            Endpoint ep = createEndpoint();
            ClientState actualState = getActualState();
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.