Examples of MyJAXBObject


Examples of org.apache.wink.providers.jackson.internal.jaxb.polymorphic.MyJAXBObject

        assertTrue(JSONUtils.equals(JSONUtils.objectForString(expectedResponseString), JSONUtils
                .objectForString(response.getContentAsString())));
       
        // call the provider as though the wink-client was in use on the client side
        InputStream is = new ByteArrayInputStream(response.getContentAsByteArray());
        MyJAXBObject myJAXBObject = (MyJAXBObject)jacksonProvider.readFrom(Object.class, MyJAXBObject.class, null, MediaType.APPLICATION_JSON_TYPE, null, is);

        // make sure the Jackson deserializer is using the 'type' property on the XmlElement annotation in MyJAXBObject
        // confirm Jackson deserialized to expected object type -- support for this was added in Jackson 1.4
        assertTrue(myJAXBObject.getConfiguration() instanceof MyProperties);
    }
View Full Code Here

Examples of org.apache.wink.providers.jackson.internal.jaxb.polymorphic.MyJAXBObject

       
        // call the provider as though the wink-client was in use on the client side
        InputStream is = new ByteArrayInputStream(response.getContentAsByteArray());
        // use JacksonJaxbJsonProvider with default configuration instead of the old JacksonJsonProvider
        JacksonJaxbJsonProvider jacksonJAXBProvider = new JacksonJaxbJsonProvider();
        MyJAXBObject myJAXBObject = (MyJAXBObject)jacksonJAXBProvider.readFrom(Object.class, MyJAXBObject.class, null, MediaType.APPLICATION_JSON_TYPE, null, is);

        // make sure the Jackson deserializer is using the 'type' property on the XmlElement annotation in MyJAXBObject
        // confirm Jackson deserialized to expected object type -- support for this was added in Jackson 1.4
        assertTrue(myJAXBObject.getConfiguration() instanceof MyProperties);
    }
View Full Code Here

Examples of org.apache.wink.providers.jackson.internal.jaxb.polymorphic.MyJAXBObject

    @Path("/test/myproperties")
    public static class MyJAXBObjectResource {

        @GET
        public MyJAXBObject getMyJAXBObject() throws IOException {
            MyJAXBObject p = new MyJAXBObject();
            MyProperties myProps = new MyProperties();
            myProps.addProperty("I rock?", "Yes, yes I do.");
            p.setConfiguration(myProps);
            return p;
        }
View Full Code Here

Examples of org.apache.wink.providers.jackson.internal.jaxb.polymorphic.MyJAXBObject

        assertTrue(JSONUtils.equals(JSONUtils.objectForString(expectedResponseString), JSONUtils
                .objectForString(response.getContentAsString())));
       
        // call the provider as though the wink-client was in use on the client side
        InputStream is = new ByteArrayInputStream(response.getContentAsByteArray());
        MyJAXBObject myJAXBObject = (MyJAXBObject)winkJacksonProvider.readFrom(Object.class, MyJAXBObject.class, null, MediaType.APPLICATION_JSON_TYPE, null, is);

        // make sure the Jackson deserializer is using the 'type' property on the XmlElement annotation in MyJAXBObject
        // confirm Jackson deserialized to expected object type -- support for this was added in Jackson 1.4
        assertTrue(myJAXBObject.getConfiguration() instanceof MyProperties);
    }
View Full Code Here

Examples of org.apache.wink.providers.jackson.internal.jaxb.polymorphic.MyJAXBObject

       
        // call the provider as though the wink-client was in use on the client side
        InputStream is = new ByteArrayInputStream(response.getContentAsByteArray());
        // use JacksonJaxbJsonProvider with default configuration instead of the old JacksonJsonProvider
        JacksonJaxbJsonProvider jacksonJAXBProvider = new JacksonJaxbJsonProvider();
        MyJAXBObject myJAXBObject = (MyJAXBObject)jacksonJAXBProvider.readFrom(Object.class, MyJAXBObject.class, null, MediaType.APPLICATION_JSON_TYPE, null, is);

        // make sure the Jackson deserializer is using the 'type' property on the XmlElement annotation in MyJAXBObject
        // confirm Jackson deserialized to expected object type -- support for this was added in Jackson 1.4
        assertTrue(myJAXBObject.getConfiguration() instanceof MyProperties);
    }
View Full Code Here

Examples of org.apache.wink.providers.jackson.internal.jaxb.polymorphic.MyJAXBObject

    @Path("/test/myproperties")
    public static class MyJAXBObjectResource {

        @GET
        public MyJAXBObject getMyJAXBObject() throws IOException {
            MyJAXBObject p = new MyJAXBObject();
            MyProperties myProps = new MyProperties();
            myProps.addProperty("I rock?", "Yes, yes I do.");
            p.setConfiguration(myProps);
            return p;
        }
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.