Package javax.xml.soap

Examples of javax.xml.soap.SOAPBody.addBodyElement()


                            Service.Mode.MESSAGE);
       
       
        SOAPMessage msg = MessageFactory.newInstance().createMessage();
        SOAPBody body = msg.getSOAPPart().getEnvelope().getBody();
        body.addBodyElement(new QName("http://cxf.apache.org/swa/types",
                                      "VoidRequest"));
       
        AttachmentPart att = msg.createAttachmentPart(dh1);
        att.setContentId("<attach1=c187f5da-fa5d-4ab9-81db-33c2bb855201@apache.org>");
        msg.addAttachmentPart(att);
View Full Code Here


                                           "executeResponse",
                                           "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

                                           "executeResponse",
                                           "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

        SOAPBody body = soapMessage.getSOAPPart().getEnvelope().getBody();
        QName payloadName = new QName( "http://soap.jax.drools.org",
                                       "execute",
                                       "ns1" );

        body.addBodyElement( payloadName );

        String cmd = "";
        cmd += "<batch-execution lookup=\"ksession1\">\n";
        cmd += "  <insert out-identifier=\"salaboy\" disconnected=\"true\">\n";
        cmd += "      <org.kie.springframework.Person2>\n";
View Full Code Here

        SOAPBody body2 = soapMessage.getSOAPPart().getEnvelope().getBody();
        QName payloadName2 = new QName( "http://soap.jax.drools.org",
                                       "execute",
                                       "ns1" );

        body2.addBodyElement( payloadName2);

        String cmd2 = "";
        cmd2 += "<batch-execution lookup=\"ksession2\">\n";
        cmd2 += "  <insert out-identifier=\"salaboy\" disconnected=\"true\">\n";
        cmd2 += "      <org.kie.springframework.Person3>\n";
View Full Code Here

        SOAPBody body = soapMessage.getSOAPPart().getEnvelope().getBody();
        QName payloadName = new QName( "http://soap.jax.drools.org",
                                       "execute",
                                       "ns1" );

        body.addBodyElement( payloadName );

        String cmd = "";
        cmd += "<batch-execution lookup=\"ksession1\">\n";
        cmd += "  <insert out-identifier=\"salaboy\" disconnected=\"true\">\n";
        cmd += "      <org.kie.pipeline.camel.Person>\n";
View Full Code Here

        String requestEncoding = "UTF-16";
        message.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, requestEncoding);
        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);
View Full Code Here

        SOAPBody body = message.getSOAPBody();

        // Create the base element
        Name bodyName = soapFactory.createName("VBGenReceiver", "xsi",
                                               "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);
View Full Code Here

        myName.addTextNode("Tony");
        Name ns = env.createName("Address",
                                 "shw",
                                 "http://www.jcommerce.net/soap/ns/SOAPHelloWorld");
        SOAPBody body = env.getBody();
        SOAPElement bodyElmnt = body.addBodyElement(ns);
        Name ns1 = env.createName("City",
                                  "shw",
                                  "http://www.jcommerce.net/soap/ns/SOAPHelloWorld");
        SOAPElement city = bodyElmnt.addChildElement(ns1);
        city.addTextNode("GENT");
View Full Code Here

            SOAPEnvelope env = sp.getEnvelope();

            SOAPBody body = env.getBody();

            Name elName = env.createName("GetLastTradePriceResponse", "ztrade", "http://wombat.ztrade.com");
            body.addBodyElement(elName).addChildElement("Price").addTextNode("95.12");

            msg.saveChanges();

            res.setStatus(HttpServletResponse.SC_OK);
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.