Examples of intiailize()


Examples of org.milyn.javabean.binding.xml.XMLBinding.intiailize()

        test_post_created_Smooks("config4");
    }

    public void test_Person_binding() throws IOException, SAXException {
        XMLBinding xmlBinding = new XMLBinding().add(getClass().getResourceAsStream("config5/person-binding-config.xml"));
        xmlBinding.intiailize();

        Person person = xmlBinding.fromXML("<person name='Max' age='50' />", Person.class);
        String xml = xmlBinding.toXML(person);
        XMLUnit.setIgnoreWhitespace(true);
        XMLAssert.assertXMLEqual("<person name='Max' age='50' />", xml);
View Full Code Here

Examples of org.milyn.javabean.binding.xml.XMLBinding.intiailize()

    private void test_pre_created_Smooks(String config) throws IOException, SAXException {
        String inputXML = StreamUtils.readStreamAsString(getClass().getResourceAsStream(config + "/order.xml"));
        Smooks smooks = new Smooks(getClass().getResourceAsStream(config + "/order-binding-config.xml"));
        XMLBinding xmlBinding = new XMLBinding(smooks);
        xmlBinding.intiailize();

        assertTrue("Should be a binding only config.", ModelSet.get(smooks.getApplicationContext()).isBindingOnlyConfig());

        test(inputXML, xmlBinding);
    }
View Full Code Here

Examples of org.milyn.javabean.binding.xml.XMLBinding.intiailize()

    }

    private void test_post_created_Smooks(String config) throws IOException, SAXException {
        String inputXML = StreamUtils.readStreamAsString(getClass().getResourceAsStream(config + "/order.xml"));
        XMLBinding xmlBinding = new XMLBinding().add(getClass().getResourceAsStream(config + "/order-binding-config.xml"));
        xmlBinding.intiailize();

        test(inputXML, xmlBinding);
    }

    private void test(String inputXML, XMLBinding xmlBinding) throws SAXException, IOException {
View Full Code Here

Examples of org.milyn.javabean.binding.xml.XMLBinding.intiailize()

    public void test() throws IOException, SAXException {
        XMLBinding xmlV1Binding = new XMLBinding().add("v1-binding-config.xml");
        XMLBinding xmlV2Binding = new XMLBinding().add("v2-binding-config.xml");

        xmlV1Binding.intiailize();
        xmlV2Binding.intiailize();

        Order order = xmlV1Binding.fromXML(new StringSource(Main.orderV1XMLMessage), Order.class);

        StringWriter orderWriter = new StringWriter();
        xmlV2Binding.toXML(order, orderWriter);
View Full Code Here

Examples of org.milyn.javabean.binding.xml.XMLBinding.intiailize()

    public static void main(String[] args) throws IOException, SAXException, SmooksException {

        // Create and initilise the XMLBinding instance...
        XMLBinding xmlBinding = new XMLBinding().add("smooks-config.xml");
        xmlBinding.intiailize();

        // Read the order XML into the Order Object model...
        Order order = xmlBinding.fromXML(new StringSource(orderXMLMessage), Order.class);

        // Do something with the order....
View Full Code Here

Examples of org.milyn.javabean.binding.xml.XMLBinding.intiailize()

*/
public class XMLReadWriteTest extends TestCase {

    public void test() throws IOException, SAXException {
        XMLBinding xmlBinding = new XMLBinding().add("smooks-config.xml");
        xmlBinding.intiailize();

        Order order = xmlBinding.fromXML(new StringSource(Main.orderXMLMessage), Order.class);

        assertNotNull(order);
        assertNotNull(order.getHeader());
View Full Code Here

Examples of org.milyn.javabean.binding.xml.XMLBinding.intiailize()

        // Create and initilise the XMLBinding instances for v1 and v2 of the XMLs...
        XMLBinding xmlBindingV1 = new XMLBinding().add("v1-binding-config.xml");
        XMLBinding xmlBindingV2 = new XMLBinding().add("v2-binding-config.xml");
        xmlBindingV1.intiailize();
        xmlBindingV2.intiailize();

        // Read the v1 order XML into the Order Object model...
        Order order = xmlBindingV1.fromXML(new StringSource(orderV1XMLMessage), Order.class);

        // Write the Order object model instance back out to XML using the v2 XMLBinding instance...
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.