Package javax.xml.soap

Examples of javax.xml.soap.SOAPBodyElement.addChildElement()


            she.setMustUnderstand(false);

            SOAPBodyElement sbe = bdy.addBodyElement(
                    envelope.createName("Body1", NS_PREFIX, NS_URI));

            sbe.addChildElement(envelope.createName(
                    "Child1", NS_PREFIX, NS_URI)).addTextNode("This is Child1");
            sbe.addChildElement(envelope.createName(
                    "Child2", NS_PREFIX, NS_URI)).addTextNode("This is Child2");

View Full Code Here


            SOAPBodyElement sbe = bdy.addBodyElement(
                    envelope.createName("Body1", NS_PREFIX, NS_URI));

            sbe.addChildElement(envelope.createName(
                    "Child1", NS_PREFIX, NS_URI)).addTextNode("This is Child1");
            sbe.addChildElement(envelope.createName(
                    "Child2", NS_PREFIX, NS_URI)).addTextNode("This is Child2");


            URL url1 = new URL("http://localhost:8080/SOAPMessage/attach.xml");
            AttachmentPart ap = msg.createAttachmentPart(new DataHandler(url1));
View Full Code Here

                                           "ns1" );
            QName responseName = new QName( "http://soap.jax.drools.org/",
                                            "return",
                                            "ns1" );
            SOAPBodyElement payload = soapBody.addBodyElement( payloadName );
            SOAPElement response = payload.addChildElement( responseName );
            response.addTextNode( StringUtils.toString( bais ) );

            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            soapMessage.writeTo( baos );
View Full Code Here

                                           "ns1" );
            QName responseName = new QName( "http://soap.jax.drools.org/",
                                            "return",
                                            "ns1" );
            SOAPBodyElement payload = body.addBodyElement( payloadName );
            SOAPElement response = payload.addChildElement( responseName );
            //Bad Hack - Need to remote it and fix it in Camel (if it's a camel problem)
            // response.addTextNode( StringUtils.toString( is ) );
            response.addTextNode( results );
            exchange.getOut().setBody( soapMessage );
        }
View Full Code Here

        SOAPEnvelope envelope = message.getSOAPPart().getEnvelope();
        SOAPBody body = envelope.getBody();
        Name bodyName = envelope.createName("echo");
        SOAPBodyElement bodyElement = body.addBodyElement(bodyName);
        Name name = envelope.createName("arg0");
        SOAPElement symbol = bodyElement.addChildElement(name);
        symbol.addTextNode("Hello");
        URLEndpoint endpoint = new URLEndpoint(AxisGeronimoUtils.getURL("axis/EchoHeaders.jws").toString());
        SOAPMessage response = con.call(message, endpoint);
        String responseEncoding = (String) response.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
        assertEquals(requestEncoding.toLowerCase(), responseEncoding.toLowerCase());
View Full Code Here

                                               "http://www.w3.org/2001/XMLSchema-instance");
        SOAPBodyElement bodyElement = body.addBodyElement(bodyName);

        // Create the MetaData Tag
        Name name = soapFactory.createName("MetaData");
        SOAPElement metaData = bodyElement.addChildElement(name);

        //Create the SKey Tag
        name = soapFactory.createName("SKey");
        SOAPElement sKey = metaData.addChildElement(name);
        sKey.addTextNode("SKEY001");
View Full Code Here

        SOAPElement sKey = metaData.addChildElement(name);
        sKey.addTextNode("SKEY001");

        //Create Object Tag
        name = soapFactory.createName("Object");
        SOAPElement object = bodyElement.addChildElement(name);

        //Create Book ID Tag
        name = soapFactory.createName("BookID");
        SOAPElement bookID = object.addChildElement(name);
        bookID.addTextNode("BookID002");
View Full Code Here

        SOAPElement author = object.addChildElement(name);
        author.addTextNode("Author008");

        //create LanguageID Tag
        name = soapFactory.createName("Format");
        SOAPElement format = bodyElement.addChildElement(name);

        //create LanguageID Tag
        name = soapFactory.createName("Type");
        SOAPElement formatType = format.addChildElement(name);
        formatType.addTextNode("Type009");
View Full Code Here

        SOAPElement formatType = format.addChildElement(name);
        formatType.addTextNode("Type009");

        //create LanguageID Tag
        name = soapFactory.createName("Delivery");
        SOAPElement delivery = bodyElement.addChildElement(name);

        //create LanguageID Tag
        name = soapFactory.createName("Name");
        SOAPElement delName = delivery.addChildElement(name);
        delName.addTextNode("Name010");
View Full Code Here

            soapMessage = msgFactory.createMessage();
            SOAPEnvelope soapEnvelope = soapMessage.getSOAPPart().getEnvelope();
            soapEnvelope.addNamespaceDeclaration("xsi", "http://www.w3.org/2001/XMLSchema-instance");
            Name resName = soapFactory.createName("echoResponse", "ns1", "http://org.jboss.test.ws/jbws1186");
            SOAPBodyElement bodyElement = soapMessage.getSOAPBody().addBodyElement(resName);
            bodyElement.addChildElement("result").setAttribute("xsi:nil", "1");
            ((SOAPMessageContext)msgContext).setMessage(soapMessage);
         }
      }
      catch (Exception ex)
      {
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.