Examples of TestSoapElement2


Examples of org.tempuri.soapencoding.TestSoapElement2

            fail();
        }
    }

     private void testSoapElement21(Array array) {
        TestSoapElement2 testSoapElement2 = new TestSoapElement2();
        testSoapElement2.setParam1("test param");
        testSoapElement2.setParam2(array);

        try {
            OMElement omElement = testSoapElement2.getOMElement(
                    TestSoapElement1.MY_QNAME, OMAbstractFactory.getOMFactory());
            String omElementString = omElement.toStringWithConsume();
            System.out.println("OM String ==>" + omElementString);
            XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(
                    new ByteArrayInputStream(omElementString.getBytes()));
            TestSoapElement2 result = TestSoapElement2.Factory.parse(xmlReader);
            assertEquals(result.getParam1(),"test param");
            List resultList = result.getParam2().getObjectList();
            for (int i = 0; i < array.getObjectList().size(); i++) {
                assertEquals(((_double) resultList.get(i)).get_double(),
                        ((_double) array.getObjectList().get(i)).get_double(),0.001);
            }
        } catch (ADBException e) {
View Full Code Here

Examples of org.tempuri.soapencoding.TestSoapElement2

            fail();
        }
    }

    private void testSoapElement22(Array array) {
        TestSoapElement2 testSoapElement2 = new TestSoapElement2();
        testSoapElement2.setParam1("test param");
        testSoapElement2.setParam2(array);

        try {
            OMElement omElement = testSoapElement2.getOMElement(
                    TestSoapElement1.MY_QNAME, OMAbstractFactory.getOMFactory());
            String omElementString = omElement.toStringWithConsume();
            System.out.println("OM String ==>" + omElementString);
            XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(
                    new ByteArrayInputStream(omElementString.getBytes()));
            TestSoapElement2 result = TestSoapElement2.Factory.parse(xmlReader);
            assertEquals(result.getParam1(),"test param");
            List resultList = result.getParam2().getObjectList();
            for (int i = 0; i < array.getObjectList().size(); i++) {
                assertEquals(((org.apache.axis2.databinding.types.xsd._double) resultList.get(i)).get_double(),
                        ((org.apache.axis2.databinding.types.xsd._double) array.getObjectList().get(i)).get_double(),0.001);
            }
        } catch (ADBException e) {
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.