Package org.apache.cxf.sdo

Examples of org.apache.cxf.sdo.SDODataBinding


   
    @SuppressWarnings("unchecked")
    @Test
    public void testSDOWrite() throws Exception {
        Service s = new JAXRSServiceImpl(Collections.singletonList(c2), true);
        DataBinding binding = new SDODataBinding();
        binding.initialize(s);
        DataBindingJSONProvider<Structure> p = new DataBindingJSONProvider<Structure>();
        p.setDataBinding(binding);
        p.setNamespaceMap(Collections.singletonMap("http://apache.org/structure/types", "p0"));
        Structure struct = new StructureImpl();
        struct.getTexts().add("text1");
View Full Code Here


    @Test
    public void testSDORead() throws Exception {
        String data = "{\"p0.Structure\":{\"@xsi.type\":\"p0:Structure\",\"p0.text\":\"sdo\",\"p0.int\":3"
            + ",\"p0.dbl\":123.5,\"p0.texts\":\"text1\"}}";
        Service s = new JAXRSServiceImpl(Collections.singletonList(c2), true);
        DataBinding binding = new SDODataBinding();
        binding.initialize(s);
        DataBindingJSONProvider<Structure> p = new DataBindingJSONProvider<Structure>();
        p.setDataBinding(binding);
        p.setNamespaceMap(Collections.singletonMap("http://apache.org/structure/types", "p0"));
        ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
        Structure struct = p.readFrom(Structure.class, Structure.class,
View Full Code Here

TOP

Related Classes of org.apache.cxf.sdo.SDODataBinding

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.