Package org.tempuri

Examples of org.tempuri.Address


        person.setName("amila");
        person.setAge(23);
        person.setHairColor(HairColor_type1.black);
        Date date = new Date();
        person.setBirthDate(date);
        Address address = new Address();
        person.setAddress(address);
        address.setCity("Galle");
        address.setLine1("line1");
        address.setLine2("line2");
        address.setState("state");
        Zip_type1 ziptype = new Zip_type1();
        address.setZip(ziptype);
        ziptype.setZip_type0("C");

        try {
            OMElement omElement = personElement.getOMElement(ComplexRestrictionTypeTestElement.MY_QNAME, OMAbstractFactory.getOMFactory());
            String omElementString = omElement.toStringWithConsume();
            System.out.println("OM Element ==> " + omElementString);
            XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes()));
            PersonElement result = PersonElement.Factory.parse(xmlReader);
            assertEquals(result.getPersonElement().getName(),"amila");
            assertEquals(result.getPersonElement().getAge(),23);
            assertEquals(result.getPersonElement().getHairColor(),HairColor_type1.black);
            Address resultAddress = result.getPersonElement().getAddress();
            assertEquals(resultAddress.getCity(),"Galle");
            assertEquals(resultAddress.getLine1(),"line1");
            assertEquals(resultAddress.getLine2(),"line2");
            assertEquals(resultAddress.getState(),"state");
            assertEquals(resultAddress.getZip().getZip_type0(),"C");
        } catch (Exception e) {
            e.printStackTrace();
            assertFalse(true);
        }
View Full Code Here

TOP

Related Classes of org.tempuri.Address

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.