Examples of SDODataBinding


Examples of org.apache.cxf.sdo.SDODataBinding

        doTestSDOStructure("http://localhost:" + PORT + "/databinding/sdo2");
    }
   
    private void doTestSDOStructure(String address) throws Exception {
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        bean.setDataBinding(new SDODataBinding());
        bean.setAddress(address);
        bean.setResourceClass(SDOResource.class);
        SDOResource client = bean.create(SDOResource.class);
        Structure struct = client.getStructure();
        assertEquals("sdo", struct.getText());
View Full Code Here

Examples of org.apache.cxf.sdo.SDODataBinding

    }
   
    @Test
    public void testSDOStructureJSON() throws Exception {
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        DataBinding db = new SDODataBinding();
        bean.setDataBinding(db);
        DataBindingJSONProvider<Structure> provider = new DataBindingJSONProvider<Structure>();
        provider.setNamespaceMap(Collections.singletonMap("http://apache.org/structure/types", "p0"));
        provider.setDataBinding(db);
        bean.setProvider(provider);
View Full Code Here

Examples of org.apache.cxf.sdo.SDODataBinding

        doTestSDOStructure("http://localhost:" + PORT + "/databinding/sdo2");
    }
   
    private void doTestSDOStructure(String address) throws Exception {
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        bean.setDataBinding(new SDODataBinding());
        bean.setAddress(address);
        bean.setResourceClass(SDOResource.class);
        SDOResource client = bean.create(SDOResource.class);
        Structure struct = client.getStructure();
        assertEquals("sdo", struct.getText());
View Full Code Here

Examples of org.apache.cxf.sdo.SDODataBinding

    }
   
    @Test
    public void testSDOStructureJSON() throws Exception {
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        DataBinding db = new SDODataBinding();
        bean.setDataBinding(db);
        DataBindingJSONProvider<Structure> provider = new DataBindingJSONProvider<Structure>();
        provider.setNamespaceMap(Collections.singletonMap("http://apache.org/structure/types", "p0"));
        provider.setDataBinding(db);
        bean.setProvider(provider);
View Full Code Here

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);
        DataBindingProvider p = new DataBindingProvider(binding);
        Structure struct = new StructureImpl();
        struct.getTexts().add("text1");
        struct.setText("sdo");
        struct.setInt(3);
View Full Code Here

Examples of org.apache.cxf.sdo.SDODataBinding

            + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" "
            + "xsi:type=\"p0:Structure\">"
            + "<p0:text>sdo</p0:text><p0:int>3</p0:int><p0:dbl>123.5</p0:dbl><p0:texts>text1</p0:texts>"
            + "</p0:Structure>";
        Service s = new JAXRSServiceImpl(Collections.singletonList(c2), true);
        DataBinding binding = new SDODataBinding();
        binding.initialize(s);
        DataBindingProvider p = new DataBindingProvider(binding);
        ByteArrayInputStream is = new ByteArrayInputStream(data.getBytes());
        Structure struct = (Structure)p.readFrom((Class)Structure.class, Structure.class,
                                      new Annotation[0], MediaType.APPLICATION_XML_TYPE,
                                      new MetadataMap<String, String>(), is);
View Full Code Here

Examples of org.apache.cxf.sdo.SDODataBinding

    }
   
    @Test
    public void testSDOStructure() throws Exception {
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        bean.setDataBinding(new SDODataBinding());
        bean.setAddress("http://localhost:" + PORT + "/databinding/sdo");
        bean.setResourceClass(SDOResource.class);
        SDOResource client = bean.create(SDOResource.class);
        Structure struct = client.getStructure();
        assertEquals("sdo", struct.getText());
View Full Code Here

Examples of org.apache.cxf.sdo.SDODataBinding

    }
   
    @Test
    public void testSDOStructureJSON() throws Exception {
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        DataBinding db = new SDODataBinding();
        bean.setDataBinding(db);
        DataBindingJSONProvider<Structure> provider = new DataBindingJSONProvider<Structure>();
        provider.setNamespaceMap(Collections.singletonMap("http://apache.org/structure/types", "p0"));
        provider.setDataBinding(db);
        bean.setProvider(provider);
View Full Code Here

Examples of org.apache.cxf.sdo.SDODataBinding

        doTestSDOStructure("http://localhost:" + PORT + "/databinding/sdo2");
    }
   
    private void doTestSDOStructure(String address) throws Exception {
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        bean.setDataBinding(new SDODataBinding());
        bean.setAddress(address);
        bean.setResourceClass(SDOResource.class);
        SDOResource client = bean.create(SDOResource.class);
        Structure struct = client.getStructure();
        assertEquals("sdo", struct.getText());
View Full Code Here

Examples of org.apache.cxf.sdo.SDODataBinding

    }
   
    @Test
    public void testSDOStructureJSON() throws Exception {
        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
        DataBinding db = new SDODataBinding();
        bean.setDataBinding(db);
        DataBindingJSONProvider<Structure> provider = new DataBindingJSONProvider<Structure>();
        provider.setNamespaceMap(Collections.singletonMap("http://apache.org/structure/types", "p0"));
        provider.setDataBinding(db);
        bean.setProvider(provider);
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.