Package org.tempuri

Examples of org.tempuri.ComplexRestrictionTypeTestElement


    }

    public void testComplexRestrictionType() {

        ComplexRestrictionTypeTestElement complexRestrictionTypeTestElement = new ComplexRestrictionTypeTestElement();
        ParentRestrictionType parentRestrictionType = new ParentRestrictionType();
        complexRestrictionTypeTestElement.setComplexRestrictionTypeTestElement(parentRestrictionType);
        parentRestrictionType.setBaseTypeElement1("test 1");
        parentRestrictionType.setBaseTypeElement2(5);

         try {
            OMElement omElement = complexRestrictionTypeTestElement.getOMElement(ComplexRestrictionTypeTestElement.MY_QNAME, OMAbstractFactory.getOMFactory());
            String omElementString = omElement.toStringWithConsume();
            System.out.println("OM Element ==> " + omElementString);
            XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes()));
            ComplexRestrictionTypeTestElement result = ComplexRestrictionTypeTestElement.Factory.parse(xmlReader);
            assertEquals(result.getComplexRestrictionTypeTestElement().getBaseTypeElement1(), parentRestrictionType.getBaseTypeElement1());
            assertEquals(result.getComplexRestrictionTypeTestElement().getBaseTypeElement2(), parentRestrictionType.getBaseTypeElement2());
        } catch (Exception e) {
            e.printStackTrace();
            assertFalse(true);
        }
View Full Code Here

TOP

Related Classes of org.tempuri.ComplexRestrictionTypeTestElement

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.