Package javax.xml.soap

Examples of javax.xml.soap.SOAPFactory.createElement()


        x.setAddress("Some Address x");
        x.setAny(elem);

        elem = factory.createElement("AnonTypeElementQualified", "tns", "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("tns", "http://apache.org/type_test/types1");
        floatElem = factory.createElement("varFloat", "tns", "http://apache.org/type_test/types1");
        floatElem.addTextNode("12.76");
        elem.addChildElement(floatElem);
        intElem = factory.createElement("varInt", "tns", "http://apache.org/type_test/types1");
        intElem.addTextNode("56");
        elem.addChildElement(intElem);
View Full Code Here


        elem = factory.createElement("AnonTypeElementQualified", "tns", "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("tns", "http://apache.org/type_test/types1");
        floatElem = factory.createElement("varFloat", "tns", "http://apache.org/type_test/types1");
        floatElem.addTextNode("12.76");
        elem.addChildElement(floatElem);
        intElem = factory.createElement("varInt", "tns", "http://apache.org/type_test/types1");
        intElem.addTextNode("56");
        elem.addChildElement(intElem);
        stringElem = factory.createElement("varString", "tns", "http://apache.org/type_test/types1");
        stringElem.addTextNode("test string");
        elem.addChildElement(stringElem);
View Full Code Here

        floatElem.addTextNode("12.76");
        elem.addChildElement(floatElem);
        intElem = factory.createElement("varInt", "tns", "http://apache.org/type_test/types1");
        intElem.addTextNode("56");
        elem.addChildElement(intElem);
        stringElem = factory.createElement("varString", "tns", "http://apache.org/type_test/types1");
        stringElem.addTextNode("test string");
        elem.addChildElement(stringElem);

        StructWithAnyStrict yOrig = new StructWithAnyStrict();
        yOrig.setName("Name y");
View Full Code Here

    }

    @Test
    public void testStructWithAnyArrayLax() throws Exception {
        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement elem = factory.createElement("StringElementQualified", "tns",
                "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("tns", "http://apache.org/type_test/types1");
        elem.addTextNode("This is the text of the node");

        StructWithAnyArrayLax x = new StructWithAnyArrayLax();
View Full Code Here

        StructWithAnyArrayLax x = new StructWithAnyArrayLax();
        x.setName("Name x");
        x.setAddress("Some Address x");
        x.getAny().add(elem);

        elem = factory.createElement("StringElementQualified", "tns", "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("tns", "http://apache.org/type_test/types1");
        elem.addTextNode("This is the text of the node for the second struct");

        StructWithAnyArrayLax yOrig = new StructWithAnyArrayLax();
        yOrig.setName("Name y");
View Full Code Here

    }

    @Test
    public void testStructWithAnyArrayLaxComplex() throws Exception {
        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement elem = factory.createElement("AnonTypeElementQualified", "tns",
                "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("tns", "http://apache.org/type_test/types1");
        SOAPElement floatElem = factory
                .createElement("varFloat", "tns", "http://apache.org/type_test/types1");
        floatElem.addTextNode("12.76");
View Full Code Here

    public void testStructWithAnyArrayLaxComplex() throws Exception {
        SOAPFactory factory = SOAPFactory.newInstance();
        SOAPElement elem = factory.createElement("AnonTypeElementQualified", "tns",
                "http://apache.org/type_test/types1");
        elem.addNamespaceDeclaration("tns", "http://apache.org/type_test/types1");
        SOAPElement floatElem = factory
                .createElement("varFloat", "tns", "http://apache.org/type_test/types1");
        floatElem.addTextNode("12.76");
        elem.addChildElement(floatElem);
        SOAPElement intElem = factory.createElement("varInt", "tns", "http://apache.org/type_test/types1");
        intElem.addTextNode("56");
View Full Code Here

        elem.addNamespaceDeclaration("tns", "http://apache.org/type_test/types1");
        SOAPElement floatElem = factory
                .createElement("varFloat", "tns", "http://apache.org/type_test/types1");
        floatElem.addTextNode("12.76");
        elem.addChildElement(floatElem);
        SOAPElement intElem = factory.createElement("varInt", "tns", "http://apache.org/type_test/types1");
        intElem.addTextNode("56");
        elem.addChildElement(intElem);
        SOAPElement stringElem = factory.createElement("varString", "tns",
                "http://apache.org/type_test/types1");
        stringElem.addTextNode("test string");
View Full Code Here

        floatElem.addTextNode("12.76");
        elem.addChildElement(floatElem);
        SOAPElement intElem = factory.createElement("varInt", "tns", "http://apache.org/type_test/types1");
        intElem.addTextNode("56");
        elem.addChildElement(intElem);
        SOAPElement stringElem = factory.createElement("varString", "tns",
                "http://apache.org/type_test/types1");
        stringElem.addTextNode("test string");
        elem.addChildElement(stringElem);

        StructWithAnyArrayLax x = new StructWithAnyArrayLax();
View Full Code Here

        MessageFactory msgFac = MessageFactory.newInstance();
        SOAPConnectionFactory conFac = SOAPConnectionFactory.newInstance();
        SOAPMessage msg = msgFac.createMessage();
       
        QName sayHi = new QName("http://apache.org/hello_world_rpclit", "sayHiWAttach");
        msg.getSOAPBody().addChildElement(soapFac.createElement(sayHi));
        AttachmentPart ap1 = msg.createAttachmentPart();
        ap1.setContent("Attachment content", "text/plain");
        msg.addAttachmentPart(ap1);
        AttachmentPart ap2 = msg.createAttachmentPart();
        ap2.setContent("Attachment content - Part 2", "text/plain");
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.