Examples of RESTBinding


Examples of org.apache.tuscany.sca.binding.rest.RESTBinding

     */
    @Test
    public void testResponseWireFormat() throws Exception {
        XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(BINDING_WITH_RESPONSE_WIRE_FORMAT));

        RESTBinding binding = (RESTBinding)staxProcessor.read(reader, context);
        Assert.assertNotNull(binding);

        WireFormat responseWireFormat = binding.getResponseWireFormat();
        Assert.assertEquals(JSONWireFormat.class, responseWireFormat.getClass().getInterfaces()[0]);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.binding.rest.RESTBinding

    @Test
    public void testWriteWireFormat() throws Exception {
        XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(BINDING_WITH_WIRE_FORMAT));

        RESTBinding binding = (RESTBinding)staxProcessor.read(reader, context);
        Assert.assertNotNull(binding);
        reader.close();

        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        staxProcessor.write(binding, bos, context);
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.