Package org.apache.cxf.jaxrs.utils

Examples of org.apache.cxf.jaxrs.utils.XMLSource


            return new DOMSource(doc);
        } else if (StreamSource.class.isAssignableFrom(source)
                   || Source.class.isAssignableFrom(source)) {
            return new StreamSource(is);
        } else if (XMLSource.class.isAssignableFrom(source)) {
            return new XMLSource(is);
        }
       
        throw new IOException("Unrecognized source");
    }
View Full Code Here


            return new DOMSource(doc);
        } else if (StreamSource.class.isAssignableFrom(source)
                   || Source.class.isAssignableFrom(source)) {
            return new StreamSource(is);
        } else if (XMLSource.class.isAssignableFrom(source)) {
            return new XMLSource(is);
        }
       
        throw new IOException("Unrecognized source");
    }
View Full Code Here

    @Test
    public void testGetBook123XMLSource() throws Exception {
        String baseAddress = "http://localhost:9092/test/services/rest";
        WebClient client = WebClient.create(baseAddress);
        client.path("/bookstore/123").accept(MediaType.APPLICATION_XML_TYPE);
        XMLSource source = client.get(XMLSource.class);
        source.setBuffering(true);
        Book b = source.getNode("/Book", Book.class);
        assertEquals(123L, b.getId());
        assertEquals("CXF in Action", b.getName());
        b = source.getNode("/Book", Book.class);
        assertEquals(123, b.getId());
        assertEquals("CXF in Action", b.getName());
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxrs.utils.XMLSource

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.