Examples of StructWithAny


Examples of org.apache.type_test.types2.StructWithAny

    @Test
    public void testStructWithAny() throws Exception {
        if (!shouldRunTest("StructWithAny")) {
            return;
        }
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");

        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement x = factory.createElement("hello", "foo", "http://some.url.com");
        x.addNamespaceDeclaration("foo", "http://some.url.com");
        x.addTextNode("This is the text of the node");

        SOAPElement x2 = factory.createElement("hello2", "foo", "http://some.url.com");
        x2.addNamespaceDeclaration("foo", "http://some.url.com");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();

        StructWithAny ret;
        if (testDocLiteral) {
            ret = docClient.testStructWithAny(swa, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testStructWithAny(swa, y, z);
        } else {
View Full Code Here

Examples of org.apache.type_test.types2.StructWithAny

    @Test
    public void testStructWithAnyXsi() throws Exception {
        if (!shouldRunTest("StructWithAnyXsi")) {
            return;
        }
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");
        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory sf = SOAPFactory.newInstance();
        Name elementName = sf.createName("UKAddress", "", "http://apache.org/type_test");
        Name xsiAttrName = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x = sf.createElement(elementName);
        x.addNamespaceDeclaration("tns", "http://apache.org/type_test");
        x.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x.addAttribute(xsiAttrName, "tns:UKAddressType11");
        x.addTextNode("This is the text of the node for the first struct");

        Name elementName2 = sf.createName("UKAddress", "", "http://apache.org/type_test");
        Name xsiAttrName2 = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x2 = sf.createElement(elementName2);
        x2.addNamespaceDeclaration("tns", "http://apache.org/type_test");
        x2.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x2.addAttribute(xsiAttrName2, "tns:UKAddressType22");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();
        StructWithAny ret;
        if (testDocLiteral) {
            ret = docClient.testStructWithAny(swa, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testStructWithAny(swa, y, z);
        } else {
View Full Code Here

Examples of org.apache.type_test.types2.StructWithAny

    @Test
    public void testStructWithInvalidAny() throws Exception {
        if (!shouldRunTest("StructWithInvalidAny")) {
            return;
        }
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");

        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement x = factory.createElement("hello", "foo", "http://some.url.com");
        x.addTextNode("This is the text of the node");

        SOAPElement x2 = factory.createElement("hello2", "foo", "http://some.url.com");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();

        try {
View Full Code Here

Examples of org.apache.type_test.types2.StructWithAny

            }
        }
    }
    @Test
    public void testStructWithAny() throws Exception {
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");

        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement x = factory.createElement("hello", "foo", "http://some.url.com");
        x.addNamespaceDeclaration("foo", "http://some.url.com");
        x.addTextNode("This is the text of the node");

        SOAPElement x2 = factory.createElement("hello2", "foo", "http://some.url.com");
        x2.addNamespaceDeclaration("foo", "http://some.url.com");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();

        StructWithAny ret;
        if (testDocLiteral) {
            ret = docClient.testStructWithAny(swa, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testStructWithAny(swa, y, z);
        } else {
View Full Code Here

Examples of org.apache.type_test.types2.StructWithAny

        }
    }

    @Test
    public void testStructWithAnyXsi() throws Exception {
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");
        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory sf = SOAPFactory.newInstance();
        Name elementName = sf.createName("UKAddress", "", "http://apache.org/type_test");
        Name xsiAttrName = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x = sf.createElement(elementName);
        x.addNamespaceDeclaration("tns", "http://apache.org/type_test");
        x.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x.addAttribute(xsiAttrName, "tns:UKAddressType11");
        x.addTextNode("This is the text of the node for the first struct");

        Name elementName2 = sf.createName("UKAddress", "", "http://apache.org/type_test");
        Name xsiAttrName2 = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x2 = sf.createElement(elementName2);
        x2.addNamespaceDeclaration("tns", "http://apache.org/type_test");
        x2.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x2.addAttribute(xsiAttrName2, "tns:UKAddressType22");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();
        StructWithAny ret;
        if (testDocLiteral) {
            ret = docClient.testStructWithAny(swa, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testStructWithAny(swa, y, z);
        } else {
View Full Code Here

Examples of org.apache.type_test.types2.StructWithAny

    // StructWithInvalidAny
    // XXX - no exception thrown
    @Test
    public void testStructWithInvalidAny() throws Exception {
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");

        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement x = factory.createElement("hello", "foo", "http://some.url.com");
        x.addTextNode("This is the text of the node");

        SOAPElement x2 = factory.createElement("hello2", "foo", "http://some.url.com");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();

        try {
View Full Code Here

Examples of org.apache.type_test.types2.StructWithAny

            }
        }
    }
   
    public void testStructWithAny() throws Exception {
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");

        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement x = factory.createElement("hello", "foo", "http://some.url.com");
        x.addNamespaceDeclaration("foo", "http://some.url.com");
        x.addTextNode("This is the text of the node");

        SOAPElement x2 = factory.createElement("hello2", "foo", "http://some.url.com");
        x2.addNamespaceDeclaration("foo", "http://some.url.com");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();

        StructWithAny ret;
        if (testDocLiteral) {
            ret = docClient.testStructWithAny(swa, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testStructWithAny(swa, y, z);
        } else {
View Full Code Here

Examples of org.apache.type_test.types2.StructWithAny

            assertEqualsStructWithAny(swa, ret);
        }
    }

    public void testStructWithAnyXsi() throws Exception {
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");
        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory sf = SOAPFactory.newInstance();
        Name elementName = sf.createName("UKAddress", "", "http://apache.org/type_test");
        Name xsiAttrName = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x = sf.createElement(elementName);
        x.addNamespaceDeclaration("tns", "http://apache.org/type_test");
        x.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x.addAttribute(xsiAttrName, "tns:UKAddressType11");
        x.addTextNode("This is the text of the node for the first struct");

        Name elementName2 = sf.createName("UKAddress", "", "http://apache.org/type_test");
        Name xsiAttrName2 = sf.createName("type", "xsi", "http://www.w3.org/2001/XMLSchema-instance");
        SOAPElement x2 = sf.createElement(elementName2);
        x2.addNamespaceDeclaration("tns", "http://apache.org/type_test");
        x2.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
        x2.addAttribute(xsiAttrName2, "tns:UKAddressType22");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();
        StructWithAny ret;
        if (testDocLiteral) {
            ret = docClient.testStructWithAny(swa, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testStructWithAny(swa, y, z);
        } else {
View Full Code Here

Examples of org.apache.type_test.types2.StructWithAny

    }

    // StructWithInvalidAny
    // XXX - no exception thrown
    public void testStructWithInvalidAny() throws Exception {
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");

        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement x = factory.createElement("hello", "foo", "http://some.url.com");
        x.addTextNode("This is the text of the node");

        SOAPElement x2 = factory.createElement("hello2", "foo", "http://some.url.com");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();

        try {
View Full Code Here

Examples of org.apache.type_test.types2.StructWithAny

    @Test
    public void testStructWithAny() throws Exception {
        if (!shouldRunTest("StructWithAny")) {
            return;
        }
        StructWithAny swa = new StructWithAny();
        swa.setName("Name");
        swa.setAddress("Some Address");

        StructWithAny yOrig = new StructWithAny();
        yOrig.setName("Name2");
        yOrig.setAddress("Some Other Address");

        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement x = factory.createElement("hello", "foo", "http://some.url.com");
        x.addNamespaceDeclaration("foo", "http://some.url.com");
        x.addTextNode("This is the text of the node");

        SOAPElement x2 = factory.createElement("hello2", "foo", "http://some.url.com");
        x2.addNamespaceDeclaration("foo", "http://some.url.com");
        x2.addTextNode("This is the text of the node for the second struct");

        swa.setAny(x);
        yOrig.setAny(x2);

        Holder<StructWithAny> y = new Holder<StructWithAny>(yOrig);
        Holder<StructWithAny> z = new Holder<StructWithAny>();

        StructWithAny ret;
        if (testDocLiteral) {
            ret = docClient.testStructWithAny(swa, y, z);
        } else if (testXMLBinding) {
            ret = xmlClient.testStructWithAny(swa, y, z);
        } else {
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.